Component to change Button background on onMouseEntered and onMouseExited events.
ChangeButtonOnPass class is generic in T extends Button.
public ChangeButtonOnPass(T button, ImageView onEnter, ImageView onExit, 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 onEnter and Image onExit will be used to instantiate ImageView.String onEnterPath and String onExitPath will be used to instantiate Image.
public ChangeButtonOnPass(T button, ImageView onEnter, ImageView onExit)
public ChangeButtonOnPass(T button, Image onEnter, Image onExit, boolean keepOldHandlers)
public ChangeButtonOnPass(T button, Image onEnter, Image onExit)
public ChangeButtonOnPass(T button, String onEnterPath, String onExitPath, boolean keepOldHandlers)
public ChangeButtonOnPass(T button, String onEnterPath, String onExitPath)
public ChangeButtonOnPass(IComponent<T> component, ImageView onEnter, ImageView onExit, boolean keepOldHandlers)
public ChangeButtonOnPass(IComponent<T> component, ImageView onEnter, ImageView onExit)
public ChangeButtonOnPass(IComponent<T> component, Image onEnter, Image onExit, boolean keepOldHandlers)
public ChangeButtonOnPass(IComponent<T> component, Image onEnter, Image onExit)
public ChangeButtonOnPass(IComponent<T> component, String onEnterPath, String onExitPath, boolean keepOldHandlers)
public ChangeButtonOnPass(IComponent<T> component, String onEnterPath, String onExitPath)
Button button;
new ChangeButtonOnPass<>(button, IN_IMAGE, OUT_IMAGE).mount();