JavaFX Utils

ChangeMouseOnPass

Component to change mouse image on onMouseEntered and onMouseExited events of Node.

Constructors

	public ChangeMouseOnPass(T node, Cursor onEnter, Cursor onExit, boolean keepOldHandlers)
					

  • node : Node in which will be mounted animation.
  • onEnter : Cursor to be set as mouse on onMouseEntered event.
  • onExit : Cursor to be set as mouse on onMouseExited event.
  • 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() .
  • Constructors that receive Image onEnter and Image onExit will be used to instantiate Cursor.
  • Constructors that receive String onEnterPath and String onExitPath will be used to instantiate Image.
	public ChangeMouseOnPass(T node, Cursor onEnter, Cursor onExit)
					
	public ChangeMouseOnPass(T node, Image onEnter, Image onExit, boolean keepOldHandlers)
					
	public ChangeMouseOnPass(T node, Image onEnter, Image onExit)
					
	public ChangeMouseOnPass(T node, String onEnterPath, String onExitPath, boolean keepOldHandlers)
					
	public ChangeMouseOnPass(T node, String onEnterPath, String onExitPath)
					
	public ChangeMouseOnPass(IComponent<T> component, Cursor onEnter, Cursor onExit, boolean keepOldHandlers)
					
	public ChangeMouseOnPass(IComponent<T> component, Cursor onEnter, Cursor onExit)
					
	public ChangeMouseOnPass(IComponent<T> component, Image onEnter, Image onExit, boolean keepOldHandlers)
					
	public ChangeMouseOnPass(IComponent<T> component, Image onEnter, Image onExit)
					
	public ChangeMouseOnPass(IComponent<T> component, String onEnterPath, String onExitPath, boolean keepOldHandlers)
					
	public ChangeMouseOnPass(IComponent<T> component, String onEnterPath, String onExitPath)
					

Usage

	Button button;

	new ChangeMouseOnPass<>(button, Cursor.CLOSED_HAND, Cursor.OPEN_HAND).mount();
					

Links