public abstract class CenterSwitchAnimation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
javafx.scene.image.ImageView |
imageView
The image view
|
Constructor and Description |
---|
CenterSwitchAnimation() |
Modifier and Type | Method and Description |
---|---|
void |
animate(javafx.scene.layout.BorderPane pane,
javafx.scene.Node newNode,
java.lang.Runnable animationFinished)
Animate to the new node
|
protected abstract @NonNull javafx.animation.Animation |
createAndPrepareAnimation(@NonNull javafx.scene.Node curNode,
@NonNull javafx.scene.Node newNode)
Create an animation and prepare it for execution - but don't execute!
|
protected abstract void |
resetProperties(@NonNull javafx.scene.Node curNode,
@NonNull javafx.scene.Node newNode)
Reset properties to their default after the animation has finished
|
public void animate(javafx.scene.layout.BorderPane pane, javafx.scene.Node newNode, java.lang.Runnable animationFinished)
pane
- the pane the animation is happening onnewNode
- the new nodeanimationFinished
- runnable to run when finishedprotected abstract @NonNull javafx.animation.Animation createAndPrepareAnimation(@NonNull javafx.scene.Node curNode, @NonNull javafx.scene.Node newNode)
curNode
- the current node (node moved out!)newNode
- the replacement node (node moved in)protected abstract void resetProperties(@NonNull javafx.scene.Node curNode, @NonNull javafx.scene.Node newNode)
curNode
- the current node (node moved out!)newNode
- the new node (node moved in)