com.vaadin.ui
Class Button.ClickShortcut

java.lang.Object
  extended by com.vaadin.event.Action
      extended by com.vaadin.event.ShortcutAction
          extended by com.vaadin.event.ShortcutListener
              extended by com.vaadin.ui.Button.ClickShortcut
All Implemented Interfaces:
Action.Listener, Serializable
Enclosing class:
Button

public static class Button.ClickShortcut
extends ShortcutListener

A ShortcutListener specifically made to define a keyboard shortcut that invokes a click on the given button.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.event.ShortcutAction
ShortcutAction.KeyCode, ShortcutAction.ModifierKey
 
Nested classes/interfaces inherited from class com.vaadin.event.Action
Action.Container, Action.Handler, Action.Listener, Action.Notifier, Action.ShortcutNotifier
 
Field Summary
protected  Button button
           
 
Fields inherited from class com.vaadin.event.ShortcutAction
SHORTHAND_CHAR_ALT, SHORTHAND_CHAR_CTRL, SHORTHAND_CHAR_SHIFT
 
Constructor Summary
Button.ClickShortcut(Button button, int keyCode)
          Creates a keyboard shortcut for clicking the given button using the given ShortcutAction.KeyCode.
Button.ClickShortcut(Button button, int keyCode, int... modifiers)
          Creates a keyboard shortcut for clicking the given button using the given ShortcutAction.KeyCode and ShortcutAction.ModifierKeys.
Button.ClickShortcut(Button button, String shorthandCaption)
          Creates a keyboard shortcut for clicking the given button using the shorthand notation defined in ShortcutAction.
 
Method Summary
 void handleAction(Object sender, Object target)
           
 
Methods inherited from class com.vaadin.event.ShortcutAction
getKeyCode, getModifiers
 
Methods inherited from class com.vaadin.event.Action
getCaption, getIcon, setCaption, setIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

button

protected Button button
Constructor Detail

Button.ClickShortcut

public Button.ClickShortcut(Button button,
                            String shorthandCaption)
Creates a keyboard shortcut for clicking the given button using the shorthand notation defined in ShortcutAction.

Parameters:
button - to be clicked when the shortcut is invoked
shorthandCaption - the caption with shortcut keycode and modifiers indicated

Button.ClickShortcut

public Button.ClickShortcut(Button button,
                            int keyCode,
                            int... modifiers)
Creates a keyboard shortcut for clicking the given button using the given ShortcutAction.KeyCode and ShortcutAction.ModifierKeys.

Parameters:
button - to be clicked when the shortcut is invoked
keyCode - KeyCode to react to
modifiers - optional modifiers for shortcut

Button.ClickShortcut

public Button.ClickShortcut(Button button,
                            int keyCode)
Creates a keyboard shortcut for clicking the given button using the given ShortcutAction.KeyCode.

Parameters:
button - to be clicked when the shortcut is invoked
keyCode - KeyCode to react to
Method Detail

handleAction

public void handleAction(Object sender,
                         Object target)
Specified by:
handleAction in interface Action.Listener
Specified by:
handleAction in class ShortcutListener


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.