* 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;
}
hidden = true;
restoreSize = getSize();
restorePos = getPosition(true);
super.onHide();
RootPanel.get().remove(this);
if (modal) {
modalPanel.hide();
}
fireEvent(Events.Hide, new WindowEvent(this, buttonPressed));
}