BrightSide Workbench Full Report + Source Code
org.turro.zkoss.grid.EditableCell Class Reference
Collaboration diagram for org.turro.zkoss.grid.EditableCell:

Public Member Functions

 EditableCell (EditableGrid grid, Row row, int cellIndex)
 
 EditableCell (EditableGrid grid, Row row, Component renderer)
 
int getCellIndex ()
 
Column getColumn ()
 
Component getRenderer ()
 
Component getEditor ()
 
EditableGrid getGrid ()
 
Row getRow ()
 
String getFormat ()
 
Class getJavaClass ()
 
boolean isOnlyDate ()
 
boolean isOnlyTime ()
 
int getScale ()
 
String getProperty ()
 
boolean isReadOnly ()
 
void edit ()
 
void resume ()
 
boolean isBoolean ()
 
boolean isNumber ()
 
boolean isDate ()
 

Protected Attributes

EditableGrid grid
 
Row row
 
Component renderer
 
HtmlBasedComponent editor
 
Column column
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file EditableCell.java.

Constructor & Destructor Documentation

◆ EditableCell() [1/2]

org.turro.zkoss.grid.EditableCell.EditableCell ( EditableGrid  grid,
Row  row,
int  cellIndex 
)

Definition at line 40 of file EditableCell.java.

40  {
41  this.grid = grid;
42  this.row = row;
43  this.renderer = row.getChildren().size() > cellIndex ?
44  (Component) row.getChildren().get(cellIndex) : null;
45  this.cellIndex = cellIndex;
46  this.column = grid.getEditableColumn(cellIndex);
47  }
Column getEditableColumn(int cellIndex)
Here is the call graph for this function:

◆ EditableCell() [2/2]

org.turro.zkoss.grid.EditableCell.EditableCell ( EditableGrid  grid,
Row  row,
Component  renderer 
)

Definition at line 49 of file EditableCell.java.

49  {
50  this.grid = grid;
51  this.row = row;
52  this.renderer = renderer;
53  this.cellIndex = row.getChildren().indexOf(renderer);
54  this.column = grid.getEditableColumn(cellIndex);
55  }
Here is the call graph for this function:

Member Function Documentation

◆ edit()

void org.turro.zkoss.grid.EditableCell.edit ( )

Definition at line 116 of file EditableCell.java.

116  {
117  editor = grid.getEditor(this);
118  row.getChildren().remove(renderer);
119  row.getChildren().add(cellIndex, editor);
120  if(editor instanceof AfterCompose) {
121  ((AfterCompose) editor).afterCompose();
122  }
123  editor.setHflex("true");
124  editor.setFocus(true);
125  if(grid.isSelectInput() && editor instanceof InputElement) {
126  ((InputElement) editor).select();
127  }
128  }
HtmlBasedComponent getEditor(EditableCell editableCell)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCellIndex()

int org.turro.zkoss.grid.EditableCell.getCellIndex ( )

Definition at line 57 of file EditableCell.java.

57  {
58  return cellIndex;
59  }
Here is the caller graph for this function:

◆ getColumn()

Column org.turro.zkoss.grid.EditableCell.getColumn ( )

Definition at line 61 of file EditableCell.java.

61  {
62  return column;
63  }
Here is the caller graph for this function:

◆ getEditor()

Component org.turro.zkoss.grid.EditableCell.getEditor ( )

Definition at line 69 of file EditableCell.java.

69  {
70  return editor;
71  }
Here is the caller graph for this function:

◆ getFormat()

String org.turro.zkoss.grid.EditableCell.getFormat ( )

Definition at line 81 of file EditableCell.java.

81  {
82  return column instanceof EditableColumn ?
83  ((EditableColumn) column).getFormat() : null;
84  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGrid()

EditableGrid org.turro.zkoss.grid.EditableCell.getGrid ( )

Definition at line 73 of file EditableCell.java.

73  {
74  return grid;
75  }

◆ getJavaClass()

Class org.turro.zkoss.grid.EditableCell.getJavaClass ( )

Definition at line 86 of file EditableCell.java.

86  {
87  return column instanceof EditableColumn ?
88  ((EditableColumn) column).getJavaClass() : null;
89  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProperty()

String org.turro.zkoss.grid.EditableCell.getProperty ( )

Definition at line 106 of file EditableCell.java.

106  {
107  return column instanceof EditableColumn ?
108  ((EditableColumn) column).getProperty() : null;
109  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRenderer()

Component org.turro.zkoss.grid.EditableCell.getRenderer ( )

Definition at line 65 of file EditableCell.java.

65  {
66  return renderer;
67  }
Here is the caller graph for this function:

◆ getRow()

Row org.turro.zkoss.grid.EditableCell.getRow ( )

Definition at line 77 of file EditableCell.java.

77  {
78  return row;
79  }
Here is the caller graph for this function:

◆ getScale()

int org.turro.zkoss.grid.EditableCell.getScale ( )

Definition at line 101 of file EditableCell.java.

101  {
102  return column instanceof EditableColumn ?
103  ((EditableColumn) column).getScale() : 2;
104  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isBoolean()

boolean org.turro.zkoss.grid.EditableCell.isBoolean ( )

Definition at line 137 of file EditableCell.java.

137  {
138  return column instanceof EditableColumn ?
139  ((EditableColumn) column).isBoolean() : false;
140  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isDate()

boolean org.turro.zkoss.grid.EditableCell.isDate ( )

Definition at line 147 of file EditableCell.java.

147  {
148  return column instanceof EditableColumn ?
149  ((EditableColumn) column).isDate() : false;
150  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNumber()

boolean org.turro.zkoss.grid.EditableCell.isNumber ( )

Definition at line 142 of file EditableCell.java.

142  {
143  return column instanceof EditableColumn ?
144  ((EditableColumn) column).isNumber() : false;
145  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOnlyDate()

boolean org.turro.zkoss.grid.EditableCell.isOnlyDate ( )

Definition at line 91 of file EditableCell.java.

91  {
92  return column instanceof EditableColumn ?
93  ((EditableColumn) column).isOnlyDate() : true;
94  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOnlyTime()

boolean org.turro.zkoss.grid.EditableCell.isOnlyTime ( )

Definition at line 96 of file EditableCell.java.

96  {
97  return column instanceof EditableColumn ?
98  ((EditableColumn) column).isOnlyTime() : true;
99  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isReadOnly()

boolean org.turro.zkoss.grid.EditableCell.isReadOnly ( )

Definition at line 111 of file EditableCell.java.

111  {
112  return column instanceof EditableColumn ?
113  ((EditableColumn) column).isReadOnly() : false;
114  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resume()

void org.turro.zkoss.grid.EditableCell.resume ( )

Definition at line 130 of file EditableCell.java.

130  {
131  if(editor != null) {
132  row.getChildren().remove(editor);
133  }
134  row.getChildren().add(cellIndex, renderer);
135  }
Here is the caller graph for this function:

Member Data Documentation

◆ column

Column org.turro.zkoss.grid.EditableCell.column
protected

Definition at line 37 of file EditableCell.java.

◆ editor

HtmlBasedComponent org.turro.zkoss.grid.EditableCell.editor
protected

Definition at line 36 of file EditableCell.java.

◆ grid

EditableGrid org.turro.zkoss.grid.EditableCell.grid
protected

Definition at line 33 of file EditableCell.java.

◆ renderer

Component org.turro.zkoss.grid.EditableCell.renderer
protected

Definition at line 35 of file EditableCell.java.

◆ row

Row org.turro.zkoss.grid.EditableCell.row
protected

Definition at line 34 of file EditableCell.java.


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