Package org.graffiti.managers
Class DefaultViewManager
java.lang.Object
org.graffiti.managers.DefaultViewManager
- All Implemented Interfaces:
 PluginManagerListener,ViewManager,ViewListener
public class DefaultViewManager extends Object implements ViewManager
Manages a list of view types.
- Version:
 - $Revision: 1.11 $
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.graffiti.managers.ViewManager
ViewManager.ViewManagerListener - 
Constructor Summary
Constructors Constructor Description DefaultViewManager()Constructs a new view manager. - 
Method Summary
Modifier and Type Method Description voidaddListener(ViewManager.ViewManagerListener viewManagerListener)Registers the givenViewManagerListener.voidaddView(String viewType)Adds the given view type (class name) to the map of view types.voidaddViewListener(ViewListener viewListener)Registers the givenViewListener.voidaddViews(String[] views)Adds the given list of views types (class names) to the list of available view types.ViewcreateView(String name)Returns a new instance of the specified view.StringgetDefaultView()String[]getViewDescriptions()String[]getViewNames()Returns the class names of the registered views.booleanhasViews()Returnstrue, if there is at least one registered view plugin available.voidpluginAdded(GenericPlugin plugin, PluginDescription desc)Called by the plugin manager, iff a plugin has been added.booleanremoveListener(ViewManager.ViewManagerListener l)Returnstrue, if the given view manager listener was in the list of listeners and could be removed.booleanremoveViewListener(ViewListener l)Returnstrue, if the given view listener was in the list of listeners and could be removed.voidremoveViews()Removes the known list of views from the internal memory.voidsetDefaultView(String defaultView)voidviewChanged(View newView)This method is called when the view changes. 
- 
Constructor Details
- 
DefaultViewManager
public DefaultViewManager()Constructs a new view manager. 
 - 
 - 
Method Details
- 
getViewNames
Description copied from interface:ViewManagerReturns the class names of the registered views.- Specified by:
 getViewNamesin interfaceViewManager- Returns:
 - the class names of the registered views.
 
 - 
getViewDescriptions
- Specified by:
 getViewDescriptionsin interfaceViewManager
 - 
addListener
Description copied from interface:ViewManagerRegisters the givenViewManagerListener.- Specified by:
 addListenerin interfaceViewManager- Parameters:
 viewManagerListener- the listener to register.
 - 
addView
Description copied from interface:ViewManagerAdds the given view type (class name) to the map of view types.- Specified by:
 addViewin interfaceViewManager- Parameters:
 viewType- the new view to add to the map.
 - 
addViewListener
Description copied from interface:ViewManagerRegisters the givenViewListener.- Specified by:
 addViewListenerin interfaceViewManager- Parameters:
 viewListener- the listener to register.
 - 
addViews
Description copied from interface:ViewManagerAdds the given list of views types (class names) to the list of available view types.- Specified by:
 addViewsin interfaceViewManager- Parameters:
 views- the list of classNames to add to the view type list.
 - 
createView
Description copied from interface:ViewManagerReturns a new instance of the specified view.- Specified by:
 createViewin interfaceViewManager- Parameters:
 name- the class name of the view.- Returns:
 - a new instance of the specified view.
 - Throws:
 InstanceCreationException
 - 
hasViews
public boolean hasViews()Description copied from interface:ViewManagerReturnstrue, if there is at least one registered view plugin available. /- Specified by:
 hasViewsin interfaceViewManager- Returns:
 - DOCUMENT ME!
 
 - 
pluginAdded
Description copied from interface:PluginManagerListenerCalled by the plugin manager, iff a plugin has been added.- Specified by:
 pluginAddedin interfacePluginManagerListener- Parameters:
 plugin- the added plugin.desc- the description of the new plugin.
 - 
removeListener
Description copied from interface:ViewManagerReturnstrue, if the given view manager listener was in the list of listeners and could be removed.- Specified by:
 removeListenerin interfaceViewManager- Parameters:
 l- the view manager listener to remove.- Returns:
 - DOCUMENT ME!
 
 - 
removeViewListener
Description copied from interface:ViewManagerReturnstrue, if the given view listener was in the list of listeners and could be removed.- Specified by:
 removeViewListenerin interfaceViewManager- Parameters:
 l- the view manager listener to remove.- Returns:
 - DOCUMENT ME!
 
 - 
viewChanged
Description copied from interface:ViewListenerThis method is called when the view changes. This method is not called when another session is activated. ImplementSessionListenerif you are interested in session changed events.- Specified by:
 viewChangedin interfaceViewListener- Parameters:
 newView- the new View.
 - 
removeViews
public void removeViews()Description copied from interface:ViewManagerRemoves the known list of views from the internal memory. Makes it possible to remove and re-add views.- Specified by:
 removeViewsin interfaceViewManager
 - 
getDefaultView
- Specified by:
 getDefaultViewin interfaceViewManager
 - 
setDefaultView
- Specified by:
 setDefaultViewin interfaceViewManager
 
 -