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

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

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

Label.setPadding介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

label.setPadding(new Insets(20));
JFXRippler rippler = new JFXRippler(label);
rippler.setEnabled(false);
l1.setPadding(new Insets(20));
JFXRippler rippler1 = new JFXRippler(l1);
main.getChildren().add(rippler1);
l2.setPadding(new Insets(20));
JFXRippler rippler2 = new JFXRippler(l2);
main.getChildren().add(rippler2);
l3.setPadding(new Insets(20));
JFXRippler rippler3 = new JFXRippler(l3);
main.getChildren().add(rippler3);
l4.setPadding(new Insets(20));
JFXRippler rippler4 = new JFXRippler(l4);
main.getChildren().add(rippler4);
l5.setPadding(new Insets(20));
JFXRippler rippler5 = new JFXRippler(l5);
main.getChildren().add(rippler5);

代码示例来源:origin: jfoenixadmin/JFoenix

separatorLabel.setPadding(new Insets(0, 0, 4, 0));
separatorLabel.setTextFill(fadedColor);
separatorLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));

代码示例来源:origin: stackoverflow.com

selectedText.addListener((obs, oldSelectedText, newSelectedText) ->
{
  if (newSelectedText != null)
  {
    newSelectedText.setStyle("-fx-background-color: lightgray");

  }
});

FlowPane navigationBar = new FlowPane();
navigationBar.setMaxHeight(45);
navigationBar.setPadding(new Insets(5, 5, 5, 5));
navigationBar.setVgap(10);   
navigationBar.setHgap(0); // set to 0, instead add padding to every node

Label FirstIcon = FirstIcon();
FirstIcon.setPadding(new Insets( 5)); // add padding
Label SecIcon = SecIcon();
SecIcon.setPadding(new Insets( 5)); // add padding
Label ThurIcon = ThurIcon();
ThurIcon.setPadding(new Insets( 5)); // add padding

代码示例来源:origin: PhoenicisOrg/phoenicis

private void populateRepositoryLegend() {
  this.priorityHint = new Label(tr(
      "The value in front of each repository is its priority. The higher the priority is, the more important the scripts inside the repository are."));
  this.priorityHint.setWrapText(true);
  this.priorityHint.setPadding(new Insets(10));
}

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

/**
 * Constructs a new segmented bar.
 */
public SegmentedBar() {
  segments.addListener((Observable it) -> listenToValues());
  listenToValues();
  getStyleClass().add(DEFAULT_STYLE);
  setSegmentViewFactory(segment -> new SegmentView(segment));
  setInfoNodeFactory(segment -> {
    Label label = new Label("Value: " + segment.getValue());
    label.setPadding(new Insets(4));
    return label;
  });
}

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

titleLabel.setPadding(new Insets(0, 0, 0, TITLE_PADDING));
getChildren().add(titleLabel);

代码示例来源:origin: org.fxmisc.richtext/richtextfx

@Override
public Node apply(int idx) {
  Val<String> formatted = nParagraphs.map(n -> format(idx+1, n));
  Label lineNo = new Label();
  lineNo.setFont(DEFAULT_FONT);
  lineNo.setBackground(DEFAULT_BACKGROUND);
  lineNo.setTextFill(DEFAULT_TEXT_FILL);
  lineNo.setPadding(DEFAULT_INSETS);
  lineNo.setAlignment(Pos.TOP_RIGHT);
  lineNo.getStyleClass().add("lineno");
  // bind label's text to a Val that stops observing area's paragraphs
  // when lineNo is removed from scene
  lineNo.textProperty().bind(formatted.conditionOnShowing(lineNo));
  return lineNo;
}

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

tab1.setGraphic(pages);
Label label =new Label("Allgemein...");
label.setPadding(new Insets(15));
tab1.setContent(label);
tabPane.getTabs().add(tab1);
tab2.setGraphic(layout);
Label label2 = new Label("Etiketten");
label2.setPadding(new Insets(15));
tab2.setContent(label2);
tabPane.getTabs().add(tab2);
tab3.setGraphic(umbruch);
Label label3 = new Label("seitenleiste...");
label3.setPadding(new Insets(15));
tab3.setContent(label3);
tabPane.getTabs().add(tab3);
info.setPadding(new Insets(9, 0, 0, 0));

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

