~veger/ganttproject/manual-import

« back to all changes in this revision

Viewing changes to ganttproject/src/net/sourceforge/ganttproject/action/CancelAction.java

  • Committer: Maarten Bezemer
  • Date: 2012-01-22 12:20:00 UTC
  • Revision ID: maarten.bezemer@gmail.com-20120122122000-qwyec45rjx86wi7o
Updated till 2fe683a778c3 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Created on 27.03.2005
3
 
 */
 
2
GanttProject is an opensource project management tool.
 
3
Copyright (C) 2005-2011 GanttProject Team
 
4
 
 
5
This program is free software; you can redistribute it and/or
 
6
modify it under the terms of the GNU General Public License
 
7
as published by the Free Software Foundation; either version 3
 
8
of the License, or (at your option) any later version.
 
9
 
 
10
This program is distributed in the hope that it will be useful,
 
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
GNU General Public License for more details.
 
14
 
 
15
You should have received a copy of the GNU General Public License
 
16
along with this program; if not, write to the Free Software
 
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
*/
4
19
package net.sourceforge.ganttproject.action;
5
20
 
 
21
import java.awt.event.ActionEvent;
 
22
 
6
23
/**
7
 
 * @author bard
 
24
 * Default cancel action for dialogs.
 
25
 * {@link UIFacade#createDialog(java.awt.Component, javax.swing.Action[], String)}
 
26
 * adds additional/special functionalities for this action
8
27
 */
9
 
public abstract class CancelAction extends GPAction {
 
28
public class CancelAction extends GPAction {
 
29
    /** CancelAction which does not do anything */
 
30
    public final static CancelAction EMPTY = new CancelAction();
 
31
 
 
32
    public static final CancelAction CLOSE = new CancelAction("close");
 
33
 
10
34
    public CancelAction() {
11
35
        this("cancel");
12
36
    }
13
 
    protected CancelAction(String key) {
 
37
 
 
38
    /** For concealed CancelActions (with a different text) */
 
39
    public CancelAction(String key) {
14
40
        super(key);
15
41
    }
 
42
 
 
43
    @Override
 
44
    public void actionPerformed(ActionEvent e) {
 
45
        // Do nothing, as cancel mostly does nothing
 
46
    }
16
47
}