/** * @{inheritedDoc} */ @Override public String getIdentity() { if (presenter.getIdentityPresenter() != null) { final String identity = presenter.getIdentityPresenter().identityOf(controller, configuration); return identity; } return null; }
/** * {@inheritDoc} */ @Override public Node getHeaderIdentity() { ModelIdentityPresenter realpresenter = null; if (presenter.getHeaderIdentityProvider() != null) { realpresenter = presenter.getHeaderIdentityProvider(); } if (realpresenter == null) { realpresenter = presenter.getIdentityPresenter(); } if (realpresenter != null) { final Node identity = realpresenter.provideIdentityOf(controller, configuration); return identity; } return null; }
private void translate(AbstractViewController controller, VLViewComponentXML configuration) { final Object datavalue = ReflectionUIUtils.invokeGetterOn(null, null); initEnumeratedTypeTranslater(configuration); if (datavalue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running final String realVal = enumeratedTypeTranslater.translate(controller, configuration, datavalue.toString()); label.setText(realVal); } else { label.setText(datavalue.toString()); } } }
Node icon = iconPresenter.provideIcon(controller, configuration, forData); if (icon != null) { iconContainer.getChildren().clear(); Node cell = identityPresenter.provideIdentityOf(controller, configuration, forData); if (cell != null) { if (StringUtils.isNotBlank(extraParameters.get("mainLabelStyleClass"))) { Node secondaryLabel = secondaryLabelPresenter.provideLabel(controller, configuration, forData); if (secondaryLabel != null) { secondaryLabelContainer.getChildren().clear();
Node icon = presenter.getIconPresenter().provideIcon((IEmaginController) controller, configuration, model); if (icon != null) { iconContainer.getChildren().clear(); Node cell = presenter.getIdentityPresenter().provideIdentityOf((IEmaginController) controller, configuration, model); if (cell != null) { mainLabelContainer.getChildren().clear(); Node secondaryLabel = presenter.getSecondaryLabelPresenter().provideLabel((IEmaginController) controller, configuration, model); if (secondaryLabel != null) { secondaryLabelContainer.getChildren().clear(); Node ellipsisMenu = presenter.getEllipsisMenuPresenter().provideEllipsis((IEmaginController) controller, configuration, model); presenter.setEllipsisMenu((EllipsisActionButton) ellipsisMenu);
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.configuration = configuration; this.controller = (AbstractViewController) controller; if (presenter.getIconPresenter() != null) { Node icon = presenter.getIconPresenter().provideIcon(controller, configuration); iconContainer.getChildren().add(icon); } if (presenter.getLocationPresenter() != null) { Node location = presenter.getLocationPresenter().provideCurrentLocationOf(controller, configuration); locationContainer.getChildren().add(location); } if (presenter.getIdentityPresenter() != null) { Node identity = presenter.getIdentityPresenter().provideIdentityOf(controller, configuration); identityContainer.getChildren().add(identity); } // build header actions VLViewComponentXML actionsConfig = configuration.getComponentById("HeaderActions").orElse(null); if (actionsConfig != null) { Optional<AbstractToolbar> optional = ToolbarUtils.buildToolbar((AbstractViewController) controller, this); optional.ifPresent(t -> actionsContainer.getChildren().add(t.getDisplay())); } }
protected void onContextMenu(MouseEvent event) { if (event.getButton() == MouseButton.SECONDARY) { EllipsisActionButton contextMenu = (EllipsisActionButton) presenter.getContextMenuPresenter().provideContextMenu(null, null); if (contextMenu != null) { if (presenter.getEllipsisMenu() != null) { if (presenter.getEllipsisMenu().contextMenu().isShowing()) { presenter.getEllipsisMenu().contextMenu().hide(); } } contextMenu.contextMenu().show(this); } } }
Node icon = iconPresenter.provideIcon(controller, configuration, forData); if (icon != null) { iconContainer.getChildren().clear(); Node cell = identityPresenter.provideIdentityOf(controller, configuration, forData); if (cell != null) { if (StringUtils.isNotBlank(extraParameters.get("mainLabelStyleClass"))) { Node secondaryLabel = secondaryLabelPresenter.provideLabel(controller, configuration, forData); if (secondaryLabel != null) { secondaryLabelContainer.getChildren().clear();
/** * @{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())); */ } }
/** * @{inheritedDoc} */ @Override public String getIdentity() { if (presenter.getIdentityPresenter() != null) { String identity = presenter.getIdentityPresenter().identityOf((IEmaginController) controller, configuration); return identity; } return null; }
@Override public Node getDisplayIdentity() { if(identityPresenter != null) { Node node = identityPresenter.provideIdentityOf(this, getRootComponent()); return node; } OperationData data = getOpData(); Label identity = new Label("Structure of " + data.getMasterAttributes().get("name")); identity.setStyle("-fx-text-fill:white;-fx-font-size:12px;"); return identity; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { final String attributePath = configuration.getPropertyValue("attributePath"); final Object datavalue = ReflectionUIUtils.invokeGetterOn(forModel, attributePath); initEnumeratedTypeTranslater(configuration); if (datavalue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running final String realVal = enumeratedTypeTranslater.translate(controller, configuration, datavalue.toString()); label.setText(realVal); } else { label.setText(datavalue.toString()); } } return label; }
protected void onContextMenu(MouseEvent event) { if (event.getButton() == MouseButton.SECONDARY) { EllipsisActionButton contextMenu = (EllipsisActionButton) presenter.getContextMenuPresenter().provideContextMenu(null, null); if (contextMenu != null) { if (presenter.getEllipsisMenu() != null) { if (presenter.getEllipsisMenu().contextMenu().isShowing()) { presenter.getEllipsisMenu().contextMenu().hide(); } } contextMenu.contextMenu().show(this); } } }
Node icon = presenter.getIconPresenter().provideIcon((IEmaginController) controller, configuration, userData); if (icon != null) { iconContainer.getChildren().clear(); Node cell = presenter.getIdentityPresenter().provideIdentityOf((IEmaginController) controller, configuration, userData); if (cell != null) { mainLabelContainer.getChildren().clear(); Node secondaryLabel = presenter.getSecondaryLabelPresenter().provideLabel((IEmaginController) controller, configuration, userData); if (secondaryLabel != null) { secondaryLabelContainer.getChildren().clear();
/** * @{inheritedDoc} */ @Override public String getIdentity() { if (presenter.getIdentityPresenter() != null) { String identity = presenter.getIdentityPresenter().identityOf((IEmaginController) controller, configuration); return identity; } return null; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration) { if (StringUtils.isEmpty(attributePath)) { attributePath = configuration.getPropertyValue("attributePath"); } String dataValue = getModelAttribute(controller, attributePath); initEnumeratedTypeTranslater(configuration); if (dataValue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running String realVal = enumeratedTypeTranslater.translate(controller, configuration, dataValue.toString()); label.setText(realVal); } else { label.setText(dataValue.toString()); } } return label; }
protected void onContextMenu(MouseEvent event) { if (event.getButton() == MouseButton.SECONDARY) { EllipsisActionButton contextMenu = (EllipsisActionButton) presenter.getContextMenuPresenter().provideContextMenu(null, null); if (contextMenu != null) { if (presenter.getEllipsisMenu() != null) { if (presenter.getEllipsisMenu().contextMenu().isShowing()) { presenter.getEllipsisMenu().contextMenu().hide(); } } contextMenu.contextMenu().show(this); } } }
/** * @{inheritedDoc} */ @Override public Node provideIcon(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { final StackPane graphic = new StackPane(); graphic.setAlignment(Pos.CENTER); graphic.getChildren().addAll(label); label.getStyleClass().add("item-initial-circle-icon-label"); if (getIdentityPresenter() != null) { String allidentity = getIdentityPresenter().identityOf(controller, configuration, forModel); String processInitialFromIdentity = processInitialFromIdentity(allidentity, controller, configuration); if (StringUtils.isNotBlank(processInitialFromIdentity)) { label.setText(processInitialFromIdentity); } } else { label.setText("AN0".substring(0, getCaractersToDisplay())); } processColoration(graphic); return graphic; }
/** * @{inheritedDoc} */ @Override public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { if (StringUtils.isEmpty(attributePath)) { attributePath = configuration.getPropertyValue("attributePath"); } String dataValue = getModelAttribute((OperationData) forModel, attributePath); initEnumeratedTypeTranslater(configuration); if (dataValue != null) { if (enumeratedTypeTranslater != null) { // TO DO Asunch if long running String realVal = enumeratedTypeTranslater.translate(controller, configuration, dataValue.toString()); label.setText(realVal); } else { label.setText(dataValue.toString()); } } return label; }
/** * @{inheritedDoc} */ @Override public Node provideIcon(IEmaginController controller, VLViewComponentXML configuration) { final StackPane graphic = new StackPane(); graphic.setAlignment(Pos.CENTER); graphic.getChildren().addAll(label); label.getStyleClass().add("item-initial-circle-icon-label"); if (getIdentityPresenter() != null) { String allidentity = getIdentityPresenter().identityOf(controller, configuration); String processInitialFromIdentity = processInitialFromIdentity(allidentity, controller, configuration); if (StringUtils.isNotBlank(processInitialFromIdentity)) { label.setText(processInitialFromIdentity); } processColoration(graphic); } return graphic; }