We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.terminal.gwt.client.ui.
Class ShortcutActionHandler
java.lang.Object
com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler
- extends Object
public class ShortcutActionHandler
A helper class to implement keyboard shorcut handling. Keeps a list of owners actions and fires actions to server. User class needs to delegate keyboard events to handleKeyboardEvents function.
Author:
Vaadin Ltd
Nested Class Summary | |
---|---|
static interface |
ShortcutActionHandler.BeforeShortcutActionListener
A focusable Paintable implementing this interface will be
notified before shortcut actions are handled if it will be the target of
the action (most commonly means it is the focused component during the
keyboard combination is triggered by the user). |
static interface |
ShortcutActionHandler.ShortcutActionHandlerOwner
An interface implemented by those users (most often Container s,
but HasWidgets at least) of this helper class that want to support
special components like VRichTextArea that don't properly
propagate key down events. |
Field Summary | |
---|---|
static String |
ACTION_CAPTION_ATTRIBUTE
|
static String |
ACTION_KEY_ATTRIBUTE
|
static String |
ACTION_MODIFIER_KEYS_ATTRIBUTE
|
static String |
ACTION_SHORTCUT_KEY_ATTRIBUTE
|
static String |
ACTION_TARGET_ACTION_ATTRIBUTE
|
static String |
ACTION_TARGET_ACTION_VARIABLE
|
static String |
ACTION_TARGET_ATTRIBUTE
|
static String |
ACTION_TARGET_VARIABLE
|
Constructor Summary | |
---|---|
ShortcutActionHandler(String pid,
ApplicationConnection c)
|
Method Summary | |
---|---|
void |
handleKeyboardEvent(com.google.gwt.user.client.Event event)
|
void |
handleKeyboardEvent(com.google.gwt.user.client.Event event,
Paintable target)
|
void |
updateActionMap(UIDL c)
Updates list of actions this handler listens to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
ACTION_TARGET_ATTRIBUTE
public static final String ACTION_TARGET_ATTRIBUTE
See Also:
ACTION_TARGET_ACTION_ATTRIBUTE
public static final String ACTION_TARGET_ACTION_ATTRIBUTE
See Also:
ACTION_CAPTION_ATTRIBUTE
public static final String ACTION_CAPTION_ATTRIBUTE
See Also:
ACTION_KEY_ATTRIBUTE
public static final String ACTION_KEY_ATTRIBUTE
See Also:
ACTION_SHORTCUT_KEY_ATTRIBUTE
public static final String ACTION_SHORTCUT_KEY_ATTRIBUTE
See Also:
ACTION_MODIFIER_KEYS_ATTRIBUTE
public static final String ACTION_MODIFIER_KEYS_ATTRIBUTE
See Also:
ACTION_TARGET_VARIABLE
public static final String ACTION_TARGET_VARIABLE
See Also:
ACTION_TARGET_ACTION_VARIABLE
public static final String ACTION_TARGET_ACTION_VARIABLE
See Also:
Constructor Detail |
---|
ShortcutActionHandler
public ShortcutActionHandler(String pid,
ApplicationConnection c)
Parameters:
pid
- Paintable id
c
- reference to application connections
Method Detail |
---|
updateActionMap
public void updateActionMap(UIDL c)
- Parameters:
c
- UIDL snippet containing actions
Updates list of actions this handler listens to.
handleKeyboardEvent
public void handleKeyboardEvent(com.google.gwt.user.client.Event event,
Paintable target)
handleKeyboardEvent
public void handleKeyboardEvent(com.google.gwt.user.client.Event event)