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

Public Member Functions

 MajorAccountGrid ()
 
- Public Member Functions inherited from org.turro.jpa.grid.JpaGrid< V >
 JpaGrid (Dao dao, String query, boolean autoSave)
 
boolean isAutoSave ()
 
void setAutoSave (boolean autoSave)
 
Dao getDao ()
 
void setDao (Dao dao)
 
String getQuery ()
 
void setQuery (String query)
 
void save ()
 
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 clearTable ()
 
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 deleteSelectedRow (final Row row)
 
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, MajorAccount value)
 
boolean isValid (MajorAccount v)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
String formatCell (EditableCell editableCell, Object value)
 
- Protected Member Functions inherited from org.turro.jpa.grid.JpaGrid< V >
void rowChanged (Row row)
 
boolean deleteRow (Row row)
 
- 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)
 
void cellChanged (EditableCell editableCell, Object value)
 
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.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 37 of file MajorAccountGrid.java.

Constructor & Destructor Documentation

◆ MajorAccountGrid()

org.turro.financials.account.MajorAccountGrid.MajorAccountGrid ( )

Definition at line 39 of file MajorAccountGrid.java.

39  {
40  super(new FinancialsPU(),
41  "select major from MajorAccount as major " +
42  "order by major.account", true);
43  addColumns();
44  }

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.financials.account.MajorAccountGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 67 of file MajorAccountGrid.java.

67  {
68  if(editableCell.getCellIndex() == 2) {
69  EnumListbox<MajorAccountType> mat = new EnumListbox<MajorAccountType>(MajorAccountType.values());
70  mat.setMold("select");
71  mat.setObjectValue((MajorAccountType) getCellValue(editableCell));
72  mat.setAllowNull(true);
73  return mat;
74  } else if(editableCell.getCellIndex() == 3) {
75  BookListbox blb = new BookListbox();
76  blb.setMold("select");
77  blb.setObjectValue((BookDefinition) getCellValue(editableCell));
78  blb.setAllowNull(true);
79  return blb;
80  }
81  return super.createEditor(editableCell);
82  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ formatCell()

String org.turro.financials.account.MajorAccountGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 85 of file MajorAccountGrid.java.

85  {
86  if(editableCell.getCellIndex() == 2 && value != null) {
87  return I_.byKey(((MajorAccountType) value).toString());
88  } else if(editableCell.getCellIndex() == 3 && value != null) {
89  return ((BookDefinition) value).getDescription();
90  }
91  return super.formatCell(editableCell, value);
92  }
Here is the call graph for this function:

◆ initiateRow()

void org.turro.financials.account.MajorAccountGrid.initiateRow ( Row  row,
MajorAccount  value 
)
protected

Definition at line 47 of file MajorAccountGrid.java.

47  {
48  if(value == null) value = new MajorAccount();
49  row.setValue(value);
50  //addDetail(row);
51  }

◆ isValid()

boolean org.turro.financials.account.MajorAccountGrid.isValid ( MajorAccount  v)
protected

Definition at line 54 of file MajorAccountGrid.java.

54  {
55  return !Strings.isBlank(v.getAccount()) &&
56  !Strings.isBlank(v.getDescription());
57  }
Here is the call graph for this function:

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