@Override public void handleAction(Object sender, Object target) { if (window.isClosable()) { window.close(); } }
/** * Sets the closable status for the window. If a window is closable it * typically shows an X in the upper right corner. Clicking on the X sends a * close event to the server. Setting closable to false will remove the X * from the window and prevent the user from closing the window. * * @param closable * determines if the window can be closed by the user. */ public void setClosable(boolean closable) { if (closable != isClosable()) { getState().closable = closable; } }