javafx.scene.Node.visibleProperty()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(244)

本文整理了Java中javafx.scene.Node.visibleProperty()方法的一些代码示例,展示了Node.visibleProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.visibleProperty()方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:visibleProperty

Node.visibleProperty介绍

暂无

代码示例

代码示例来源:origin: speedment/speedment

  1. private void hideShowBehaviour(Node node){
  2. node.visibleProperty().bind(enabled);
  3. node.managedProperty().bind(enabled);
  4. node.disableProperty().bind(Bindings.not(enabled));
  5. }

代码示例来源:origin: jfoenixadmin/JFoenix

  1. closeButton.managedProperty().bind(closeButton.visibleProperty());
  2. closeButton.setVisible(false);

代码示例来源:origin: stackoverflow.com

  1. @Override
  2. public void onEnteringPage(Wizard wizard) {
  3. ObservableList<ButtonType> list = getButtonTypes();
  4. for (ButtonType type : list) {
  5. if (type.getButtonData().equals(ButtonBar.ButtonData.BACK_PREVIOUS)) {
  6. Node prev = lookupButton(type);
  7. prev.visibleProperty().setValue(Boolean.FALSE);
  8. }
  9. }
  10. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. @Override
  2. public Property<Boolean> visibleProperty() {
  3. return content.getDisplay().visibleProperty();
  4. }

代码示例来源:origin: org.controlsfx/controlsfx

  1. private void showDecoration(Node targetNode, Decoration decoration) {
  2. Node decorationNode = decoration.applyDecoration(targetNode);
  3. if (decorationNode != null) {
  4. List<Node> decorationNodes = nodeDecorationMap.get(targetNode);
  5. if (decorationNodes == null) {
  6. decorationNodes = new ArrayList<>();
  7. nodeDecorationMap.put(targetNode, decorationNodes);
  8. }
  9. decorationNodes.add(decorationNode);
  10. if (!getChildren().contains(decorationNode)) {
  11. getChildren().add(decorationNode);
  12. StackPane.setAlignment(decorationNode, Pos.TOP_LEFT); // TODO support for all positions.
  13. }
  14. }
  15. targetNode.visibleProperty().addListener(visibilityListener);
  16. }

代码示例来源:origin: io.datafx/featuretoggle

  1. public void hideByFeature(Node node, String featureName) {
  2. node.visibleProperty().bind(createFeatureProperty(featureName).not());
  3. }

代码示例来源:origin: org.javafxdata/datafx-featuretoggle

  1. public void hideByFeature(Node node, String featureName) {
  2. node.visibleProperty().bind(createFeatureProperty(featureName).not());
  3. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. protected void doLayout(AbstractTableStructure ts) {
  2. if (ts.getToolbar().isPresent()) {
  3. toolbar = ts.getToolbar().get();
  4. actionsAndFiltersContainer.getChildren().add(toolbar);
  5. HBox.setHgrow(toolbar, Priority.NEVER);
  6. if(!toolbar.managedProperty().isBound()) {
  7. toolbar.managedProperty().bind(toolbar.visibleProperty());
  8. }
  9. }
  10. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. row.getDisplay().visibleProperty().set(true);
  2. row.getDisplay().visibleProperty().set(false);
  3. String newValKey = (String) comp.getValueToValidate();
  4. if (attrValue.contains(newValKey)) {
  5. row.getDisplay().visibleProperty().set(true);
  6. } else {
  7. row.getDisplay().visibleProperty().set(false);

代码示例来源:origin: org.controlsfx/controlsfx

  1. clippedNode.visibleProperty().unbind();
  2. clippedNode.setVisible(true);

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. /**
  2. * Build the pagination
  3. */
  4. public void buildPagination() {
  5. if (paginationConfiguration != null) {
  6. final String paginationImpl = paginationConfiguration.getPropertyValue("paginationImpl", "SimplePaginationBar");
  7. pagination = (IPaginationBar) Services.getBean(paginationImpl);
  8. pagination.buildFrom(controller, paginationConfiguration);
  9. pagination.setPageable(this);
  10. final Integer rpp = rootConfiguration.getIntPropertyValue("rowPerPage");
  11. if (rpp > 0) {
  12. pagination.setCurrentPageSize(rpp.toString());
  13. }
  14. pagination.getDisplay().visibleProperty().addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> {
  15. });
  16. }
  17. }

代码示例来源:origin: stackoverflow.com

  1. import javafx.application.Application;
  2. import javafx.scene.*;
  3. import javafx.scene.control.*;
  4. import javafx.stage.Stage;
  5. public class DialogClosure extends Application{
  6. @Override
  7. public void start(Stage stage) throws Exception {
  8. Button openDialog = new Button("Open Dialog");
  9. openDialog.setOnAction(event -> {
  10. Dialog dialog = new Dialog();
  11. dialog.getDialogPane().getButtonTypes().add(ButtonType.CLOSE);
  12. Node closeButton = dialog.getDialogPane().lookupButton(ButtonType.CLOSE);
  13. closeButton.managedProperty().bind(closeButton.visibleProperty());
  14. closeButton.setVisible(false);
  15. dialog.showAndWait();
  16. });
  17. stage.setScene(new Scene(openDialog));
  18. stage.show();
  19. }
  20. public static void main(String[] args) {
  21. launch(args);
  22. }
  23. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. /**
  2. * @{inheritedDoc}
  3. */
  4. @Override
  5. public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
  6. super.buildFrom(controller, configuration);
  7. locationContainer.managedProperty().bind(locationContainer.visibleProperty());
  8. locationContainer.setVisible(false);
  9. primaryMenuButton.getDisplay().managedProperty().bind(primaryMenuButton.getDisplay().visibleProperty());
  10. }

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

  1. if (this.resizeLeft != null) {
  2. this.resizeLeft.resizeRelocate(0, this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize());
  3. this.resizeLeft.visibleProperty().bind(this.resizeable);
  4. this.resizeRight.visibleProperty().bind(this.resizeable);
  5. this.resizeTop.visibleProperty().bind(this.resizeable);
  6. this.resizeBottom.visibleProperty().bind(this.resizeable);
  7. this.resizeCornerRightBottom.visibleProperty().bind(this.resizeable);
  8. this.resizeCornerRightTop.visibleProperty().bind(this.resizeable);
  9. this.resizeCornerLeftBottom.visibleProperty().bind(this.resizeable);
  10. this.resizeCornerLeftTop.visibleProperty().bind(this.resizeable);

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

  1. if (this.resizeLeft != null) {
  2. this.resizeLeft.resizeRelocate(0, this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize());
  3. this.resizeLeft.visibleProperty().bind(this.resizeable);
  4. this.resizeRight.visibleProperty().bind(this.resizeable);
  5. this.resizeTop.visibleProperty().bind(this.resizeable);
  6. this.resizeBottom.visibleProperty().bind(this.resizeable);
  7. this.resizeCornerRightBottom.visibleProperty().bind(this.resizeable);
  8. this.resizeCornerRightTop.visibleProperty().bind(this.resizeable);
  9. this.resizeCornerLeftBottom.visibleProperty().bind(this.resizeable);
  10. this.resizeCornerLeftTop.visibleProperty().bind(this.resizeable);

代码示例来源:origin: com.miglayout/miglayout-javafx

  1. while (c.next()) {
  2. for (Node node : c.getRemoved()) {
  3. node.visibleProperty().removeListener(gridInvalidator);
  4. node.visibleProperty().addListener(gridInvalidator);

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. nodecontent.managedProperty().bind(nodecontent.visibleProperty());
  2. selectableCompsLayout.getChildren().add(nodecontent);

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void layout(IViewLayoutManageable layoutManageable) {
  6. super.layout(layoutManageable);
  7. if (topNode == null) {
  8. headerAreaSection.setVisible(false);
  9. AnchorPane.clearConstraints(anchorCenteredPane);
  10. AnchorPane.setLeftAnchor(anchorCenteredPane, 0.);
  11. AnchorPane.setRightAnchor(anchorCenteredPane, 0.);
  12. AnchorPane.setTopAnchor(anchorCenteredPane, 0.);
  13. AnchorPane.setBottomAnchor(anchorCenteredPane, 72.);
  14. } else {
  15. headerAreaSection.heightProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> {
  16. headerHeight = newValue.doubleValue();
  17. AnchorPane.clearConstraints(anchorCenteredPane);
  18. AnchorPane.setTopAnchor(anchorCenteredPane, 0.);
  19. AnchorPane.setLeftAnchor(anchorCenteredPane, 0.);
  20. AnchorPane.setRightAnchor(anchorCenteredPane, 0.);
  21. AnchorPane.setBottomAnchor(anchorCenteredPane, 72.);
  22. });
  23. }
  24. if(bottomNode != null) {
  25. bottomNode.visibleProperty().addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> {
  26. updateConstraints();
  27. });
  28. }
  29. }

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. header.setFormRowEditor(this);
  2. header.buildFrom(controller, inlineActionconfiguration);
  3. header.getDisplay().managedProperty().bind(header.getDisplay().visibleProperty());
  4. rootLayout.setTop(header.getDisplay());

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

  1. editLayout.getDisplay().visibleProperty().bind(Bindings.not(viewLayout.getDisplay().visibleProperty()));
  2. getChildren().addAll(viewLayout.getDisplay(), editLayout.getDisplay());
  3. NodeHelper.setHgrow(viewLayout.getDisplay(), editLayout.getDisplay(), this);

相关文章

Node类方法