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

Public Member Functions

 NextEventListener (EditableGrid grid)
 
void onEvent (Event event) throws Exception
 
- Public Member Functions inherited from org.turro.zkoss.grid.EditableEventListener
 EditableEventListener (EditableGrid grid)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.zkoss.grid.EditableEventListener
EditableGrid grid
 

Detailed Description

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

Definition at line 30 of file NextEventListener.java.

Constructor & Destructor Documentation

◆ NextEventListener()

org.turro.zkoss.grid.NextEventListener.NextEventListener ( EditableGrid  grid)

Definition at line 32 of file NextEventListener.java.

32  {
33  super(grid);
34  }

Member Function Documentation

◆ onEvent()

void org.turro.zkoss.grid.NextEventListener.onEvent ( Event  event) throws Exception

Definition at line 37 of file NextEventListener.java.

37  {
38  Component comp = event.getTarget();
39  Row row = Components.from(comp).parent(Row.class);
40  while(row != null) {
41  comp = comp.getNextSibling();
42  if(comp == null) {
43  row = (Row) row.getNextSibling();
44  if(row != null) {
45  comp = (Component) row.getChildren().get(0);
46  }
47  }
48  if(comp == null) {
49  if(grid.isAllowInsertions()) {
50  row = grid.addNewRow();
51  } else {
52  row = (Row) grid.getRows().getFirstChild();
53  }
54  if(row != null) {
55  comp = (Component) row.getChildren().get(0);
56  }
57  }
58  if(row != null && comp != null && !(comp instanceof Detail) ) {
59  EditableCell ec = new EditableCell(grid, row, comp);
60  if(!(ec.getColumn() instanceof EditableColumn && ((EditableColumn) ec.getColumn()).isReadOnly())) {
61  grid.processEdition(ec);
62  break;
63  }
64  }
65  }
66  }
void processEdition(EditableCell editableCell)
Rows getRows(boolean create)
Here is the call graph for this function:

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