Example usage for javafx.geometry Pos BASELINE_LEFT

List of usage examples for javafx.geometry Pos BASELINE_LEFT

Introduction

In this page you can find the example usage for javafx.geometry Pos BASELINE_LEFT.

Prototype

Pos BASELINE_LEFT

To view the source code for javafx.geometry Pos BASELINE_LEFT.

Click Source Link

Document

Represents positioning on the baseline vertically and on the left horizontally.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("VBox Test");

    VBox vb = new VBox();
    vb.setPadding(new Insets(10, 50, 50, 50));
    vb.setSpacing(10);/* www.j  a  v  a2 s. c om*/
    vb.setAlignment(Pos.BASELINE_LEFT);
    System.out.println(vb.getSpacing());

    Label lbl = new Label("VBox");
    lbl.setFont(Font.font("Amble CN", FontWeight.BOLD, 24));
    vb.getChildren().add(lbl);

    Button btn1 = new Button();
    btn1.setText("Button1");
    vb.getChildren().add(btn1);

    Button btn2 = new Button();
    btn2.setText("Button2");
    vb.getChildren().add(btn2);

    Button btn3 = new Button();
    btn3.setText("Button3");
    vb.getChildren().add(btn3);

    Button btn4 = new Button();
    btn4.setText("Button4");
    vb.getChildren().add(btn4);

    // Adding VBox to the scene
    Scene scene = new Scene(vb);
    primaryStage.setScene(scene);
    primaryStage.show();

}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("VBox Test");

    VBox vb = new VBox();
    vb.setPadding(new Insets(10, 50, 50, 50));
    vb.setSpacing(10);/*from ww  w.  j  av a  2 s  . com*/
    vb.setAlignment(Pos.BASELINE_LEFT);
    System.out.println(vb.alignmentProperty());

    Label lbl = new Label("VBox");
    lbl.setFont(Font.font("Amble CN", FontWeight.BOLD, 24));
    vb.getChildren().add(lbl);

    Button btn1 = new Button();
    btn1.setText("Button1");
    vb.getChildren().add(btn1);

    Button btn2 = new Button();
    btn2.setText("Button2");
    vb.getChildren().add(btn2);

    Button btn3 = new Button();
    btn3.setText("Button3");
    vb.getChildren().add(btn3);

    Button btn4 = new Button();
    btn4.setText("Button4");
    vb.getChildren().add(btn4);

    // Adding VBox to the scene
    Scene scene = new Scene(vb);
    primaryStage.setScene(scene);
    primaryStage.show();

}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("VBox Test");

    VBox vb = new VBox();
    vb.setPadding(new Insets(10, 50, 50, 50));
    vb.setSpacing(10);//from   ww  w .  ja  v a  2  s  . co m
    vb.setAlignment(Pos.BASELINE_LEFT);
    System.out.println(vb.getAlignment());

    Label lbl = new Label("VBox");
    lbl.setFont(Font.font("Amble CN", FontWeight.BOLD, 24));
    vb.getChildren().add(lbl);

    Button btn1 = new Button();
    btn1.setText("Button1");
    vb.getChildren().add(btn1);

    Button btn2 = new Button();
    btn2.setText("Button2");
    vb.getChildren().add(btn2);

    Button btn3 = new Button();
    btn3.setText("Button3");
    vb.getChildren().add(btn3);

    Button btn4 = new Button();
    btn4.setText("Button4");
    vb.getChildren().add(btn4);

    // Adding VBox to the scene
    Scene scene = new Scene(vb);
    primaryStage.setScene(scene);
    primaryStage.show();

}

From source file:com.thomaskuenneth.tkmactuning.TKMacTuning.java

