private void hideShowBehaviour(Node node){ node.visibleProperty().bind(enabled); node.managedProperty().bind(enabled); node.disableProperty().bind(Bindings.not(enabled)); }
closeButton.managedProperty().bind(closeButton.visibleProperty()); closeButton.setVisible(false);
@Override public void onEnteringPage(Wizard wizard) { ObservableList<ButtonType> list = getButtonTypes(); for (ButtonType type : list) { if (type.getButtonData().equals(ButtonBar.ButtonData.BACK_PREVIOUS)) { Node prev = lookupButton(type); prev.visibleProperty().setValue(Boolean.FALSE); } } }
@Override public Property<Boolean> visibleProperty() { return content.getDisplay().visibleProperty(); }
private void showDecoration(Node targetNode, Decoration decoration) { Node decorationNode = decoration.applyDecoration(targetNode); if (decorationNode != null) { List<Node> decorationNodes = nodeDecorationMap.get(targetNode); if (decorationNodes == null) { decorationNodes = new ArrayList<>(); nodeDecorationMap.put(targetNode, decorationNodes); } decorationNodes.add(decorationNode); if (!getChildren().contains(decorationNode)) { getChildren().add(decorationNode); StackPane.setAlignment(decorationNode, Pos.TOP_LEFT); // TODO support for all positions. } } targetNode.visibleProperty().addListener(visibilityListener); }
public void hideByFeature(Node node, String featureName) { node.visibleProperty().bind(createFeatureProperty(featureName).not()); }
public void hideByFeature(Node node, String featureName) { node.visibleProperty().bind(createFeatureProperty(featureName).not()); }
protected void doLayout(AbstractTableStructure ts) { if (ts.getToolbar().isPresent()) { toolbar = ts.getToolbar().get(); actionsAndFiltersContainer.getChildren().add(toolbar); HBox.setHgrow(toolbar, Priority.NEVER); if(!toolbar.managedProperty().isBound()) { toolbar.managedProperty().bind(toolbar.visibleProperty()); } } }
row.getDisplay().visibleProperty().set(true); row.getDisplay().visibleProperty().set(false); String newValKey = (String) comp.getValueToValidate(); if (attrValue.contains(newValKey)) { row.getDisplay().visibleProperty().set(true); } else { row.getDisplay().visibleProperty().set(false);
clippedNode.visibleProperty().unbind(); clippedNode.setVisible(true);
/** * Build the pagination */ public void buildPagination() { if (paginationConfiguration != null) { final String paginationImpl = paginationConfiguration.getPropertyValue("paginationImpl", "SimplePaginationBar"); pagination = (IPaginationBar) Services.getBean(paginationImpl); pagination.buildFrom(controller, paginationConfiguration); pagination.setPageable(this); final Integer rpp = rootConfiguration.getIntPropertyValue("rowPerPage"); if (rpp > 0) { pagination.setCurrentPageSize(rpp.toString()); } pagination.getDisplay().visibleProperty().addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> { }); } }
import javafx.application.Application; import javafx.scene.*; import javafx.scene.control.*; import javafx.stage.Stage; public class DialogClosure extends Application{ @Override public void start(Stage stage) throws Exception { Button openDialog = new Button("Open Dialog"); openDialog.setOnAction(event -> { Dialog dialog = new Dialog(); dialog.getDialogPane().getButtonTypes().add(ButtonType.CLOSE); Node closeButton = dialog.getDialogPane().lookupButton(ButtonType.CLOSE); closeButton.managedProperty().bind(closeButton.visibleProperty()); closeButton.setVisible(false); dialog.showAndWait(); }); stage.setScene(new Scene(openDialog)); stage.show(); } public static void main(String[] args) { launch(args); } }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); locationContainer.managedProperty().bind(locationContainer.visibleProperty()); locationContainer.setVisible(false); primaryMenuButton.getDisplay().managedProperty().bind(primaryMenuButton.getDisplay().visibleProperty()); }
if (this.resizeLeft != null) { this.resizeLeft.resizeRelocate(0, this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize()); this.resizeLeft.visibleProperty().bind(this.resizeable); this.resizeRight.visibleProperty().bind(this.resizeable); this.resizeTop.visibleProperty().bind(this.resizeable); this.resizeBottom.visibleProperty().bind(this.resizeable); this.resizeCornerRightBottom.visibleProperty().bind(this.resizeable); this.resizeCornerRightTop.visibleProperty().bind(this.resizeable); this.resizeCornerLeftBottom.visibleProperty().bind(this.resizeable); this.resizeCornerLeftTop.visibleProperty().bind(this.resizeable);
if (this.resizeLeft != null) { this.resizeLeft.resizeRelocate(0, this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize()); this.resizeLeft.visibleProperty().bind(this.resizeable); this.resizeRight.visibleProperty().bind(this.resizeable); this.resizeTop.visibleProperty().bind(this.resizeable); this.resizeBottom.visibleProperty().bind(this.resizeable); this.resizeCornerRightBottom.visibleProperty().bind(this.resizeable); this.resizeCornerRightTop.visibleProperty().bind(this.resizeable); this.resizeCornerLeftBottom.visibleProperty().bind(this.resizeable); this.resizeCornerLeftTop.visibleProperty().bind(this.resizeable);
while (c.next()) { for (Node node : c.getRemoved()) { node.visibleProperty().removeListener(gridInvalidator); node.visibleProperty().addListener(gridInvalidator);
nodecontent.managedProperty().bind(nodecontent.visibleProperty()); selectableCompsLayout.getChildren().add(nodecontent);
/** * {@inheritDoc} */ @Override public void layout(IViewLayoutManageable layoutManageable) { super.layout(layoutManageable); if (topNode == null) { headerAreaSection.setVisible(false); AnchorPane.clearConstraints(anchorCenteredPane); AnchorPane.setLeftAnchor(anchorCenteredPane, 0.); AnchorPane.setRightAnchor(anchorCenteredPane, 0.); AnchorPane.setTopAnchor(anchorCenteredPane, 0.); AnchorPane.setBottomAnchor(anchorCenteredPane, 72.); } else { headerAreaSection.heightProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { headerHeight = newValue.doubleValue(); AnchorPane.clearConstraints(anchorCenteredPane); AnchorPane.setTopAnchor(anchorCenteredPane, 0.); AnchorPane.setLeftAnchor(anchorCenteredPane, 0.); AnchorPane.setRightAnchor(anchorCenteredPane, 0.); AnchorPane.setBottomAnchor(anchorCenteredPane, 72.); }); } if(bottomNode != null) { bottomNode.visibleProperty().addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> { updateConstraints(); }); } }
header.setFormRowEditor(this); header.buildFrom(controller, inlineActionconfiguration); header.getDisplay().managedProperty().bind(header.getDisplay().visibleProperty()); rootLayout.setTop(header.getDisplay());
editLayout.getDisplay().visibleProperty().bind(Bindings.not(viewLayout.getDisplay().visibleProperty())); getChildren().addAll(viewLayout.getDisplay(), editLayout.getDisplay()); NodeHelper.setHgrow(viewLayout.getDisplay(), editLayout.getDisplay(), this);