- java.lang.Object
-
- org.tbee.javafx.scene.layout.LayoutAnimator
-
public class LayoutAnimator extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classLayoutAnimator.LayoutTrans(package private) static classLayoutAnimator.TransType
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<javafx.scene.Node>addedNodesstatic javafx.util.DurationANIM_DURATIONprivate static java.lang.StringANIM_REPLACE_IDprivate java.util.IdentityHashMap<javafx.scene.Node,java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition>>nodeAnimMapprivate MigPanepaneprivate java.util.ArrayList<javafx.scene.Node>removedNodesprivate java.util.IdentityHashMap<javafx.scene.Node,javafx.scene.Node>replacedNodeMap
-
Constructor Summary
Constructors Constructor Description LayoutAnimator(MigPane pane)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidanimate(javafx.scene.Node node, javafx.geometry.Rectangle2D toBounds)Animates the node.private java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition>createOrUpdateAnimation(javafx.scene.Node node, java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition> transMap, javafx.geometry.Rectangle2D toBounds)javafx.scene.NodecreateReplacement(javafx.scene.Node node)private doubleextractOpacity(javafx.scene.Node node)private static javafx.geometry.Rectangle2DgetBounds(javafx.scene.Node node)private static booleanisReplacement(javafx.scene.Node node)(package private) voidnodeAdded(javafx.scene.Node node)(package private) voidnodeRemoved(javafx.scene.Node node)(package private) voidstart()
-
-
-
Field Detail
-
ANIM_REPLACE_ID
private static final java.lang.String ANIM_REPLACE_ID
- See Also:
- Constant Field Values
-
ANIM_DURATION
public static final javafx.util.Duration ANIM_DURATION
-
pane
private final MigPane pane
-
addedNodes
private final java.util.ArrayList<javafx.scene.Node> addedNodes
-
removedNodes
private final java.util.ArrayList<javafx.scene.Node> removedNodes
-
nodeAnimMap
private final java.util.IdentityHashMap<javafx.scene.Node,java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition>> nodeAnimMap
-
replacedNodeMap
private final java.util.IdentityHashMap<javafx.scene.Node,javafx.scene.Node> replacedNodeMap
-
-
Constructor Detail
-
LayoutAnimator
public LayoutAnimator(MigPane pane)
-
-
Method Detail
-
animate
void animate(javafx.scene.Node node, javafx.geometry.Rectangle2D toBounds)Animates the node.- Parameters:
node- The node to animate. Not null.toBounds- If != null the animation will be to these bounds.
-
createOrUpdateAnimation
private java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition> createOrUpdateAnimation(javafx.scene.Node node, java.util.HashMap<LayoutAnimator.TransType,javafx.animation.Transition> transMap, javafx.geometry.Rectangle2D toBounds)
-
extractOpacity
private double extractOpacity(javafx.scene.Node node)
-
nodeAdded
void nodeAdded(javafx.scene.Node node)
-
nodeRemoved
void nodeRemoved(javafx.scene.Node node)
-
isReplacement
private static boolean isReplacement(javafx.scene.Node node)
-
createReplacement
public javafx.scene.Node createReplacement(javafx.scene.Node node)
-
start
void start()
-
getBounds
private static javafx.geometry.Rectangle2D getBounds(javafx.scene.Node node)
-
-