org.scijava.menu
Class DefaultMenuService

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.service.AbstractService
              extended by org.scijava.menu.DefaultMenuService
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, Disposable, MenuService, HasPluginInfo, RichPlugin, SciJavaPlugin, Prioritized, SciJavaService, Service

public class DefaultMenuService
extends AbstractService
implements MenuService

Default service for keeping track of the application's menu structure.

Author:
Curtis Rueden
See Also:
ShadowMenu

Constructor Summary
DefaultMenuService()
           
 
Method Summary
<T> T
createMenus(MenuCreator<T> creator, T menu)
          Populates a UI-specific application menu structure.
<T> T
createMenus(String menuRoot, MenuCreator<T> creator, T menu)
          Populates a UI-specific menu structure.
 ShadowMenu getMenu()
          Gets the root node of the application menu structure.
 ShadowMenu getMenu(String menuRoot)
          Gets the root node of a menu structure.
protected  void onEvent(ModulesAddedEvent event)
           
protected  void onEvent(ModulesRemovedEvent event)
           
protected  void onEvent(ModulesUpdatedEvent event)
           
 
Methods inherited from class org.scijava.service.AbstractService
dispose, getContext, initialize, registerEventHandlers, setContext, toString
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority
 
Methods inherited from class org.scijava.AbstractContextual
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Constructor Detail

DefaultMenuService

public DefaultMenuService()
Method Detail

getMenu

public ShadowMenu getMenu()
Description copied from interface: MenuService
Gets the root node of the application menu structure.

Specified by:
getMenu in interface MenuService

getMenu

public ShadowMenu getMenu(String menuRoot)
Description copied from interface: MenuService
Gets the root node of a menu structure.

Specified by:
getMenu in interface MenuService
Parameters:
menuRoot - the root of the desired menu structure (see UIDetails.getMenuRoot()).

createMenus

public <T> T createMenus(MenuCreator<T> creator,
                         T menu)
Description copied from interface: MenuService
Populates a UI-specific application menu structure.

Specified by:
createMenus in interface MenuService
Parameters:
creator - the MenuCreator to use to populate the menus.
menu - the destination menu structure to populate.

createMenus

public <T> T createMenus(String menuRoot,
                         MenuCreator<T> creator,
                         T menu)
Description copied from interface: MenuService
Populates a UI-specific menu structure.

Specified by:
createMenus in interface MenuService
Parameters:
menuRoot - the root of the menu structure to generate (see UIDetails.getMenuRoot()).
creator - the MenuCreator to use to populate the menus.
menu - the destination menu structure to populate.

onEvent

protected void onEvent(ModulesAddedEvent event)

onEvent

protected void onEvent(ModulesRemovedEvent event)

onEvent

protected void onEvent(ModulesUpdatedEvent event)


Copyright © 2009–2015 SciJava. All rights reserved.