P - Parent configuratorpublic interface ShortcutConfigurator<P>
| Modifier and Type | Method and Description |
|---|---|
P |
add()
Add the configured shortcut listener to the component.
|
ShortcutConfigurator<P> |
allowBrowserDefault()
Allows the default keyboard event handling when the shortcut is invoked.
|
ShortcutConfigurator<P> |
allowEventPropagation()
Allow the event to propagate upwards in the DOM tree, when the shortcut is invoked.
|
ShortcutConfigurator<P> |
bindLifecycleTo(com.vaadin.flow.component.Component component)
Binds the shortcut's life cycle to that of the given
Component. |
ShortcutConfigurator<P> |
listenOn(com.vaadin.flow.component.Component listenOnComponent)
Define the
Component onto which the shortcut's listener is bound. |
ShortcutConfigurator<P> |
modifiers(com.vaadin.flow.component.KeyModifier... keyModifiers)
Configures
KeyModifiers for the shortcut. |
ShortcutConfigurator<P> |
withAlt()
Adds
KeyModifier.ALT to the shortcut's modifiers. |
ShortcutConfigurator<P> |
withCtrl()
Adds
KeyModifier.CONTROL to the shortcut's modifiers. |
ShortcutConfigurator<P> |
withMeta()
Adds
KeyModifier.META to the shortcut's modifiers. |
ShortcutConfigurator<P> |
withShift()
Adds
KeyModifier.SHIFT to the shortcut's modifiers. |
ShortcutConfigurator<P> modifiers(com.vaadin.flow.component.KeyModifier... keyModifiers)
KeyModifiers for the shortcut.
Calling this method will overwrite any previously set modifier keys.
keyModifiers - The key modifiers to set (can be empty)ShortcutConfigurator<P> withAlt()
KeyModifier.ALT to the shortcut's modifiers.ShortcutConfigurator<P> withCtrl()
KeyModifier.CONTROL to the shortcut's modifiers.ShortcutConfigurator<P> withShift()
KeyModifier.SHIFT to the shortcut's modifiers.ShortcutConfigurator<P> withMeta()
KeyModifier.META to the shortcut's modifiers.ShortcutConfigurator<P> allowBrowserDefault()
ShortcutConfigurator<P> allowEventPropagation()
ShortcutConfigurator<P> bindLifecycleTo(com.vaadin.flow.component.Component component)
Component. When the given component is
attached, the shortcut's listener is attached to the Component that owns the shortcut. When the given
component is detached, so is the listener.component - New lifecycle owner of the shortcutShortcutConfigurator<P> listenOn(com.vaadin.flow.component.Component listenOnComponent)
Component onto which the shortcut's listener is bound. Calling this method will remove the
previous listener from the component it was bound to.listenOnComponent - Component onto which the shortcut listener is bound.P add()
Copyright © 2019 The Holon Platform. All rights reserved.