freemind.extensions
Interface MindMapHook

All Known Subinterfaces:
ModeControllerHook, NodeHook, PermanentNodeHook, StatefulNodeHook
All Known Implementing Classes:
BrowseReminderHook, ExportHook, HookAdapter, MindMapHookAdapter, MindMapNodeHookAdapter, ModeControllerHookAdapter, NodeHookAdapter, PermanentMindMapNodeHookAdapter, PermanentNodeHookAdapter, PermanentNodeHookSubstituteUnknown, ReminderHookBase, StatefulMindMapNodeHookAdapter

public interface MindMapHook

Author:
foltin

Nested Class Summary
static interface MindMapHook.PluginBaseClassSearcher
          This indirection is necessary, as all stored PermanentNodeHooks are created during the map's creation time but the registrations are underdone on ModeController's startup method later.
 
Method Summary
 java.lang.String getName()
           
 java.lang.Object getPluginBaseClass()
          If a base class is specified in the plugin declaration via a plugin_registration entry with isPluginBase==true, this object is returned here.
 java.lang.String getResourceString(java.lang.String property)
          looks for a property in the plugin properties file.
 void setController(ModeController controller)
           
 void setName(java.lang.String name)
           
 void setPluginBaseClass(MindMapHook.PluginBaseClassSearcher baseClass)
           
 void setProperties(java.util.Properties properties)
           
 void shutdownMapHook()
          This method is also called, if the node, this hook belongs to, is removed from the map.
 void startupMapHook()
          This method is also called, if the hook is created in the map.
 

Method Detail

getName

java.lang.String getName()
Returns:
The name of the hook. In the xml description, this is the unique label.

setName

void setName(java.lang.String name)

setProperties

void setProperties(java.util.Properties properties)
Parameters:
properties - the properties of the property file belonging to the hook are passed.

getResourceString

java.lang.String getResourceString(java.lang.String property)
looks for a property in the plugin properties file.


setController

void setController(ModeController controller)

getPluginBaseClass

java.lang.Object getPluginBaseClass()
If a base class is specified in the plugin declaration via a plugin_registration entry with isPluginBase==true, this object is returned here. You can use it to realize something like the state of a plugin (eg. is the plugin switched on or off?).
An example is the menu status of the encrypted nodes. If the node is not encrypted, the encryption state cannot be toggled (see EncryptNode.java).
Another example arises from the collaboration mode. The state (connected, wait for second party, map sharing etc.) can be stored in the plugin base.
Remember, that it is most likely that you havn't specified the base class and that you get NULL here.

Returns:
The object returned is of HookRegistration type but has to be casted anyway.

setPluginBaseClass

void setPluginBaseClass(MindMapHook.PluginBaseClassSearcher baseClass)

startupMapHook

void startupMapHook()
This method is also called, if the hook is created in the map.


shutdownMapHook

void shutdownMapHook()
This method is also called, if the node, this hook belongs to, is removed from the map.