javafx.scene.control.Button.setMinSize()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中javafx.scene.control.Button.setMinSize()方法的一些代码示例,展示了Button.setMinSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setMinSize()方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:setMinSize

Button.setMinSize介绍

暂无

代码示例

代码示例来源: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());
}

代码示例来源:origin: org.controlsfx/controlsfx

graphic.getStyleClass().setAll("graphic"); //$NON-NLS-1$
closeBtn.setGraphic(graphic);
closeBtn.setMinSize(17, 17);
closeBtn.setPrefSize(17, 17);
closeBtn.setFocusTraversable(false);

相关文章