public int size() { int sz = getChildren().size() - _hdcnt; if (_listfoot != null) --sz; if (_paging != null) --sz; if (_frozen != null) --sz; return sz; }
public Listitem get(int j) { final Component o = Listbox.this.getChildren().get(j + _hdcnt); if (o instanceof Listitem) return (Listitem) o; throw new IndexOutOfBoundsException("Wrong index: " + j); }
private void prepare() { if (_it == null) _it = cast(getChildren().listIterator(_j + _hdcnt)); } }
private Component fixRefChildForHeader(Component refChild) { if (refChild != null && refChild.getParent() != this) refChild = null; // try the first listitem if (refChild == null || (refChild != _listhead && !(refChild instanceof Auxhead))) refChild = getChildren().size() > _hdcnt ? getChildren().get(_hdcnt) : null; // try listfoot or paging if no listem refChild = fixRefChildBeforeFoot(refChild); return refChild; }
/** * Returns the Listfoot, if any. Otherwise, null is returned. */ public Listfoot getListfoot() { int index = getListgroupfootIndex(); if (index < 0) return null; final Listbox lb = (Listbox) getParent(); return (Listfoot) lb.getChildren().get(index); }
private void afterUnmarshal(int index) { for (Iterator<Component> it = getChildren().iterator(); it.hasNext();) { final Object child = it.next(); if (child instanceof Listitem) { final Listitem li = (Listitem) child; li.setIndexDirectly(index++); // since Listitem.clone() resets // index if (li.isSelected()) { _selItems.add(li); } } else if (child instanceof Listhead) { _listhead = (Listhead) child; } else if (child instanceof Listfoot) { _listfoot = (Listfoot) child; } else if (child instanceof Frozen) { _frozen = (Frozen) child; } else if (child instanceof Paging) { _pgi = _paging = (Paging) child; addPagingListener(_pgi); } } }
final int realIndex = getRealIndex(idx) - 1; if (realIndex >= 0 && realIndex < getItemCount()) removeChild(getChildren().get(realIndex));
if (j_domain.getChildren().size() > 0) { if (j_domain.getSelectedIndex() == -1) { j_domain.setSelectedIndex(0);
refChild = getChildren().size() > _hdcnt ? getChildren().get(_hdcnt) : null;