本文整理了Java中javafx.scene.layout.HBox.managedProperty()
方法的一些代码示例,展示了HBox.managedProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HBox.managedProperty()
方法的具体详情如下:
包路径:javafx.scene.layout.HBox
类名称:HBox
方法名:managedProperty
暂无
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
protected HBox buildSelector() {
HBox selector = new HBox();
selector.getStyleClass().add("wizard-form-fieldset-selector");
// displayed only if have more than one bloc
selector.managedProperty().bind(Bindings.size(fieldsets).greaterThan(1));
return selector;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
this.controller = (AbstractViewController) controller;
if (configuration != null) {
Optional<VLViewComponentXML> footer = configuration.getComponentById("Footer");
if (footer.isPresent()) {
componentXML = footer.get();
List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(this.controller, componentXML.getSubcomponents());
if (buildables.size() > 0) {
display = new HBox();
display.managedProperty().bind(display.visibleProperty());
for(IBuildable e: buildables) {
display.getChildren().add(e.getDisplay());
}
NodeHelper.styleClassAddAll(display, componentXML, "styleClass", "ep-bloc-footer");
}
}
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public STVTopToolbar(AbstractViewController controller, VLViewComponentXML tableConfiguration) {
super();
this.controller = controller;
this.tableConfiguration = tableConfiguration;
modifyingToolbar.managedProperty().bind(modifyingToolbar.visibleProperty());
defaultToolbar.managedProperty().bind(defaultToolbar.visibleProperty());
NodeHelper.setHgrow(modifyingToolbar);
NodeHelper.setHgrow(defaultToolbar);
defaultToolbar.setVisible(true);
modifyingToolbar.setVisible(false);
defaultToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 8 16 16 16;" + "-fx-spacing: 16;" + "-fx-border-color: -grey-color-300;"
+ "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 64;");
modifyingToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment: CENTER;" + "-fx-padding: 16;" + "-fx-spacing: 16;" + "-fx-border-color: -border-color;" + "-fx-border-width: 0.25 0 0 0;"
+ "-fx-pref-height: 64;");
}
代码示例来源:origin: Tristan971/Lyrebird
@Override
public void initialize() {
LOG.debug("New tweet stage ready.");
enableTweetLengthCheck();
Buttons.setOnClick(sendButton, this::send);
Buttons.setOnClick(pickMediaButton, this::openMediaAttachmentsFilePicker);
final BooleanBinding mediasNotEmpty = mediasToUpload.emptyProperty().not();
mediaPreviewBox.visibleProperty().bind(mediasNotEmpty);
mediaPreviewBox.managedProperty().bind(mediasNotEmpty);
inReplyStatus.addListener((o, prev, cur) -> prefillMentionsForReply());
sendOnControlEnter();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
private void buildFilterToolbar() {
filtersToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 16 16 16 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;"
+ "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;");
getChildren().add(filtersToolbar);
NodeHelper.setHgrow(filtersToolbar);
filtersToolbar.managedProperty().bind(filtersToolbar.visibleProperty());
final Hyperlink filterToolBarButton = new Hyperlink();
defaultToolbar.getChildren().add(filterToolBarButton);
filterToolBarButton.setOnAction(e -> {
filtersToolbar.visibleProperty().set(!filtersToolbar.visibleProperty().get());
});
filtersToolbar.setVisible(false);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
super.buildFrom(controller, configuration);
layout.managedProperty().bind(layout.visibleProperty());
String position = configuration.getPropertyValue("position", "right");
if ("right".equals(position)) {
layout.getChildren().add(2, NodeHelper.horizontalSpacer());
} else if ("left".equals(position)) {
layout.getChildren().add(NodeHelper.horizontalSpacer());
}
// center default
else {
layout.getChildren().add(2, NodeHelper.horizontalSpacer());
layout.getChildren().add(NodeHelper.horizontalSpacer());
}
NodeHelper.styleClassSetAll(layout, configuration, "loadMoreLayoutStyleClass", "loadmore-pagination-bar");
NodeHelper.styleClassSetAll(nextButton, configuration, "loadMoreButtonStyleClass", "load-more-pagination-button");
NodeHelper.styleClassSetAll(previousButton, configuration, "loadLessButtonStyleClass", "load-more-pagination-button");
nextButton.setOnAction(e -> {
direction = Direction.NEXT;
pageable.nextPage(model);
});
previousButton.setOnAction(e -> {
direction = Direction.PREVIOUS;
pageable.loadLess(model);
});
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Build the modify button.
*/
private void buildModifyButton() {
modifyButton.getStyleClass().addAll("table-toolbar-action", "ep-button");
modifyButton.setOnAction(e -> modifyClicked(controller));
modifyButton.setText(controller.getGLocalised("EDIT_LABEL").toUpperCase());
IconUtils.setFontIcon("gmi-more-horiz:18", modifyButton);
allOverWrapper.getChildren().add(modifyButton);
if (selectable.get()) {
//thickButton.setOnAction(e -> thickClicked());
//modifyingActionsWrapper.getChildren().add(0, thickButton);
}
NodeHelper.setHgrow(modifyingActionsWrapper);
modifyingActionsWrapper.visibleProperty().bind(((IModifiableToolbarHolder) toolbarHolder).modifyingProperty());
modifyingActionsWrapper.managedProperty().bind(modifyingActionsWrapper.visibleProperty());
rootContainer.getChildren().add(modifyingActionsWrapper);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
super.buildFrom(controller, configuration);
layout.managedProperty().bind(layout.visibleProperty());
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
private void buildSearchFilter() {
searchToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 8 16 8 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;"
+ "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;");
getChildren().addAll(searchToolbar);
NodeHelper.setHgrow(searchToolbar);
searchToolbar.managedProperty().bind(searchToolbar.visibleProperty());
final CustomTextField customTextField = new CustomTextField();
customTextField.setPrefWidth(350);
final Button searchIconRight = new Button("Go");
searchIconRight.setFocusTraversable(false);
searchIconRight.setOnAction(e -> {
Method method = null;
try {
method = controller.getClass().getMethod("runSearch", Event.class);
method.invoke(controller, e);
} catch (final Exception e1) {
e1.printStackTrace();
}
});
final Hyperlink searchToolBarButton = new Hyperlink();
defaultToolbar.getChildren().add(searchToolBarButton);
searchToolBarButton.setOnAction(e -> {
searchToolbar.visibleProperty().set(!searchToolbar.visibleProperty().get());
});
searchToolbar.getChildren().addAll(NodeHelper.horizontalSpacer(), customTextField, searchIconRight, NodeHelper.horizontalSpacer());
searchToolbar.setVisible(false);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
super.process();
headerBottomSectionHbox.managedProperty().bind(headerBottomSectionHbox.visibleProperty());
headerTopSectionHbox.managedProperty().bind(headerTopSectionHbox.visibleProperty());
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
allOverWrapper.managedProperty().bind(allOverWrapper.visibleProperty());
代码示例来源: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: Tristan971/Lyrebird
@Override
public void initialize() {
currentViewButton.addListener((o, prev, current) -> {
if (prev != null) {
prev.setDisable(false);
prev.setOpacity(1.0);
}
current.setDisable(true);
current.setOpacity(0.5);
});
setUpTweetButton();
bindActionImageToLoadingView(timeline, TIMELINE);
bindActionImageToLoadingView(mentions, MENTIONS);
bindActionImageToLoadingView(directMessages, DIRECT_MESSAGES);
credits.setOnMouseClicked(e -> openCreditsView());
sessionManager.isLoggedInProperty().addListener((o, prev, cur) -> handleLogStatusChange(prev, cur));
handleLogStatusChange(false, sessionManager.isLoggedInProperty().getValue());
loadCurrentAccountPanel();
update.managedProperty().bind(updateService.isUpdateAvailableProperty());
update.visibleProperty().bind(updateService.isUpdateAvailableProperty());
update.setOnMouseClicked(e -> openUpdatesScreen());
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!