blob: 62073b85ec726e473bcea01f64033c2ca38626d9 (
plain) (
tree)
|
|
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;
@SuppressWarnings("serial")
public abstract class ActivityPanel extends JPanel {
/**
* 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);
}
}
|