org.wilmascope.view
Class ViewManager

java.lang.Object
  extended by org.wilmascope.view.ViewManager

public class ViewManager
extends java.lang.Object

This class manages a 'registry' of view object prototypes for nodes and edges. It implements the 'Singleton' pattern to ensure that only one instance is available to the System, a reference to which may be obtained using the getInstance() method.


Nested Class Summary
 class ViewManager.Registry
           
 class ViewManager.UnknownViewTypeException
           
 
Method Summary
 void addPrototypeView(GraphElementView view)
           
 ClusterView createClusterView()
           
 ClusterView createClusterView(java.lang.String type)
           
 EdgeView createEdgeView()
           
 EdgeView createEdgeView(java.lang.String type)
           
 NodeView createNodeView()
           
 NodeView createNodeView(java.lang.String type)
           
 ViewManager.Registry getClusterViewRegistry()
           
 java.lang.String getDefaultClusterViewType()
           
 java.lang.String getDefaultEdgeViewType()
           
 java.lang.String getDefaultNodeViewType()
           
 ViewManager.Registry getEdgeViewRegistry()
           
static ViewManager getInstance()
           
 ViewManager.Registry getNodeViewRegistry()
           
 void loadViews()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ViewManager getInstance()
Returns:
a reference to the Singleton instance of this class.

loadViews

public void loadViews()
               throws java.io.IOException,
                      java.lang.ClassNotFoundException,
                      java.lang.IllegalAccessException,
                      java.lang.InstantiationException
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException

addPrototypeView

public void addPrototypeView(GraphElementView view)

getNodeViewRegistry

public ViewManager.Registry getNodeViewRegistry()

getEdgeViewRegistry

public ViewManager.Registry getEdgeViewRegistry()

getClusterViewRegistry

public ViewManager.Registry getClusterViewRegistry()

createClusterView

public ClusterView createClusterView(java.lang.String type)
                              throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

createNodeView

public NodeView createNodeView(java.lang.String type)
                        throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

createEdgeView

public EdgeView createEdgeView(java.lang.String type)
                        throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

createClusterView

public ClusterView createClusterView()
                              throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

createNodeView

public NodeView createNodeView()
                        throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

createEdgeView

public EdgeView createEdgeView()
                        throws ViewManager.UnknownViewTypeException
Throws:
ViewManager.UnknownViewTypeException

getDefaultEdgeViewType

public java.lang.String getDefaultEdgeViewType()

getDefaultNodeViewType

public java.lang.String getDefaultNodeViewType()

getDefaultClusterViewType

public java.lang.String getDefaultClusterViewType()