本文整理了Java中javafx.scene.control.Button.setMaxSize()
方法的一些代码示例,展示了Button.setMaxSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setMaxSize()
方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:setMaxSize
暂无
代码示例来源:origin: torakiki/pdfsam
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);
}
代码示例来源:origin: stackoverflow.com
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);
}
代码示例来源:origin: com.bitplan.gui/com.bitplan.javafx
/**
* 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());
}
内容来源于网络,如有侵权,请联系作者删除!