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

Public Member Functions

 ProductContractorGrid ()
 
 ProductContractorGrid (Product product)
 
Product getProduct ()
 
void setProduct (Product product)
 
void updateProduct (Product product)
 
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, ProductByContractor value)
 
boolean deleteRow (Row row)
 
boolean isValid (ProductByContractor v)
 
String formatCell (EditableCell editableCell, Object value)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
void cellChanged (EditableCell editableCell, Object value)
 
- Protected Member Functions inherited from org.turro.zkoss.grid.CollectionGrid< V >
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 39 of file ProductContractorGrid.java.

Constructor & Destructor Documentation

◆ ProductContractorGrid() [1/2]

org.turro.financials.product.ProductContractorGrid.ProductContractorGrid ( )

Definition at line 43 of file ProductContractorGrid.java.

43  {
44  super();
45  }

◆ ProductContractorGrid() [2/2]

org.turro.financials.product.ProductContractorGrid.ProductContractorGrid ( Product  product)

Definition at line 47 of file ProductContractorGrid.java.

47  {
48  super();
49  setProduct(product);
50  }
Here is the call graph for this function:

Member Function Documentation

◆ afterCompose()

void org.turro.financials.product.ProductContractorGrid.afterCompose ( )

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

Definition at line 68 of file ProductContractorGrid.java.

68  {
69  addColumns();
70  super.afterCompose();
71  }
Here is the caller graph for this function:

◆ cellChanged()

void org.turro.financials.product.ProductContractorGrid.cellChanged ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 118 of file ProductContractorGrid.java.

118  {
119  super.cellChanged(editableCell, value);
120  updateRow(editableCell.getRow());
121  }
Here is the call graph for this function:

◆ createEditor()

HtmlBasedComponent org.turro.financials.product.ProductContractorGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 104 of file ProductContractorGrid.java.

104  {
105  if(editableCell.getColumn() instanceof EditableColumn) {
106  EditableColumn ec = (EditableColumn) editableCell.getColumn();
107  if(ec.getJavaClass().equals(Contract.class)) {
108  Object value = getCellValue(editableCell);
109  ContractCombobox cc = new ContractCombobox();
110  if(value != null) cc.setObjectValue((Contract) value);
111  return cc;
112  }
113  }
114  return super.createEditor(editableCell);
115  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.financials.product.ProductContractorGrid.deleteRow ( Row  row)
protected

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

Definition at line 84 of file ProductContractorGrid.java.

84  {
85  product.getProductByContractors().remove((ProductByContractor) row.getValue());
86  return true;
87  }
Set< ProductByContractor > getProductByContractors()
Definition: Product.java:92
Here is the call graph for this function:

◆ formatCell()

String org.turro.financials.product.ProductContractorGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 95 of file ProductContractorGrid.java.

95  {
96  if(value instanceof Contract) {
97  Contract c = ((Contract) value);
98  return c.getName();
99  }
100  return super.formatCell(editableCell, value);
101  }
Here is the call graph for this function:

◆ getProduct()

Product org.turro.financials.product.ProductContractorGrid.getProduct ( )

Definition at line 52 of file ProductContractorGrid.java.

52  {
53  return product;
54  }

◆ initiateRow()

void org.turro.financials.product.ProductContractorGrid.initiateRow ( Row  row,
ProductByContractor  value 
)
protected

Definition at line 74 of file ProductContractorGrid.java.

74  {
75  if(value == null) {
76  value = new ProductByContractor();
77  value.setProduct(product);
78  product.getProductByContractors().add(value);
79  }
80  row.setValue(value);
81  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.financials.product.ProductContractorGrid.isValid ( ProductByContractor  v)
protected

Definition at line 90 of file ProductContractorGrid.java.

90  {
91  return v.getContract() != null && !Strings.isEmpty(v.getContractorCode());
92  }
Here is the call graph for this function:

◆ setProduct()

void org.turro.financials.product.ProductContractorGrid.setProduct ( Product  product)

Definition at line 56 of file ProductContractorGrid.java.

56  {
57  this.product = product;
59  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateProduct()

void org.turro.financials.product.ProductContractorGrid.updateProduct ( Product  product)

Definition at line 61 of file ProductContractorGrid.java.

Here is the call graph for this function:

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