use of com.kyj.fx.voeditor.visual.framework.animation.BlinkBorderTransition in project Gargoyle by callakrsos.
the class LetterExam method start.
/**
* @inheritDoc
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane borderPane = new BorderPane();
Button button = new Button("Play");
LettersPane lettersPane = new LettersPane();
borderPane.setTop(new StackPane(button));
borderPane.setCenter(lettersPane);
primaryStage.setScene(new Scene(borderPane));
primaryStage.show();
// lettersPane.setStyle("-fx-border-color : blue; -fx-border-width : 1px");
// button.setCache(true);
// button.setCacheHint(CacheHint.SPEED);
// Border fromBorder = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT));
// Border toBorder = new Border(new BorderStroke(Color.RED, BorderStrokeStyle.DASHED, CornerRadii.EMPTY, BorderWidths.DEFAULT));
// StringBinding createStringBinding = Bindings.createStringBinding(new Callable<String>() {
//
// @Override
// public String call() throws Exception {
// return "-fx-border-color : red ; -fx-border-width : 1px";
// }
// }, button.styleProperty());
Border border = button.getBorder();
button.setOnAction(ev -> {
new BlinkBorderTransition(lettersPane, border, Color.RED).play();
});
}
Aggregations