Animation_Intro1.htm |
|
Reference :
http://www.developer.com/java/data/doing-animation-in-javafx.html

Animation Classes:
- Animation: Is accomplished with "javafx.animation package" and
"Duration in javafx.util package" .
- Duration Class
- Animation Class
- TimeLine
- Transition
- ParallelTransition
- SequentialTransition
- FadeTransition
- PauseTransition
- RotateTransition
- StrokeTransition
- PathTransition
- ScaleTransition
- TranslateTransition
- FadeTransition
|
|
- Path
- Path : Methods
- beginPath()
- lineTo(double x1, double y1)
- moveTo(double x0, double y0)
- quadraticCurveTo(double xc, double yc, double x1, double y1)
- appendSVGPath(String svgpath)
arc(double centerX, double centerY, double radiusX, double
radiusY,
double startAngle, double length)
- arcTo(double x1, double y1, double x2, double y2, double
radius)
- bezierCurveTo(double xc1, double yc1, double xc2, double
yc2, double x1,
double y1)
- closePath()
- stroke()
- fill()
- Uses
Path path = new Path();
path.getElements().add (new MoveTo (0f, 50f));
path.setStroke(Color.WHITE);
path.setStrokeWidth(4);
|
- Shapes: javafx.scene.shape :: Path
- Arc
- Polygon
- Line : (startX, startY, endX, endY)
path.getElements().add(new LineTo(100.0f, 100.0f));
- SVGPath
- CubicCurve
path.getElements().add (new CubicCurveTo (40f, 10f, 390f, 240f,
400, 50f));
- Path
- Circle
- Ellipse
- QuadCurve
- Rectangle
- Polyline
- Text
|
- Animation :page 917 Learn JavaFx
- TimeLine
- KeyFrame
- KeyValue
- Interpolator
|
|

- SubClasses:
- FadeTransition,
- FillTransition,
- ParallelTransition,
- PathTransition,
- PauseTransition,
- RotateTransition,
- ScaleTransition,
- SequentialTransition,
- StrokeTransition,
- TranslateTransition
|
 |
Controlling animation:
|
Path Class using Shapes:
MoveTo
• LineTo
• HLineTo
• VLineTo
• ArcTo
• QuadCurveTo
• CubicCurveTo
|
ArcTo
- new ArcTo(20, 10, 0, 0,0,false,false),

- new ArcTo(20, 5, 0, 0,0,false,false)

- new ArcTo(20,100, 0, 0,0,false,false),

- new ArcTo(20,100, 10, 0,0,false,false), top-bulge

- new ArcTo(20,10, 50, 0,0,false,false),

- new
ArcTo(20,10, 50, 50,0,false,false

-

- Letter P
new VLineTo(-50), new HLineTo(100), new VLineTo(50),new HLineTo(10),
|
- VLineTo HLIneTo
- U shaped Track/path
new MoveTo(0, 0), //
new HLineTo(150),new VLineTo(0),
- With ClosePath ::/NO
ClosePath(),
 
- Rectangular Track/path

- Square Track/Path
|
|
|