/** * Returns the selected institution, if any. * * @return An institution object. May be null. */ private Organization getSelectedOrganization() { Listitem item = j_domain.getSelectedItem(); return item == null ? null : (Organization) item.getValue(); }
protected Encounter getSelectedEncounter(Listbox lb) { Listitem item = lb.getSelectedItem(); return item == null ? null : (Encounter) item.getValue(); }
/** * Extract the associated dropped item from the dropped UI component. * * @param comp The component (a list item) that was dropped. * @return The associated drop item. */ private DroppedItem getDroppedItem(Component comp) { return (DroppedItem) ((Listitem) comp).getValue(); }
/** * Returns the selected security domain, if any. * * @return An ISecurityDomain object. May be null. */ protected ISecurityDomain getSelectedSecurityDomain() { Listitem item = lstDomain.getSelectedItem(); return item == null ? null : (ISecurityDomain) item.getValue(); }
/** * Returns the recipient selected in the specified list, or null if no selection. * * @param lst A list box. * @return The selected recipient, or null if no selection. */ private Recipient getSelected(Listbox lst) { Listitem selItem = lst == null ? null : lst.getSelectedItem(); return selItem == null ? null : (Recipient) selItem.getValue(); }
/** * Returns the currently selected notification. * * @return The currently selected notification. */ private ScheduledNotification getSelected() { return (ScheduledNotification) lstScheduled.getSelectedItem().getValue(); }
private Encounter getEncounter(Listbox lb) { Listitem item = lb.getSelectedItem(); return item == null ? null : (Encounter) item.getValue(); }
private Participant getSelectedParticipant(Listbox lb) { Listitem item = lb.getSelectedItem(); return item == null ? null : (Participant) item.getValue(); }
private void saveGridState() { selectedProblems.clear(); for (Object object : lbProblems.getSelectedItems()) { Listitem item = (Listitem) object; lbProblems.renderItem(item); selectedProblems.add((Problem) item.getValue()); } }
private Problem problemFromRow(int row) { Listitem item = lbProblems.getItemAtIndex(row); lbProblems.renderItem(item); return (Problem) item.getValue(); }
public void onClick$btnSelect() { Listitem item = lbResults.getSelectedItem(); if (item == null) { return; } result = (String) item.getValue(); close(false); }
private TestItem getSelectedTest() { Listitem item = lbTests.getSelectedItem(); if (item != null) { lbTests.renderItem(item); return (TestItem) item.getValue(); } else { return null; } }
/** * Returns an array of selected subsets. * * @return Array of selected subsets. */ private String[] getSelectedSubsets() { String[] selectedSubsets = new String[lbSubset.getSelectedCount()]; int i = 0; for (Listitem item : lbSubset.getSelectedItems()) { selectedSubsets[i] = item.getValue(); } return selectedSubsets; }
/** * Process a double-clicked notification. * * @param event The process item event. */ public void onProcessItem$lstNotification(Event event) { event = ZKUtil.getEventOrigin(event); Listitem item = (Listitem) event.getTarget(); Notification notification = (Notification) item.getValue(); processingController.process(Collections.singleton(notification)); }
/** * Change the location context to the selected location and close the dialog. */ public void onClick$btnOK() { Listitem item = lstLocation.getSelectedItem(); Location location = item == null ? null : (Location) item.getValue(); if (location != null) { LocationContext.changeLocation(location); close(); } }
private void restoreGridState() { lbProblems.clearSelection(); for (Object object : lbProblems.getItems()) { Listitem item = (Listitem) object; lbProblems.renderItem(item); if (selectedProblems.contains(item.getValue())) { item.setSelected(true); } } selectedProblems.clear(); updateControls(); }
/** * Change the location context to the selected location and close the dialog. */ public void onClick$btnOK() { Listitem item = lstLocation.getSelectedItem(); Location location = item == null ? null : (Location) item.getValue(); if (location != null) { LocationContext.changeLocation(location); close(); } }
/** * Re-renders a previously rendered list item. * * @param item List item to re-render. */ protected void rerender(Listitem item) { try { ZKUtil.detachChildren(item); listBox.getItemRenderer().render(item, item.getValue(), item.getIndex()); } catch (Exception e) { throw MiscUtil.toUnchecked(e); } }
public void onClick$lstAllergies() { Listitem item = lstAllergies.getSelectedItem(); if (item != null) { lstAllergies.clearSelection(); String s = item.getValue(); List<String> lst = broker.callRPCList("RGCWARCV DETAIL", null, patientId, StrUtil.piece(s, U)); ReportBox.modal(lst, code2Text('A'), allowPrint); } }
@Override public void onEvent(Event event) throws Exception { DropEvent dropEvent = (DropEvent) ZKUtil.getEventOrigin(event); Listitem dragged = (Listitem) dropEvent.getDragged(); Listitem target = (Listitem) dropEvent.getTarget(); filterManager.moveFilter((AbstractPatientListFilter) dragged.getValue(), target.getIndex()); dragged.getListbox().insertBefore(dragged, target); } };