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

Public Member Functions

 LineTypeAccountGrid (LineType lineType)
 
- 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)
 
void afterCompose ()
 
- 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, LineTypeAccount value)
 
boolean deleteRow (Row row)
 
boolean isValid (LineTypeAccount v)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
String formatCell (EditableCell editableCell, Object value)
 
- 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)
 
HtmlBasedComponent createRenderer (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 43 of file LineTypeAccountGrid.java.

Constructor & Destructor Documentation

◆ LineTypeAccountGrid()

org.turro.financials.linetype.LineTypeAccountGrid.LineTypeAccountGrid ( LineType  lineType)

Definition at line 45 of file LineTypeAccountGrid.java.

45  {
46  super(lineType.getLineTypeAccounts());
47  addColumns();
48  setDefaultBehavior(false);
49  }
void setDefaultBehavior(boolean defaultBehavior)
Here is the call graph for this function:

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.financials.linetype.LineTypeAccountGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 78 of file LineTypeAccountGrid.java.

78  {
79  if(editableCell.getCellIndex() == 0) {
80  Object value = getCellValue(editableCell);
81  LineTypeAccountTypeListbox ltatl = new LineTypeAccountTypeListbox();
82  ltatl.setMold("select");
83  ltatl.setObjectValue((LineTypeAccountType) value);
84  return ltatl;
85  } if(editableCell.getCellIndex() == 3) {
86  Object value = getCellValue(editableCell);
87  AccountPositionListbox apl = new AccountPositionListbox();
88  apl.setMold("select");
89  apl.setObjectValue((AccountPosition) value);
90  return apl;
91  } if(editableCell.getCellIndex() == 5) {
92  Object value = getCellValue(editableCell);
93  ViewListbox vl = new ViewListbox();
94  vl.setMold("select");
95  vl.setObjectValue((RegisterView) value);
96  return vl;
97  } if(editableCell.getCellIndex() == 6) {
98  Object value = getCellValue(editableCell);
99  OperatingModifierListbox oml = new OperatingModifierListbox();
100  oml.setAllowNull(true);
101  oml.setMold("select");
102  oml.setObjectValue((OperatingModifier) value);
103  return oml;
104  }
105  return super.createEditor(editableCell);
106  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.financials.linetype.LineTypeAccountGrid.deleteRow ( Row  row)
protected

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

Definition at line 64 of file LineTypeAccountGrid.java.

64  {
65  return true;
66  }

◆ formatCell()

String org.turro.financials.linetype.LineTypeAccountGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 109 of file LineTypeAccountGrid.java.

109  {
110  if(editableCell.getCellIndex() == 0) {
111  if(value instanceof LineTypeAccountType) {
112  return I_.byKey(((LineTypeAccountType) value).toString());
113  }
114  return "";
115  } else if(editableCell.getCellIndex() == 3) {
116  if(value instanceof AccountPosition) {
117  return I_.byKey(((AccountPosition) value).toString());
118  }
119  return "";
120  } else if(editableCell.getCellIndex() == 5) {
121  if(value instanceof RegisterView) {
122  return ((RegisterView) value).getName();
123  }
124  return "";
125  } else if(editableCell.getCellIndex() == 6) {
126  if(value instanceof OperatingModifier) {
127  return I_.byKey(((OperatingModifier) value).toString());
128  }
129  return "";
130  }
131  return super.formatCell(editableCell, value);
132  }
Here is the call graph for this function:

◆ initiateRow()

void org.turro.financials.linetype.LineTypeAccountGrid.initiateRow ( Row  row,
LineTypeAccount  value 
)
protected

Definition at line 52 of file LineTypeAccountGrid.java.

52  {
53  if(value == null) {
54  LineType lt = (LineType) getDependingRow().getValue();
55  value = new LineTypeAccount();
56  value.setCoefficient(1);
57  value.setLineType(lt);
58  lt.getLineTypeAccounts().add(value);
59  }
60  row.setValue(value);
61  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.financials.linetype.LineTypeAccountGrid.isValid ( LineTypeAccount  v)
protected

Definition at line 69 of file LineTypeAccountGrid.java.

69  {
70  return !Strings.isBlank(v.getPattern()) &&
71  v.getLineType() != null &&
72  v.getPosition() != null &&
73  v.getType() != null &&
74  v.getView() != null;
75  }
Here is the call graph for this function:

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