public ElementMenubar() { this(new Span()); }
@Override protected void _initProps(Map<String, Object> props) { super._initProps(props); props.put("wclazz", "fujion_namespace"); }
/** * Sets the drop down state of the node. * * @param open If true, show child nodes. If false, hide child nodes. */ private void setOpen(boolean open) { this.open = open; if (!canOpen) { node.setClasses(null); } else { node.toggleClass("cwf-treeview-node-exp", "cwf-treeview-node-col", open); } }
/** * Adds a cell with the specified content to the grid row. * * @param row List row. * @param label Content for cell. Auto-detects type of content. * @return Newly created cell. */ public Span addContent(Row row, String label) { Span cell = new Span(); cell.addChild(CWFUtil.getTextComponent(label)); row.addChild(cell); return cell; }
@Override protected void updateVisibility(boolean visible, boolean activated) { super.updateVisibility(visible, activated); step.setVisible(visible && !isHomePane); step.toggleClass("cwf-stepview-separator", null, getNextSibling(true) != null); updateButtonStyle(); }
/** * Create the UI components that comprise this UI element. */ public ElementStepPane() { super(); button.setLabel("New Step"); fullSize(pane); setOuterComponent(pane); associateComponent(button); associateComponent(step); pane.setVisible(false); step.addChild(button); button.addClass("cwf-step-button"); button.addClass("btn btn-sm"); button.addEventListener("click", (event) -> { ((ElementStepView) getParent()).setActivePane(ElementStepPane.this); pane.setFocus(true); }); }
/** * Detach the UI components of the child pane the UI. * * @see org.carewebframework.shell.elements.ElementUI#unbind */ @Override protected void unbind() { super.unbind(); step.detach(); }
/** * Remove the node from the tree view when this element is destroyed. */ @Override public void unbind() { node.destroy(); pane.destroy(); }
public ElementMenubar(Span menubar) { setOuterComponent(this.menubar = menubar); menubar.addClass("cwf-menubar"); }
@Override protected void updateVisibility(boolean visible, boolean activated) { super.updateVisibility(visible, activated); setSelected(activated); node.setVisible(visible); }
public ElementTreePane() { super(); pane.setFlex("1"); pane.setVisible(false); setOuterComponent(pane); node = (Span) createFromTemplate(); associateComponent(node); anchor = (Hyperlink) node.getFirstChild(); anchor.addEventListener("click", clickListener); anchor.addEventListener("dblclick", dblclickListener); associateComponent(anchor); }