Class ScaleTransition

java.lang.Object

public final class ScaleTransition extends Transition
This Transition creates a scale animation that spans its duration. This is done by updating the scaleX, scaleY and scaleZ variables of the node at regular intervals.

It starts from the (fromX, fromY, fromZ) value if provided else uses the node's (scaleX, scaleY, scaleZ) value.

It stops at the (toX, toY, toZ) value if provided else it will use start value plus (byX, byY, byZ) value.

The (toX, toY, toZ) value takes precedence if both ( toX, toY, toZ) and (byX, byY, byZ) values are specified.

Code Segment Example:

 
 import javafx.scene.shape.*;
 import javafx.animation.*;

 ...

     Rectangle rect = new Rectangle (100, 40, 100, 100);
     rect.setArcHeight(50);
     rect.setArcWidth(50);
     rect.setFill(Color.VIOLET);

     ScaleTransition st = new ScaleTransition(Duration.millis(2000), rect);
     st.setByX(1.5f);
     st.setByY(1.5f);
     st.setCycleCount(4f);
     st.setAutoReverse(true);

     st.play();

 ...

 
 
Since:
JavaFX 2.0
See Also: