freemind.extensions
Interface MindMapHook

All Known Subinterfaces:
ModeControllerHook, NodeHook, PermanentNodeHook
All Known Implementing Classes:
HookAdapter, ModeControllerHookAdapter, NodeHookAdapter, PermanentNodeHookAdapter

public interface MindMapHook

Author:
foltin

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(java.lang.Object 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

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

setName

public void setName(java.lang.String name)

setProperties

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

getResourceString

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


setController

public void setController(ModeController controller)

getPluginBaseClass

public 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

public void setPluginBaseClass(java.lang.Object baseClass)

startupMapHook

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


shutdownMapHook

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