BrightSide Workbench Full Report + Source Code
org.turro.polls.PollOptionGrid Class Reference
Inheritance diagram for org.turro.polls.PollOptionGrid:
Collaboration diagram for org.turro.polls.PollOptionGrid:

Public Member Functions

 PollOptionGrid ()
 
void setPoll (Poll poll)
 
- 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, PollOption value)
 
boolean deleteRow (Row row)
 
boolean isValid (PollOption v)
 
String formatCell (EditableCell editableCell, Object value)
 
void setCellValue (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)
 
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 36 of file PollOptionGrid.java.

Constructor & Destructor Documentation

◆ PollOptionGrid()

org.turro.polls.PollOptionGrid.PollOptionGrid ( )

Definition at line 40 of file PollOptionGrid.java.

40  {
41  super();
42  addColumns();
43  }

Member Function Documentation

◆ createEditor()

HtmlBasedComponent org.turro.polls.PollOptionGrid.createEditor ( EditableCell  editableCell)
protected

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

Definition at line 94 of file PollOptionGrid.java.

94  {
95  if(editableCell.getCellIndex() == 0) {
96  Object value = getCellValue(editableCell);
97  HtmlBasedComponent editor = PollControl.getEditor(poll.getOptionClass(), editableCell.isReadOnly(), value);
98  if(editor != null) {
99  return editor;
100  }
101  }
102  return super.createEditor(editableCell);
103  }
Object getCellValue(EditableCell editableCell)
Here is the call graph for this function:

◆ deleteRow()

boolean org.turro.polls.PollOptionGrid.deleteRow ( Row  row)
protected

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

Definition at line 64 of file PollOptionGrid.java.

64  {
65  PollOption po = (PollOption) row.getValue();
66  PollsUtil.removeOption(po);
67  return true;
68  }
Here is the call graph for this function:

◆ formatCell()

String org.turro.polls.PollOptionGrid.formatCell ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 76 of file PollOptionGrid.java.

76  {
77  if(editableCell.getCellIndex() == 0) {
78  String formatted = PollControl.getFormattedString(poll.getOptionClass(), value);
79  if(formatted != null) return formatted;
80  }
81  return super.formatCell(editableCell, value);
82  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initiateRow()

void org.turro.polls.PollOptionGrid.initiateRow ( Row  row,
PollOption  value 
)
protected

Definition at line 55 of file PollOptionGrid.java.

55  {
56  if(value == null && poll != null) {
57  value = new PollOption();
58  value.setIdPoll(poll.getId());
59  }
60  row.setValue(value);
61  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.polls.PollOptionGrid.isValid ( PollOption  v)
protected

Definition at line 71 of file PollOptionGrid.java.

71  {
72  return !v.isEmpty();
73  }
Here is the call graph for this function:

◆ setCellValue()

void org.turro.polls.PollOptionGrid.setCellValue ( EditableCell  editableCell,
Object  value 
)
protected

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

Definition at line 85 of file PollOptionGrid.java.

85  {
86  if(editableCell.getCellIndex() == 0) {
87  super.setCellValue(editableCell, formatCell(editableCell, value));
88  } else {
89  super.setCellValue(editableCell, value);
90  }
91  }
String formatCell(EditableCell editableCell, Object value)
Here is the call graph for this function:

◆ setPoll()

void org.turro.polls.PollOptionGrid.setPoll ( Poll  poll)

Definition at line 45 of file PollOptionGrid.java.

45  {
46  this.poll = poll;
47  if(this.poll != null) {
48  updateCollection(this.poll.getOptions());
49  } else {
50  clearRows();
51  }
52  }
List< PollOption > getOptions()
Definition: Poll.java:226
void updateCollection(Collection< V > collection)
Here is the call graph for this function:

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