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

Public Member Functions

 StatementGrid ()
 
void refreshRows ()
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
 CollectionGrid ()
 
 CollectionGrid (Collection< V > collection)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
void updateCollection (Collection< V > collection)
 
Row getDependingRow ()
 
void setDependingRow (Row dependingRow)
 
void clearTable ()
 
void deleteSelectedRow (Row row)
 
- Public Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
 EditableGrid ()
 
boolean isAllowDeletions ()
 
void setAllowDeletions (boolean allowDeletions)
 
boolean isAllowInsertions ()
 
void setAllowInsertions (boolean allowInsertions)
 
EditableCell getCurrentCell ()
 
Row getLastRow ()
 
boolean isReadOnly ()
 
void setReadOnly (boolean readOnly)
 
boolean isSelectInput ()
 
void setSelectInput (boolean selectInput)
 
boolean isShowZeros ()
 
void setShowZeros (boolean showZeros)
 
void clearFoot ()
 
void clearRows ()
 
void clearValidRows ()
 
void clearColumns ()
 
List< V > getValues ()
 
List< V > getAllValues ()
 
EventListener getEditListener ()
 
EventListener getNextListener ()
 
EventListener getKeyListener ()
 
EventListener getBlurListener ()
 
EventListener getCancelListener ()
 
void processEdition (EditableCell editableCell)
 
void cancelEdition ()
 
HtmlBasedComponent getEditor (EditableCell editableCell)
 
Row appendValue ()
 
Row addNewRow ()
 
void insertInSelectedRow (Row row)
 
Column getEditableColumn (int cellIndex)
 
void updateRow (Row row)
 
void updateRows ()
 
EditableColumn addColumn (String label, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String label, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
EditableColumn addColumn (String image, String tooltip, Class javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly)
 
EditableColumn addColumn (String image, String tooltip, String javaClass, String property, String format, int scale, boolean onlyDate, boolean readOnly) throws ClassNotFoundException
 
- 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 clearEmptyGroups ()
 
Columns getColumns (boolean create)
 
Rows getRows (boolean create)
 
Foot getFoot (boolean create)
 
Foot createFoot ()
 
void exportToPdf ()
 

Protected Member Functions

void initiateRow (Row row, StatementEntry value)
 
boolean deleteRow (Row row)
 
boolean isValid (StatementEntry v)
 
HtmlBasedComponent createRenderer (EditableCell editableCell)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
void cellChanged (EditableCell editableCell, Object value)
 
void rowChanged (Row row)
 
boolean filterValue (V v)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.EditableGrid< V >
Object getCellValue (EditableCell editableCell)
 
Object getEditorValue (EditableCell editableCell)
 
void setCellValue (EditableCell editableCell, Object value)
 
String formatCell (EditableCell editableCell, Object value)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
boolean isCellValid (EditableCell editableCell, Object value)
 
boolean canDeleteRow (Row row)
 
boolean canEditRow (Row row)
 
abstract void initiateRow (Row row, V value)
 
abstract boolean isValid (V v)
 

Additional Inherited Members

- Public Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditEventListener editListener
 
NextEventListener nextListener
 
KeyEventListener keyListener
 
CancelEventListener cancelListener
 
BlurEventListener blurListener
 
boolean allowInsertions
 
- Protected Attributes inherited from org.turro.zkoss.grid.CollectionGrid< V >
Row dependingRow
 
- Protected Attributes inherited from org.turro.zkoss.grid.EditableGrid< V >
EditableCell currentCell
 
String ctrlKeys
 
Row lastRow
 

Detailed Description

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

Definition at line 48 of file StatementGrid.java.

Constructor & Destructor Documentation

◆ StatementGrid()

org.turro.financials.register.StatementGrid.StatementGrid ( )

Definition at line 50 of file StatementGrid.java.

50  {
51  super();
52  try {
53  setReadOnly(true);
54  addColumns();
55  } catch (ClassNotFoundException ex) {
56  Logger.getLogger(StatementGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
57  }
58  }
void setReadOnly(boolean readOnly)
Here is the call graph for this function:

Member Function Documentation

◆ afterCompose()

void org.turro.financials.register.StatementGrid.afterCompose ( )

Reimplemented from org.turro.zkoss.grid.CollectionGrid< V >.

Definition at line 67 of file StatementGrid.java.

67  {
68  super.afterCompose();
69  double debit = 0.0, credit = 0.0;
70  if(getCollection() != null) {
71  for(StatementEntry se : getCollection()) {
72  if(!(se instanceof BankEntry)) {
73  debit += se.getDebit();
74  credit += se.getCredit();
75  }
76  }
77  Foot foot = createFoot();
78  Footer footer = new Footer("");
79  footer.setSpan(4);
80  foot.appendChild(footer);
81  footer = new Footer();
82  footer.setAlign("right");
83  footer.appendChild(LabelTypes.getCaptionLabel(DecimalFormats.format(debit, "#,##0.00")));
84  foot.appendChild(footer);
85  footer = new Footer();
86  footer.setAlign("right");
87  footer.appendChild(LabelTypes.getCaptionLabel(DecimalFormats.format(credit, "#,##0.00")));
88  foot.appendChild(footer);
89  footer = new Footer();
90  footer.setAlign("right");
91  footer.appendChild(LabelTypes.getCaptionLabel(DecimalFormats.format(debit-credit, "#,##0.00")));
92  foot.appendChild(footer);
93  footer = new Footer("");
94  foot.appendChild(footer);
95  }
96  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createRenderer()

HtmlBasedComponent org.turro.financials.register.StatementGrid.createRenderer ( EditableCell  editableCell)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 117 of file StatementGrid.java.

117  {
118  if(editableCell.getCellIndex() == 3) {
119  final StatementEntry se = (StatementEntry) editableCell.getRow().getValue();
120  if(!(se instanceof BankEntry)) {
121  return CommandUtil.getAdapterOrSpace(
122  se.getDocument() == null ? se.getRegister() : se.getDocument())
123  .setLabel(se.getDescription());
124  } else {
125  return new BankLabel(se);
126  }
127  } if(editableCell.getCellIndex() == 7) {
128  final StatementEntry se = (StatementEntry) editableCell.getRow().getValue();
129  if(!(se instanceof BankEntry)) {
130  final Checkbox cb = (Checkbox) super.createRenderer(editableCell);
131  cb.addEventListener(Events.ON_CHECK, new EventListener() {
132  @Override
133  public void onEvent(Event event) throws Exception {
134  se.setConciliated(cb.isChecked());
135  }
136  });
137  return cb;
138  } else {
139  return new Space();
140  }
141  }
142  return super.createRenderer(editableCell);
143  }
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.financials.register.StatementGrid.deleteRow ( Row  row)
protected

Reimplemented from org.turro.zkoss.grid.EditableGrid< V >.

Definition at line 107 of file StatementGrid.java.

107  {
108  return false;
109  }

◆ initiateRow()

void org.turro.financials.register.StatementGrid.initiateRow ( Row  row,
StatementEntry  value 
)
protected

Definition at line 99 of file StatementGrid.java.

99  {
100  row.setValue(value);
101  if(value instanceof BankEntry) {
102  row.setSclass("invalid");
103  }
104  }

◆ isValid()

boolean org.turro.financials.register.StatementGrid.isValid ( StatementEntry  v)
protected

Definition at line 112 of file StatementGrid.java.

112  {
113  return true;
114  }

◆ refreshRows()

void org.turro.financials.register.StatementGrid.refreshRows ( )

Definition at line 60 of file StatementGrid.java.

Here is the call graph for this function:

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