Protege 4.1.0

org.protege.editor.core.ui.menu
Class MenuActionPluginJPFImpl

java.lang.Object
  extended by org.protege.editor.core.plugin.AbstractProtegePlugin<ProtegeAction>
      extended by org.protege.editor.core.ui.action.ProtegeActionPluginJPFImpl
          extended by org.protege.editor.core.ui.menu.MenuActionPluginJPFImpl
All Implemented Interfaces:
ProtegePlugin<ProtegeAction>, ProtegeActionPlugin, MenuActionPlugin

public class MenuActionPluginJPFImpl
extends ProtegeActionPluginJPFImpl
implements MenuActionPlugin

Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: Mar 27, 2006

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

An implementation of the MenuActionPlugin which uses the Java Plugin Framework to provide the details of the plugin.


Field Summary
static String EXTENSION_POINT_ID
           
 
Fields inherited from class org.protege.editor.core.ui.action.ProtegeActionPluginJPFImpl
NAME_PARAM, TOOL_TIP_PARAM
 
Constructor Summary
MenuActionPluginJPFImpl(EditorKit editorKit, org.eclipse.core.runtime.IExtension extension)
           
 
Method Summary
 KeyStroke getAccelerator()
          Gets the accelerator KeyStroke for the menu item defined by this plugin.
 String getGroup()
          Menu items can belong to groups.
 String getGroupIndex()
          Within a menu item group, items are sorted according to the group index.
 String getParentId()
          Gets the parent menu id.
 URL getURL()
           
 boolean isCheckBox()
          Determines if the menu item should be a JCheckBoxMenuItem.
 boolean isDynamic()
          Determines if the menu is dynamically constructed after the plugin has been loaded.
 boolean isJCheckBox()
          Deprecated. 
 boolean isRadioButton()
          Determines if the menu item is a JRadioButtomMenuItem.
 ProtegeAction newInstance()
          Creates an instance of the plugin.
 String toString()
           
 
Methods inherited from class org.protege.editor.core.ui.action.ProtegeActionPluginJPFImpl
getEditorKit, getIcon, getName, getToolTipText
 
Methods inherited from class org.protege.editor.core.plugin.AbstractProtegePlugin
getDocumentation, getId, getIExtension, getLabel, getPluginProperty, getPluginProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.protege.editor.core.ui.action.ProtegeActionPlugin
getEditorKit, getIcon, getId, getName, getToolTipText
 
Methods inherited from interface org.protege.editor.core.plugin.ProtegePlugin
getDocumentation
 

Field Detail

EXTENSION_POINT_ID

public static final String EXTENSION_POINT_ID
See Also:
Constant Field Values
Constructor Detail

MenuActionPluginJPFImpl

public MenuActionPluginJPFImpl(EditorKit editorKit,
                               org.eclipse.core.runtime.IExtension extension)
Method Detail

getParentId

public String getParentId()
Description copied from interface: MenuActionPlugin
Gets the parent menu id. This is the id of the ProtegeActionPlugin that represents the parent menu. If the parent id is an empty string then this signifies a top level menu on the main menu bar. If the parent id is contained in square brackets (e.g. [parID]) then this signifies a top level menu item on some popup menu.

Specified by:
getParentId in interface MenuActionPlugin

getGroup

public String getGroup()
Description copied from interface: MenuActionPlugin
Menu items can belong to groups. Groups are usually separated on the menu with menu separators (although this is look and feel dependent). Providing a group name makes it possible to gain some control over where the item appears on a menu. Groups are sorted alphabetically.

Specified by:
getGroup in interface MenuActionPlugin
Returns:
A String that represents the group the menu item belongs to.

getGroupIndex

public String getGroupIndex()
Description copied from interface: MenuActionPlugin
Within a menu item group, items are sorted according to the group index. A group index is a string. Sets of groups index strings are sorted alphabetically.

Specified by:
getGroupIndex in interface MenuActionPlugin

getAccelerator

public KeyStroke getAccelerator()
Description copied from interface: MenuActionPlugin
Gets the accelerator KeyStroke for the menu item defined by this plugin. If the menu item does not have an accelerator KeyStroke then this method returns null.

Specified by:
getAccelerator in interface MenuActionPlugin

getURL

public URL getURL()

isDynamic

public boolean isDynamic()
Determines if the menu is dynamically constructed after the plugin has been loaded.

Specified by:
isDynamic in interface MenuActionPlugin

isJCheckBox

@Deprecated
public boolean isJCheckBox()
Deprecated. 

Specified by:
isJCheckBox in interface MenuActionPlugin

isCheckBox

public boolean isCheckBox()
Description copied from interface: MenuActionPlugin
Determines if the menu item should be a JCheckBoxMenuItem.

Specified by:
isCheckBox in interface MenuActionPlugin

isRadioButton

public boolean isRadioButton()
Description copied from interface: MenuActionPlugin
Determines if the menu item is a JRadioButtomMenuItem.

Specified by:
isRadioButton in interface MenuActionPlugin

newInstance

public ProtegeAction newInstance()
                          throws ClassNotFoundException,
                                 IllegalAccessException,
                                 InstantiationException
Creates an instance of the plugin. It is expected that this instance will be "setup", but the instance's initialise method will not have been called in the instantiation process.

Specified by:
newInstance in interface ProtegePlugin<ProtegeAction>
Overrides:
newInstance in class AbstractProtegePlugin<ProtegeAction>
Throws:
ClassNotFoundException
IllegalAccessException
InstantiationException

toString

public String toString()
Overrides:
toString in class Object

Protege 4.1.0

Submit a bug report or feature request

For further API reference and developer documentation, see Protege 4 Developer Documentation.

Copyright © 2010 Stanford Center for Biomedical Informatics Research