/** * If the child being removed is the popup, set the popup to null. * * @see org.fujion.component.BaseComponent#afterRemoveChild(org.fujion.component.BaseComponent) */ @Override protected void afterRemoveChild(BaseComponent child) { super.afterRemoveChild(child); if (child == popup.getReference()) { setPopup(null); } }
protected void remove(BaseComponent child, boolean noSync, boolean destroy) { if (child instanceof IComposite) { BaseComponent root = ((IComposite) child).getCompositeRoot(); BaseComponent parent = root == null ? null : root.getParent(); if (parent != null) { parent.children.remove(root, noSync, destroy); } child.parent = null; modCount++; } else { int index = indexOf(child); ComponentException.assertTrue(index != -1, parent, "Child does not belong to this parent"); parent.beforeRemoveChild(child); parent.nameIndex.remove(child); child.parent = null; delegate.remove(child); modCount++; if (!noSync) { parent.invokeIfAttached("removeChild", child, destroy); } child.dead |= destroy; parent.afterRemoveChild(child); } }