Component to change mouse image on onMousePressed and onMouseReleased events of Node.
public ChangeMouseOnPress(T node, Cursor onPress, Cursor onRelease, boolean keepOldHandlers)
There are more constructors with different parameters, but all will internally call this first one.
Variations :
keepOldHandlers this value is assumed as true.IComponent<T> component obtain Node from component.getNode()
.Image onPress and Image onRelease will be used to instantiate Cursor.String onPressPath and String onReleasePath will be used to instantiate Image.
public ChangeMouseOnPress(T node, Cursor onPress, Cursor onRelease)
public ChangeMouseOnPress(T node, Image onPress, Image onRelease, boolean keepOldHandlers)
public ChangeMouseOnPress(T node, Image onPress, Image onRelease)
public ChangeMouseOnPress(T node, String onPressPath, String onReleasePath, boolean keepOldHandlers)
public ChangeMouseOnPress(T node, String onPressPath, String onReleasePath)
public ChangeMouseOnPress(IComponent<T> component, Cursor onPress, Cursor onRelease, boolean keepOldHandlers)
public ChangeMouseOnPress(IComponent<T> component, Cursor onPress, Cursor onRelease)
public ChangeMouseOnPress(IComponent<T> component, Image onPress, Image onRelease, boolean keepOldHandlers)
public ChangeMouseOnPress(IComponent<T> component, Image onPress, Image onRelease)
public ChangeMouseOnPress(IComponent<T> component, String onPressPath, String onReleasePath, boolean keepOldHandlers)
public ChangeMouseOnPress(IComponent<T> component, String onPressPath, String onReleasePath)
Button button;
new ChangeMouseOnPress<>(button, Cursor.CLOSED_HAND, Cursor.OPEN_HAND).mount();