blob: 62073b85ec726e473bcea01f64033c2ca38626d9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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);
}
}
|