com.vaadin.client.widget.grid.events.
Class GridKeyDownEvent
- java.lang.Object
-
- com.google.web.bindery.event.shared.Event<H>
-
- com.google.gwt.event.shared.GwtEvent<H>
-
- com.google.gwt.event.dom.client.DomEvent<H>
-
- com.google.gwt.event.dom.client.KeyEvent<HANDLER>
-
- com.vaadin.client.widgets.Grid.AbstractGridKeyEvent<AbstractGridKeyEventHandler.GridKeyDownHandler>
-
- com.vaadin.client.widget.grid.events.GridKeyDownEvent
-
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasNativeEvent
public class GridKeyDownEvent extends Grid.AbstractGridKeyEvent<AbstractGridKeyEventHandler.GridKeyDownHandler>
Represents native key down event in Grid.
Since:
7.4
Author:
Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.gwt.event.dom.client.DomEvent.Type<AbstractGridKeyEventHandler.GridKeyDownHandler>
TYPE
DOM event type.
-
Constructor Summary
Constructors Constructor Description GridKeyDownEvent()
GridKeyDownEvent(Grid<?> grid, CellReference<?> targetCell)
Deprecated.
This constructor's arguments are no longer used.
-
Method Summary
All Methods Modifier and Type Method Description protected void
doDispatch(AbstractGridKeyEventHandler.GridKeyDownHandler handler, GridConstants.Section section)
The given handler processes the event if the handler type matches the given section.
com.google.gwt.event.dom.client.DomEvent.Type<AbstractGridKeyEventHandler.GridKeyDownHandler>
getAssociatedType()
protected String
getBrowserEventType()
Returns the
BrowserEvents
type that corresponds with this event.int
getNativeKeyCode()
Gets the native key code.
static boolean
isArrow(int keyCode)
Does the key code represent an arrow key?
boolean
isDownArrow()
Is this a key down arrow?
boolean
isLeftArrow()
Is this a left arrow?
boolean
isRightArrow()
Is this a right arrow?
boolean
isUpArrow()
Is this a up arrow?
String
toDebugString()
-
Methods inherited from class com.vaadin.client.widgets.Grid.AbstractGridKeyEvent
dispatch, getFocusedCell, getGrid
-
Methods inherited from class com.google.gwt.event.dom.client.KeyEvent
isAltKeyDown, isAnyModifierKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown
-
Methods inherited from class com.google.gwt.event.dom.client.DomEvent
fireNativeEvent, fireNativeEvent, getNativeEvent, getRelativeElement, preventDefault, setNativeEvent, setRelativeElement, stopPropagation
-
-
-
-
Field Detail
-
TYPE
public static final com.google.gwt.event.dom.client.DomEvent.Type<AbstractGridKeyEventHandler.GridKeyDownHandler> TYPE
DOM event type.
-
-
Constructor Detail
-
GridKeyDownEvent
public GridKeyDownEvent()
Since:
7.7.9
-
GridKeyDownEvent
@Deprecated public GridKeyDownEvent(Grid<?> grid, CellReference<?> targetCell)
Deprecated.This constructor's arguments are no longer used. Use the no-args constructor instead.Parameters:
grid
- the grid the event occurred in, not usedtargetCell
- the cell the event targets, not used
-
-
Method Detail
-
getAssociatedType
public com.google.gwt.event.dom.client.DomEvent.Type<AbstractGridKeyEventHandler.GridKeyDownHandler> getAssociatedType()
Specified by:
getAssociatedType
in classcom.google.gwt.event.dom.client.DomEvent<AbstractGridKeyEventHandler.GridKeyDownHandler>
-
doDispatch
protected void doDispatch(AbstractGridKeyEventHandler.GridKeyDownHandler handler, GridConstants.Section section)
Description copied from class:
Grid.AbstractGridKeyEvent
The given handler processes the event if the handler type matches the given section.
Specified by:
doDispatch
in classGrid.AbstractGridKeyEvent<AbstractGridKeyEventHandler.GridKeyDownHandler>
Parameters:
handler
- handlersection
- the section where the target element is located
-
getBrowserEventType
protected String getBrowserEventType()
Description copied from class:
Grid.AbstractGridKeyEvent
Returns the
BrowserEvents
type that corresponds with this event.Specified by:
getBrowserEventType
in classGrid.AbstractGridKeyEvent<AbstractGridKeyEventHandler.GridKeyDownHandler>
Returns:
the browser event type
-
isArrow
public static boolean isArrow(int keyCode)
Does the key code represent an arrow key?
Parameters:
keyCode
- the key codeReturns:
if it is an arrow key code
-
getNativeKeyCode
public int getNativeKeyCode()
Gets the native key code. These key codes are enumerated in the
KeyCodes
class.Returns:
the key code
-
isDownArrow
public boolean isDownArrow()
Is this a key down arrow?
Returns:
whether this is a down arrow key event
-
isLeftArrow
public boolean isLeftArrow()
Is this a left arrow?
Returns:
whether this is a left arrow key event
-
isRightArrow
public boolean isRightArrow()
Is this a right arrow?
Returns:
whether this is a right arrow key event
-
isUpArrow
public boolean isUpArrow()
Is this a up arrow?
Returns:
whether this is a right arrow key event
-
toDebugString
public String toDebugString()
Overrides:
toDebugString
in classcom.google.web.bindery.event.shared.Event<AbstractGridKeyEventHandler.GridKeyDownHandler>
-
-