java.lang.Object
javafx.scene.input.EventBinding<T>
- Type Parameters:
T- the event type
- All Implemented Interfaces:
EventListener,EventHandler<T>
- Direct Known Subclasses:
KeyEventBinding,MouseEventBinding
public abstract class EventBinding<T extends Event> extends Object implements EventHandler<T>
An event binding listens for events on a
Node and executes a command if a specified event was received.-
Property Summary
Properties Type Property Description ObjectProperty<?>commandParameterObjectProperty<Command<?>>command -
Constructor Summary
Constructors Modifier Constructor Description protectedEventBinding(EventType<T> eventType) -
Method Summary
Modifier and Type Method Description ObjectProperty<?>commandParameterProperty()ObjectProperty<Command<?>>commandProperty()protected voidfireCommand()Command<?>getCommand()Gets the value of the property command.ObjectgetCommandParameter()Gets the value of the property commandParameter.EventType<T>getEventType()voidsetCommand(Command<?> command)Sets the value of the property command.voidsetCommandParameter(Object commandParameter)Sets the value of the property commandParameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.event.EventHandler
handle
-
Property Details
-
command
- See Also:
getCommand(),setCommand(Command)
-
commandParameter
- See Also:
getCommandParameter(),setCommandParameter(Object)
-
-
Constructor Details
-
EventBinding
-
-
Method Details
-
getEventType
-
commandProperty
- See Also:
getCommand(),setCommand(Command)
-
getCommand
Gets the value of the property command.- Property description:
-
setCommand
Sets the value of the property command.- Property description:
-
commandParameterProperty
- See Also:
getCommandParameter(),setCommandParameter(Object)
-
getCommandParameter
Gets the value of the property commandParameter.- Property description:
-
setCommandParameter
Sets the value of the property commandParameter.- Property description:
-
fireCommand
protected void fireCommand()
-