1 package net.sf.openrocket.gui.plugin;
3 import javax.swing.Action;
5 import net.sf.openrocket.document.OpenRocketDocument;
6 import net.sf.openrocket.gui.main.BasicFrame;
9 * A plugin that provides a menu item to the Swing GUI menus.
10 * This may open a dialog window or perform some other action on
11 * the current document.
13 * During plugin discovery, the BasicFrame and OpenRocketDocument
14 * objects are passed to the plugin.
16 * @author Sampo Niskanen <sampo.niskanen@iki.fi>
18 public interface SwingMenuPlugin {
21 * Return the menu position where the action is placed.
22 * The first string in the array indicates the menu to place
23 * the item in, the second is the sub-menu, the third is the
26 * The strings are translated menu names.
28 * @return the menu position for the action
30 public String[] getMenuPosition();
33 * Return the Action that the menu item performs. This contains
34 * the menu item text and may contain an icon.
36 * @return the action to perform on the menu item.
38 public Action getAction(BasicFrame frame, OpenRocketDocument document);