public Listgroup next() { final Listgroup o = (Listgroup) getItemAtIndex(_it.next()[0]); ++_j; return o; }
public Listgroup get(int index) { return (Listgroup) getItemAtIndex(_groupsInfo.get(index)[0]); } };
/** * Returns the selected item. * * <p> * Note: if live data is used ({@link #getModel} is not null), the returned * item might NOT be loaded yet. To ensure it is loaded, you have to invoke * {@link #renderItem}. */ public Listitem getSelectedItem() { return _jsel >= 0 ? _jsel > 0 && _selItems.size() == 1 ? // optimize for performance _selItems.iterator().next() : getItemAtIndex(_jsel) : null; }
/* package */Listgroup getListgroupAt(int index) { if (_groupsInfo.isEmpty()) return null; final int[] g = getGroupsInfoAt(index); if (g != null) { return (Listgroup) getItemAtIndex(g[0]); } return null; }
public Component getComponentAtIndexByOwner(Component comp, int index) { if (comp instanceof Listbox) { final Listbox listbox = (Listbox) comp; return listbox.getItemAtIndex(index); } else { throw new UiException("Unsupported type for ListitemCollectionItem: " + comp); } }
/** * Removes the child item in the list box at the given index. * * <p> * Note: if live data is used ({@link #getModel} is not null), the returned * item might NOT be loaded yet. To ensure it is loaded, you have to invoke * {@link #renderItem}. * * @return the removed item. */ public Listitem removeItemAt(int index) { final Listitem item = getItemAtIndex(index); removeChild(item); return item; }
public Listitem get(int index) { final Listbox lb = getListbox(); if (lb == null) throw new IndexOutOfBoundsException("Index: " + index); return lb.getItemAtIndex(getIndex() + index + 1); } };
private Problem problemFromRow(int row) { Listitem item = lbProblems.getItemAtIndex(row); lbProblems.renderItem(item); return (Problem) item.getValue(); }
private Listcell getCell(int col, int row) { Listitem item; while (row >= lstVitals.getItemCount()) { item = new Listitem(); item.setVisible(false); item.setParent(lstVitals); } item = lstVitals.getItemAtIndex(row); while (col >= item.getChildren().size()) { Listcell cell = new Listcell(""); cell.setParent(item); } return (Listcell) item.getChildren().get(col); }
public void render(int x, int y) { Listbox listbox = target.as(Listbox.class); if(x==-1) x = 0; if(y==-1) y = listbox.getItemCount()-1; ArrayList<String> ids = new ArrayList<String>(); while(true){ if(x > y) break; Listitem item = listbox.getItemAtIndex(x++); if(item!=null && !item.isLoaded()){ ids.add(item.getUuid()); } } if(ids.size()==0) return; String desktopId = target.getDesktop().getId(); String cmd = Events.ON_RENDER; Map<String, Object> data = EventDataManager.getInstance().build( new RenderEvent(cmd, new HashSet<String>(ids))); ((ClientCtrl) target.getClient()).postUpdate(desktopId, target.getUuid(), cmd, data, false); ((ClientCtrl) getClient()).flush(desktopId); }; }
/** * Places the highlight indicator next to the specified notification. If the notification is not * found or is null, the indicator is hidden. * * @param notification Notification to highlight. */ protected void highlightNotification(Notification notification) { int i = notification == null ? -1 : model.indexOf(notification); if (i >= 0) { Listitem item = lstNotification.getItemAtIndex(i); imgIndicator.setParent(item.getFirstChild()); imgIndicator.setVisible(true); Clients.scrollIntoView(item); } else { imgIndicator.setVisible(false); } }
if (jsel < 0) { // unselect all clearSelection(); } else if (jsel != _jsel || (_multiple && _selItems.size() > 1) || !_selItems.contains(getItemAtIndex(_jsel))) { for (Listitem item : _selItems) { item.setSelectedDirectly(false); Listitem item = getItemAtIndex(_jsel); final Listitem item = getItemAtIndex(_jsel); int size = getDataLoader().getOffset(); for (Iterator it = new VisibleChildrenIterator(true); it.hasNext(); size++)
int index = model.indexOf(val); if (index >= 0) { final Listitem item = lbx.getItemAtIndex(index);
int row = StrUtil.toInt(pcs[1]) - 1; setValue(col, row, StrUtil.strAppend(getValue(col, row), pcs[2], "; "), null); lstVitals.getItemAtIndex(row).setVisible(true);
Listitem li = lbProblems.getItemAtIndex(i);
getItemAtIndex(index), shift != 0 ? SelectEvent.SHIFT_KEY : 0); Events.postEvent(evt); } else if (cmd.equals("onCheckSelectAll")) { // F65-ZK-2014
final Component next = min < oldsz ? _listbox.getItemAtIndex(min) : null; while (--cnt >= 0) { if (renderer == null) Component comp = _listbox.getItemAtIndex(max); while (--cnt >= 0) { Component p = comp.getPreviousSibling();
Component comp = _listbox.getItemAtIndex(max); next = comp.getNextSibling(); while (--cnt >= 0) { Component item = _listbox.getItemAtIndex(min); while (--cnt >= 0) { next = item.getNextSibling();