Component to change Button background on onMousePressed and onMouseReleased events.
ChangeButtonOnPress class is generic in T extends Button.
public ChangeButtonOnPress(T button, ImageView onPress, ImageView 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 Button from component.getNode()
.Image onPress and Image onRelease will be used to instantiate ImageView.String onPressPath and String onReleasePath will be used to instantiate Image.
public ChangeButtonOnPress(T button, ImageView onPress, ImageView onRelease)
public ChangeButtonOnPress(T button, Image onPress, Image onRelease, boolean keepOldHandlers)
public ChangeButtonOnPress(T button, Image onPress, Image onRelease)
public ChangeButtonOnPress(T button, String onPressPath, String onReleasePath, boolean keepOldHandlers)
public ChangeButtonOnPress(T button, String onPressPath, String onReleasePath)
public ChangeButtonOnPress(IComponent<T> component, ImageView onPress, ImageView onRelease, boolean keepOldHandlers)
public ChangeButtonOnPress(IComponent<T> component, ImageView onPress, ImageView onRelease)
public ChangeButtonOnPress(IComponent<T> component, Image onPress, Image onRelease, boolean keepOldHandlers)
public ChangeButtonOnPress(IComponent<T> component, Image onPress, Image onRelease)
public ChangeButtonOnPress(IComponent<T> component, String onPressPath, String onReleasePath, boolean keepOldHandlers)
public ChangeButtonOnPress(IComponent<T> component, String onPressPath, String onReleasePath)
Button button;
new ChangeButtonOnPress<>(button, IN_IMAGE, OUT_IMAGE).mount();