01: package net.xoetrope.builder.editor.plugin;
02:
03: import java.awt.BorderLayout;
04: import java.awt.Container;
05: import javax.swing.event.MenuEvent;
06: import javax.swing.event.MenuListener;
07:
08: /**
09: * A wrapper for the plugin to tracking within the editor
10: * <p> Copyright (c) Xoetrope Ltd., 2002-2003</p>
11: * <p> $Revision: 1.3 $</p>
12: * <p> License: see License.txt</p>
13: */
14: public class XPluginTab extends Container implements MenuListener {
15: private XEditorPlugin plugin;
16:
17: /**
18: * Create a new wrapper to track the plugin
19: * @param pluginComp the tracked plugin
20: */
21: public XPluginTab(XEditorPlugin pluginComp) {
22: plugin = pluginComp;
23: setLayout(new BorderLayout());
24:
25: add(pluginComp.getMainPanel(), BorderLayout.CENTER);
26: }
27:
28: public XEditorPlugin getPlugin() {
29: return plugin;
30: }
31:
32: public void menuCanceled(MenuEvent e) {
33: }
34:
35: public void menuDeselected(MenuEvent e) {
36: }
37:
38: public void menuSelected(MenuEvent e) {
39: plugin.menuSelected(e);
40: }
41: }
|