BrightSide Workbench Full Report + Source Code
org.turro.erp.sales.CustomerOrderLinesGrid Class Reference
Inheritance diagram for org.turro.erp.sales.CustomerOrderLinesGrid:
Collaboration diagram for org.turro.erp.sales.CustomerOrderLinesGrid:

Public Member Functions

void setCustomerOrder (CustomerOrder customerOrder)
 
CustomerOrder getCustomerOrder ()
 
void setNewValues (CustomerOrder customerOrder)
 
- 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, CustomerOrder value)
 
boolean canDeleteRow (Row row)
 
boolean canEditRow (Row row)
 
boolean deleteRow (Row row)
 
boolean isValid (CustomerOrder v)
 
String formatCell (EditableCell editableCell, Object value)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
- 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)
 
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 44 of file CustomerOrderLinesGrid.java.

Member Function Documentation

◆ canDeleteRow()

boolean org.turro.erp.sales.CustomerOrderLinesGrid.canDeleteRow ( Row  row)
protected

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

Definition at line 74 of file CustomerOrderLinesGrid.java.

74  {
75  CustomerOrder co = (CustomerOrder) row.getValue();
76  return co.getOrderReference() == null;
77  }
Here is the call graph for this function:

◆ canEditRow()

boolean org.turro.erp.sales.CustomerOrderLinesGrid.canEditRow ( Row  row)
protected

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

Definition at line 80 of file CustomerOrderLinesGrid.java.

80  {
81  CustomerOrder co = (CustomerOrder) row.getValue();
82  return co.getOrderReference() == null;
83  }
Here is the call graph for this function:

◆ createEditor()

HtmlBasedComponent org.turro.erp.sales.CustomerOrderLinesGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 113 of file CustomerOrderLinesGrid.java.

113  {
114  if(editableCell.getColumn() instanceof EditableColumn) {
115  EditableColumn ec = (EditableColumn) editableCell.getColumn();
116  if(ec.getJavaClass().equals(Contract.class)) {
117  Object value = getCellValue(editableCell);
118  ServiceStoreListbox sslb = new ServiceStoreListbox();
119  if(value != null) sslb.setObjectValue((Contract) value);
120  sslb.setMold("select");
121  return sslb;
122  } else if(ec.getJavaClass().equals(Product.class)) {
123  Object value = getCellValue(editableCell);
124  ProductCombobox pcb = new ProductCombobox();
125  if(value != null) pcb.setObjectValue((Product) value);
126  return pcb;
127  }
128  }
129  return super.createEditor(editableCell);
130  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.erp.sales.CustomerOrderLinesGrid.deleteRow ( Row  row)
protected

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

Definition at line 86 of file CustomerOrderLinesGrid.java.

86  {
87  CustomerOrder co = (CustomerOrder) row.getValue();
88  if(co.getOrderReference() == null) {
89  new ErpPU().deleteObject(co);
90  return true;
91  }
92  return false;
93  }
Here is the call graph for this function:

◆ formatCell()

String org.turro.erp.sales.CustomerOrderLinesGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 101 of file CustomerOrderLinesGrid.java.

101  {
102  if(value instanceof Contract) {
103  Contract ctc = (Contract) value;
104  return ctc == null ? null : ctc.getPartialDescription();
105  } else if(value instanceof Product) {
106  Product p = (Product) value;
107  return p == null ? null : p.getDescription();
108  }
109  return super.formatCell(editableCell, value);
110  }
Here is the call graph for this function:

◆ getCustomerOrder()

CustomerOrder org.turro.erp.sales.CustomerOrderLinesGrid.getCustomerOrder ( )

Definition at line 54 of file CustomerOrderLinesGrid.java.

54  {
55  return customerOrder;
56  }
Here is the caller graph for this function:

◆ initiateRow()

void org.turro.erp.sales.CustomerOrderLinesGrid.initiateRow ( Row  row,
CustomerOrder  value 
)
protected

Definition at line 63 of file CustomerOrderLinesGrid.java.

63  {
64  if(value == null) {
65  value = new CustomerOrder();
66  value.setCustomerId(customerOrder.getCustomerId());
67  value.setOrderDate(customerOrder.getOrderDate());
68  value.setOrderId(customerOrder.getOrderId());
69  }
70  row.setValue(value);
71  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.erp.sales.CustomerOrderLinesGrid.isValid ( CustomerOrder  v)
protected

Definition at line 96 of file CustomerOrderLinesGrid.java.

96  {
97  return !v.isEmpty();
98  }
Here is the call graph for this function:

◆ setCustomerOrder()

void org.turro.erp.sales.CustomerOrderLinesGrid.setCustomerOrder ( CustomerOrder  customerOrder)

Definition at line 48 of file CustomerOrderLinesGrid.java.

48  {
49  this.customerOrder = customerOrder;
50  setCollection(CustomerOrderWrapper.getLines(customerOrder));
51  addColumns();
52  }
void setCollection(Collection< V > collection)
Here is the call graph for this function:

◆ setNewValues()

void org.turro.erp.sales.CustomerOrderLinesGrid.setNewValues ( CustomerOrder  customerOrder)

Definition at line 58 of file CustomerOrderLinesGrid.java.

58  {
59  this.customerOrder = customerOrder;
60  }

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