Example usage for javafx.scene.control ToolBar getOrientation

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

Introduction

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

Prototype

public final Orientation getOrientation() 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group());
    stage.setWidth(300);//from   w w  w.j  a v  a2 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.getOrientation());
    ((Group) scene.getRoot()).getChildren().add(toolBar);

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