public interface KeyNotifier extends Serializable
Modifier and Type | Method and Description |
---|---|
default Registration |
addKeyDownListener(ComponentEventListener<KeyDownEvent> listener)
Adds a
keydown listener to this component. |
default Registration |
addKeyDownListener(Key key,
ComponentEventListener<KeyDownEvent> listener,
KeyModifier... modifiers)
Adds a
keydown listener to this component, which will trigger
only if the keys involved in the event match the key and
modifiers parameters. |
default Registration |
addKeyPressListener(ComponentEventListener<KeyPressEvent> listener)
Adds a
keypress listener to this component. |
default Registration |
addKeyPressListener(Key key,
ComponentEventListener<KeyPressEvent> listener,
KeyModifier... modifiers)
Adds a
keypress listener to this component, which will trigger
only if the keys involved in the event match the key and
modifiers parameters. |
default Registration |
addKeyUpListener(ComponentEventListener<KeyUpEvent> listener)
Adds a
keyup listener to this component. |
default Registration |
addKeyUpListener(Key key,
ComponentEventListener<KeyUpEvent> listener,
KeyModifier... modifiers)
Adds a
keyup listener to this component, which will trigger only
if the keys involved in the event match the key and
modifiers parameters. |
default Registration addKeyDownListener(ComponentEventListener<KeyDownEvent> listener)
keydown
listener to this component.listener
- the listener to add, not null
default Registration addKeyPressListener(ComponentEventListener<KeyPressEvent> listener)
keypress
listener to this component.listener
- the listener to add, not null
default Registration addKeyUpListener(ComponentEventListener<KeyUpEvent> listener)
keyup
listener to this component.listener
- the listener to add, not null
default Registration addKeyDownListener(Key key, ComponentEventListener<KeyDownEvent> listener, KeyModifier... modifiers)
keydown
listener to this component, which will trigger
only if the keys involved in the event match the key
and
modifiers
parameters.
See Key
for common static instances or use
Key.of(String, String...)
to get an instance from an arbitrary
value.
key
- the key to matchlistener
- the listener to add, not null
modifiers
- the optional modifiers to matchdefault Registration addKeyPressListener(Key key, ComponentEventListener<KeyPressEvent> listener, KeyModifier... modifiers)
keypress
listener to this component, which will trigger
only if the keys involved in the event match the key
and
modifiers
parameters.
See Key
for common static instances or use
Key.of(String, String...)
to get an instance from an arbitrary
value.
key
- the key to matchlistener
- the listener to add, not null
modifiers
- the optional modifiers to matchdefault Registration addKeyUpListener(Key key, ComponentEventListener<KeyUpEvent> listener, KeyModifier... modifiers)
keyup
listener to this component, which will trigger only
if the keys involved in the event match the key
and
modifiers
parameters.
See Key
for common static instances or use
Key.of(String, String...)
to get an instance from an arbitrary
value.
key
- the key to matchlistener
- the listener to add, not null
modifiers
- the optional modifiers to matchCopyright © 2019. All rights reserved.