private void addHeader(String text) { Label header = new Label(text); header.setSclass("cwf-patientheader-header"); pnlDetail.appendChild(header); }
} else { if (parent != null) parent.appendChild(inl); else inl.setPage(page);
/** * Add a link for drilldown of objects. * * @param dataObject Object for drilldown. * @param title Title for dialog. */ private void addLink(Object dataObject, String title) { if (debugObject(dataObject, true)) { Component cell = getLastRow().getFirstChild(); cell.appendChild(new DebugLink(dataObject, title)); } }
private void addDetail(String text, String label) { if (StringUtils.isEmpty(text)) { return; } Div div = new Div(); pnlDetail.appendChild(div); if (label != null) { Label lbl = new Label(label); lbl.setSclass("cwf-patientheader-label"); div.appendChild(lbl); } div.appendChild(new Label(text)); }
/** * Create a new status pane and associated label. * * @param pane Name of pane (becomes the id of the label). * @return The newly created label. */ private Label createLabel(String pane) { boolean first = root.getFirstChild() == null; if (!first) { root.appendChild(new Splitter()); } Cell cell = new Cell(); if (first) { cell.setHflex("1"); } else { cell.setAlign("center"); } cell.setVflex("1"); cell.setSclass("cwf-header-cell"); root.appendChild(cell); Label lbl = new Label(); lbl.setId(pane); cell.appendChild(lbl); return lbl; } }
/** Sets what buttons are allowed. */ public void setButtons(Messagebox.Button[] buttons, String[] btnLabels) { _buttons = buttons; final Component parent = getFellowIfAny("buttons"); if (parent != null && parent.getFirstChild() == null) { //Backward compatible to ZK 5 //We check if any child since user's old template might create them final String sclass = (String) parent.getAttribute("button.sclass"); for (int j = 0; j < _buttons.length; ++j) { final Button mbtn = new Button(); mbtn.setButton(_buttons[j], btnLabels != null && j < btnLabels.length ? btnLabels[j] : null); mbtn.setSclass(sclass); mbtn.setAutodisable("self"); parent.appendChild(mbtn); } } }