/** * Generates the components from the given configuration. * * @param groupDefinition * @return List */ public List<IBuildable> buildActionGroup(VLViewComponentXML groupDefinition) { if (groupDefinition == null) { return new ArrayList<>(); } List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(controller, groupDefinition.getSubcomponents()); if (buildables == null) { return new ArrayList<>(); } return buildables; } }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.controller = (AbstractViewController) controller; List<IBuildable> links = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, configuration.getSubcomponents()); if (links.size() > 1) { // prohibited!!!! but .. } if (links.size() == 1) { primaryMenuButton = links.get(0); Node button = primaryMenuButton.getDisplay(); topToolbar.getChildren().add(0, button); } }
protected void buildDefaultActions() { if (defaultActionsConfiguration != null && defaultActionsConfiguration.hasSubComponent()) { defaultActions = ComponentUtils.resolveAndGenerate(controller, defaultActionsConfiguration.getSubcomponents()); } }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.controller = (AbstractViewController) controller; NodeHelper.styleClassSetAll(backIcon, configuration, "backIconStyleClass", "app-header-button"); backIcon.getStyleClass().add("hand-hover"); final List<IBuildable> links = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, configuration.getSubcomponents()); if (links.size() > 1) { // prohibited!!!! but .. } if (links.size() == 1) { primaryMenuButton = links.get(0); final Node button = primaryMenuButton.getDisplay(); topToolbar.getChildren().add(1, button); } }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML actionsModelConfig) { List<IBuildable> all = new ArrayList<>(); Optional<VLViewComponentXML> leftActionsCfg = actionsModelConfig.getComponentById(LEFT_ACTIONS); leftActionsCfg.ifPresent(config -> { List<IBuildable> buttons = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, config.getSubcomponents()); all.addAll(buttons); }); Optional<VLViewComponentXML> rightActionsCfg = actionsModelConfig.getComponentById(RIGHT_ACTIONS); rightActionsCfg.ifPresent(config -> { List<IBuildable> buttons = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, config.getSubcomponents()); all.addAll(buttons); }); Optional<VLViewComponentXML> centerActionsCfg = actionsModelConfig.getComponentById(CENTER_ACTIONS); centerActionsCfg.ifPresent(config -> { List<IBuildable> buttons = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, config.getSubcomponents()); all.addAll(buttons); }); for(IBuildable b: all) { getChildren().add(b.getDisplay()); } }
protected void buildTopToolbar(AbstractViewController controller, VLViewComponentXML configuration) { List<IBuildable> links = ComponentUtils.resolveAndGenerate(controller, configuration.getSubcomponents()); NodeHelper.styleClassSetAll(topToolbar, configuration, EP_HEADER_LEFT_TOOLBAR_TOP); for (final IBuildable action : links) { topToolbar.getChildren().add(action.getDisplay()); } }
protected void buildHeader() { VLViewComponentXML rootComp = controller.getRootComponent(); VLViewComponentXML header = rootComp.getComponentById("Header").orElse(null); if (header != null && header.hasSubComponent()) { List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(controller, header.getSubcomponents()); for(IBuildable e: buildables) { maximizedMenu.getChildren().add(0, e.getDisplay()); } } }
/** * Constructor */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML blocConfig) { VLViewComponentXML headerActions = blocConfig.getComponentById("HeaderActions").orElse(null); NodeHelper.styleClassSetAll(getDisplay(), headerActions, "styleClass", "ep-form-bloc-title-pane-header-actions-wrapper"); if (headerActions != null && headerActions.hasSubComponent()) { List<IBuildable> buildables = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, headerActions.getSubcomponents()); for(IBuildable e: buildables) { getChildren().add(e.getDisplay()); } } }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.controller = (AbstractViewController) controller; if (configuration != null) { Optional<VLViewComponentXML> footer = configuration.getComponentById("Footer"); if (footer.isPresent()) { componentXML = footer.get(); List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(this.controller, componentXML.getSubcomponents()); if (buildables.size() > 0) { display = new HBox(); display.managedProperty().bind(display.visibleProperty()); for(IBuildable e: buildables) { display.getChildren().add(e.getDisplay()); } NodeHelper.styleClassAddAll(display, componentXML, "styleClass", "ep-bloc-footer"); } } } }
protected void buildFooter() { VLViewComponentXML rootComp = controller.getRootComponent(); VLViewComponentXML footer = rootComp.getComponentById("Footer").orElse(null); maximizedMenu.getChildren().addAll(NodeHelper.verticalSpacer()); if (footer != null && footer.hasSubComponent()) { List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(controller, footer.getSubcomponents()); for(IBuildable e: buildables) { maximizedMenu.getChildren().add(e.getDisplay()); } } }
/** * {@inheritDoc} */ @Override public void build(VLViewComponentXML blocConfig, IEmaginController controller) { flowPane.setStyle("-fx-padding:8;-fx-spacing:8"); flowPane.setAlignment(Pos.CENTER); if (blocConfig.hasSubComponent()) { VLViewComponentXML subtabs = blocConfig.getComponentById("Tabs").orElse(null); if (subtabs != null && subtabs.hasSubComponent()) { List<IBuildable> buildables = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, subtabs.getSubcomponents()); for(IBuildable e: buildables) { flowPane.getChildren().add(e.getDisplay()); } } } }
private void buildHeaderActions() { VLViewComponentXML root = getRootComponent(); VLViewComponentXML headerActions = root.getComponentById("HeaderActions").orElse(null); if (headerActions != null) { // we dislay only right actions the DONE button VLViewComponentXML rightActions = headerActions.getComponentById("RightActions").orElse(null); if ((rightActions != null) && rightActions.hasSubComponent()) { List<IBuildable> actions = ComponentUtils.resolveAndGenerate(this, rightActions.getSubcomponents()); // set header actions HeaderNavbarSetCustomRightActions ev = new HeaderNavbarSetCustomRightActions.Builder().actions(actions).build(); dispatchEvent(ev); } } }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { List<IBuildable> links = ComponentUtils.resolveAndGenerate((AbstractViewController) controller, configuration.getSubcomponents()); NodeHelper.styleClassSetAll(topToolbar, configuration, "header-center-toolbar"); for (final IBuildable action : links) { action.getDisplay().setFocusTraversable(false); addItem(action.getDisplay()); } }
/** * @{inheritedDoc} */ @Override protected void process() { super.process(); VLViewComponentXML widgetList = getRootComponent().getComponentById("WidgetList").orElse(null); if (widgetList != null) { List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(this, widgetList.getSubcomponents()); FlowPane flowPane = new FlowPane(); flowPane.getStyleClass().add("ep-dashboard-items-wrapper"); for(IBuildable e: buildables) { flowPane.getChildren().add(e.getDisplay()); } processedView(flowPane); } else { processedView(new StackPane()); } }
/** * @{inheritedDoc} */ @Override protected void process() { super.process(); processedView(pane); final VLViewComponentXML root = getRootComponent(); if (root.hasSubComponent()) { for (final VLViewComponentXML group : root.getSubcomponents()) { if (group.hasSubComponent()) { final List<IBuildable> ts = ComponentUtils.resolveAndGenerate(this, group.getSubcomponents()); final FlowPane p = new FlowPane(); p.setVgap(20); p.setHgap(20); for(IBuildable e: ts) { p.getChildren().add(e.getDisplay()); } pane.getChildren().add(p); } } } } }
final List<IBuildable> buttons = ComponentUtils.resolveAndGenerate(controller, actionsGroup.getSubcomponents());