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

Public Member Functions

 RelatedContractStoreGrid ()
 
 RelatedContractStoreGrid (Contract contract)
 
Contract getContract ()
 
void setContract (Contract contract)
 
- 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

boolean isValid (RelatedContractStore v)
 
void initiateRow (Row row, RelatedContractStore value)
 
boolean deleteRow (Row row)
 
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 40 of file RelatedContractStoreGrid.java.

Constructor & Destructor Documentation

◆ RelatedContractStoreGrid() [1/2]

org.turro.financials.contract.RelatedContractStoreGrid.RelatedContractStoreGrid ( )

Definition at line 44 of file RelatedContractStoreGrid.java.

44  {
45  super();
46  addColumns();
47  }

◆ RelatedContractStoreGrid() [2/2]

org.turro.financials.contract.RelatedContractStoreGrid.RelatedContractStoreGrid ( Contract  contract)

Definition at line 49 of file RelatedContractStoreGrid.java.

49  {
50  super(contract.getRelatedContractStores());
51  addColumns();
52  }
Set< RelatedContractStore > getRelatedContractStores()
Definition: Contract.java:268
Here is the call graph for this function:

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.financials.contract.RelatedContractStoreGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 88 of file RelatedContractStoreGrid.java.

88  {
89  if(editableCell.getCellIndex() == 0) {
90  Object value = getCellValue(editableCell);
91  DocumentDefinitionListbox rd = new DocumentDefinitionListbox(contract.getContractDefinition());
92  rd.setObjectValue((DocumentDefinition) value);
93  rd.setMold("select");
94  return rd;
95  } else if(editableCell.getCellIndex() == 1) {
96  RelatedContractStore rcs = (RelatedContractStore) editableCell.getRow().getValue();
97  Object value = getCellValue(editableCell);
98  ContractListbox sl = new ContractListbox(new DocumentDefinitionWrapper(
99  rcs.getDocumentDefinition()).getRelatedStores());
100  sl.setObjectValue((Contract) value);
101  sl.setMold("select");
102  return sl;
103  }
104  return super.createEditor(editableCell);
105  }
ContractDefinition getContractDefinition()
Definition: Contract.java:125
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.financials.contract.RelatedContractStoreGrid.deleteRow ( Row  row)
protected

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

Definition at line 80 of file RelatedContractStoreGrid.java.

80  {
81  RelatedContractStore rcs = (RelatedContractStore) row.getValue();
82  EntityCollections.entities(contract.getRelatedContractStores()).remove(rcs);
83  rcs.setContract(null);
84  return true;
85  }
Here is the call graph for this function:

◆ formatCell()

String org.turro.financials.contract.RelatedContractStoreGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 108 of file RelatedContractStoreGrid.java.

108  {
109  if(editableCell.getCellIndex() == 0) {
110  if(value instanceof DocumentDefinition) {
111  return ((DocumentDefinition) value).getName();
112  }
113  return "";
114  } else if(editableCell.getCellIndex() == 1) {
115  if(value instanceof Contract) {
116  return ((Contract) value).getName();
117  }
118  return "";
119  }
120  return super.formatCell(editableCell, value);
121  }
Here is the call graph for this function:

◆ getContract()

Contract org.turro.financials.contract.RelatedContractStoreGrid.getContract ( )

Definition at line 54 of file RelatedContractStoreGrid.java.

54  {
55  return contract;
56  }

◆ initiateRow()

void org.turro.financials.contract.RelatedContractStoreGrid.initiateRow ( Row  row,
RelatedContractStore  value 
)
protected

Definition at line 70 of file RelatedContractStoreGrid.java.

70  {
71  if(value == null) {
72  value = new RelatedContractStore();
73  value.setContract(contract);
74  contract.getRelatedContractStores().add(value);
75  }
76  row.setValue(value);
77  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.financials.contract.RelatedContractStoreGrid.isValid ( RelatedContractStore  v)
protected

Definition at line 64 of file RelatedContractStoreGrid.java.

64  {
65  return v.getStore() != null &&
66  v.getDocumentDefinition() != null;
67  }
Here is the call graph for this function:

◆ setContract()

void org.turro.financials.contract.RelatedContractStoreGrid.setContract ( Contract  contract)

Definition at line 58 of file RelatedContractStoreGrid.java.

58  {
59  this.contract = contract;
61  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:

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