Example usage for javafx.geometry Orientation VERTICAL

List of usage examples for javafx.geometry Orientation VERTICAL

Introduction

In this page you can find the example usage for javafx.geometry Orientation VERTICAL.

Prototype

Orientation VERTICAL

To view the source code for javafx.geometry Orientation VERTICAL.

Click Source Link

Document

The vertical (top <-> bottom) orientation

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 500, 200);
    stage.setScene(scene);//ww w . ja  va2 s  .c  o m

    ScrollBar s1 = new ScrollBar();
    s1.setOrientation(Orientation.VERTICAL);

    root.getChildren().add(s1);
    stage.show();
}

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    stage.setTitle("HTML");
    stage.setWidth(500);/*from  w  w  w  .  j  a  v a 2s  .co  m*/
    stage.setHeight(500);
    Scene scene = new Scene(new Group());

    FlowPane flow = new FlowPane(Orientation.VERTICAL);
    flow.setVgap(8);
    flow.setHgap(4);
    flow.setPrefWrapLength(300); // preferred width = 300
    for (int i = 0; i < 10; i++) {
        flow.getChildren().add(new Button("asdf"));
    }
    scene.setRoot(flow);

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

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    Scene scene = new Scene(new Group(), 450, 250);

    TilePane tile = new TilePane(Orientation.VERTICAL, 0.5, 0.5);
    tile.setHgap(8);/*w  w w.  ja va  2s  .  c o  m*/
    tile.setPrefColumns(4);
    for (int i = 0; i < 20; i++) {
        tile.getChildren().add(new CheckBox("asdf"));
    }

    HBox hbox = new HBox(10);
    hbox.setPadding(new Insets(20, 0, 0, 20));
    hbox.getChildren().setAll(tile);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(hbox);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 500, 200);
    stage.setScene(scene);/*from   w  ww .  j  a v a2  s  . c  o  m*/

    ScrollBar s1 = new ScrollBar();
    s1.setMax(500);
    s1.setMin(0);
    s1.setValue(100);
    s1.setUnitIncrement(30);
    s1.setBlockIncrement(35);

    s1.setOrientation(Orientation.VERTICAL);

    root.getChildren().add(s1);
    stage.show();
}

From source file:Main.java

License:asdf

@Override
public void start(Stage stage) {
    stage.setTitle("TitledPane");
    Scene scene = new Scene(new Group(), 450, 250);
    scene.setFill(Color.GHOSTWHITE);

    TilePane tile = new TilePane(Orientation.VERTICAL);
    tile.setHgap(8);//from  w ww  . j av  a2s.  c o m
    tile.setPrefColumns(4);
    for (int i = 0; i < 20; i++) {
        tile.getChildren().add(new CheckBox("asdf"));
    }

    HBox hbox = new HBox(10);
    hbox.setPadding(new Insets(20, 0, 0, 20));
    hbox.getChildren().setAll(tile);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(hbox);
    stage.setScene(scene);
    stage.show();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Split Views");
    Group root = new Group();
    Scene scene = new Scene(root, 350, 250, Color.WHITE);

    SplitPane splitPane = new SplitPane();
    splitPane.prefWidthProperty().bind(scene.widthProperty());
    splitPane.prefHeightProperty().bind(scene.heightProperty());

    VBox leftArea = new VBox(10);
    HBox rowBox = new HBox(20);
    final Text leftText = TextBuilder.create().text("Left ").translateX(20).fill(Color.RED)
            .font(Font.font(null, FontWeight.BOLD, 20)).build();

    rowBox.getChildren().add(leftText);/* ww w. j ava2s  .c o  m*/
    leftArea.getChildren().add(rowBox);

    leftArea.setAlignment(Pos.CENTER);

    SplitPane splitPane2 = new SplitPane();
    splitPane2.setOrientation(Orientation.VERTICAL);
    splitPane2.prefWidthProperty().bind(scene.widthProperty());
    splitPane2.prefHeightProperty().bind(scene.heightProperty());

    HBox centerArea = new HBox();

    final Text upperRight = TextBuilder.create().text("Text").x(100).y(50).fill(Color.RED)
            .font(Font.font(null, FontWeight.BOLD, 35)).translateY(50).build();
    centerArea.getChildren().add(upperRight);

    HBox rightArea = new HBox();

    final Text lowerRight = TextBuilder.create().text("Lower Right").x(100).y(50).fill(Color.RED)
            .font(Font.font(null, FontWeight.BOLD, 35)).translateY(50).build();
    rightArea.getChildren().add(lowerRight);

    splitPane2.getItems().add(centerArea);
    splitPane2.getItems().add(rightArea);

    splitPane.getItems().add(leftArea);

    splitPane.getItems().add(splitPane2);

    ObservableList<SplitPane.Divider> dividers = splitPane.getDividers();
    for (int i = 0; i < dividers.size(); i++) {
        dividers.get(i).setPosition((i + 1.0) / 3);
    }
    HBox hbox = new HBox();
    hbox.getChildren().add(splitPane);
    root.getChildren().add(hbox);

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

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXAtomAddPane.java

public CFBamJavaFXAtomAddPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamAtomObj argFocus) {//www.ja  va 2s. co m
    super();
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    setJavaFXFocus(argFocus);
    attrPane = argSchema.getAtomFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane(attrPane);
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXChainAddPane.java

public CFBamJavaFXChainAddPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamChainObj argFocus) {/*from ww w.  ja v a 2s. com*/
    super();
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    setJavaFXFocus(argFocus);
    attrPane = argSchema.getChainFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane(attrPane);
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXIndexAddPane.java

public CFBamJavaFXIndexAddPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamIndexObj argFocus) {//from w ww .  j  a  v  a  2 s. c  o m
    super();
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    setJavaFXFocus(argFocus);
    attrPane = argSchema.getIndexFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane(attrPane);
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamJavaFX.CFBamJavaFXParamAddPane.java

public CFBamJavaFXParamAddPane(ICFFormManager formManager, ICFBamJavaFXSchema argSchema,
        ICFBamParamObj argFocus) {/*  w  w w . j  a  va2  s. c  o  m*/
    super();
    final String S_ProcName = "construct-schema-focus";
    if (formManager == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 1,
                "formManager");
    }
    cfFormManager = formManager;
    if (argSchema == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 2,
                "argSchema");
    }
    // argFocus is optional; focus may be set later during execution as
    // conditions of the runtime change.
    javafxSchema = argSchema;
    setJavaFXFocus(argFocus);
    attrPane = argSchema.getParamFactory().newAttrPane(cfFormManager, argFocus);
    attrScrollPane = new ScrollPane(attrPane);
    attrScrollPane.setFitToWidth(true);
    attrScrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
    attrScrollPane.setVbarPolicy(ScrollBarPolicy.AS_NEEDED);
    attrScrollPane.setContent(attrPane);
    setOrientation(Orientation.VERTICAL);
    getItems().add(attrScrollPane);
}