freemind.extensions
Class HookAdapter
java.lang.Object
freemind.extensions.HookAdapter
- All Implemented Interfaces:
- MindMapHook
- Direct Known Subclasses:
- ModeControllerHookAdapter, NodeHookAdapter
public class HookAdapter
- extends java.lang.Object
- implements MindMapHook
Implments MindMapHook as an Adapter class.
Implementation is straight forward.
- Author:
- foltin
Field Summary |
protected java.util.logging.Logger |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected java.util.logging.Logger logger
HookAdapter
public HookAdapter()
getName
public java.lang.String getName()
- Specified by:
getName
in interface MindMapHook
- Returns:
- The name of the hook. In the xml description, this is the unique label.
setName
public void setName(java.lang.String name)
- Specified by:
setName
in interface MindMapHook
startupMapHook
public void startupMapHook()
- Description copied from interface:
MindMapHook
- This method is also called, if the hook is created in the map.
- Specified by:
startupMapHook
in interface MindMapHook
shutdownMapHook
public void shutdownMapHook()
- Description copied from interface:
MindMapHook
- This method is also called, if the node, this hook belongs to, is removed from the map.
- Specified by:
shutdownMapHook
in interface MindMapHook
getController
protected ModeController getController()
getProperties
protected java.util.Properties getProperties()
setProperties
public void setProperties(java.util.Properties properties)
- Specified by:
setProperties
in interface MindMapHook
- Parameters:
properties
- the properties of the property file belonging to the hook are passed.
setController
public void setController(ModeController controller)
- Specified by:
setController
in interface MindMapHook
getResourceString
public java.lang.String getResourceString(java.lang.String property)
- Description copied from interface:
MindMapHook
- looks for a property in the plugin properties file.
- Specified by:
getResourceString
in interface MindMapHook
getResource
public java.net.URL getResource(java.lang.String resourceName)
getPluginBaseClass
public java.lang.Object getPluginBaseClass()
- Description copied from interface:
MindMapHook
- 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.
- Specified by:
getPluginBaseClass
in interface MindMapHook
- Returns:
- The object returned is of HookRegistration type but has to be
casted anyway.
setPluginBaseClass
public void setPluginBaseClass(MindMapHook.PluginBaseClassSearcher baseClass)
- Specified by:
setPluginBaseClass
in interface MindMapHook