summaryrefslogblamecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/helper/CompositePage.java
blob: d9fed2e671c986b92abf05b0d43d9be09deff087 (plain) (tree)





























                                                                                    
package org.openslx.dozmod.gui.helper;

import org.eclipse.swt.widgets.Composite;

public abstract class CompositePage extends Composite {

	public CompositePage(Composite parent, int style) {
		super(parent, style);
	}

	/**
	 * 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 hide();

	/**
	 * Called when this page will be shown. The Page can initialize or reset
	 * internal data and control contents.
	 */
	public abstract void show();

}