1 /*
2  * aTunes
3  * Copyright (C) Alex Aranda, Sylvain Gaudard and contributors
4  *
5  * See http://www.atunes.org/wiki/index.php?title=Contributing for information about contributors
6  *
7  * http://www.atunes.org
8  * http://sourceforge.net/projects/atunes
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  */
20 
21 package net.sourceforge.atunes.gui.views.controls;
22 
23 import javax.swing.WindowConstants;
24 
25 /**
26  * Types of actions when closing a dialog
27  *
28  * @author alex
29  *
30  */
31 public enum CloseAction {
32 
33 	/**
34 	 * Release memory of dialog
35 	 */
36 	DISPOSE(WindowConstants.DISPOSE_ON_CLOSE),
37 
38 	/**
39 	 * Just hide dialog
40 	 */
41 	HIDE(WindowConstants.HIDE_ON_CLOSE),
42 
43 	/**
44 	 * Ignore closes events
45 	 */
46 	NOTHING(WindowConstants.DO_NOTHING_ON_CLOSE);
47 
48 	private int constant;
49 
CloseAction(final int constant)50 	private CloseAction(final int constant) {
51 		this.constant = constant;
52 	}
53 
54 	/**
55 	 * @return Swing constant associated
56 	 */
getConstant()57 	public int getConstant() {
58 		return this.constant;
59 	}
60 }