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 $
  • Constructor Details

    • DefaultViewManager

      public DefaultViewManager()
      Constructs a new view manager.
  • Method Details

    • getViewNames

      public String[] getViewNames()
      Description copied from interface: ViewManager
      Returns the class names of the registered views.
      Specified by:
      getViewNames in interface ViewManager
      Returns:
      the class names of the registered views.
    • getViewDescriptions

      public String[] getViewDescriptions()
      Specified by:
      getViewDescriptions in interface ViewManager
    • addListener

      public void addListener​(ViewManager.ViewManagerListener viewManagerListener)
      Description copied from interface: ViewManager
      Registers the given ViewManagerListener.
      Specified by:
      addListener in interface ViewManager
      Parameters:
      viewManagerListener - the listener to register.
    • addView

      public void addView​(String viewType)
      Description copied from interface: ViewManager
      Adds the given view type (class name) to the map of view types.
      Specified by:
      addView in interface ViewManager
      Parameters:
      viewType - the new view to add to the map.
    • addViewListener

      public void addViewListener​(ViewListener viewListener)
      Description copied from interface: ViewManager
      Registers the given ViewListener.
      Specified by:
      addViewListener in interface ViewManager
      Parameters:
      viewListener - the listener to register.
    • addViews

      public void addViews​(String[] views)
      Description copied from interface: ViewManager
      Adds the given list of views types (class names) to the list of available view types.
      Specified by:
      addViews in interface ViewManager
      Parameters:
      views - the list of classNames to add to the view type list.
    • createView

      public View createView​(String name) throws InstanceCreationException
      Description copied from interface: ViewManager
      Returns a new instance of the specified view.
      Specified by:
      createView in interface ViewManager
      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: ViewManager
      Returns true, if there is at least one registered view plugin available. /
      Specified by:
      hasViews in interface ViewManager
      Returns:
      DOCUMENT ME!
    • pluginAdded

      public void pluginAdded​(GenericPlugin plugin, PluginDescription desc)
      Description copied from interface: PluginManagerListener
      Called by the plugin manager, iff a plugin has been added.
      Specified by:
      pluginAdded in interface PluginManagerListener
      Parameters:
      plugin - the added plugin.
      desc - the description of the new plugin.
    • removeListener

      public boolean removeListener​(ViewManager.ViewManagerListener l)
      Description copied from interface: ViewManager
      Returns true, if the given view manager listener was in the list of listeners and could be removed.
      Specified by:
      removeListener in interface ViewManager
      Parameters:
      l - the view manager listener to remove.
      Returns:
      DOCUMENT ME!
    • removeViewListener

      public boolean removeViewListener​(ViewListener l)
      Description copied from interface: ViewManager
      Returns true, if the given view listener was in the list of listeners and could be removed.
      Specified by:
      removeViewListener in interface ViewManager
      Parameters:
      l - the view manager listener to remove.
      Returns:
      DOCUMENT ME!
    • viewChanged

      public void viewChanged​(View newView)
      Description copied from interface: ViewListener
      This method is called when the view changes. This method is not called when another session is activated. Implement SessionListener if you are interested in session changed events.
      Specified by:
      viewChanged in interface ViewListener
      Parameters:
      newView - the new View.
    • removeViews

      public void removeViews()
      Description copied from interface: ViewManager
      Removes the known list of views from the internal memory. Makes it possible to remove and re-add views.
      Specified by:
      removeViews in interface ViewManager
    • getDefaultView

      public String getDefaultView()
      Specified by:
      getDefaultView in interface ViewManager
    • setDefaultView

      public void setDefaultView​(String defaultView)
      Specified by:
      setDefaultView in interface ViewManager