KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > core > gui > globalactions > BeanshellManagerAction


1 /*
2
3  The contents of this file are subject to the Mozilla Public License Version 1.1
4  (the "License") you may not use this file except in compliance with the License.
5
6  You may obtain a copy of the License at http://www.mozilla.org/MPL/
7
8  Software distributed under the License is distributed on an "AS IS" basis,
9  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 JavaDoc;
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 JavaDoc 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 JavaDoc aEvent) {
49         new ScriptManager(getFrameMediator().getView().getFrame(),
50                 FileObserverThread.getInstance()).setVisible(true);
51     }
52
53 }
54
Popular Tags