edu.memphis.ccrg.lida.framework.gui.utils
Class NodeStructureGuiAdapter

java.lang.Object
  extended by edu.uci.ics.jung.graph.AbstractGraph<V,E>
      extended by edu.uci.ics.jung.graph.AbstractTypedGraph<Linkable,GuiLink>
          extended by edu.memphis.ccrg.lida.framework.gui.utils.NodeStructureGuiAdapter
All Implemented Interfaces:
edu.uci.ics.jung.graph.Graph<Linkable,GuiLink>, edu.uci.ics.jung.graph.Hypergraph<Linkable,GuiLink>, java.io.Serializable

public class NodeStructureGuiAdapter
extends edu.uci.ics.jung.graph.AbstractTypedGraph<Linkable,GuiLink>

Utility to convert NodeStructure to AbstractTypedGraph for use with the NodeStructurePanel

Author:
Javier Snaider
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.uci.ics.jung.graph.AbstractTypedGraph
edge_type
 
Constructor Summary
NodeStructureGuiAdapter(NodeStructure ns)
          Default constructor
 
Method Summary
 boolean addEdge(GuiLink arg0, edu.uci.ics.jung.graph.util.Pair<? extends Linkable> arg1, edu.uci.ics.jung.graph.util.EdgeType arg2)
           
 boolean addVertex(Linkable arg0)
           
 boolean containsEdge(GuiLink arg0)
           
 boolean containsVertex(Linkable arg0)
           
 Linkable getDest(GuiLink guiLink)
           
 int getEdgeCount()
           
 java.util.Collection<GuiLink> getEdges()
           
 edu.uci.ics.jung.graph.util.Pair<Linkable> getEndpoints(GuiLink arg0)
           
 java.util.Collection<GuiLink> getIncidentEdges(Linkable arg0)
          Returns all edges attached to specified Linkable
 java.util.Collection<GuiLink> getInEdges(Linkable arg0)
           
 java.util.Collection<Linkable> getNeighbors(Linkable arg0)
           
 NodeStructure getNodeStructure()
           
 java.util.Collection<GuiLink> getOutEdges(Linkable arg0)
          Creates and returns GuiLinks for all Links in the NodeStructure whose source is the argument
 java.util.Collection<Linkable> getPredecessors(Linkable arg0)
           
 Linkable getSource(GuiLink arg0)
           
 java.util.Collection<Linkable> getSuccessors(Linkable arg0)
           
 int getVertexCount()
           
 java.util.Collection<Linkable> getVertices()
           
 boolean isDest(Linkable arg0, GuiLink arg1)
          Returns true if arg0 is a destination of GuiLink arg1
 boolean isSource(Linkable arg0, GuiLink arg1)
          Returns true if arg0 is a source of GuiLink arg1
 boolean removeEdge(GuiLink arg0)
           
 boolean removeVertex(Linkable arg0)
           
 void setNodeStructure(NodeStructure nodeStructure)
           
 
Methods inherited from class edu.uci.ics.jung.graph.AbstractTypedGraph
getDefaultEdgeType, getEdgeCount, getEdges, getEdgeType, hasEqualEdgeType, validateEdgeType
 
Methods inherited from class edu.uci.ics.jung.graph.AbstractGraph
addEdge, addEdge, addEdge, addEdge, addEdge, degree, findEdge, findEdgeSet, getIncidentCount, getIncidentVertices, getNeighborCount, getOpposite, getPredecessorCount, getSuccessorCount, getValidatedEndpoints, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeStructureGuiAdapter

public NodeStructureGuiAdapter(NodeStructure ns)
Default constructor

Parameters:
ns - NodeStructure to be adapted.
Method Detail

getNodeStructure

public NodeStructure getNodeStructure()
Returns:
the nodeStructure

setNodeStructure

public void setNodeStructure(NodeStructure nodeStructure)
Parameters:
nodeStructure - the nodeStructure to set

addEdge

public boolean addEdge(GuiLink arg0,
                       edu.uci.ics.jung.graph.util.Pair<? extends Linkable> arg1,
                       edu.uci.ics.jung.graph.util.EdgeType arg2)
Specified by:
addEdge in class edu.uci.ics.jung.graph.AbstractGraph<Linkable,GuiLink>

getDest

public Linkable getDest(GuiLink guiLink)

getSource

public Linkable getSource(GuiLink arg0)

getEndpoints

public edu.uci.ics.jung.graph.util.Pair<Linkable> getEndpoints(GuiLink arg0)

getInEdges

public java.util.Collection<GuiLink> getInEdges(Linkable arg0)

getOutEdges

public java.util.Collection<GuiLink> getOutEdges(Linkable arg0)
Creates and returns GuiLinks for all Links in the NodeStructure whose source is the argument

See Also:
Graph.getOutEdges(java.lang.Object)

getPredecessors

public java.util.Collection<Linkable> getPredecessors(Linkable arg0)

getSuccessors

public java.util.Collection<Linkable> getSuccessors(Linkable arg0)

isDest

public boolean isDest(Linkable arg0,
                      GuiLink arg1)
Returns true if arg0 is a destination of GuiLink arg1

See Also:
Graph.isDest(java.lang.Object, java.lang.Object)

isSource

public boolean isSource(Linkable arg0,
                        GuiLink arg1)
Returns true if arg0 is a source of GuiLink arg1

See Also:
Graph.isSource(java.lang.Object, java.lang.Object)

addVertex

public boolean addVertex(Linkable arg0)

containsEdge

public boolean containsEdge(GuiLink arg0)

containsVertex

public boolean containsVertex(Linkable arg0)

getEdgeCount

public int getEdgeCount()

getEdges

public java.util.Collection<GuiLink> getEdges()

getIncidentEdges

public java.util.Collection<GuiLink> getIncidentEdges(Linkable arg0)
Returns all edges attached to specified Linkable

See Also:
Hypergraph.getIncidentEdges(java.lang.Object)

getNeighbors

public java.util.Collection<Linkable> getNeighbors(Linkable arg0)

getVertexCount

public int getVertexCount()

getVertices

public java.util.Collection<Linkable> getVertices()

removeEdge

public boolean removeEdge(GuiLink arg0)

removeVertex

public boolean removeVertex(Linkable arg0)