@Override public DefaultKeyNotifierConfigurator withKeyUpListener(Key key, ComponentEventListener<KeyUpEvent> listener, KeyModifier... modifiers) { component.addKeyUpListener(key, listener, modifiers); return this; }
@Override public DefaultKeyNotifierConfigurator withKeyUpListener(ComponentEventListener<KeyUpEvent> listener) { component.addKeyUpListener(listener); return this; }
/** * Adds a {@code keyup} listener to this component, which will trigger only * if the keys involved in the event match the {@code key} and * {@code modifiers} parameters. * <p> * See {@link Key} for common static instances or use * {@link Key#of(String, String...)} to get an instance from an arbitrary * value. * * @param key * the key to match * @param listener * the listener to add, not <code>null</code> * @param modifiers * the optional modifiers to match * @return a handle that can be used for removing the listener */ default Registration addKeyUpListener(Key key, ComponentEventListener<KeyUpEvent> listener, KeyModifier... modifiers) { return addKeyUpListener( new KeyEventListener<>(listener, key, modifiers)); }