public class KeyNav extends Object
Constructor and Description |
---|
KeyNav()
Creates a new KeyNav without a target widget.
|
KeyNav(Widget target)
Creates a new key nav for the specified target.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(Widget target)
Binds the key nav to the widget.
|
boolean |
getCancelBubble()
Returns the cancel bubble state.
|
Widget |
getComponent()
Returns the target widget.
|
static int |
getKeyEvent()
Returns the key event type which varies by browser.
|
boolean |
getPreventDefault()
Returns true if the default event action is being cancelled.
|
void |
handleEvent(NativeEvent event) |
void |
onAlt(NativeEvent evt) |
void |
onBackspace(NativeEvent evt) |
void |
onControl(NativeEvent evt) |
void |
onDelete(NativeEvent evt) |
void |
onDown(NativeEvent evt) |
void |
onEnd(NativeEvent evt) |
void |
onEnter(NativeEvent evt) |
void |
onEsc(NativeEvent evt) |
void |
onHome(NativeEvent evt) |
void |
onKeyPress(NativeEvent evt) |
void |
onLeft(NativeEvent evt) |
void |
onPageDown(NativeEvent evt) |
void |
onPageUp(NativeEvent evt) |
void |
onRight(NativeEvent evt) |
void |
onShift(NativeEvent evt) |
void |
onTab(NativeEvent evt) |
void |
onUp(NativeEvent evt) |
void |
setCancelBubble(boolean cancelBubble)
True to stop event bubbling when the key nav intercepts a key (defaults to
false).
|
void |
setPreventDefault(boolean preventDefault)
True to prevent the default action of the key event when the key nav
intercepts a key (defaults to false).
|
public KeyNav()
handleEvent(NativeEvent)
method.public KeyNav(Widget target)
target
- the target widgetpublic static int getKeyEvent()
public void bind(Widget target)
target
- the target widgetpublic boolean getCancelBubble()
public Widget getComponent()
public boolean getPreventDefault()
public void handleEvent(NativeEvent event)
public void onAlt(NativeEvent evt)
public void onBackspace(NativeEvent evt)
public void onControl(NativeEvent evt)
public void onDelete(NativeEvent evt)
public void onDown(NativeEvent evt)
public void onEnd(NativeEvent evt)
public void onEnter(NativeEvent evt)
public void onEsc(NativeEvent evt)
public void onHome(NativeEvent evt)
public void onKeyPress(NativeEvent evt)
public void onLeft(NativeEvent evt)
public void onPageDown(NativeEvent evt)
public void onPageUp(NativeEvent evt)
public void onRight(NativeEvent evt)
public void onShift(NativeEvent evt)
public void onTab(NativeEvent evt)
public void onUp(NativeEvent evt)
public void setCancelBubble(boolean cancelBubble)
cancelBubble
- the cancel bubble statepublic void setPreventDefault(boolean preventDefault)
preventDefault
- true to prevent the defaultCopyright © 2018. All rights reserved.