001: /*
002: * The contents of this file are subject to the
003: * Mozilla Public License Version 1.1 (the "License");
004: * you may not use this file except in compliance with the License.
005: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006: *
007: * Software distributed under the License is distributed on an "AS IS"
008: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
009: * See the License for the specific language governing rights and
010: * limitations under the License.
011: *
012: * The Initial Developer of the Original Code is Simulacra Media Ltd.
013: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014: *
015: * All Rights Reserved.
016: *
017: * Contributor(s):
018: */
019: package org.openharmonise.him.actions.help;
020:
021: import java.awt.event.ActionEvent;
022:
023: import javax.swing.Icon;
024: import javax.swing.ImageIcon;
025: import javax.swing.JFrame;
026:
027: import org.openharmonise.him.actions.*;
028: import org.openharmonise.him.window.about.*;
029: import org.openharmonise.vfs.*;
030: import org.openharmonise.vfs.gui.*;
031:
032: /**
033: * Action to open the about dialog.
034: *
035: * @author Matthew Large
036: * @version $Revision: 1.1 $
037: *
038: */
039: public class ActionAbout extends AbstractHIMAction implements HIMAction {
040:
041: /**
042: *
043: */
044: public ActionAbout() {
045: super ();
046: }
047:
048: /**
049: * @param vfFile
050: */
051: public ActionAbout(VirtualFile vfFile) {
052: super (vfFile);
053: }
054:
055: /* (non-Javadoc)
056: * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
057: */
058: public void actionPerformed(ActionEvent arg0) {
059: JFrame frame = new JFrame();
060: frame.setIconImage(((ImageIcon) IconManager.getInstance()
061: .getIcon("16-sim-logo.gif")).getImage());
062:
063: AboutDialog dialog = new AboutDialog(frame);
064: dialog.show();
065: }
066:
067: /* (non-Javadoc)
068: * @see com.simulacramedia.contentmanager.actions.CMAction#getDescription()
069: */
070: public String getDescription() {
071: return "Displays information about Harmonise Information Manager";
072: }
073:
074: /* (non-Javadoc)
075: * @see com.simulacramedia.contentmanager.actions.CMAction#getText()
076: */
077: public String getText() {
078: return "About";
079: }
080:
081: /* (non-Javadoc)
082: * @see com.simulacramedia.contentmanager.actions.CMAction#getToolTip()
083: */
084: public String getToolTip() {
085: return this .getDescription();
086: }
087:
088: /* (non-Javadoc)
089: * @see com.simulacramedia.contentmanager.actions.CMAction#getIcon()
090: */
091: public Icon getIcon() {
092: return IconManager.getInstance()
093: .getIcon("16-command-about.png");
094: }
095:
096: /* (non-Javadoc)
097: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorKeycode()
098: */
099: public int getAcceleratorKeycode() {
100: return 0;
101: }
102:
103: /* (non-Javadoc)
104: * @see com.simulacramedia.contentmanager.actions.CMAction#getMnemonic()
105: */
106: public String getMnemonic() {
107: return "A";
108: }
109:
110: /* (non-Javadoc)
111: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorMask()
112: */
113: public int getAcceleratorMask() {
114: return 0;
115: }
116:
117: }
|