本文整理了Java中javafx.scene.layout.HBox.minWidthProperty()
方法的一些代码示例,展示了HBox.minWidthProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBox.minWidthProperty()
方法的具体详情如下:
包路径:javafx.scene.layout.HBox
类名称:HBox
方法名:minWidthProperty
暂无
代码示例来源:origin: stackoverflow.com
hBox.minWidthProperty().bind(title.widthProperty().subtract(25));
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public SingleLocationPrimaryMenuWithNavigationBar() {
super();
IconUtils.setHeaderNavigationBack(backIcon);
backIcon.setOnAction(e -> goBack());
backIcon.getStyleClass().remove("jfx-button");
backIcon.getStyleClass().remove("button");
backIcon.managedProperty().bind(backIcon.visibleProperty());
backIcon.setVisible(false);
final HBox box = NodeHelper.wrapInHbox(backIcon);
box.getStyleClass().add("ep-navbar-top-toolbar-back-icon-container");
topToolbar.getChildren().addAll(box, locationContainer);
getChildren().addAll(topToolbar, bottomToolbar);
topToolbar.getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar");
bottomToolbar.getStyleClass().add("ep-primary-menu-with-navbar-bottom-toolbar");
getStyleClass().add("ep-primary-menu-with-navbar-toolbar");
// location0.getStyleClass().add("current-location-item-label");
topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty());
topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty());
bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty());
NodeHelper.setHVGrow(topToolbar, bottomToolbar, this);
bottomToolbar.setVisible(false);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public PrimaryMenuWithNavigationBar() {
super();
IconUtils.setHeaderNavigationBack(backIcon);
backIcon.setOnAction(e -> goBack());
backIcon.getStyleClass().addAll("app-header-button", "hand-hover");
backIcon.managedProperty().bind(backIcon.visibleProperty());
// TO DO HANDLE PREVIOUS AND CURRENT
previousLocation.managedProperty().bind(previousLocation.visibleProperty());
previousLocation.setVisible(false);
topToolbar.getChildren().addAll(backIcon, currentLocation);
bottomToolbar.getChildren().add(previousLocation);
getChildren().addAll(topToolbar, bottomToolbar);
topToolbar.getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar");
bottomToolbar.getStyleClass().add("ep-primary-menu-with-navbar-bottom-toolbar");
getStyleClass().add("ep-primary-menu-with-navbar-toolbar");
topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty());
// topToolbar.maxWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty());
topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty());
bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty());
// bottomToolbar.maxWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty());
NodeHelper.setHVGrow(topToolbar, bottomToolbar, this);
bottomToolbar.setVisible(false);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public HeaderLeftToolBar() {
super();
minWidthProperty().bind(prefWidthProperty());
maxWidthProperty().bind(prefWidthProperty());
getStyleClass().add(EP_HEADER_LEFT_TOOLBAR);
getChildren().addAll(topToolbar, bottomToolbar);
NodeHelper.setVgrow(topToolbar, bottomToolbar);
topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.maxWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty());
topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty());
bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.maxWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty());
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @return
*/
public static Node headerVerticalSeparator() {
final HBox box = new HBox();
box.setStyle("-fx-background-color:white;-fx-opacity:0.70");
box.minHeightProperty().bind(box.prefHeightProperty());
box.maxHeightProperty().bind(box.prefHeightProperty());
box.minWidthProperty().bind(box.prefWidthProperty());
box.maxWidthProperty().bind(box.prefWidthProperty());
box.setPrefWidth(2);
box.setPrefHeight(30);
// translate the box because the toolbar is top right aligned
// we can not align the toolbar center, too complex to handle!!!
box.setTranslateY(-2);
return box;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public HeaderCenterToolBar() {
super();
minWidthProperty().bind(prefWidthProperty());
maxWidthProperty().bind(prefWidthProperty());
getChildren().addAll(topToolbar, bottomToolbar);
NodeHelper.setVgrow(topToolbar, bottomToolbar);
topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.maxWidthProperty().bind(topToolbar.prefWidthProperty());
topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty());
topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty());
bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.maxWidthProperty().bind(bottomToolbar.prefWidthProperty());
bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty());
bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty());
bottomToolbar.setVisible(false);
}
内容来源于网络,如有侵权,请联系作者删除!