@Override public Listitem render(String term) { return new Listitem(term); }
@Override public Listitem render(IMessageProducer producer) { Listitem item = new Listitem(producer.getClass().getName()); //item.setSelectable(true); item.setSelected(true); return item; }
@Override public Listitem render(String channel) { Listitem item = new Listitem(channel); //item.setSelectable(true); item.setSelected(true); return item; }
@Override public Listitem render(HelpTopic topic) { Listitem item = new Listitem(topic.getLabel()); item.setData(topic); return item; } }
/** * Render a list item. * * @param filter The associated patient list filter. * @return The rendered list item. */ @Override public Listitem render(AbstractPatientListFilter filter) { Listitem item = new Listitem(filter.getName()); item.setData(filter); return item; }
/** * Add an item to the list box. * * @param value = Value of item to add. */ public void addItem(String value) { Listitem item = new Listitem(); item.setLabel(value); addChild(item); if (value.equalsIgnoreCase(defaultValue)) { item.addStyle("font-style", "italic"); } } }
@Override public Listitem render(IPublisherInfo participant) { Listitem item = new Listitem(participant.getUserName()); item.setData(participant); if (exclusions != null && exclusions.contains(participant)) { item.setDisabled(true); item.addClass("chat-participant-active"); item.setVisible(!hideExclusions); } if (participant.equals(self)) { item.addClass("chat-participant-self"); } return item; }
public DateRangeChooser() { super(); customItem = new Listitem(); customItem.setLabel("Custom..."); addChild(customItem); setAllowCustom(false); loadChoices(null); }
/** * Render a list item. * * @param filter The associated PatientListFilter object. */ @Override public Listitem render(AbstractPatientListFilter filter) { Listitem item = new Listitem(filter.getName()); item.setHint(filter.getName()); item.setData(filter); return item; }
@Override public Listitem render(String data) { Listitem item = new Listitem(data); item.setData(new LayoutIdentifier(data, shared)); if (pnlSelect.isVisible()) { item.addEventForward(DblclickEvent.TYPE, btnOK, ClickEvent.TYPE); } return item; }
@EventHandler(value = "click", target = "btnNewEvent") private void onClick$btnNewEvent() { String eventName = StringUtils.trimToNull(tboxNewEvent.getValue()); if (eventName != null && !containsEvent(eventName)) { Listitem item = new Listitem(); item.setLabel(eventName); lboxEventList.addChild(item); } tboxNewEvent.setValue(""); }
item = new Listitem(); item.setLabel(range.getLabel()); item.setData(range);
/** * Creates and returns a draggable list item. * * @param associateEvents If true, associate events with this item. * @return New list item. */ private Listitem newListitem(boolean associateEvents) { Listitem item = new Listitem(); if (associateEvents) { associateEvents(item); } String label = "Drop item #" + ++itemCount + (associateEvents ? " *" : ""); item.setLabel(label); // Set to info panel drop id. item.setDragid(IInfoPanel.DROP_ID); // Create and attach the object to be rendered. DroppedItem dropped = new DroppedItem(label, "This is the detail for drop item #" + itemCount); item.setData(dropped); // Associate the drop renderer with the item. DropUtil.setDropRenderer(item, dropRenderer); return item; }
private void processListResponses() { List<?> responses = control.getResponses(); listbox.setVisible(true); for (Object rsp : responses) { DialogResponse<?> response = (DialogResponse<?>) rsp; Listitem item = new Listitem(StrUtil.formatMessage(response.getLabel())); item.addEventListener(DblclickEvent.TYPE, clickListener); item.setData(response); listbox.addChild(item); if (response.isDefault()) { item.setSelected(true); } } if (listbox.getSelectedCount() == 0) { listbox.setSelectedItem(listbox.getChild(Listitem.class)); } addButton(LABEL_ID_CANCEL, "danger", (event) -> { close(null); }); addButton(LABEL_ID_OK, "success", (event) -> { close(listbox.getSelectedItem()); }); }
/** * Renders the list box contents. * * @param qr The search hit to render. */ @Override public Listitem render(HelpSearchHit qr) { Listitem item = new Listitem(); double score = qr.getConfidence(); item.setData(qr.getTopic()); Cell lc = new Cell(); lc.addChild(toImage(score)); String tt = StrUtil.formatMessage("@cwf.help.tab.search.score", score); lc.setHint(tt); item.addChild(lc); lc = new Cell(qr.getTopic().getLabel()); item.addChild(lc); lc = new Cell(qr.getTopic().getSource()); item.addChild(lc); return item; }