Search in sources :

Example 1 with LettersPane

use of com.kyj.fx.voeditor.visual.component.LettersPane 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();
    });
}
Also used : BorderPane(javafx.scene.layout.BorderPane) LettersPane(com.kyj.fx.voeditor.visual.component.LettersPane) Button(javafx.scene.control.Button) Scene(javafx.scene.Scene) Border(javafx.scene.layout.Border) StackPane(javafx.scene.layout.StackPane) BlinkBorderTransition(com.kyj.fx.voeditor.visual.framework.animation.BlinkBorderTransition)

Aggregations

LettersPane (com.kyj.fx.voeditor.visual.component.LettersPane)1 BlinkBorderTransition (com.kyj.fx.voeditor.visual.framework.animation.BlinkBorderTransition)1 Scene (javafx.scene.Scene)1 Button (javafx.scene.control.Button)1 Border (javafx.scene.layout.Border)1 BorderPane (javafx.scene.layout.BorderPane)1 StackPane (javafx.scene.layout.StackPane)1