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

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

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

Label.setLayoutX介绍

暂无

代码示例

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

@Override
public void start(Stage stage) {
  Pane root = new Pane();
  for(int i = 0 ;i < 4000; i++) {
    Label child = new Label("label" + i);
    child.setLayoutX(Math.random() * 500 + 100);
    child.setLayoutY(Math.random() * 500+ 100);
    root.getChildren().add(child);
  }
  root.getChildren().add(build());
  FPSDecorator decorator = new FPSDecorator(stage, root);
  final Scene scene = new Scene(decorator, 800, 800);
  stage.setScene(scene);
  stage.setResizable(true);
  stage.show();
  afterShow(stage);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Constructor
 */
public NavigationBar() {
 super();
 IconUtils.setHeaderNavigationBack(backIcon);
 backIcon.getStyleClass().addAll("transparent-focus", "empty-padding", "scale-down-on-click");
 backIcon.setOnAction(e -> goBack());
 pane.getChildren().addAll(location0, location1, backIcon);
 getChildren().add(pane);
 NodeHelper.setHVGrow(pane);
 getStyleClass().add("ep-header-center-area-nav-bar-container");
 location0.getStyleClass().add("previous-location-item-label");
 location1.getStyleClass().add("current-location-item-label");
 backIcon.setLayoutX(16);
 backIcon.setLayoutY(15);
 location0.setLayoutX(46);
 location0.setLayoutY(18);
 location1.setLayoutX(22);
 location1.setLayoutY(65);
}

代码示例来源:origin: nl.cloudfarming.client/calendar-api

x = -barXPosition;
  label.setLayoutX(x + TITLE_LABEL_INDENT);
} else {
  label.setText(SHORT_TEXT);
  label.setLayoutX(TITLE_LABEL_INDENT);
    expandedStateLabel.setLayoutX(x);

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

time.setLayoutX(ph.getWidth() - spacing - 32);
dateTxt.setLayoutX(time.getLayoutX() - spacing - dateTxt.getBoundsInLocal().getWidth());
dateTxt.setTextOrigin(VPos.BASELINE);

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

background.setHeight(newValue.getHeight());
  Dimension2D titleDim = textSize.calculate(control.getTitle(), openPatrician24);
  title.setLayoutX((newValue.getWidth() - titleDim.getWidth())/2 + frame.getInsetBackground().getX());
  titleBackground.setLayoutX((newValue.getWidth() - titleWidth)/2 + frame.getInsetBackground().getX() + 20);
  Dimension2D titleDim = textSize.calculate(control.getTitle(), openPatrician24);
  title.setLayoutX((frame.getBackgroundDimension().getWidth() - titleDim.getWidth())/2 + newValue.getX());
  titleBackground.setLayoutX((frame.getBackgroundDimension().getWidth() - titleWidth)/2 + newValue.getX() + 20);
});
title.textProperty().addListener((observable, oldValue, newValue) -> {
  Dimension2D titleDim = textSize.calculate(control.getTitle(), openPatrician24);
  title.setLayoutX((frame.getBackgroundDimension().getWidth() - titleDim.getWidth())/2 + frame.getInsetBackground().getX());
});
desc.textProperty().addListener((observable, oldValue, newValue) -> {

相关文章