public DashboardTile(String title, String description, Node graphic) { getStyleClass().addAll("dashboard-modules-tile"); Label titleLabel = new Label(title); titleLabel.getStyleClass().add("dashboard-modules-tile-title"); if (nonNull(graphic)) { titleLabel.setGraphic(graphic); } Label textLabel = new Label(description); textLabel.getStyleClass().add("dashboard-modules-tile-text"); textLabel.setMinHeight(USE_PREF_SIZE); VBox topTile = new VBox(5); topTile.getChildren().addAll(titleLabel, textLabel); button.getStyleClass().add("dashboard-modules-invisible-button"); button.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE); armed.bind(button.armedProperty()); getChildren().addAll(new StackPane(topTile, button)); setMaxHeight(USE_PREF_SIZE); setMinHeight(USE_PREF_SIZE); }
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()); }