@Listen("onDrop = #userListbox") public void onDragDropUserListitem(DropEvent dropEvent){ Listbox droppedListbox = (Listbox)dropEvent.getTarget()); Listitem draggedListitem = (Listitem)dropEvent.getDragged(); if (draggedListitem instanceof Listitem) { droppedListbox.insertBefore(draggedListitem, droppedListbox.getNextSibling()); }else{ droppedListbox.appendChild(draggedListitem); } }
Listitem item = new Listitem(); item.addForward(Events.ON_DOUBLE_CLICK, btnSelect, Events.ON_CLICK); lbResults.appendChild(item); String pcs[] = s.split("\\^"); StringBuilder sb = new StringBuilder();
/** * Adds the service location to the specified listbox. * * @param location Service location to add. * @param lstLocation Listbox to receive the location. * @return The added list item. */ public static Listitem locationAdd(Location location, Listbox lstLocation) { Listitem item = new Listitem(location.getName()); item.setValue(location); //item.setTooltiptext(location.getDescription()); item.addForward(Events.ON_DOUBLE_CLICK, "btnOK", Events.ON_CLICK); lstLocation.appendChild(item); lstLocation.setDisabled(false); return item; }
/** * Adds the service location to the specified listbox. * * @param location Service location to add. * @param lstLocation Listbox to receive the location. * @return The added list item. */ public static Listitem locationAdd(Location location, Listbox lstLocation) { Listitem item = new Listitem(location.getName().getValue()); item.setValue(location); //item.setTooltiptext(location.getDescription()); item.addForward(Events.ON_DOUBLE_CLICK, "btnOK", Events.ON_CLICK); lstLocation.appendChild(item); lstLocation.setDisabled(false); return item; }
listbox.appendChild(group); listbox.appendChild(item); previous = item;
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); String[] subsets = (String[]) arg.get("subsets"); TermSubset termSubsets = TermUtil.getSubset(null); for (String subset : subsets) { Listitem item = new Listitem(termSubsets.getMemberName(subset)); item.setValue(subset); lbSubset.appendChild(item); } if (subsets.length == 1) { pnlSubset.setVisible(false); lbSubset.setSelectedIndex(0); ((Window) root).getCaption().setLabel(lbSubset.getSelectedItem().getLabel()); } treeSearch.setItemRenderer(termMatchRenderer); }
sortCollection(children, cmprx); for (Component c : children) listbox.appendChild(c); } finally { Scopes.afterInterpret();
final Listitem li = new Listitem(); li.setValue(organization); j_domain.appendChild(li); IdentifierDt abbr = FhirUtil.getIdentifier(organization.getIdentifier(), "ABBREVIATION"); li.appendChild(new Listcell(abbr == null ? organization.getName().getValue() : abbr.getValue().getValue()));
Listitem li = new Listitem(); li.setValue(securityDomain); lstDomain.appendChild(li); li.appendChild(new Listcell(securityDomain.getName()));
private void initHeaders() { Listhead lh = lbResults.getListhead(); if (lh == null) { lh = new Listhead(); lbResults.appendChild(lh); } Listheader lhr = null; for (ColumnControl ctrl : lookupParams.getColControl()) { lhr = new Listheader(ctrl.getLabel()); lhr.setParent(lh); lhr.setVisible(ctrl.isVisible()); lhr.setWidth(ctrl.getWidth() + "px"); lhr.setSort("auto"); } if (lhr != null) { lhr.setHflex("1"); } }
/** * Populate list box with some draggable items. */ @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); while (itemCount < 11) { Listitem item = newListitem(itemCount % 2 == 1); item.addForward(Events.ON_DOUBLE_CLICK, listbox, null); listbox.appendChild(item); } infoPanel = (IInfoPanel) getController(include.getFellow("infoPanelRoot")); eventManager = EventManager.getInstance(); }
private void renderNote(ProblemNote pn) { Listitem item = new Listitem(); lstNotes.appendChild(item); Listcell cell = addCell(item, ""); cell.setSclass("bgo-problem-icon-cell"); Toolbarbutton btn = new Toolbarbutton("", DELETE_ICON); btn.setTooltiptext("Delete this note."); btn.addForward(Events.ON_CLICK, lstNotes, "onDeleteNote"); cell.appendChild(btn); addCell(item, pn.getNumber()); // Note # addCell(item, pn.getNarrative()).setHflex("1"); // Narrative addCell(item, DateUtil.formatDate(pn.getDateAdded())); // Date added addCell(item, pn.getAuthor()); // Author item.setValue(pn); }