BrightSide Workbench Full Report + Source Code
org.turro.financials.portfolio.PortfolioGrid Class Reference
Inheritance diagram for org.turro.financials.portfolio.PortfolioGrid:
Collaboration diagram for org.turro.financials.portfolio.PortfolioGrid:

Public Member Functions

void setFilterGrid (FilterGrid filterGrid)
 
PortfolioSet getFilter ()
 
void reload ()
 
void process ()
 
void count ()
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.grid.PagingGrid
void setColumns (int columns)
 
void setColumns (String hflexs)
 
void refine ()
 
boolean isDefaultBehavior ()
 
void setDefaultBehavior (boolean defaultBehavior)
 
String getRefineValue ()
 
void setRefineValue (String value)
 
int getMaxResults ()
 
void setMaxResults (int maxResults)
 
String getPagingMold ()
 
void setPagingMold (String pagingMold)
 
int getRowCount ()
 
void setRowCount (int rows)
 
void setHeadersVisible (boolean value)
 
boolean isHeadersVisible ()
 
String getVarColumns ()
 
void setVarColumns (String varColumns)
 
Collection< String > getVarColumnsList (String defaultCols)
 
void addDetailColumn ()
 
void addDetailColumn (HtmlBasedComponent caption)
 
void openDetails ()
 
boolean isEmpty ()
 
void clearColumns ()
 
void clearRows ()
 
void clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 45 of file PortfolioGrid.java.

Member Function Documentation

◆ afterCompose()

void org.turro.financials.portfolio.PortfolioGrid.afterCompose ( )

Definition at line 116 of file PortfolioGrid.java.

116  {
117  dam = new DocumentActionMenu();
118  getParent().appendChild(dam);
119  addColumns();
120  }

◆ count()

void org.turro.financials.portfolio.PortfolioGrid.count ( )

Definition at line 87 of file PortfolioGrid.java.

87  {
88  if(isEmpty()) return;
89  AggregateCountMap acm = new AggregateCountMap();
90  for(Component row : getRows().getChildren()) {
91  PortfolioItem pi = (PortfolioItem) ((Row)row).getValue();
92  if(pi != null) {
93  for(WorkflowItem dw : pi.getForward()) {
94  if(dw.isSelected()) {
95  acm.sum(dw.getWorkflow().getDescendant().getName(), pi.getDocument().getTotalAmount());
96  }
97  }
98  for(WorkflowItem dw : pi.getBackward()) {
99  if(dw.isSelected()) {
100  acm.sum(dw.getWorkflow().getAncestor().getName(), pi.getDocument().getTotalAmount());
101  }
102  }
103  }
104  }
105  StringBuilder sb = new StringBuilder();
106  for(Map.Entry<String, AggregateCountItem> entry : acm.entrySet()) {
107  sb.append(entry.getKey())
108  .append(": ")
109  .append(String.format("%.2f (%d)",entry.getValue().getAmount(), entry.getValue().getCount()))
110  .append("\n");
111  }
112  Clients.showNotification(sb.toString());
113  }
Rows getRows(boolean create)
Here is the call graph for this function:

◆ getFilter()

PortfolioSet org.turro.financials.portfolio.PortfolioGrid.getFilter ( )

Definition at line 55 of file PortfolioGrid.java.

55  {
56  return filter;
57  }
Here is the caller graph for this function:

◆ process()

void org.turro.financials.portfolio.PortfolioGrid.process ( )

Definition at line 66 of file PortfolioGrid.java.

66  {
67  if(isEmpty()) return;
68  PortfolioProcess process = new PortfolioProcess();
69  for(Component row : getRows().getChildren()) {
70  PortfolioItem pi = (PortfolioItem) ((Row)row).getValue();
71  if(pi != null) {
72  for(WorkflowItem dw : pi.getForward()) {
73  if(dw.isSelected()) {
74  process.add(new PortfolioAction(pi.getDocument(), dw.getWorkflow(), true, (Row) row));
75  }
76  }
77  for(WorkflowItem dw : pi.getBackward()) {
78  if(dw.isSelected()) {
79  process.add(new PortfolioAction(pi.getDocument(), dw.getWorkflow(), false, (Row) row));
80  }
81  }
82  }
83  }
84  process.doIt(this);
85  }
Here is the call graph for this function:

◆ reload()

void org.turro.financials.portfolio.PortfolioGrid.reload ( )

Definition at line 59 of file PortfolioGrid.java.

59  {
60  if(getRows() != null) {
61  getRows().detach();
62  }
63  addRows();
64  }
Here is the call graph for this function:

◆ setFilterGrid()

void org.turro.financials.portfolio.PortfolioGrid.setFilterGrid ( FilterGrid  filterGrid)

Definition at line 51 of file PortfolioGrid.java.

51  {
52  this.filterGrid = filterGrid;
53  }

The documentation for this class was generated from the following file: