|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.widget.grid.DefaultEditorEventHandler<T>
public class DefaultEditorEventHandler<T>
The default handler for Grid editor events. Offers several overridable protected methods for easier customization.
| Field Summary | |
|---|---|
static int |
KEYCODE_BUFFERED_SAVE
|
static int |
KEYCODE_CLOSE
|
static int |
KEYCODE_MOVE_HORIZONTAL
|
static int |
KEYCODE_MOVE_VERTICAL
|
static int |
KEYCODE_OPEN
|
| Constructor Summary | |
|---|---|
DefaultEditorEventHandler()
|
|
| Method Summary | |
|---|---|
protected void |
editRow(Grid.EditorDomEvent<T> event,
int rowIndex,
int colIndex)
|
protected boolean |
handleBufferedMoveEvent(Grid.EditorDomEvent<T> event)
Moves the editor to another column if the received event is a move event. |
protected boolean |
handleCloseEvent(Grid.EditorDomEvent<T> event)
Closes the editor if the received event is a close event. |
boolean |
handleEvent(Grid.EditorDomEvent<T> event)
Handles editor-related events in an appropriate way. |
protected boolean |
handleMoveEvent(Grid.EditorDomEvent<T> event)
Moves the editor to another row or another column if the received event is a move event. |
protected boolean |
handleOpenEvent(Grid.EditorDomEvent<T> event)
Opens the editor on the appropriate row if the received event is an open event. |
protected boolean |
isCloseEvent(Grid.EditorDomEvent<T> event)
Returns whether the given event should close the editor. |
protected boolean |
isOpenEvent(Grid.EditorDomEvent<T> event)
Returns whether the given event should open the editor. |
protected boolean |
isTouchOpenEvent(Grid.EditorDomEvent<T> event)
Returns whether the given event is a touch event that should open the editor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEYCODE_OPEN
public static final int KEYCODE_MOVE_VERTICAL
public static final int KEYCODE_CLOSE
public static final int KEYCODE_MOVE_HORIZONTAL
public static final int KEYCODE_BUFFERED_SAVE
| Constructor Detail |
|---|
public DefaultEditorEventHandler()
| Method Detail |
|---|
protected boolean isTouchOpenEvent(Grid.EditorDomEvent<T> event)
event - the received event
protected boolean isOpenEvent(Grid.EditorDomEvent<T> event)
KEYCODE_OPEN.
event - the received event
protected boolean handleOpenEvent(Grid.EditorDomEvent<T> event)
isOpenEvent.
event - the received event
protected boolean handleMoveEvent(Grid.EditorDomEvent<T> event)
KEYCODE_MOVE_VERTICAL, moves the editor one
row up or down if the shift key is pressed or not, respectively. Keydown
event with keycode KEYCODE_MOVE_HORIZONTAL moves the editor left
or right if shift key is pressed or not, respectively.
event - the received event
protected boolean handleBufferedMoveEvent(Grid.EditorDomEvent<T> event)
KEYCODE_MOVE_HORIZONTAL. This moves the editor left or right if
shift key is pressed or not, respectively.
event - the received event
protected boolean isCloseEvent(Grid.EditorDomEvent<T> event)
KEYCODE_CLOSE.
event - the received event
protected boolean handleCloseEvent(Grid.EditorDomEvent<T> event)
isCloseEvent.
event - the received event
protected void editRow(Grid.EditorDomEvent<T> event,
int rowIndex,
int colIndex)
public boolean handleEvent(Grid.EditorDomEvent<T> event)
Grid.Editor.EventHandler
handleEvent in interface Grid.Editor.EventHandler<T>event - the received event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||