KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > qfs > apps > qflog > command > CommandHelpAbout


1 // {{{ copyright
2

3 /********************************************************************
4  *
5  * $Id: CommandHelpAbout.java,v 1.2 2000/07/05 14:07:44 gs Exp $
6  *
7  * The contents of this file are subject to the Mozilla Public
8  * License Version 1.1 (the "License"); you may not use this file
9  * except in compliance with the License. You may obtain a copy of
10  * the License at http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS
13  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14  * implied. See the License for the specific language governing
15  * rights and limitations under the License.
16  *
17  * The Original Code is qfs.de code.
18  *
19  * The Initial Developer of the Original Code is Gregor Schmid.
20  * Portions created by Gregor Schmid are
21  * Copyright (C) 1999 Quality First Software, Gregor Schmid.
22  * All Rights Reserved.
23  *
24  * Contributor(s):
25  *
26  *******************************************************************/

27
28 // }}}
29

30 package de.qfs.apps.qflog.command;
31
32 // {{{ imports
33

34 import java.awt.Frame JavaDoc;
35
36 import de.qfs.lib.command.Command;
37 import de.qfs.lib.command.CommandException;
38 import de.qfs.lib.command.Invokable;
39 import de.qfs.lib.gui.Message;
40 import de.qfs.lib.log.Log;
41 import de.qfs.lib.log.Logger;
42
43 import de.qfs.apps.qflog.App;
44 import de.qfs.apps.qflog.Version;
45
46 // }}}
47

48 /**
49  * This command brings up a dialog displaying version and copyright
50  * information.
51  *
52  * @author Gregor Schmid
53  * @version $Revision: 1.2 $
54  */

55 public class CommandHelpAbout extends Command
56 implements Invokable
57 {
58     // {{{ variables
59

60     /**
61      * The Logger used for logging.
62      */

63     private final static Logger logger = new Logger (CommandHelpAbout.class);
64
65     /**
66      * The parent for the dialog.
67      */

68     private Frame JavaDoc parent;
69
70     // }}}
71

72     // {{{ CommandHelpAbout
73

74     /**
75      * Create a new CommandHelpAbout.
76      *
77      * @param source The source of the Command.
78      * @param parent The parent frame for the dialog.
79      */

80     public CommandHelpAbout (Object JavaDoc source, Frame JavaDoc parent)
81     {
82         super (source);
83         if (logger.level >= Log.MTD) {
84             logger.log(Log.MTD, "CommandHelpAbout(Object,Frame)", "");
85         }
86         this.parent = parent;
87     }
88
89     // }}}
90
// {{{ invoke
91

92     /**
93      * Invoke the command.
94      *
95      * @return Always null.
96      *
97      * @throws CommandException Never.
98      */

99     public Object JavaDoc invoke()
100          throws CommandException
101     {
102         if (logger.level >= Log.MTD) {
103             logger.log(Log.MTD, "invoke()", "");
104         }
105
106         Message.showMessage(parent, "qflog.info",
107                             new String JavaDoc[] {Version.getVersion()});
108
109         return null;
110     }
111
112     // }}}
113
}
114
Popular Tags