BrightSide Workbench Full Report + Source Code
org.turro.zul.fieldit.FieldItGrid Class Reference
Inheritance diagram for org.turro.zul.fieldit.FieldItGrid:
Collaboration diagram for org.turro.zul.fieldit.FieldItGrid:

Public Member Functions

 FieldItGrid ()
 
String getEntityPath ()
 
void setEntityPath (String entityPath)
 
void setEntity (Object entity)
 
- 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, FieldIt value)
 
boolean deleteRow (Row row)
 
boolean isValid (FieldIt v)
 
HtmlBasedComponent createEditor (EditableCell editableCell)
 
Object getEditorValue (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)
 
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 45 of file FieldItGrid.java.

Constructor & Destructor Documentation

◆ FieldItGrid()

org.turro.zul.fieldit.FieldItGrid.FieldItGrid ( )

Definition at line 49 of file FieldItGrid.java.

49  {
50  addColumns();
51  setShowZeros(true);
52  }
void setShowZeros(boolean showZeros)
Here is the call graph for this function:

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.zul.fieldit.FieldItGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 94 of file FieldItGrid.java.

94  {
95  if(editableCell.getCellIndex() == 1) {
96  FieldIt h = editableCell.getRow().getValue();
97  ClassesListbox el = new ClassesListbox();
98  el.setMold("select");
99  el.setObjectValue(h.getJavaClass());
100  return el;
101  } else if(editableCell.getCellIndex() == 7) {
102  FieldIt h = editableCell.getRow().getValue();
103  Radio el = new Radio();
104  el.setImage(Images.getImage("properties"));
105  if(h != null && h.getJavaClass() != null && Reflections.of(h.getJavaClass()).canCast(StringList.class)) {
106  el.addEventListener(Events.ON_CHECK, new EventListener<Event>() {
107  @Override
108  public void onEvent(Event event) throws Exception {
109  if(h.getId() != null) {
110  FileEditor.editFile(StringList.getValueFile(h));
111  }
112  }
113  });
114  } else {
115  el.setDisabled(true);
116  }
117  return el;
118  }
119  return super.createEditor(editableCell);
120  }
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.zul.fieldit.FieldItGrid.deleteRow ( Row  row)
protected

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

Definition at line 80 of file FieldItGrid.java.

80  {
81  FieldIt field = row.getValue();
82  if(field != null) {
83  FieldItUtil.delete(field);
84  }
85  return true;
86  }
Here is the call graph for this function:

◆ formatCell()

String org.turro.zul.fieldit.FieldItGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 132 of file FieldItGrid.java.

132  {
133  if(editableCell.getCellIndex() == 1) {
134  return FieldItUtil.getLabel((Class) value);
135  } else if(editableCell.getCellIndex() == 7) {
136  return "";
137  }
138  return super.formatCell(editableCell, value);
139  }
Here is the call graph for this function:

◆ getEditorValue()

Object org.turro.zul.fieldit.FieldItGrid.getEditorValue ( EditableCell  editableCell)
protected

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

Definition at line 123 of file FieldItGrid.java.

123  {
124  if(editableCell.getCellIndex() == 1) {
125  ClassesListbox rtl = (ClassesListbox) editableCell.getEditor();
126  return rtl.getObjectValue();
127  }
128  return super.getEditorValue(editableCell);
129  }
Here is the call graph for this function:

◆ getEntityPath()

String org.turro.zul.fieldit.FieldItGrid.getEntityPath ( )

Definition at line 54 of file FieldItGrid.java.

54  {
55  return entityPath;
56  }

◆ initiateRow()

void org.turro.zul.fieldit.FieldItGrid.initiateRow ( Row  row,
FieldIt  value 
)
protected

Definition at line 68 of file FieldItGrid.java.

68  {
69  if(value == null) {
70  value = new FieldIt();
71  value.setPath(entityPath);
72  value.setDescription(true);
73  value.setPublishable(true);
74  value.setSearchable(true);
75  }
76  row.setValue(value);
77  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.zul.fieldit.FieldItGrid.isValid ( FieldIt  v)
protected

Definition at line 89 of file FieldItGrid.java.

89  {
90  return v.isValid();
91  }
Here is the call graph for this function:

◆ setEntity()

void org.turro.zul.fieldit.FieldItGrid.setEntity ( Object  entity)

Definition at line 63 of file FieldItGrid.java.

63  {
64  setEntityPath(Entities.getController(entity).getPath());
65  }
void setEntityPath(String entityPath)
Here is the call graph for this function:

◆ setEntityPath()

void org.turro.zul.fieldit.FieldItGrid.setEntityPath ( String  entityPath)

Definition at line 58 of file FieldItGrid.java.

58  {
59  this.entityPath = entityPath;
60  updateCollection(FieldItUtil.fields(entityPath));
61  }
void updateCollection(Collection< V > collection)
Here is the call graph for this function:
Here is the caller graph for this function:

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