/** * Disconnects a child from its parent. */ private void orphan() { if (slot == null) { return; } if (!slot.isRemovable()) { throw new IllegalArgumentException("Cannot remove a child from a permanent slot"); } if (parent != null) { internalHide(); parent.children.remove(this); parent = null; } slot = null; }
/** * Internal method called to hide a presenter. * See {@link PresenterWidget} for ways to hide a presenter. */ void internalHide() { if (!isVisible()) { return; } for (PresenterWidget<?> child : children) { child.internalHide(); } if (isPopup()) { ((PopupView) this.getView()).setCloseHandler(null); ((PopupView) this.getView()).hide(); } unregisterVisibleHandlers(); visible = false; onHide(); }