Class AbstractToolPluginManager<T extends ToolPluginSupporter,​P extends AbstractToolPlugin>

  • Type Parameters:
    T - the owning tool
    P - the type of plugin
    Direct Known Subclasses:
    ImageViewerPluginManager

    public abstract class AbstractToolPluginManager<T extends ToolPluginSupporter,​P extends AbstractToolPlugin>
    extends Object
    Ancestor for classes that manage tool plugins.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • AbstractToolPluginManager

        protected AbstractToolPluginManager​(T owner)
        Initializes the manager.
        Parameters:
        owner - the owning tool
    • Method Detail

      • setMenuUpdateListener

        public void setMenuUpdateListener​(ChangeListener l)
        Sets the listener for menu updates.
        Parameters:
        l - the listener, null to unset
      • getMenuUpdateListener

        public ChangeListener getMenuUpdateListener()
        Returns the listener for menu updates.
        Returns:
        the listener, null if not available
      • getPlugins

        public abstract String[] getPlugins()
        Returns a list of plugin classnames.
        Returns:
        all the available plugins
      • addToMenuBar

        public void addToMenuBar​(JMenuBar menubar)
        Adds the plugins to the menu bar.
        Parameters:
        menubar - the menu bar
      • updateMenu

        public void updateMenu()
        updates the enabled state of the menu items.