javafx.scene.Parent.layout()方法的使用及代码示例

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

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

Parent.layout介绍

暂无

代码示例

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

((Parent) child).layout();
double alignedWidth = alignToChild.getLayoutBounds().getWidth();
double alignedX = alignToChild.getLayoutX();

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

@Override
public void handle(MouseEvent mouseEvent) {
  MouseButton mouseButton = mouseEvent.getButton();
  if (MouseButton.PRIMARY.equals(mouseButton) && listViewHidden) {
    setPrefWidth(LIST_VIEW_WIDTH);
    setMaxWidth(LIST_VIEW_WIDTH);
    listViewHidden = false;
    getChildren().clear();
    setCenter(treeViewPane);
    layout();
    getParent().layout();
  }
}

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

@Override
  public void handle(MouseEvent mouseEvent) {
    MouseButton mouseButton = mouseEvent.getButton();
    if (MouseButton.PRIMARY.equals(mouseButton) && !listViewHidden) {
      setPrefWidth(HIDDEN_LIST_VIEW_WIDTH);
      setMaxWidth(HIDDEN_LIST_VIEW_WIDTH);
      listViewHidden = true;
      getChildren().clear();
      setCenter(hiddenPane);
      layout();
      getParent().layout();
    }
  }
});

代码示例来源:origin: com.guigarage/responsivefx

public static void addResponsiveToWindow(Window window) {
  StringProperty stylesheet = new SimpleStringProperty(getCurrentResponsiveStylesheet(window));
  Util.bindStyleSheetToWindow(window, stylesheet);
  updatePseudoClassesForAllChildren(window);
  //TODO: Falsch! Hier muss der ursprünglich gesetzte Wert gespeichert werden! managed müsste eine styledProperty sein
  updateManagedPropertyForAllChildren(window);
  Util.registerRecursiveChildObserver(window, n -> removeAllPseudoClasses(n), n -> updatePseudoClasses(n, getTypeForWindow(window)));
  window.widthProperty().addListener(e -> {
    stylesheet.setValue(getCurrentResponsiveStylesheet(window));
    updatePseudoClassesForAllChildren(window);
    updateManagedPropertyForAllChildren(window);
  });
  window.getScene().getRoot().layout();
}

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

((Parent) child).layout();
double alignedWidth = alignToChild.getLayoutBounds().getWidth();
double alignedX = alignToChild.getLayoutX();

相关文章