Package javafx.scene.layout

Examples of javafx.scene.layout.ColumnConstraints


            }
        }).prefWidth(100.0).build();

        final HBox hBoxButtonArea = HBoxBuilder.create().alignment(Pos.CENTER).spacing(5.0).padding(new Insets(20)).children(buttonCreate, buttonCancel).build();

        final ColumnConstraints ccWidth20 = ColumnConstraintsBuilder.create().prefWidth(50.0).build();
        final ColumnConstraints ccWidth180 = ColumnConstraintsBuilder.create().prefWidth(150.0).build();

        // labels for team names
        final Label labelTeamRnk1 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank1")).build();
        final Label labelTeamRnk2 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank2")).build();
        final Label labelTeamRnk3 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank3")).build();
        final Label labelTeamRnk4 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank4")).build();
        final Label labelTeamRnk5 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank5")).build();
        final Label labelTeamRnk6 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank6")).build();
        final Label labelTeamRnk7 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank7")).build();
        final Label labelTeamRnk8 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank8")).build();
        final Label labelTeamRnk9 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank9")).build();
        final Label labelTeamRnk10 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank10")).build();
        final Label labelTeamRnk11 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank11")).build();
        final Label labelTeamRnk12 = LabelBuilder.create().text(ResourceLoader.getResource("label.team.rank12")).build();

        final GridPane gpTeams = GridPaneBuilder.create().alignment(Pos.TOP_LEFT).hgap(5.0).vgap(5.0).columnConstraints(ccWidth20, ccWidth180).build();
        gpTeams.add(labelTeamRnk1, 0, 0);
        gpTeams.add(tfTeamRnk1, 1, 0);
        gpTeams.add(labelTeamRnk2, 0, 1);
        gpTeams.add(tfTeamRnk2, 1, 1);
        gpTeams.add(labelTeamRnk3, 0, 2);
        gpTeams.add(tfTeamRnk3, 1, 2);
        gpTeams.add(labelTeamRnk4, 0, 3);
        gpTeams.add(tfTeamRnk4, 1, 3);
        gpTeams.add(labelTeamRnk5, 0, 4);
        gpTeams.add(tfTeamRnk5, 1, 4);
        gpTeams.add(labelTeamRnk6, 0, 5);
        gpTeams.add(tfTeamRnk6, 1, 5);
        gpTeams.add(labelTeamRnk7, 0, 6);
        gpTeams.add(tfTeamRnk7, 1, 6);
        gpTeams.add(labelTeamRnk8, 0, 7);
        gpTeams.add(tfTeamRnk8, 1, 7);
        gpTeams.add(labelTeamRnk9, 0, 8);
        gpTeams.add(tfTeamRnk9, 1, 8);
        gpTeams.add(labelTeamRnk10, 0, 9);
        gpTeams.add(tfTeamRnk10, 1, 9);
        gpTeams.add(labelTeamRnk11, 0, 10);
        gpTeams.add(tfTeamRnk11, 1, 10);
        gpTeams.add(labelTeamRnk12, 0, 11);
        gpTeams.add(tfTeamRnk12, 1, 11);

        final ColumnConstraints ccWidth80 = ColumnConstraintsBuilder.create().prefWidth(80.0).build();
        final ColumnConstraints ccWidth120 = ColumnConstraintsBuilder.create().prefWidth(120.0).build();

        final Label labelMatchday = LabelBuilder.create().text(ResourceLoader.getResource("label.firstMatchday")).build();
        final TextField tfMatchday = TextFieldBuilder.create().id("idTfMatchday").build();

        final GridPane gpMatchday = GridPaneBuilder.create().alignment(Pos.TOP_LEFT).hgap(5.0).vgap(5.0).columnConstraints(ccWidth80, ccWidth120).build();
View Full Code Here


    // construct a gridpane: one row, two columns
    gridPane = new GridPane();
    gridPane.setHgap(3);
    gridPane.add(textField, 0, 0);
    gridPane.add(imageView, 1, 0);
    ColumnConstraints column0 = new ColumnConstraints(100, 10, Double.MAX_VALUE);
    column0.setHgrow(Priority.ALWAYS);
    gridPane.getColumnConstraints().addAll(column0); // first column gets any extra width
   
    // add to self
    getSkinnable().getStyleClass().add(this.getClass().getSimpleName()); // always add self as style class, because CSS should relate to the skin not the control
    getChildren().add(gridPane);
