本文整理了Java中javafx.scene.layout.HBox.widthProperty()
方法的一些代码示例,展示了HBox.widthProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBox.widthProperty()
方法的具体详情如下:
包路径:javafx.scene.layout.HBox
类名称:HBox
方法名:widthProperty
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
container.getChildren().add(new Label("Selection Path..."));
container.setAlignment(Pos.CENTER_LEFT);
container.widthProperty().addListener(observable -> setHvalue(getHmax()));
setContent(container);
setPannable(true);
代码示例来源:origin: stackoverflow.com
HBox buttonLayout = new HBox();
buttonLayout.getChildren().add(button1);
buttonLayout.getChildren().add(button1);
HBox.setHgrow(button1, Priority.ALWAYS);
HBox.setHgrow(button2, Priority.ALWAYS);
int btnCount = buttonLayout.getChildren().size();
button1.prefWidthProperty().bind(buttonLayout.widthProperty().divide(btnCount));
button2.prefWidthProperty().bind(buttonLayout.widthProperty().divide(btnCount));
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public static HBox horizontalViewActions(AbstractViewController controller, VLViewComponentXML actionsConfiguration, OperationData forModel) {
HBox box = new HBox();
if(!AbstractApplicationRunner.isDesktop()) {
NodeHelper.setHgrow(box);
box.widthProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
double d = newValue.doubleValue() / box.getChildren().size();
for(Node node: box.getChildren()) {
ReflectionUIUtils.setPrefWidth(node, d);
}
}});
}
box.getStyleClass().add("ep-view-actions-container");
NodeHelper.setStyleClass(box, actionsConfiguration, "styleClass", true);
List<Node> actionPresenters = process(controller, actionsConfiguration, forModel);
for(Node n : actionPresenters) {
box.getChildren().add(n);
if(!AbstractApplicationRunner.isDesktop()) {
NodeHelper.setHgrow(n);
}
}
return box;
}
代码示例来源:origin: stackoverflow.com
msgArea.prefWidthProperty().bind(msgBox.widthProperty().subtract(sendButton.widthProperty()));
msgArea.addEventFilter(KeyEvent.KEY_PRESSED, e -> {
if (e.getCode().equals(KeyCode.ENTER)) {
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
navigationBar.getChildren().addAll(back, action, next);
navigationBar.setLayoutX((CloseButtonDialog.WIDTH - navigationBar.getWidth()) / 2);
navigationBar.widthProperty().addListener((observable, oldWidth, newWidth) ->
navigationBar.setLayoutX((CloseButtonDialog.WIDTH - newWidth.doubleValue()) / 2));
navigationBar.setLayoutY(CLOSE_BTN_Y_POS - 64);
代码示例来源:origin: stackoverflow.com
rect.widthProperty().bind(hBox.widthProperty().subtract(20));
代码示例来源:origin: stackoverflow.com
dataPane.prefWidthProperty().bind(hbox.widthProperty());
代码示例来源:origin: com.jfoenix/jfoenix
container.getChildren().add(new Label("Selection Path..."));
container.setAlignment(Pos.CENTER_LEFT);
container.widthProperty().addListener(observable -> setHvalue(getHmax()));
setContent(container);
setPannable(true);
内容来源于网络,如有侵权,请联系作者删除!