JavaFX Utils

PressAnimation

Component to help implement animation based on onMousePressed and onMouseReleased as entry and exit points respectively.

Constructors

	public PressAnimation(T node,
		EventHandler<? super MouseEvent> onPress,
		EventHandler<? super MouseEvent> onRelease,
		boolean keepOldHandlers)
					

  • node : Node in which will be mounted animation.
  • onPress : entry point of animation.
  • onRelease : exit point of animation.
  • keepOldHandlers : indicates if old EventHandlers are to keep or discard.

There are more constructors with different parameters, but all will internally call this first one.

Variations :

  • Constructors that don't receive keepOldHandlers this value is assumed as true.
  • Constructors that receive IComponent<T> component obtain Node from component.getNode().
	public PressAnimation(T node,
		EventHandler<? super MouseEvent> onPress,
		EventHandler<? super MouseEvent> onRelease)
					
	public PressAnimation(IComponent<T> component,
		EventHandler<? super MouseEvent> onPress,
		EventHandler<? super MouseEvent> onRelease,
		boolean keepOldHandlers)
					
	public PressAnimation(IComponent<T> component,
		EventHandler<? super MouseEvent> onPress,
			EventHandler<? super MouseEvent> onRelease)
					

Links