Package org.graffiti.managers
Class DefaultModeManager
java.lang.Object
org.graffiti.managers.DefaultModeManager
- All Implemented Interfaces:
ModeManager
,PluginManagerListener
public class DefaultModeManager extends Object implements ModeManager
Handles the editor's modes.
- Version:
- $Revision: 1.6 $
-
Constructor Summary
Constructors Constructor Description DefaultModeManager()
Constructs a new mode manager. -
Method Summary
Modifier and Type Method Description void
addMode(Mode mode)
Adds the given mode to the list of modes.Mode
getMode(String mode)
Returns the specified mode from the list of modes.void
pluginAdded(GenericPlugin plugin, PluginDescription desc)
Called by the plugin manager, iff a plugin has been added.void
removeMode(Mode mode)
Removes the specified mode from the list of modes the manager contains.
-
Constructor Details
-
DefaultModeManager
public DefaultModeManager()Constructs a new mode manager.
-
-
Method Details
-
getMode
Description copied from interface:ModeManager
Returns the specified mode from the list of modes.- Specified by:
getMode
in interfaceModeManager
- Returns:
- the specified mode from the list of modes.
-
addMode
Adds the given mode to the list of modes.mode
may not benull
.- Specified by:
addMode
in interfaceModeManager
- Parameters:
mode
- the mode to be added to the list.- See Also:
ModeManager.addMode(org.graffiti.plugin.mode.Mode)
-
pluginAdded
Description copied from interface:PluginManagerListener
Called by the plugin manager, iff a plugin has been added.- Specified by:
pluginAdded
in interfacePluginManagerListener
- Parameters:
plugin
- the added plugin.desc
- the description of the new plugin.
-
removeMode
Description copied from interface:ModeManager
Removes the specified mode from the list of modes the manager contains.- Specified by:
removeMode
in interfaceModeManager
- Parameters:
mode
- the mode to be removed.
-