@Override
public void start(Stage primaryStage) {
    TabPane tabPane = new TabPane();
    tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
    // Found here: http://stackoverflow.com/a/17488304/5956451
    tabPane.getStyleClass().add("floating");

    // TODO: propper error handling
    JSONTokener t = new JSONTokener(getClass().getResourceAsStream("resources/plugins.json"));
    JSONArray a = new JSONArray(t);
    a.forEach((Object anObject) -> {
        JSONObject jsonObject = (JSONObject) anObject;
        addPlugin(tabPane, jsonObject.getString("class"), jsonObject.getString("pluginName"));
    });/*from   www.  j  a v a  2s . c  om*/

    FlowPane buttonsPane = new FlowPane(Orientation.HORIZONTAL);
    buttonsPane.setPadding(LayoutConstants.PADDING_1);
    buttonsPane.setHgap(LayoutConstants.HORIZONTAL_CONTROL_GAP);
    buttonsPane.setAlignment(Pos.BASELINE_LEFT);
    final Button buttonReread = new Button(getString("reread"));
    buttonReread.setOnAction(event -> {
        PluginManager.reread(this);
    });
    buttonsPane.getChildren().add(buttonReread);
    final Button buttonApply = new Button(getString("apply"));
    buttonApply.setOnAction(event -> {
        PluginManager.save(this);
    });
    buttonsPane.getChildren().add(buttonApply);

    statusbar = new StatusBar();
    BorderPane borderPane = new BorderPane(tabPane);
    borderPane.setTop(buttonsPane);
    borderPane.setBottom(statusbar);
    primaryStage.setScene(new Scene(borderPane, 800, 600));
    primaryStage.setTitle(getString("application_name"));

    ready();
    primaryStage.show();
}

From source file:de.pixida.logtest.designer.logreader.LogReaderEditor.java

private void createDialogItems() {
    Validate.notNull(this.logReader); // Will be used to initialize input field values

    // CHECKSTYLE:OFF Yes, we are using lots of constants here. It does not make sense to name them using final variables.
    final GridPane gp = new GridPane();
    gp.setAlignment(Pos.BASELINE_LEFT);
    gp.setHgap(10d);// w w  w  . j  a  v  a  2  s .  c o  m
    gp.setVgap(15d);
    gp.setPadding(new Insets(5d));
    final ColumnConstraints column1 = new ColumnConstraints();
    final ColumnConstraints column2 = new ColumnConstraints();
    column1.setHgrow(Priority.NEVER);
    column2.setHgrow(Priority.SOMETIMES);
    gp.getColumnConstraints().addAll(column1, column2);
    this.insertConfigItemsIntoGrid(gp, this.createConfigurationForm());
    final TitledPane configPane = new TitledPane("Edit Configuration", gp);
    configPane.setGraphic(Icons.getIconGraphics("pencil"));
    configPane.setCollapsible(false);

    final VBox lines = this.createRunForm();
    final TitledPane testPane = new TitledPane("Test Configuration", lines);
    testPane.setGraphic(Icons.getIconGraphics("script_go"));
    testPane.setCollapsible(false);

    final VBox panes = new VBox(configPane, testPane);
    panes.setSpacing(10d);
    final ScrollPane sp = new ScrollPane(panes);
    sp.setPadding(new Insets(10d));
    sp.setFitToWidth(true);
    this.setCenter(sp);
    // CHECKSTYLE:ON
}

From source file:de.pixida.logtest.designer.testrun.TestRunEditor.java

public TitledPane createPanelForConfiguration() {
    final GridPane gp = new GridPane();
    gp.setAlignment(Pos.BASELINE_LEFT);
    final double hGapOfGridPane = 10d;
    gp.setHgap(hGapOfGridPane);/*w  ww  . j  ava  2  s. co  m*/
    final double vGapOfGridPane = 15d;
    gp.setVgap(vGapOfGridPane);
    final double paddingOfGridPane = 5d;
    gp.setPadding(new Insets(paddingOfGridPane));
    final ColumnConstraints column1 = new ColumnConstraints();
    final ColumnConstraints column2 = new ColumnConstraints();
    column1.setHgrow(Priority.NEVER);
    column2.setHgrow(Priority.SOMETIMES);
    gp.getColumnConstraints().addAll(column1, column2);
    this.insertConfigItemsIntoGrid(gp, this.createConfigurationForm());
    final TitledPane configPane = new TitledPane("Edit Configuration", gp);
    configPane.setGraphic(Icons.getIconGraphics("pencil"));
    configPane.setCollapsible(false);
    return configPane;
}