for (final Button button : dummyButtons()) { GridPane.setRowIndex(button, i / (int) nColumns); GridPane.setColumnIndex(button, i % (int) nColumns); button.setMinSize(MIN_TILE_SIZE, MIN_TILE_SIZE); button.setMaxSize(MAX_TILE_SIZE, MAX_TILE_SIZE); gridPane.getChildren().add(button); i++; } for (int j = 0; j < nColumns; j++) { ColumnConstraints cc = new ColumnConstraints(); cc.setHgrow(Priority.ALWAYS); gridPane.getColumnConstraints().add(cc); } for (int j = 0; j < nRows; j++) { RowConstraints rc = new RowConstraints(); rc.setVgrow(Priority.ALWAYS); gridPane.getRowConstraints().add(rc); }
/** * create an XYTab Pane with the given iconSize * * @param iconSize * - e.g. 48 */ public XYTabPane(int iconSize) { super(); this.iconSize = iconSize; this.currentTab = TabSelection.getInstance(); setvTabPane(this.addTabPane("vTabPane")); getvTabPane().setSide(Side.LEFT); Tab filler = new Tab(); topLeftButton = new Button(); int tabSize = getTabSize(); topLeftButton.setMinSize(tabSize, tabSize); topLeftButton.setMaxSize(tabSize, tabSize); topLeftButton.setDisable(true); filler.setGraphic(topLeftButton); filler.setDisable(true); getvTabPane().getTabs().add(filler); this.addToMaps(filler, vTabPane); fontAwesome = GlyphFontRegistry.font("FontAwesome"); super.getChildren().add(getvTabPane()); }
graphic.getStyleClass().setAll("graphic"); //$NON-NLS-1$ closeBtn.setGraphic(graphic); closeBtn.setMinSize(17, 17); closeBtn.setPrefSize(17, 17); closeBtn.setFocusTraversable(false);