summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/IQuitWarningPanel.java
blob: 34d9e0751d77e97e5ab254536585d9d7a23d1fba (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package jrummikub.view;

import jrummikub.util.IEvent;

/**
 * Warning panel shown to if the emitted event would cancel the current game
 */
public interface IQuitWarningPanel {

	/**
	 * Enum summarizing the different events invoking the quit warning panel
	 */
	public enum QuitMode {
		/** */
		DEFAULT,
		/** */
		QUIT_PROCESS,
		/** */
		QUIT_GAME
	}

	/**
	 * Is emitted if the user is positive about quitting
	 * 
	 * @return the event
	 */
	public IEvent getQuitEvent();

	/**
	 * Is emitted if the user selected quit by mistake
	 * 
	 * @return the event
	 */
	public IEvent getCancelEvent();

	/**
	 * Sets the panel according to the event which invoked it
	 * 
	 * @param mode
	 *            the invoking event type
	 */
	public void setMode(QuitMode mode);

	/**
	 * Getter for quit mode
	 * 
	 * @return the quit mode
	 */
	public QuitMode getQuitMode();

}