|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tigris.gef.graph.MutableGraphSupport
org.tigris.gef.graph.presentation.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,
AdjacencyListGraphModel,
Serialized Form| Field Summary | |
protected NetList |
_netList
Deprecated. in 0.10.1 use getter/setter will become private |
| Fields inherited from class org.tigris.gef.graph.MutableGraphSupport |
_graphListeners |
| Constructor Summary | |
DefaultGraphModel()
|
|
DefaultGraphModel(NetList nl)
|
|
| Method Summary | |
void |
addEdge(java.lang.Object edge)
Add the given edge to the graph, if valid. |
void |
addNode(java.lang.Object node)
Add the given node to the graph, if valid. |
void |
addNodeRelatedEdges(java.lang.Object node)
Add existing edges that are related to the node. |
boolean |
canAddEdge(java.lang.Object edge)
Return true if the given object is a valid edge in this graph |
boolean |
canAddNode(java.lang.Object node)
Return true if the given object is a valid node in this graph |
boolean |
canChangeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge)
Return true if the connection to the old node can be rerouted to the new node. |
boolean |
canConnect(java.lang.Object srcPort,
java.lang.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(java.lang.Object srcPort,
java.lang.Object destPort,
java.lang.Class edgeClass)
Return true if the two given ports can be connected by the given kind of edge. |
boolean |
canDragNode(java.lang.Object node)
Return true if dragging the given object is a valid in this graph |
void |
changeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
Reroutes the connection to the old node to be connected to the new node. |
java.lang.Object |
connect(java.lang.Object srcPort,
java.lang.Object destPort)
Contruct and add a new edge of a kind determined by the ports |
java.lang.Object |
connect(java.lang.Object srcPort,
java.lang.Object destPort,
java.lang.Class edgeClass)
Contruct and add a new edge of the given kind |
protected java.lang.Object |
connectInternal(NetPort s,
NetPort d,
NetEdge e)
|
java.lang.Object |
createNode(java.lang.String name,
java.util.Hashtable args)
Return a valid node in this graph |
void |
dragNode(java.lang.Object node)
Create a new node based on the given one and add it to the graph. |
java.lang.Object |
getDestPort(java.lang.Object edge)
Return the other end of an edge |
java.util.Vector |
getEdges()
Deprecated. in 0.11 use getEdges(Collection) |
java.util.Collection |
getEdges(java.util.Collection c)
Return all nodes in the graph |
java.util.Vector |
getInEdges(java.lang.Object port)
Return all edges going to given port |
NetList |
getNetList()
|
java.util.Vector |
getNodes()
Deprecated. in 0.11 use getNodes(Collection) |
java.util.Collection |
getNodes(java.util.Collection c)
Return all nodes in the graph |
java.util.Vector |
getOutEdges(java.lang.Object port)
Return all edges going from given port |
java.lang.Object |
getOwner(java.lang.Object port)
Return the node or edge that owns the given port |
java.util.Collection |
getPorts(java.util.Collection c,
java.lang.Object nodeOrEdge)
Return all ports on node or edge |
java.util.Vector |
getPorts(java.lang.Object nodeOrEdge)
Deprecated. in 0.11 use getPorts(Collection, Object) |
java.lang.Object |
getSourcePort(java.lang.Object edge)
Return one end of an edge |
boolean |
OK()
|
void |
removeEdge(java.lang.Object edge)
Remove the given edge from the graph. |
void |
removeNode(java.lang.Object node)
Remove the given node from the graph. |
void |
setNetList(NetList nl)
|
| Methods inherited from class org.tigris.gef.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 java.util.Vector getNodes()
getNodes in interface GraphModelpublic java.util.Vector getEdges()
getEdges in interface GraphModelpublic java.util.Vector getPorts(java.lang.Object nodeOrEdge)
getPorts in interface GraphModelpublic java.util.Collection getNodes(java.util.Collection c)
public java.util.Collection getEdges(java.util.Collection c)
public java.util.Collection getPorts(java.util.Collection c,
java.lang.Object nodeOrEdge)
public java.lang.Object getOwner(java.lang.Object port)
getOwner in interface BaseGraphModelpublic java.util.Vector getInEdges(java.lang.Object port)
getInEdges in interface GraphModelpublic java.util.Vector getOutEdges(java.lang.Object port)
getOutEdges in interface GraphModelpublic java.lang.Object getSourcePort(java.lang.Object edge)
getSourcePort in interface BaseGraphModelpublic java.lang.Object getDestPort(java.lang.Object edge)
getDestPort in interface BaseGraphModel
public java.lang.Object createNode(java.lang.String name,
java.util.Hashtable args)
createNode in interface MutableGraphModelcreateNode in class MutableGraphSupportpublic boolean canAddNode(java.lang.Object node)
canAddNode in interface MutableGraphModelpublic boolean canAddEdge(java.lang.Object edge)
canAddEdge in interface MutableGraphModelpublic void removeNode(java.lang.Object node)
removeNode in interface MutableGraphModelpublic boolean canDragNode(java.lang.Object node)
canDragNode in interface MutableGraphModelcanDragNode in class MutableGraphSupportpublic void addNode(java.lang.Object node)
addNode in interface MutableGraphModelpublic void addEdge(java.lang.Object edge)
addEdge in interface MutableGraphModelpublic void addNodeRelatedEdges(java.lang.Object node)
MutableGraphModel
addNodeRelatedEdges in interface MutableGraphModelpublic void removeEdge(java.lang.Object edge)
removeEdge in interface MutableGraphModelpublic void dragNode(java.lang.Object node)
MutableGraphSupport
dragNode in interface MutableGraphModeldragNode in class MutableGraphSupport
public boolean canConnect(java.lang.Object srcPort,
java.lang.Object destPort)
canConnect in interface MutableGraphModel
public boolean canConnect(java.lang.Object srcPort,
java.lang.Object destPort,
java.lang.Class edgeClass)
canConnect in interface MutableGraphModelcanConnect in class MutableGraphSupport
public java.lang.Object connect(java.lang.Object srcPort,
java.lang.Object destPort)
connect in interface MutableGraphModel
public java.lang.Object connect(java.lang.Object srcPort,
java.lang.Object destPort,
java.lang.Class edgeClass)
connect in interface MutableGraphModelconnect in class MutableGraphSupport
protected java.lang.Object connectInternal(NetPort s,
NetPort d,
NetEdge e)
public boolean canChangeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge)
canChangeConnectedNode in interface MutableGraphModelcanChangeConnectedNode in class MutableGraphSupport
public void changeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
changeConnectedNode in interface MutableGraphModelchangeConnectedNode in class MutableGraphSupport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||