summaryrefslogblamecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/activity/ActivityPanel.java
blob: 2694605e9e89ea0269dfee1155e4b2436f2d15b7 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                        
                                 
                          
                                         
 
                                         
 
                                                    

           




                                                                           







                                                                                    




                                                                                         



                                                
 
package org.openslx.dozmod.gui.activity;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.CompoundBorder;

import org.openslx.dozmod.gui.MainWindow;

public abstract class ActivityPanel extends JPanel {

	/**
	 * Version for serialization.
	 */
	private static final long serialVersionUID = -3207947029817052277L;

	/**
	 * If this activity wants to prevent the user from closing the application,
	 * it should return true. This makes the application ask the user to confirm
	 * quitting.
	 * 
	 * @return true to ask the user for confirmation
	 */
	public abstract boolean wantConfirmQuit();

	public ActivityPanel() {
		setBorder(new CompoundBorder(BorderFactory.createRaisedSoftBevelBorder(),
				BorderFactory.createEmptyBorder(3, 3, 3, 3)));
	}

	protected final void close() {
		MainWindow.removeActivity(this);
	}

}