Example usage for javafx.scene.control ToolBar orientationProperty

List of usage examples for javafx.scene.control ToolBar orientationProperty

Introduction

In this page you can find the example usage for javafx.scene.control ToolBar orientationProperty.

Prototype

public final ObjectProperty<Orientation> orientationProperty() 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//from ww w.  j av a 2  s  .c  o  m
    stage.setHeight(150);

    ToolBar toolBar = new ToolBar(new Button("New"), new Button("Open"), new Button("Save"), new Separator(),
            new Button("Clean"), new Button("Compile"), new Button("Run"), new Separator(), new Button("Debug"),
            new Button("Profile"));
    toolBar.setOrientation(Orientation.HORIZONTAL);

    System.out.println(toolBar.orientationProperty());
    ((Group) scene.getRoot()).getChildren().add(toolBar);

    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//w w w  .ja  v a 2  s .  c  o  m
    stage.setHeight(150);

    ToolBar toolBar = new ToolBar();
    toolBar.getItems().add(new Button("New"));
    toolBar.getItems().add(new Button("Open"));
    toolBar.getItems().add(new Button("Save"));
    toolBar.getItems().add(new Separator());
    toolBar.getItems().add(new Button("Clean"));
    toolBar.getItems().add(new Button("Compile"));
    toolBar.getItems().add(new Button("Run"));
    toolBar.getItems().add(new Separator());
    toolBar.getItems().add(new Button("Debug"));
    toolBar.getItems().add(new Button("Profile"));
    toolBar.setOrientation(Orientation.HORIZONTAL);

    System.out.println(toolBar.orientationProperty());
    ((Group) scene.getRoot()).getChildren().add(toolBar);

    stage.setScene(scene);
    stage.show();
}