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

Public Member Functions

 DocumentRegistersGrid ()
 
 DocumentRegistersGrid (Document document)
 
Document getDocument ()
 
void setDocument (Document document)
 
void setDescendants (Collection< DocumentRelation > descendants)
 
void updateDocument (Document document, Collection< DocumentRelation > descendants)
 
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, RegisterWrapper value)
 
boolean deleteRow (Row row)
 
boolean isValid (RegisterWrapper v)
 
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 createEditor (EditableCell editableCell)
 
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 DocumentRegistersGrid.java.

Constructor & Destructor Documentation

◆ DocumentRegistersGrid() [1/2]

org.turro.financials.document.DocumentRegistersGrid.DocumentRegistersGrid ( )

Definition at line 47 of file DocumentRegistersGrid.java.

47  {
48  super();
49  }

◆ DocumentRegistersGrid() [2/2]

org.turro.financials.document.DocumentRegistersGrid.DocumentRegistersGrid ( Document  document)

Definition at line 51 of file DocumentRegistersGrid.java.

51  {
52  super();
53  setDocument(document);
54  }
Here is the call graph for this function:

Member Function Documentation

◆ afterCompose()

void org.turro.financials.document.DocumentRegistersGrid.afterCompose ( )

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

Definition at line 131 of file DocumentRegistersGrid.java.

131  {
132  setReadOnly(true);
133  if(document != null && document.getDocumentDefinition() != null) {
134  try {
135  addColumns();
136  } catch (ClassNotFoundException ex) {
137  Logger.getLogger(DocumentRegistersGrid.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
138  }
139  }
140  super.afterCompose();
141  }
DocumentDefinition getDocumentDefinition()
Definition: Document.java:167
void setReadOnly(boolean readOnly)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteRow()

boolean org.turro.financials.document.DocumentRegistersGrid.deleteRow ( Row  row)
protected

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

Definition at line 104 of file DocumentRegistersGrid.java.

104  {
105  throw new UnsupportedOperationException("Not supported yet.");
106  }

◆ formatCell()

String org.turro.financials.document.DocumentRegistersGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 114 of file DocumentRegistersGrid.java.

114  {
115  if(editableCell.getCellIndex() == 1) {
116  if(value instanceof Long) {
117  if(((Long) value) == 0) {
118  return "<auto>";
119  }
120  }
121  } else if(editableCell.getCellIndex() == 3) {
122  if(value instanceof RegisterView) {
123  return ((RegisterView) value).getName();
124  }
125  return "";
126  }
127  return super.formatCell(editableCell, value);
128  }
Here is the call graph for this function:

◆ getDocument()

Document org.turro.financials.document.DocumentRegistersGrid.getDocument ( )

Definition at line 56 of file DocumentRegistersGrid.java.

56  {
57  return document;
58  }

◆ initiateRow()

void org.turro.financials.document.DocumentRegistersGrid.initiateRow ( Row  row,
RegisterWrapper  value 
)
protected

Definition at line 98 of file DocumentRegistersGrid.java.

98  {
99  row.setValue(value);
100  addDetail(row);
101  }

◆ isValid()

boolean org.turro.financials.document.DocumentRegistersGrid.isValid ( RegisterWrapper  v)
protected

Definition at line 109 of file DocumentRegistersGrid.java.

109  {
110  return true;
111  }

◆ setDescendants()

void org.turro.financials.document.DocumentRegistersGrid.setDescendants ( Collection< DocumentRelation descendants)

Definition at line 64 of file DocumentRegistersGrid.java.

64  {
65  if(descendants == null) return;
66  if(getCollection() == null) {
67  setCollection(new HashSet<RegisterWrapper>());
68  }
69  for(DocumentRelation dr : descendants) {
70  if(!dr.isEmpty()) {
71  dr.getDescendant().setForcedView(document.getForcedView());
72  getCollection().addAll(new DocumentWrapper(dr.getDescendant()).getRegisters());
73  }
74  }
75  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDocument()

void org.turro.financials.document.DocumentRegistersGrid.setDocument ( Document  document)

Definition at line 60 of file DocumentRegistersGrid.java.

60  {
61  this.document = document;
62  }
Here is the caller graph for this function:

◆ updateDocument()

void org.turro.financials.document.DocumentRegistersGrid.updateDocument ( Document  document,
Collection< DocumentRelation descendants 
)

Definition at line 77 of file DocumentRegistersGrid.java.

77  {
78  clearRows();
79  clearColumns();
80  if(getCollection() != null) {
81  setCollection(null);
82  }
83  setDocument(document);
84  if(getCollection() == null) {
85  setCollection(new HashSet<RegisterWrapper>());
86  }
87  if(document != null && document.getContract() != null) {
88  getCollection().addAll(new DocumentWrapper(document).getRegisters());
89  }
90  setDescendants(descendants);
91  for(DocumentRelation dr : descendants) {
92  dr.getDescendant().setForcedView(document.getForcedView());
93  }
94  afterCompose();
95  }
void setDescendants(Collection< DocumentRelation > descendants)
Here is the call graph for this function:

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