/** * This method adds some content in a specific slot of the {@link Presenter}. The attached {@link View} should * manage this slot when its {@link View#addToSlot(Object, IsWidget)} is called. * <p/> * Contrary to the {@link #setInSlot(IsSlot, PresenterWidget)} method, no {@link ResetPresentersEvent} is fired, so * {@link PresenterWidget#onReset()} is not invoked. * <p/> * For more details on slots, see {@link HasSlots}. * * @param slot The slot into which the content is being added. * @param child The content, a {@link PresenterWidget}. Passing {@code null} will not add anything. */ @Override public <T extends PresenterWidget<?>> void addToSlot(MultiSlot<T> slot, T child) { assert child != null : "cannot add null to a slot"; if (child.slot == slot && child.parent == this) { return; } adoptChild(slot, child); if (!child.isPopup()) { getView().addToSlot(slot.getRawSlot(), child); } if (isVisible()) { child.internalReveal(); } }