Java Reference
In-Depth Information
javafx.event.EventHandler<ActionEvent>
javafx.scene.shape.Rectangle
To fade out the current picture and fade in next picture, you need the following
classes:
javafx.animation.SequentialTransition
javafx.animation.FadeTransition
javafx.event.EventHandler<ActionEvent>
javafx.scene.image.Image
javafx.scene.image.ImageView
javafx.util.Duration
To fade in and out button controls when the cursor moves into and out of the scene
area, respectively, you need the following classes:
javafx.animation.FadeTransition
javafx.util.Duration
Shown here is the code used to create a news ticker control:
// create ticker area
final Group tickerArea = new Group();
final Rectangle tickerRect = new Rectangle();
tickerRect.setArcWidth(15);
tickerRect.setArcHeight(20);
tickerRect.setFill(new Color(0, 0, 0, .55));
tickerRect.setX(0);
tickerRect.setY(0);
tickerRect.setWidth(scene.getWidth() - 6);
tickerRect.setHeight(30);
tickerRect.setStroke(Color.rgb(255, 255, 255, .70));
Rectangle clipRegion = new Rectangle();
clipRegion.setArcWidth(15);
clipRegion.setArcHeight(20);
Search WWH ::




Custom Search