18 package org.turro.zkoss.grid;
20 import org.turro.elephant.util.Components;
21 import org.zkoss.zk.ui.Component;
22 import org.zkoss.zk.ui.event.Event;
23 import org.zkoss.zk.ui.event.KeyEvent;
24 import org.zkoss.zul.Row;
37 public void onEvent(Event event)
throws Exception {
38 Component comp =
event.getTarget();
40 KeyEvent kev = (KeyEvent) event;
49 int cellIndex = row.getChildren().indexOf(comp);
50 if(kev.getKeyCode() == KeyEvent.DOWN) {
51 row = (Row) row.getNextSibling();
52 }
else if(kev.getKeyCode() == KeyEvent.UP) {
53 row = (Row) row.getPreviousSibling();
56 comp = (Component) row.getChildren().get(cellIndex);
65 comp = (Component) row.getChildren().get(cellIndex);
68 if(row !=
null && comp !=
null) {
static Components from(Object component)
void processEdition(EditableCell editableCell)
boolean isAllowInsertions()
void deleteSelectedRow(final Row row)
boolean isAllowDeletions()
void insertInSelectedRow(Row row)
void onEvent(Event event)
KeyEventListener(EditableGrid grid)
Rows getRows(boolean create)