freemind.extensions
Class HookFactory
java.lang.Object
freemind.extensions.HookFactory
- public class HookFactory
- extends java.lang.Object
- Author:
- foltin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HookFactory
public HookFactory(FreeMindMain frame)
getPossibleNodeHooks
public java.util.Vector getPossibleNodeHooks(java.lang.Class mode)
- Returns:
- a string vector with representatives for plugins.
getPossibleModeControllerHooks
public java.util.Vector getPossibleModeControllerHooks(java.lang.Class mode)
- Returns:
- a string vector with representatives for plugins.
createModeControllerHook
public ModeControllerHook createModeControllerHook(java.lang.String hookName)
getFreemindBaseDir
public static java.lang.String getFreemindBaseDir()
- Returns:
createNodeHook
public NodeHook createNodeHook(java.lang.String hookName)
- Do not call this method directly. Call ModeController.createNodeHook
instead.
getHookInNode
public PermanentNodeHook getHookInNode(MindMapNode node,
java.lang.String hookName)
- Parameters:
node
- hookName
-
- Returns:
- null if not present, the hook otherwise.
getFrame
protected FreeMindMain getFrame()
- Returns:
getProperty
public java.lang.String getProperty(java.lang.String hookName,
java.lang.String prop)
decorateAction
public void decorateAction(java.lang.String hookName,
javax.swing.AbstractAction action)
- Parameters:
action
-
getHookMenuPositions
public java.util.List getHookMenuPositions(java.lang.String hookName)
- Returns:
- returns a list of menu position strings for the
StructuredMenuHolder.
getHookMenuItem
public javax.swing.JMenuItem getHookMenuItem(java.lang.String hookName,
javax.swing.AbstractAction hookAction)
- This method takes into account, that there are on off hooks that need a
special treatment for their menues like adjusting the checkbox.
- Parameters:
hookAction
-
- Returns:
- returns a new JMenuItem for the given hookAction.
getInstanciationMethod
public HookInstanciationMethod getInstanciationMethod(java.lang.String hookName)
- Returns:
getRegistrations
public java.util.List getRegistrations(java.lang.Class mode)
- 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).
registerRegistrationContainer
public void registerRegistrationContainer(HookFactory.RegistrationContainer container,
HookRegistration instanciatedRegistrationObject)
- See getRegistrations.
- Parameters:
container
- instanciatedRegistrationObject
-
getPluginBaseClass
public java.lang.Object getPluginBaseClass(java.lang.String hookName)
- Parameters:
hookName
-
- Returns:
- the base class if declared and successfully instanciated
or NULL.