@Override protected void onDetach() { super.onDetach(); if (eventPreview != null) { eventPreview.remove(); } }
/** {@inheritDoc} */ @Override protected void onDetach() { super.onDetach(); if (focusPreview != null) { focusPreview.remove(); } }
/** {@inheritDoc} */ @Override protected void onBlur(ComponentEvent ce) { final Rectangle rec = button.el().getBounds(); if (rec.contains(BaseEventPreview.getLastXY())) { ce.stopEvent(); return; } super.onBlur(ce); focusPreview.remove(); }
/** * Hides the window. * * @param buttonPressed the button that was pressed or null */ public void hide(Button buttonPressed) { if (hidden || !fireEvent(Events.BeforeHide, new WindowEvent(this, buttonPressed))) { return; } if (dragger != null) { dragger.cancelDrag(); } hidden = true; if (!maximized) { restoreSize = getSize(); restorePos = getPosition(true); } if (modalPreview != null) { modalPreview.removeHandler(); modalPreview = null; } onHide(); manager.unregister(this); if (removeFromParentOnHide) { removeFromParent(); } if (modalPanel != null) { ModalPanel.push(modalPanel); modalPanel = null; } eventPreview.remove(); notifyHide(); if (restoreWindowScrolling != null) { com.google.gwt.dom.client.Document.get() .enableScrolling(restoreWindowScrolling.booleanValue()); } fireEvent(Events.Hide, new WindowEvent(this, buttonPressed)); }
/** * Hides this menu and optionally all parent menus * * @param deep true to close all parent menus * @return this */ public Menu hide(boolean deep) { if (showing) { MenuEvent me = new MenuEvent(this); if (fireEvent(Events.BeforeHide, me)) { if (activeItem != null) { activeItem.deactivate(); activeItem = null; } onHide(); RootPanel.get().remove(this); eventPreview.remove(); showing = false; hidden = true; fireEvent(Events.Hide, me); if (deep && parentItem != null) { parentItem.parentMenu.hide(true); } } } return this; }
@Override protected void onDetach() { super.onDetach(); preview.remove(); }