public ElementLayout() { fullSize(div); div.addStyle("display", "flex"); setOuterComponent(div); }
/** * Render detail view for the specified patient. * * @param patient Patient whose detail view is to be rendered. */ @Override public BaseUIComponent render(Patient patient) { BaseUIComponent root = new Div(); root.addClass("fujion-layout-vertical text-center"); root.addStyle("align-items", "center"); if (confirmAccess(patient, root)) { renderDemographics(patient, root); } return root; }
/** * Sets the URL of the content to be retrieved. If the URL starts with "http", it is fetched * into an iframe. Otherwise, an include component is created and used to fetch the content. * * @param url Content URL. */ public void setUrl(String url) { this.url = url; if (child != null) { child.destroy(); child = null; } if (url.startsWith("http") || !url.endsWith(".fsp")) { child = new Iframe(); ((Iframe) child).setSrc(url); } else { child = new Import(); ((Import) child).setSrc(url); } fullSize(child); root.addChild(child); }
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); }
/** * Sets the panel style to use for the desktop. * * @param style The panel style. */ public void setStyle(ThemeUtil.PanelStyle style) { this.style = style; outer.addClass(style.getThemeClass()); }
/** * Remove the node from the tree view when this element is destroyed. */ @Override public void unbind() { node.destroy(); pane.destroy(); }
/** * Bind a component to this command and action. * * @param component The component to be bound. * @param action The action to be executed when the command is invoked. */ /*package*/void bind(BaseUIComponent component, IAction action) { BaseUIComponent dummy = new Div(); dummy.setAttribute(ATTR_DUMMY, true); dummy.setVisible(false); dummy.setParent(component.getPage()); ActionUtil.addAction(dummy, action, CommandEvent.TYPE); bind(component, dummy); }
public ElementFrame() { super(); root.addClass("cwf-plugin-container"); fullSize(root); setOuterComponent(root); }
/** * Creates and returns a test alert item. * * @param associateEvents If true, associate events with this item. * @return Test alert item. */ private BaseComponent newAlertitem(boolean associateEvents) { Div root = new Div(); // was vbox if (associateEvents) { associateEvents(root); } root.addChild(new Label("This is test alert #" + ++alertCount + (associateEvents ? " *" : "") + ".")); for (int i = 0; i < 10; i++) { root.addChild(new Label("This is line #" + i)); } return root; }
/** * Add a row containing the specified header (left column) and value container (right column). * * @param header Text for header column * @param container Object containing text value(s) */ protected void addRow(String header, BaseComponent container) { Row row = new Row(); grid.getRows().addChild(row); Div div = new Div(); Label label = new Label(header + ":"); label.addStyle("font-weight", "bold"); label.addStyle("word-wrap", "word-break"); row.addChild(div); row.addChild(label); row.addChild(container); }
/** * Apply color changes to button and pane only. * * @see org.carewebframework.shell.elements.ElementUI#applyColor() */ @Override protected void applyColor() { button.addStyle("color", getColor()); pane.addStyle("background", getColor()); }