Examples of GridPane


Examples of javafx.scene.layout.GridPane

   * @return the background display {@linkplain Region}
   */
  public static final GridPane createBackgroundDisplay(final Insets padding, final double gapBetweenChildren,
      final int numItemsPerRow, final boolean gaugeStyle, final int startCol, final int startRow,
      final Node... nodes) {
    final GridPane grid = new GridPane();
    if (padding != null) {
      grid.setPadding(padding);
    }
    grid.setHgap(gapBetweenChildren);
    grid.setVgap(gapBetweenChildren);
    int col = (startCol >= 0 ? startCol : 0)-1, row = startRow >= 0 ? startRow : 0;
    for (final Node node : nodes) {
      if (gaugeStyle) {
        node.getStyleClass().add("gauge");
      }
      grid.add(node, ++col, row);
      row = col == (numItemsPerRow - 1) ? row + 1 : row;
      col = col == (numItemsPerRow - 1) ? -1 : col;
    }
//    grid.setAlignment(Pos.CENTER_LEFT);
    grid.getStyleClass().add("background-display");
    return grid;
  }
View Full Code Here

Examples of javafx.scene.layout.GridPane

        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();
        gpMatchday.add(labelMatchday, 0, 0);
        gpMatchday.add(tfMatchday, 1, 0);

        final VBox vBoxCenter = VBoxBuilder.create().children(gpTeams, gpMatchday, hBoxButtonArea).spacing(5.0).padding(new Insets(10, 10, 10, 10)).build();

        parent.setTop(vBoxTop);
        parent.setCenter(vBoxCenter);
View Full Code Here

Examples of jfxtras.scene.layout.GridPane

  /**
   *
   */
  public Parent getRootNode()
  {
    gridPane = new GridPane()
      .withHGap(5)
      .withVGap(5)
      .withPadding(new Insets(10, 10, 10, 10))
      .withGridLinesVisible(true);
 
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

    @Override
    public void install(Component component) {
        super.install(component);

        GridPane gridPane = (GridPane)component;
        gridPane.getGridPaneListeners().add(this);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

        gridPane.getGridPaneListeners().add(this);
    }

    @Override
    public int getPreferredWidth(int height) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellHeight = getCellHeight(height, metadata);
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellWidth = getCellWidth(width, metadata);
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

        return preferredHeight;
    }

    @Override
    public Dimensions getPreferredSize() {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        // calculate the maximum preferred cellWidth and cellHeight
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

        return new Dimensions(preferredWidth, preferredHeight);
    }

    @Override
    public int getBaseline(int width, int height) {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        Metadata metadata = new Metadata();

        int cellWidth = getCellWidth(width, metadata);
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

        return baseline;
    }

    @Override
    public void layout() {
        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        int width = getWidth();
        int height = getHeight();
View Full Code Here

Examples of org.apache.pivot.wtk.GridPane

    @Override
    public void paint(Graphics2D graphics) {
        super.paint(graphics);

        GridPane gridPane = (GridPane)getComponent();

        GridPane.RowSequence rows = gridPane.getRows();

        int columnCount = gridPane.getColumnCount();
        int rowCount = rows.getLength();

        int width = getWidth();
        int height = getHeight();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.