com.vaadin.ui
Class Window.CloseShortcut
java.lang.Object
com.vaadin.event.Action
com.vaadin.event.ShortcutAction
com.vaadin.event.ShortcutListener
com.vaadin.ui.Window.CloseShortcut
- All Implemented Interfaces:
- Action.Listener, java.io.Serializable
- Enclosing class:
- Window
public static class Window.CloseShortcut
- extends ShortcutListener
A ShortcutListener specifically made to define a keyboard
shortcut that closes the window.
// within the window using helper
window.setCloseShortcut(KeyCode.ESCAPE, null);
// or globally
getUI().addAction(new Window.CloseShortcut(window, KeyCode.ESCAPE));
- See Also:
- Serialized Form
|
Method Summary |
void |
handleAction(java.lang.Object sender,
java.lang.Object target)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
window
protected Window window
Window.CloseShortcut
public Window.CloseShortcut(Window window,
java.lang.String shorthandCaption)
- Creates a keyboard shortcut for closing the given window using the
shorthand notation defined in
ShortcutAction.
- Parameters:
window - to be closed when the shortcut is invokedshorthandCaption - the caption with shortcut keycode and modifiers indicated
Window.CloseShortcut
public Window.CloseShortcut(Window window,
int keyCode,
int... modifiers)
- Creates a keyboard shortcut for closing the given window using the
given
ShortcutAction.KeyCode and ShortcutAction.ModifierKeys.
- Parameters:
window - to be closed when the shortcut is invokedkeyCode - KeyCode to react tomodifiers - optional modifiers for shortcut
Window.CloseShortcut
public Window.CloseShortcut(Window window,
int keyCode)
- Creates a keyboard shortcut for closing the given window using the
given
ShortcutAction.KeyCode.
- Parameters:
window - to be closed when the shortcut is invokedkeyCode - KeyCode to react to
handleAction
public void handleAction(java.lang.Object sender,
java.lang.Object target)
- Specified by:
handleAction in interface Action.Listener- Specified by:
handleAction in class ShortcutListener
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.