public boolean isLoaded() { return Listitem.this.isLoaded(); }
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); }; }
/** * Renders the specified {@link Listitem} if not loaded yet, with * {@link #getItemRenderer}. * * <p> * It does nothing if {@link #getModel} returns null. In other words, it is * meaningful only if live data model is used. * * @see #renderItems * @see #renderAll * @return the list item being passed to this method */ public Listitem renderItem(Listitem li) { if (_model != null && li != null && !li.isLoaded()) { final Renderer renderer = new Renderer(); try { renderer.render(li, li.getIndex()); } catch (Throwable ex) { renderer.doCatch(ex); } finally { renderer.doFinally(); } } return li; }
if (item.isLoaded()) { //selected is meaningful only if loaded boolean sel = selObjs.contains(_model.getElementAt(item.getIndex())); if (sel)
/* package */@SuppressWarnings({ "unchecked", "rawtypes" }) void render(Listitem item, int index) throws Throwable { if (item.isLoaded()) { return; // nothing to do
} else if (((Listitem) item).isLoaded()) { if (renderer == null) renderer = (ListitemRenderer) getRealRenderer();