01: /*
02:
03: The contents of this file are subject to the Mozilla Public License Version 1.1
04: (the "License") you may not use this file except in compliance with the License.
05:
06: You may obtain a copy of the License at http://www.mozilla.org/MPL/
07:
08: Software distributed under the License is distributed on an "AS IS" basis,
09: WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10: for the specific language governing rights and limitations under the License.
11:
12: The Original Code is "BshInterpreter plugin for The Columba Project"
13:
14: The Initial Developer of the Original Code is Celso Pinto
15: Portions created by Celso Pinto are Copyright (C) 2005.
16: Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
17:
18: All Rights Reserved.
19:
20: */
21: package org.columba.core.gui.globalactions;
22:
23: import java.awt.event.ActionEvent;
24:
25: import org.columba.api.gui.frame.IFrameMediator;
26: import org.columba.core.gui.action.AbstractColumbaAction;
27: import org.columba.core.gui.scripting.ScriptManager;
28: import org.columba.core.resourceloader.ImageLoader;
29: import org.columba.core.scripting.FileObserverThread;
30:
31: public class BeanshellManagerAction extends AbstractColumbaAction {
32:
33: /* TODO should come up with a better name for the menu item */
34: private static final String RES_MENU_ITEM = "Macros";
35:
36: public BeanshellManagerAction() {
37: super (null, RES_MENU_ITEM);
38:
39: //putValue(SMALL_ICON, ImageLoader.getIcon("script.png"));
40: }
41:
42: public BeanshellManagerAction(IFrameMediator mediator) {
43: super (mediator, RES_MENU_ITEM);
44:
45: //putValue(SMALL_ICON, ImageLoader.getIcon("script.png"));
46: }
47:
48: public void actionPerformed(ActionEvent aEvent) {
49: new ScriptManager(getFrameMediator().getView().getFrame(),
50: FileObserverThread.getInstance()).setVisible(true);
51: }
52:
53: }
|