public static class SubWindow.CloseShortcut
extends com.vaadin.event.ShortcutListener
ShortcutListener specifically made to define a keyboard shortcut that closes the subwindow.
// within the subwindow using helper
subwindow.setCloseShortcut(KeyCode.ESCAPE, null);
// or globally
getUI().addAction(new Window.CloseShortcut(subwindow, KeyCode.ESCAPE));
| Constructor and Description |
|---|
CloseShortcut(SubWindow window,
int keyCode)
Creates a keyboard shortcut for closing the given subwindow using the given
ShortcutAction.KeyCode. |
CloseShortcut(SubWindow window,
int keyCode,
int... modifiers)
Creates a keyboard shortcut for closing the given subwindow using the given
ShortcutAction.KeyCode and ShortcutAction.ModifierKeys. |
CloseShortcut(SubWindow window,
String shorthandCaption)
Creates a keyboard shortcut for closing the given subwindow using the shorthand notation defined in
ShortcutAction. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(int keyCode,
int... modifiers) |
void |
handleAction(Object sender,
Object target) |
protected SubWindow window
public CloseShortcut(SubWindow window, String shorthandCaption)
ShortcutAction.window - shorthandCaption - the caption with shortcut keycode and modifiers indicatedpublic CloseShortcut(SubWindow window, int keyCode, int... modifiers)
ShortcutAction.KeyCode and ShortcutAction.ModifierKeys.window - keyCode - KeyCode to react tomodifiers - optional modifiers for shortcutpublic CloseShortcut(SubWindow window, int keyCode)
ShortcutAction.KeyCode.window - keyCode - KeyCode to react topublic void handleAction(Object sender, Object target)
handleAction in interface com.vaadin.event.Action.ListenerhandleAction in class com.vaadin.event.ShortcutListenersender - sendertarget - targetpublic boolean equals(int keyCode,
int... modifiers)
keyCode - keyCodemodifiers - modifiersCopyright © 2018 Awesome controls. All rights reserved.