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.messages;
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.configuration.*;
029: import org.openharmonise.vfs.*;
030: import org.openharmonise.vfs.gui.*;
031:
032: /**
033: * Action to open the customise dialog with the reporting filters open.
034: *
035: * @author Matthew Large
036: * @version $Revision: 1.1 $
037: *
038: */
039: public class ActionSetFilters extends AbstractHIMAction implements
040: HIMAction {
041:
042: /**
043: *
044: */
045: public ActionSetFilters() {
046: super ();
047: }
048:
049: /**
050: * @param vfFile
051: */
052: private ActionSetFilters(VirtualFile vfFile) {
053: super (vfFile);
054: }
055:
056: /* (non-Javadoc)
057: * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
058: */
059: public void actionPerformed(ActionEvent arg0) {
060: JFrame frame = new JFrame();
061: frame.setIconImage(((ImageIcon) IconManager.getInstance()
062: .getIcon("16-command-preferences.gif")).getImage());
063:
064: ConfigDialog dialog = new ConfigDialog(frame, "Customise");
065: dialog.setSelectedTab("Options");
066: dialog.show();
067: }
068:
069: /* (non-Javadoc)
070: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getText()
071: */
072: public String getText() {
073: return "Reporting Options";
074: }
075:
076: /* (non-Javadoc)
077: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getToolTip()
078: */
079: public String getToolTip() {
080: return "Opens a dialog to customise the reporting options";
081: }
082:
083: /* (non-Javadoc)
084: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getIcon()
085: */
086: public Icon getIcon() {
087: return IconManager.getInstance().getIcon(
088: "16-command-preferences.gif");
089: }
090:
091: /* (non-Javadoc)
092: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getMnemonic()
093: */
094: public String getMnemonic() {
095: return "R";
096: }
097:
098: /* (non-Javadoc)
099: * @see com.simulacramedia.contentmanager.actions.CMAction#getDescription()
100: */
101: public String getDescription() {
102: return "Opens a dialog to customise the reporting options";
103: }
104:
105: /* (non-Javadoc)
106: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorKeycode()
107: */
108: public int getAcceleratorKeycode() {
109: return 0;
110: }
111:
112: /* (non-Javadoc)
113: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorMask()
114: */
115: public int getAcceleratorMask() {
116: return 0;
117: }
118:
119: }
|