label.setPadding(new Insets(4));
setContentNode(label);

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

tab1.setGraphic(pages);
Label label = new Label("Dokument...");
label.setPadding(new Insets(15));
tab1.setContent(label);
tabPane.getTabs().add(tab1);
tab2.setGraphic(layout);
Label label2 = new Label("layout");
label2.setPadding(new Insets(15));
tab2.setContent(label2);
tabPane.getTabs().add(tab2);
tab3.setGraphic(umbruch);
Label label3 = new Label("Zeilenumbruch...");
label3.setPadding(new Insets(15));
tab3.setContent(label3);
tabPane.getTabs().add(tab3);
tab4.setGraphic(text);
Label label4 = new Label("Zeilenumbruch...");
label4.setPadding(new Insets(15));
tab4.setContent(label4);
tabPane.getTabs().add(tab4);
tab5.setGraphic(grafik);
Label label5 = new Label("Zeilenumbruch...");
label5.setPadding(new Insets(15));
tab5.setContent(label5);
tabPane.getTabs().add(tab5);

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.dialogs

messageLabel.setPadding(new Insets(14, 0, 0, 0));
messageLabel.setMaxWidth(Double.MAX_VALUE);
messageLabel.setPrefSize(420, 56);

代码示例来源:origin: org.jrebirth.af.showcase/fonticon

private Node buildTile(final IconFont iconFont) {
  final VBox box = new VBox();
  box.setAlignment(Pos.CENTER);
  box.setPrefSize(100, 50);
  final Label icon = new Label();
  iconFont.use(icon);
  icon.setPadding(new Insets(4));
  icon.setAlignment(Pos.CENTER);
  VBox.setVgrow(icon, Priority.ALWAYS);
  final Label text = new Label(iconFont.name());
  text.setAlignment(Pos.BOTTOM_CENTER);
  VBox.setVgrow(text, Priority.SOMETIMES);
  text.setTooltip(new Tooltip(iconFont.name()));
  box.getChildren().addAll(icon, text);
  // box.setStyle("-fx-background-color:red;");
  return box;
}

代码示例来源:origin: com.jfoenix/jfoenix

separatorLabel.setPadding(new Insets(0, 0, 4, 0));
separatorLabel.setTextFill(fadedColor);
separatorLabel.setFont(Font.font(ROBOTO, FontWeight.BOLD, 42));

代码示例来源:origin: com.intuit.karate/karate-core

Label consoleLabel = new Label("Console");
consoleLabel.setStyle("-fx-font-weight: bold");
consoleLabel.setPadding(new Insets(0, 0, 3.0, 3.0));
setTop(consoleLabel);
setPadding(App.PADDING_ALL);
resultLabel = new Label(idle);
resultLabel.setTextFill(Color.web("#8c8c8c"));
resultLabel.setPadding(new Insets(3.0, 0, 0, 0));
resultLabel.setFont(new Font(15));
textArea.focusedProperty().addListener((val, before, after) -> {

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

backLbl.textProperty().bind(control.backButtonLabelProperty());
backLbl.visibleProperty().bind(backButtonVisibility);
backLbl.setPadding(defaultInsets);
nextLbl = new Label();
nextLbl.setId(getClass().getName() + "nextButton");
nextLbl.textProperty().bind(control.nextButtonLabelProperty());
nextLbl.visibleProperty().bind(nextButtonVisibility);
nextLbl.setPadding(defaultInsets);
contentContainer = new VBox();
contentContainer.getStyleClass().add("containerVBox");

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

Label info = new Label("Zum Sch\u00FCtzen auf das Schloss klicken.");
info.setStyle("-fx-font-size: 12");
info.setPadding(new Insets(0, 0, 3, 0));
footerBox.getChildren().add(info);
mainBox.getChildren().add(footerBox);

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

Label info = new Label("Zum Sch\u00FCtzen auf das Schloss klicken.");
info.setStyle("-fx-font-size: 12");
info.setPadding(new Insets(0, 0, 3, 0));
footerBox.getChildren().add(info);

相关文章