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.system;
020:
021: import java.awt.event.*;
022: import java.net.*;
023: import java.rmi.*;
024:
025: import javax.swing.*;
026: import javax.xml.rpc.*;
027:
028: import org.openharmonise.him.*;
029: import org.openharmonise.him.actions.*;
030: import org.openharmonise.him.harmonise.*;
031: import org.openharmonise.him.serverconfig.*;
032: import org.openharmonise.vfs.*;
033: import org.openharmonise.vfs.authentication.*;
034: import org.openharmonise.vfs.context.*;
035: import org.openharmonise.vfs.gui.*;
036: import org.openharmonise.vfs.servers.*;
037:
038: /**
039: * Action to open the preview settings dialog.
040: *
041: * @author matt treanor
042: * @version $Revision: 1.2 $
043: *
044: */
045: public class ActionPreviewSettings extends AbstractHIMAction implements
046: HIMAction {
047:
048: /**
049: *
050: */
051: public ActionPreviewSettings() {
052: super ();
053: }
054:
055: /**
056: * @param vfFile
057: */
058: public ActionPreviewSettings(VirtualFile vfFile) {
059: super (vfFile);
060: }
061:
062: /* (non-Javadoc)
063: * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
064: */
065: public void actionPerformed(ActionEvent arg0) {
066: JFrame frame = new JFrame();
067: frame.setIconImage(((ImageIcon) IconManager.getInstance()
068: .getIcon("16-command-server-properties.gif"))
069: .getImage());
070:
071: PreviewConfigDialog dialog = new PreviewConfigDialog(frame,
072: "Preview Settings");
073: dialog.show();
074: }
075:
076: /* (non-Javadoc)
077: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getText()
078: */
079: public String getText() {
080: // TODO Auto-generated method stub
081: return "Preview settings...";
082: }
083:
084: /* (non-Javadoc)
085: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getToolTip()
086: */
087: public String getToolTip() {
088: return this .getDescription();
089: }
090:
091: /* (non-Javadoc)
092: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getIcon()
093: */
094: public Icon getIcon() {
095: return IconManager.getInstance().getIcon("16-blank.gif");
096: }
097:
098: /* (non-Javadoc)
099: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#getMnemonic()
100: */
101: public String getMnemonic() {
102: return "P";
103: }
104:
105: /* (non-Javadoc)
106: * @see com.simulacramedia.contentmanager.actions.AbstractCMAction#isEnabled(com.simulacramedia.contentmanager.context.ContextEvent)
107: */
108: public boolean isEnabled(ContextEvent ce) {
109: if (!this .m_bUserChecked) {
110: this .checkUser();
111: }
112: this .setEnabled(this .m_bShow);
113: return this .m_bShow;
114: }
115:
116: /* (non-Javadoc)
117: * @see com.simulacramedia.contentmanager.actions.CMAction#getDescription()
118: */
119: public String getDescription() {
120: return "Opens a dialog in which you can alter preview settings";
121: }
122:
123: /* (non-Javadoc)
124: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorKeycode()
125: */
126: public int getAcceleratorKeycode() {
127: // TODO Auto-generated method stub
128: return 0;
129: }
130:
131: /* (non-Javadoc)
132: * @see com.simulacramedia.contentmanager.actions.CMAction#getAcceleratorMask()
133: */
134: public int getAcceleratorMask() {
135: // TODO Auto-generated method stub
136: return 0;
137: }
138: }
|