public void detach() { if (getParent() != null) setParent(null); else setPage(null); }
public void setParent(Component parent) { final Component old = getParent(); if (old != null && old != parent && invalidateParent()) old.invalidate(); super.setParent(parent); // avoid Includer to invalidate itself in an infinite loop if (parent != null && old != parent && invalidateParent()) parent.invalidate(); }
private void setParent0(Component parent) { if (_host != null && parent != null) { throw new UiException("As a shadow root cannot be a child of a shadow element."); } if (parent == null && _host == null) { // detach if (_firstInsertion != null) { setPrevInsertion(_firstInsertion, _previousInsertion); // resync setPrevInsertion(_nextInsertion, _lastInsertion); // resync } else { setPrevInsertion(_nextInsertion, _previousInsertion); // resync } _previousInsertion = null; _firstInsertion = null; _lastInsertion = null; _nextInsertion = null; } super.setParent(parent); }
_chdinf.markRemoving(oc, true); try { oc.setParent(null); //spec: call back setParent } finally { _chdinf.markRemoving(oc, false);
_chdinf.markAdding(nc, true); try { nc.setParent(this); //spec: callback setParent } finally { _chdinf.markAdding(nc, false);