private static boolean isGeneralSibling(Component c1, Component c2) { while (c1 != null) { if (c1 == c2) return true; c1 = c1.getPreviousSibling(); } return false; }
private int getComponentIndex() { Component curr = _comp; int index = -1; while (curr != null) { curr = curr.getPreviousSibling(); index++; } return index; }
private static boolean isGeneralSibling(Component c1, Component c2) { while (c1 != null) { if (c1 == c2) return true; c1 = c1.getPreviousSibling(); } return false; }
private int getComponentIndex() { Component curr = _comp; int index = -1; while(curr != null) { curr = curr.getPreviousSibling(); index++; } return index; }
public ComponentAgent getPreviousSibling() { return asAgent(comp.getPreviousSibling()); }
private static List<Component> nextGroupedSiblings(Set<Component> newsibs) { if (newsibs.isEmpty()) return null; final List<Component> group = new LinkedList<Component>(); final Component first; { final Iterator<Component> it = newsibs.iterator(); first = it.next(); it.remove(); } group.add(first); for (Component c = first; (c = c.getNextSibling()) != null && newsibs.remove(c);) //next is also new group.add(c); for (Component c = first; (c = c.getPreviousSibling()) != null && newsibs.remove(c);) //prev is also new group.add(0, c); return group; }
} else { final Component first = group.get(0); if ((prv = first.getPreviousSibling()) != null && (sibs == null || sibs.contains(prv)) //prv is available && !(prv instanceof Native) && !(prv instanceof StubComponent)) { //prv valid responses.add(new AuInsertAfter(prv, contents)); if ((prv = first.getPreviousSibling()) == null || (sibs != null && !sibs.contains(prv))) //prv is not available throw new UiException("Inserting a component before a native one not allowed: " + nxt);
protected void shrinkRange(Component firstChild, Component lastChild) { if (firstChild != null) { // has children boolean isEdge = false; if (firstChild == _firstInsertion) { // cut edge if (lastChild == _lastInsertion) { // cut all _firstInsertion = _lastInsertion = null; } else { // shrink from the start _firstInsertion = lastChild.getNextSibling(); } isEdge = true; } else if (lastChild == _lastInsertion) { isEdge = true; // shrink from the end _lastInsertion = _lastInsertion.getPreviousSibling(); } if (isEdge && getParent() != null) { asShadow(getParent()).shrinkRange(firstChild, lastChild); } } }
se._previousInsertion = previousSibling; } else { // some children between two shadows se._previousInsertion = old.getPreviousSibling(); se._previousInsertion = old.getPreviousSibling(); } else { se._previousInsertion = null; se._nextInsertion = old.getPreviousSibling(); } else { se._nextInsertion = null;
_previousInsertion = insertBefore.getPreviousSibling(); } else { List<ShadowElement> shadowRoots = ((ComponentCtrl) host).getShadowRoots();
} else if (child == _lastInsertion) { isEdge = true; _lastInsertion = child.getPreviousSibling(); setPrevInsertion(this, child.getPreviousSibling()); } else if (_nextInsertion == child) { setPrevInsertion(child.getNextSibling(), this);
final Component preRefChild = refChild.getPreviousSibling(); if (preRefChild instanceof Listitem) { final int idx = ((Listitem) preRefChild).getIndex();
Component p = comp.getPreviousSibling(); comp.detach(); comp = p;
break; case ADJACENT_SIBLING: if (rt2.getPreviousSibling() != rt) return null; break;
break; case ADJACENT_SIBLING: if (rt2.getPreviousSibling() != rt) return null; break;
next = comp.getNextSibling(); while (--cnt >= 0) { Component p = comp.getPreviousSibling(); comp.detach(); comp = p;
Component p = comp.getPreviousSibling(); comp.detach(); comp = p;
Component p = comp.getPreviousSibling(); comp.detach(); comp = p;
next = comp.getNextSibling(); while (--cnt >= 0) { Component p = comp.getPreviousSibling(); comp.detach(); comp = p;