Example usage for javafx.scene.control Button setLayoutY

List of usage examples for javafx.scene.control Button setLayoutY

Introduction

In this page you can find the example usage for javafx.scene.control Button setLayoutY.

Prototype

public final void setLayoutY(double value) 

Source Link

Usage

From source file:photobooth.views.ExplorerPane.java

private void addNextButton() throws IOException {
    Button button = new Button();
    button.setGraphic(/*w  w  w. jav a2  s  . com*/
            new ImageView(new Image(getClass().getResource("/photobooth/images/next.png").openStream())));
    button.setStyle("-fx-background-radius: 50%; ");
    button.setStyle("-fx-background-color: transparent;");
    button.setLayoutX(740);
    button.setLayoutY(220);
    button.setMaxSize(50, 50);
    button.setMinSize(50, 50);
    this.getChildren().add(button);
    button.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent event) {
            Global.getInstance().setSceneRoot(LoadingPane.getInstance());
            Platform.runLater(() -> {
                new Thread(new Runnable() {

                    @Override
                    public void run() {
                        ExplorerPane.getInstance().setDir(dir, offset + limit, limit, directoryLevel);
                        Global.getInstance().setSceneRoot(ExplorerPane.getInstance());
                    }
                }).start();
            });
        }
    });
}

From source file:photobooth.views.ExplorerPane.java

private void addPrevButton() throws IOException {
    Button button = new Button();
    button.setGraphic(/*from www. j  a  va  2  s . c o m*/
            new ImageView(new Image(getClass().getResource("/photobooth/images/prev.png").openStream())));
    button.setStyle("-fx-background-radius: 50%; ");
    button.setStyle("-fx-background-color: transparent;");
    button.setLayoutX(10);
    button.setLayoutY(220);
    button.setMaxSize(50, 50);
    button.setMinSize(50, 50);
    this.getChildren().add(button);
    button.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent event) {
            Global.getInstance().setSceneRoot(LoadingPane.getInstance());
            Platform.runLater(() -> {
                new Thread(new Runnable() {

                    @Override
                    public void run() {
                        ExplorerPane.getInstance().setDir(dir, offset - limit, limit, directoryLevel);
                        Global.getInstance().setSceneRoot(ExplorerPane.getInstance());
                    }
                }).start();
            });
        }
    });
}