public ProjectProblemController(){ issues = FXCollections.observableArrayList(); hasErrors = Bindings.isNotEmpty(issues.filtered(issue -> issue.getLevel() == Issue.Level.ERROR)); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.configuration = configuration; this.controller = (AbstractViewController) controller; identityContainer.managedProperty().bind(Bindings.isNotEmpty(identityContainer.getChildren())); if (presenter.getIdentityPresenter() != null) { final Node identity = presenter.getIdentityPresenter().provideIdentityOf(controller, configuration); identityContainer.getChildren().add(identity); } // set icon container to null to hide this iconContainer.managedProperty().bind(Bindings.isNotEmpty(iconContainer.getChildren())); if (presenter.getIconPresenter() != null) { final Node icon = presenter.getIconPresenter().provideIcon(controller, configuration); iconContainer.getChildren().add(icon); } // build actions final VLViewComponentXML actionsConfig = configuration.getComponentById("HeaderActions").orElse(null); if (actionsConfig != null) { // !! TODO CORRECT THIS // BUILD WITH WRONG CONFIGURATION FILE, /* * Optional<AbstractToolbar> optional = ToolbarUtils.buildToolbar(controller, this); * optional.ifPresent(t -> actionsContainer.getChildren().add(t.getDisplay())); */ } }
secondaryLabelContainer.managedProperty().bind(Bindings.isNotEmpty(secondaryLabelContainer.getChildren())); if (secondaryLabelPresenter != null) { final Node secondaryLabel = secondaryLabelPresenter.provideLabel(controller, configuration, forData); rightActionsContainer.managedProperty().bind(Bindings.isNotEmpty(rightActionsContainer.getChildren())); if (rightActions != null) { final Node actions = ViewActionFactory.viewActions((AbstractViewController) controller, rightActions, forData); quickActionsContainer.managedProperty().bind(Bindings.isNotEmpty(quickActionsContainer.getChildren())); if (moreActions != null) { final Node actions = ViewActionFactory.viewActions((AbstractViewController) controller, moreActions, forData);
description.visibleProperty().bind(Bindings.isNotEmpty(description.textProperty())); internalLayout.getChildren().add(description);
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.configuration = configuration; this.controller = (AbstractViewController) controller; NodeHelper.loadFXML(getFxmlLocation(), this); filterTextField.managedProperty().bind(filterTextField.visibleProperty()); filterTextField.setVisible(false); filterTextField.setPromptText("Find in table"); if (configuration != null) { NodeHelper.setTitle(title, configuration, (AbstractViewController) controller, true); NodeHelper.styleClassSetAll(title, configuration, "titleStyleClass", "ep-edit-structure-title-label"); NodeHelper.styleClassAddAll(tableHeaderRootPane, configuration, "styleClass"); title.visibleProperty().bind(Bindings.isNotEmpty(title.textProperty())); elementsCountProperty().addListener((ChangeListener<Number>) (observable, oldValue, newValue) -> { if (newValue.intValue() > 0) { itemsCount.textProperty().set(""); } else { itemsCount.textProperty().set(String.format(dynMessageFormat, newValue.intValue())); } }); ((FullTableStructureController) controller).processedElementProperty().addListener((ChangeListener<Object>) (observable, oldValue, newValue) -> { final AbstractTableStructure ts = (AbstractTableStructure) ((FullTableStructureController) controller).processedElementProperty().get(); doLayout(ts); buildFiltering(ts); }); } }