public class DefaultEditorEventHandler<T> extends Object implements Grid.Editor.EventHandler<T>
| Modifier and Type | Field and Description |
|---|---|
static int |
KEYCODE_BUFFERED_SAVE |
static int |
KEYCODE_CLOSE |
static int |
KEYCODE_MOVE_HORIZONTAL |
static int |
KEYCODE_MOVE_VERTICAL |
static int |
KEYCODE_OPEN |
| Constructor and Description |
|---|
DefaultEditorEventHandler() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
protected boolean isTouchOpenEvent(Grid.EditorDomEvent<T> event)
event - the received eventprotected boolean isOpenEvent(Grid.EditorDomEvent<T> event)
KEYCODE_OPEN.event - the received eventprotected boolean handleOpenEvent(Grid.EditorDomEvent<T> event)
isOpenEvent.event - the received eventprotected 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 eventprotected 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 eventprotected boolean isCloseEvent(Grid.EditorDomEvent<T> event)
KEYCODE_CLOSE.event - the received eventprotected boolean handleCloseEvent(Grid.EditorDomEvent<T> event)
isCloseEvent.event - the received eventprotected void editRow(Grid.EditorDomEvent<T> event, int rowIndex, int colIndex)
public boolean handleEvent(Grid.EditorDomEvent<T> event)
Grid.Editor.EventHandlerhandleEvent in interface Grid.Editor.EventHandler<T>event - the received eventCopyright © 2016 Vaadin Ltd. All rights reserved.