nodeObj.setOnMouseEntered(e -> new Expand((Node) e.getSource()).play());
nodeObj.setOnMouseExited(e -> new Contract((Node) e.getSource()).play());
it is also posible to set the beginScale and endScale:
nodeObj.setOnMouseEntered(e -> new Expand((Node) e.getSource()).setEndScale(1.2).play());
nodeObj.setOnMouseExited(e -> new Contract((Node) e.getSource()).setBeginScale(1.2).play());
I also created a new sub package "animatefx.animation.partial", but for that to work I had to increase the method visibility of resetNode and initTimeline, which also means that now every class can extend AnimationFX, which is not a bad change in my opinion.
Internally in the classes of Expand and Contract I had to resort to a few workarounds to support the setBeginScale and setEndScale methods, but they are documented in the classes themself.
for example like this:
it is also posible to set the beginScale and endScale:
I also created a new sub package "animatefx.animation.partial", but for that to work I had to increase the method visibility of resetNode and initTimeline, which also means that now every class can extend AnimationFX, which is not a bad change in my opinion.
Internally in the classes of Expand and Contract I had to resort to a few workarounds to support the setBeginScale and setEndScale methods, but they are documented in the classes themself.