Import "views" plugins
[deliverable/tracecompass.git] / tmf / org.lttng.scope.tmf2.views.ui / src / org / lttng / scope / tmf2 / views / ui / jfx / examples / FadeTransitionEx.java
CommitLineData
c879c4db
AM
1package org.lttng.scope.tmf2.views.ui.jfx.examples;
2
3import org.eclipse.jdt.annotation.Nullable;
4
5import javafx.animation.FadeTransition;
6import javafx.application.Application;
7import javafx.scene.Group;
8import javafx.scene.Scene;
9import javafx.scene.shape.Rectangle;
10import javafx.stage.Stage;
11import javafx.util.Duration;
12
13public class FadeTransitionEx extends Application {
14
15 public static void main(String[] args) {
16 Application.launch(args);
17 }
18
19 @Override
20 public void start(@Nullable Stage primaryStage) {
21 if (primaryStage == null) {
22 return;
23 }
24
25 Group group = new Group();
26 Rectangle rect = new Rectangle(20,20,200,200);
27
28 FadeTransition ft = new FadeTransition(Duration.millis(5000), rect);
29 ft.setFromValue(1.0);
30 ft.setToValue(0.0);
31 ft.play();
32
33 group.getChildren().add(rect);
34
35 Scene scene = new Scene(group, 300, 200);
36 primaryStage.setScene(scene);
37 primaryStage.show();
38 }
39}
This page took 0.034474 seconds and 5 git commands to generate.