本文整理了Java中javafx.scene.control.Label.managedProperty()
方法的一些代码示例,展示了Label.managedProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.managedProperty()
方法的具体详情如下:
包路径:javafx.scene.control.Label
类名称:Label
方法名:managedProperty
暂无
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
private void buildCollpaseExpandIndicator() {
final boolean collapsible = blocConfig.booleanPropertyValueOf("collapsible").orElse(true);
if (collapsible) {
// action on the mouse event on the hbox only
addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand());
buildCollapsedIcon();
buildExpandedcon();
final StackPane wrapper = new StackPane();
collpasedLabel.managedProperty().bind(Bindings.not(expanded));
collpasedLabel.getStyleClass().addAll(FORM_BLOC_TITLE_LABEL_COLLAPSE_ICON, "hand-hover");
collpasedLabel.visibleProperty().bind(collpasedLabel.managedProperty());
expandedLabel.managedProperty().bind(expanded);
expandedLabel.getStyleClass().addAll(FORM_BLOC_TITLE_LABEL_COLLAPSE_ICON, "hand-hover");
expandedLabel.visibleProperty().bind(expandedLabel.managedProperty());
expanded.set(true);
wrapper.getChildren().add(0, collpasedLabel);
wrapper.getChildren().add(0, expandedLabel);
wrapper.setStyle("-fx-max-width:28;-fx-min-width:28;");
internalLayout.getChildren().addAll( NodeHelper.horizontalSpacer(),wrapper);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
protected void buildCollpaseExpand() {
StackPane wrapper = new StackPane();
FontIcon collpasedLabelicon = new FontIcon("fa-arrow-right:20");
collpasedLabel.setGraphic(collpasedLabelicon);
FontIcon expandedLabelicon = new FontIcon("fa-arrow-left:20");
expandedLabel.setGraphic(expandedLabelicon);
collpasedLabel.managedProperty().bind(Bindings.not(collpased));
collpasedLabel.visibleProperty().bind(collpasedLabel.managedProperty());
expandedLabel.managedProperty().bind(collpased);
expandedLabel.visibleProperty().bind(expandedLabel.managedProperty());
collpased.set(true);
wrapper.getChildren().addAll(collpasedLabel, expandedLabel);
wrapper.setStyle("-fx-max-width:48;-fx-min-width:48;");
collpasedLabel.addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand());
expandedLabel.addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand());
// !! should be las items
// child class should handle this
rootContainer.getChildren().add(wrapper);
}
代码示例来源:origin: Tristan971/Lyrebird
@Override
public void initialize() {
notificationPane.visibleProperty().bind(shouldDisplay);
notificationPane.managedProperty().bind(shouldDisplay);
notificationPane.setOnMouseClicked(e -> shouldDisplay.setValue(false));
notificationContent.textProperty().addListener((observable, oldValue, newValue) -> {
notificationContent.visibleProperty().setValue(!newValue.isEmpty());
notificationContent.managedProperty().setValue(!newValue.isEmpty());
});
LOG.debug("Starting internal notification system. Listening on new notification requests.");
internalNotificationSystem.notificationProperty().addListener((o, prev, cur) -> this.handleChange(cur));
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public SimpleDetailsPaneTitle() {
setStyle(
"-fx-background-color: transparent;" + "-fx-pref-height: 64;" + "-fx-padding: 2em;" + "-fx-border-color: -grey-color-300;" + "-fx-border-width: 0 1 0.4 1;" + "-fx-alignment: CENTER_LEFT;");
titleDescriptionContainer.setStyle("-fx-background-color: transparent;" + "-fx-spacing: 10;" + "-fx-alignment:CENTER_LEFT;");
titleLabel = new Label();
titleLabel.getStyleClass().add("h2");
titleDescriptionContainer.getChildren().add(titleLabel);
descriptionLabel = new Label();
descriptionLabel.setOpacity(0.44);
descriptionLabel.visibleProperty().bind(descriptionLabel.textProperty().isNotEmpty());
descriptionLabel.managedProperty().bind(descriptionLabel.visibleProperty());
titleDescriptionContainer.getChildren().add(descriptionLabel);
getChildren().add(titleDescriptionContainer);
getChildren().add(rightContainer);
NodeHelper.setHVGrow(titleDescriptionContainer);
NodeHelper.setHgrow(rightContainer);
rightContainer.setStyle("-fx-alignment:CENTER_RIGHT;");
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
description.managedProperty().bind(description.visibleProperty());
description.visibleProperty().bind(Bindings.isNotEmpty(description.textProperty()));
internalLayout.getChildren().add(description);
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxplatform-components
/**
* Build the header
*/
private void buildHeader() {
NodeHelper.setTitle(title, configuration, controller);
NodeHelper.styleClassAddAll(title, configuration, "titleStyleClass", "h4");
title.managedProperty().bind(title.visibleProperty());
boolean displayTitle = configuration.getBooleanProperty("displayTitle", true);
title.visibleProperty().set(displayTitle);
String listViewId = configuration.getPropertyValue("listViewId");
if (StringUtils.isNotBlank(listViewId)) {
listView.setId(listViewId);
}
// description
String description = configuration.getPropertyValue("description");
NodeHelper.setHVGrow(this.description);
if (StringUtils.isNotBlank(description)) {
String lb = controller.getLocalised(description);
Text text = new Text();
NodeHelper.styleClassAddAll(text, configuration, "descriptionStyleClass", "medium-description");
text.setText(lb);
this.description.getChildren().add(text);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* {@inheritDoc}
*/
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
this.configuration = configuration;
this.controller = (AbstractViewController) controller;
loadFXML();
NodeHelper.styleClassAddAll(tableHeaderRootPane, configuration, "styleClass");
NodeHelper.setTitle(headerTitle, configuration, (AbstractViewController) controller, true);
NodeHelper.styleClassSetAll(headerTitle, configuration, "titleStyleClass", "ep-table-title-label");
NodeHelper.styleClassAddAll(titleContainer, configuration, "titleContainerStyleClass");
filterTextField.managedProperty().bind(filterTextField.visibleProperty());
filterTextField.setPromptText("Find in table");
boolean filtrable = configuration.getBooleanProperty("filtrable", true);
filterTextField.setVisible(filtrable);
((FullTableStructureController) controller).processedElementProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> {
AbstractTableStructure ts = (AbstractTableStructure) ((FullTableStructureController) controller).processedElementProperty().get();
if (ts.getToolbar().isPresent()) {
Node tb = ts.getToolbar().get();
HBox.setHgrow(tb, Priority.NEVER);
actionsContainer.getChildren().add(tb);
}
});
setRootModel();
headerTitle.managedProperty().bind(headerTitle.visibleProperty());
headerTitle.visibleProperty().bind(Bindings.size(titleContainer.getChildren()).isEqualTo(0));
titleContainer.visibleProperty().bind(Bindings.size(titleContainer.getChildren()).greaterThan(0));
titleContainer.managedProperty().bind(titleContainer.visibleProperty());
}
内容来源于网络,如有侵权,请联系作者删除!