com.vaadin.ui
Class AbstractField.FocusShortcut

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.AbstractField.FocusShortcut
All Implemented Interfaces:
Action.Listener, Serializable
Enclosing class:
AbstractField<T>

public static class AbstractField.FocusShortcut
extends ShortcutListener

A ready-made ShortcutListener that focuses the given Focusable (usually a Field) when the keyboard shortcut is invoked.

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  Component.Focusable focusable
           
 
Fields inherited from class com.vaadin.event.ShortcutAction
SHORTHAND_CHAR_ALT, SHORTHAND_CHAR_CTRL, SHORTHAND_CHAR_SHIFT
 
Constructor Summary
AbstractField.FocusShortcut(Component.Focusable focusable, int keyCode)
          Creates a keyboard shortcut for focusing the given Focusable.
AbstractField.FocusShortcut(Component.Focusable focusable, int keyCode, int... modifiers)
          Creates a keyboard shortcut for focusing the given Focusable.
AbstractField.FocusShortcut(Component.Focusable focusable, String shorthandCaption)
          Creates a keyboard shortcut for focusing the given Focusable 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

focusable

protected Component.Focusable focusable
Constructor Detail

AbstractField.FocusShortcut

public AbstractField.FocusShortcut(Component.Focusable focusable,
                                   String shorthandCaption)
Creates a keyboard shortcut for focusing the given Focusable using the shorthand notation defined in ShortcutAction.

Parameters:
focusable - to focused when the shortcut is invoked
shorthandCaption - caption with keycode and modifiers indicated

AbstractField.FocusShortcut

public AbstractField.FocusShortcut(Component.Focusable focusable,
                                   int keyCode,
                                   int... modifiers)
Creates a keyboard shortcut for focusing the given Focusable.

Parameters:
focusable - to focused when the shortcut is invoked
keyCode - keycode that invokes the shortcut
modifiers - modifiers required to invoke the shortcut

AbstractField.FocusShortcut

public AbstractField.FocusShortcut(Component.Focusable focusable,
                                   int keyCode)
Creates a keyboard shortcut for focusing the given Focusable.

Parameters:
focusable - to focused when the shortcut is invoked
keyCode - keycode that invokes the shortcut
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.