@Bean @Named("ModelAttributePresenter") public com.nexitia.emaginplatform.jfx.core.engine.components.presenter.impl.ModelAttributePresenter ModelAttributePresenter() { return new com.nexitia.emaginplatform.jfx.core.engine.components.presenter.impl.ModelAttributePresenter(); }
/** * @{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; }
@Override public Node present(IEmaginController controller, VLViewComponentXML configuration) { Label label = (Label) super.present(controller, configuration); String text = label.getText(); Platform.runLater(() -> { label.setText(text.toUpperCase()); String pc = StringUtils.replace(text, " ", "_"); PseudoClass cc = PseudoClass.getPseudoClass(pc.toLowerCase()); label.pseudoClassStateChanged(cc, true); }); return label; }
/** * @{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; }
@Override public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) { Label label = (Label) super.present(controller, configuration, forModel); String text = label.getText(); Platform.runLater(() -> { label.setText(text.toUpperCase()); String pc = StringUtils.replace(text, " ", "_"); PseudoClass cc = PseudoClass.getPseudoClass(pc.toLowerCase()); label.pseudoClassStateChanged(cc, true); }); return label; } }