package org.openslx.dozmod.gui.helper; import java.awt.LayoutManager; import javax.swing.JPanel; @SuppressWarnings("serial") public abstract class CompositePage extends JPanel { public CompositePage() { super(); } public CompositePage(LayoutManager layout) { super(layout); } /** * This page is requested to be closed (hidden). The page should save any * data or unload resources, but not destroy the window, as it might be * opened again at a later point in time. The page can request to cancel the * operation, i.e. by asking the user first if he wants to cancel the * operation and lose unsaved data, and then returning false if the user * wants to stay on this page. * * @return true to allow hiding (and opening a new page afterwards), false * to stay on this page. */ public abstract boolean requestHide(); /** * Called when this page will be shown. The Page can initialize or reset * internal data and control contents. */ public abstract void requestShow(); }