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

x33g5p2x  于2022-01-23 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(127)

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

Label.setMaxSize介绍

暂无

代码示例

代码示例来源:origin: com.aquafx-project/aquafx

private void newSection(String name, int spacing, Node ...children) {
  Label sectionLabel = new Label(name);
  sectionLabel.getStyleClass().add("section-label");
  sectionLabel.setMaxSize(Double.MAX_VALUE,Double.MAX_VALUE);
  HBox box = new HBox(spacing);
  box.getStyleClass().add("section-border");
  box.getChildren().addAll(children);
  setConstraints(sectionLabel, 0, rowIndex, 1, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
  setConstraints(box, 1, rowIndex++);
  getChildren().addAll(sectionLabel, box);
  sections.add(new Section(name, sectionLabel, box));
  content.put(name, box);
}

代码示例来源:origin: com.aquafx-project/aquafx

private void newDetailedSection(String[] labels, Node ...children) {
  Label sectionLabel = new Label(labels[0]);
  sectionLabel.getStyleClass().add("section-label");
  sectionLabel.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
  HBox hbox = new HBox(10);
  for (int n = 0; n < children.length; n++ ) {
    VBox vbox = new VBox(10);
    vbox.getStyleClass().add("section-border");
    vbox.setAlignment(Pos.CENTER);
    Label stateLabel = new Label(labels[n+1]);
    stateLabel.getStyleClass().add("section-label");
    vbox.getChildren().add(stateLabel);
    vbox.getChildren().add(children[n]);
    hbox.getChildren().addAll(vbox);
  }
  setConstraints(sectionLabel, 0, rowIndex,1,1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS,Priority.ALWAYS);
  setConstraints(hbox, 1, rowIndex++);
  getChildren().addAll(sectionLabel, hbox);
  sections.add(new Section(labels[0], sectionLabel, hbox));
  content.put(labels[0], hbox);
}

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

title = new Label();
  title.getStyleClass().add("title"); //$NON-NLS-1$
  title.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
  GridPane.setHgrow(title, Priority.ALWAYS);
label.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
GridPane.setVgrow(label, Priority.ALWAYS);
GridPane.setHgrow(label, Priority.ALWAYS);

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

label.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
label.textProperty().bind(statusBar.textProperty());
label.graphicProperty().bind(statusBar.graphicProperty());

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

title.setMaxSize(MAX_VALUE, MAX_VALUE);
title.setAlignment(Pos.CENTER);
title.getStyleClass().add("text"); //$NON-NLS-1$
closeIcon.setMaxSize(MAX_VALUE, MAX_VALUE);
closeIcon.setContentDisplay(GRAPHIC_ONLY);
closeIcon.visibleProperty().bind(

相关文章