-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.jfx.events.generic.EventDispatcher
public class DynamicMouseEventDispatcher extends SimpleMouseEventDispatcher
A mouse event dispatcher which can receive temporary actions to listen to which will only be triggered once. These temporary actions have a higher priority than actions set through action.
-
-
Field Summary
Fields Modifier and Type Field Description private final MouseActionListenerlistener
-
Constructor Summary
Constructors Constructor Description DynamicMouseEventDispatcher()
-
Method Summary
Modifier and Type Method Description MouseActionListenergetListener()The listener bound to this dispatcher. final UnitsetDynamicAction(MouseTriggerAction trigger, Function1<MouseEvent, Unit> job)Set a dynamic action. -
-
Method Detail
-
getListener
MouseActionListener getListener()
The listener bound to this dispatcher.
-
setDynamicAction
final Unit setDynamicAction(MouseTriggerAction trigger, Function1<MouseEvent, Unit> job)
Set a dynamic action.
- Parameters:
trigger- the trigger for the actionjob- the job that will be run when the action occurs
-
-
-
-