freemind.modes.mindmapmode.hooks
Class MindMapHookFactory

java.lang.Object
  extended by freemind.extensions.HookFactoryAdapter
      extended by freemind.modes.mindmapmode.hooks.MindMapHookFactory
All Implemented Interfaces:
HookFactory

public class MindMapHookFactory
extends HookFactoryAdapter

Author:
foltin

Nested Class Summary
 
Nested classes/interfaces inherited from interface freemind.extensions.HookFactory
HookFactory.RegistrationContainer
 
Field Summary
protected static java.util.HashSet allRegistrations
          Contains PluginRegistrationType -> PluginType relations.
 
Fields inherited from class freemind.extensions.HookFactoryAdapter
allRegistrationInstances
 
Constructor Summary
MindMapHookFactory(FreeMindMain frame)
           
 
Method Summary
 ModeControllerHook createModeControllerHook(java.lang.String hookName)
           
 NodeHook createNodeHook(java.lang.String hookName)
          Do not call this method directly.
 void decorateAction(java.lang.String hookName, javax.swing.AbstractAction action)
           
 java.util.List getHookMenuPositions(java.lang.String hookName)
           
 HookInstanciationMethod getInstanciationMethod(java.lang.String hookName)
           
 javax.swing.JMenuItem getMenuItem(java.lang.String pHookName, javax.swing.AbstractAction pHookAction)
           
 java.lang.Object getPluginBaseClass(java.lang.String hookName)
          A plugin base class is a common registration class of multiple plugins.
 java.util.Vector getPossibleModeControllerHooks()
           
 java.util.Vector getPossibleNodeHooks()
           
 java.util.List getRegistrations()
          Each Plugin can have a list of HookRegistrations that are called after the corresponding mode is enabled.
 
Methods inherited from class freemind.extensions.HookFactoryAdapter
deregisterAllRegistrationContainer, getHookInNode, registerRegistrationContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allRegistrations

protected static java.util.HashSet allRegistrations
Contains PluginRegistrationType -> PluginType relations.

Constructor Detail

MindMapHookFactory

public MindMapHookFactory(FreeMindMain frame)
Method Detail

getPossibleNodeHooks

public java.util.Vector getPossibleNodeHooks()
Returns:
a string vector with representatives for plugins.

getPossibleModeControllerHooks

public java.util.Vector getPossibleModeControllerHooks()
Returns:
a string vector with representatives for plugins.

createModeControllerHook

public ModeControllerHook createModeControllerHook(java.lang.String hookName)

createNodeHook

public NodeHook createNodeHook(java.lang.String hookName)
Do not call this method directly. Call ModeController.createNodeHook instead.


decorateAction

public void decorateAction(java.lang.String hookName,
                           javax.swing.AbstractAction action)

getHookMenuPositions

public java.util.List getHookMenuPositions(java.lang.String hookName)
Returns:
returns a list of menu position strings for the StructuredMenuHolder.

getInstanciationMethod

public HookInstanciationMethod getInstanciationMethod(java.lang.String hookName)

getRegistrations

public java.util.List getRegistrations()
Each Plugin can have a list of HookRegistrations that are called after the corresponding mode is enabled. (Like singletons.) One of these can operate as the pluginBase that is accessible to every normal plugin_action via the getPluginBaseClass method.

Returns:
A list of RegistrationContainer elements. The field hookRegistrationClass of RegistrationContainer is a class that is (probably) of HookRegistration type. You have to register every registration via the registerRegistrationContainer method when instanciated (this is typically done in the ModeController).

getPluginBaseClass

public java.lang.Object getPluginBaseClass(java.lang.String hookName)
A plugin base class is a common registration class of multiple plugins. It is useful to embrace several related plugins (example: EncryptedNote -> Registration).

Returns:
the base class if declared and successfully instanciated or NULL.

getMenuItem

public javax.swing.JMenuItem getMenuItem(java.lang.String pHookName,
                                         javax.swing.AbstractAction pHookAction)