|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--uci.graph.MutableGraphSupport
|
+--uci.graph.DefaultGraphModel
This interface provides a facade to a net-level representation. Similiar in concept to the Swing class TreeModel. This implementation of GraphModel uses the GEF classes NetList, NetNode, NetPort, and NetEdge. If you implement your own GraphModel, you can use your own application-specific classes.
NetList,
NetNode,
NetPort,
NetEdge,
AdjacencyMatrixGraphModel,
uci.graph.demo.WordTransforms, Serialized Form| Field Summary | |
protected NetList |
_netList
|
| Fields inherited from class uci.graph.MutableGraphSupport |
_graphListeners |
| Constructor Summary | |
DefaultGraphModel()
|
|
DefaultGraphModel(NetList nl)
|
|
| Method Summary | |
void |
addEdge(Object edge)
Add the given edge to the graph, if valid. |
void |
addNode(Object node)
Add the given node to the graph, if valid. |
boolean |
canAddEdge(Object edge)
Return true if the given object is a valid edge in this graph |
boolean |
canAddNode(Object node)
Return true if the given object is a valid node in this graph |
boolean |
canConnect(Object srcPort,
Object destPort)
Return true if the two given ports can be connected by a kind of edge to be determined by the ports. |
boolean |
canConnect(Object srcPort,
Object destPort,
Class edgeClass)
Return true if the two given ports can be connected by the given kind of edge. |
Object |
connect(Object srcPort,
Object destPort)
Contruct and add a new edge of a kind determined by the ports |
Object |
connect(Object srcPort,
Object destPort,
Class edgeClass)
Contruct and add a new edge of the given kind |
protected Object |
connectInternal(NetPort s,
NetPort d,
NetEdge e)
|
Object |
getDestPort(Object edge)
Return the other end of an edge |
Vector |
getEdges()
Return all nodes in the graph |
Vector |
getInEdges(Object port)
Return all edges going to given port |
NetList |
getNetList()
|
Vector |
getNodes()
Return all nodes in the graph |
Vector |
getOutEdges(Object port)
Return all edges going from given port |
Object |
getOwner(Object port)
Return the node or edge that owns the given port |
Vector |
getPorts(Object nodeOrEdge)
Return all ports on node or edge |
Object |
getSourcePort(Object edge)
Return one end of an edge |
boolean |
OK()
|
void |
removeEdge(Object edge)
Remove the given edge from the graph. |
void |
removeNode(Object node)
Remove the given node from the graph. |
void |
setNetList(NetList nl)
|
| Methods inherited from class uci.graph.MutableGraphSupport |
addGraphEventListener,
containsEdge,
containsEdgePort,
containsNode,
containsNodePort,
containsPort,
fireEdgeAdded,
fireEdgeRemoved,
fireGraphChanged,
fireNodeAdded,
fireNodeRemoved,
getGraphListeners,
removeGraphEventListener |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected NetList _netList
| Constructor Detail |
public DefaultGraphModel()
public DefaultGraphModel(NetList nl)
| Method Detail |
public NetList getNetList()
public void setNetList(NetList nl)
public boolean OK()
public Vector getNodes()
public Vector getEdges()
public Vector getPorts(Object nodeOrEdge)
public Object getOwner(Object port)
public Vector getInEdges(Object port)
public Vector getOutEdges(Object port)
public Object getSourcePort(Object edge)
public Object getDestPort(Object edge)
public boolean canAddNode(Object node)
public boolean canAddEdge(Object edge)
public void removeNode(Object node)
public void addNode(Object node)
public void addEdge(Object edge)
public void removeEdge(Object edge)
public boolean canConnect(Object srcPort,
Object destPort)
public boolean canConnect(Object srcPort,
Object destPort,
Class edgeClass)
public Object connect(Object srcPort,
Object destPort)
public Object connect(Object srcPort,
Object destPort,
Class edgeClass)
protected Object connectInternal(NetPort s,
NetPort d,
NetEdge e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||