View Full Code Here

    // get the things we decide on
    ArrowDirection lArrowDirection = getArrowDirection();
    ArrowPosition lArrowPosition = getArrowPosition();
   
    // get helper values
    ColumnConstraints lColumnValue = new ColumnConstraints(valueHolderNode.getMinWidth(), valueHolderNode.getPrefWidth(), Double.MAX_VALUE);
    lColumnValue.setHgrow(Priority.ALWAYS);
   
    // get helper values
    RowConstraints lRowValue = new RowConstraints(valueHolderNode.getMinHeight(), valueHolderNode.getPrefHeight(), Double.MAX_VALUE);
    lRowValue.setVgrow(Priority.ALWAYS);
View Full Code Here

   * construct the nodes
   */
  private void createNodes()
  {
    // setup the grid so all weekday togglebuttons will grow, but the weeknumbers do not
    ColumnConstraints lColumnConstraintsAlwaysGrow = new ColumnConstraints();
    lColumnConstraintsAlwaysGrow.setHgrow(Priority.ALWAYS);
    ColumnConstraints lColumnConstraintsNeverGrow = new ColumnConstraints();
    lColumnConstraintsNeverGrow.setHgrow(Priority.NEVER);

    // month spinner
    List<String> lMonthLabels = getMonthLabels();
    monthListSpinner = new ListSpinner<String>(lMonthLabels).withIndex(Calendar.getInstance().get(Calendar.MONTH)).withCyclic(Boolean.TRUE);
    monthListSpinner.setId("monthListSpinner");
View Full Code Here

    // show weeknumbers
    boolean lShowWeeknumbers = ShowWeeknumbers.YES.equals( getShowWeeknumbers() );
    int lWeeknumbersCols = (lShowWeeknumbers ? 1 : 0);
    
    // setup the grid so all weekday togglebuttons will grow, but the weeknumbers do not
    ColumnConstraints lColumnConstraintsAlwaysGrow = new ColumnConstraints();
    lColumnConstraintsAlwaysGrow.setHgrow(Priority.ALWAYS);
    ColumnConstraints lColumnConstraintsNeverGrow = new ColumnConstraints();
    lColumnConstraintsNeverGrow.setHgrow(Priority.NEVER);
    if (lShowWeeknumbers)
    {
      gridPane.getColumnConstraints().addAll(lColumnConstraintsNeverGrow);
    }
    gridPane.getColumnConstraints().addAll(lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow, lColumnConstraintsAlwaysGrow);
View Full Code Here

    // construct a gridpane: one row, two columns
    gridPane = new GridPane();
    gridPane.setHgap(3);
    gridPane.add(textField, 0, 0);
    gridPane.add(imageView, 1, 0);
    ColumnConstraints column0 = new ColumnConstraints(100, 10, Double.MAX_VALUE);
    column0.setHgrow(Priority.ALWAYS);
    gridPane.getColumnConstraints().addAll(column0); // first column gets any extra width
   
    // add to self
    getSkinnable().getStyleClass().add(this.getClass().getSimpleName()); // always add self as style class, because CSS should relate to the skin not the control
    getChildren().add(gridPane);
View Full Code Here

            GridPane.setConstraints(view, 1, 2, 2, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.SOMETIMES);
            GridPane.setConstraints(vBox, 0, 1, 1, 2, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.SOMETIMES);
            GridPane.setConstraints(vBoxRight, 3, 1, 1, 2, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.SOMETIMES);
            GridPane.setConstraints(statusField, 0, 3, 4, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
            grid.getColumnConstraints().addAll(
                    new ColumnConstraints(200,200,200, Priority.NEVER, HPos.RIGHT, true),
                    new ColumnConstraints(100, 100, Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER, true),
                    new ColumnConstraints(100,100,100, Priority.NEVER, HPos.RIGHT, true),
                    new ColumnConstraints(200,200,200, Priority.NEVER, HPos.RIGHT, true)
            );
            grid.getChildren().addAll(title1, vBox, locationField, goButton, title2, textVBox, view, vBoxRight, statusField);
            RowConstraints row1 = new RowConstraints();
            row2 = new RowConstraints();
            row3 = new RowConstraints();
View Full Code Here

        GridPane grid = new GridPane();
        grid.setPadding(new Insets(20));
        grid.setVgap(10);
        grid.setHgap(10);
        ColumnConstraints column1 = new ColumnConstraints();
        column1.setHalignment(HPos.RIGHT);
        grid.getColumnConstraints().add(column1);

        ColumnConstraints column2 = new ColumnConstraints();
        column2.setHalignment(HPos.LEFT);
        grid.getColumnConstraints().add(column2);

        /*
         * Toolbar section
         */
 
View Full Code Here

TOP

Related Classes of javafx.scene.layout.ColumnConstraints

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.