E
- the event typepublic class SimpleEventHandlerProperty<E extends Event> extends ObjectPropertyBase<EventHandler<E>>
EventHandler
property.
public class SomePane extends SomeNode {
private final ObjectProperty<EventHandler<SomeEvent>> onMyCustomEvent = new SimpleEventHandlerProperty<>(this,
"onMyCustomEvent", SomeEvent.SOME_EVENT_TYPE, this::setEventHandler);
...
}
Node.setEventHandler(javafx.event.EventType, javafx.event.EventHandler)
Constructor and Description |
---|
SimpleEventHandlerProperty(Object bean,
String name,
EventType<E> eventType,
EventHandlerRegistrar eventHandlerRegistrar)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Object |
getBean() |
EventHandlerRegistrar |
getEventHandlerRegistrar()
Gets the event handler registrar.
|
EventType<E> |
getEventType()
Gets the event type to associate with the value of this property.
|
String |
getName() |
protected void |
invalidated() |
addListener, addListener, bind, fireValueChangedEvent, get, isBound, removeListener, removeListener, set, toString, unbind
bindBidirectional, setValue, unbindBidirectional
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getValue
getValue
public SimpleEventHandlerProperty(Object bean, String name, EventType<E> eventType, EventHandlerRegistrar eventHandlerRegistrar)
bean
- the bean that contains this propertyname
- the name of this propertyeventType
- the event type to associate with the value of this propertyeventHandlerRegistrar
- the event handler registrar. Use: this::setEventHandler
Node.setEventHandler(javafx.event.EventType, javafx.event.EventHandler)
protected void invalidated()
invalidated
in class ObjectPropertyBase<EventHandler<E extends Event>>
public Object getBean()
public String getName()
public EventType<E> getEventType()
public EventHandlerRegistrar getEventHandlerRegistrar()
Copyright © 2012–2019 Drombler. All rights reserved.