|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tigris.gef.graph.MutableGraphSupport
An abstract class that makes it easier to implement your own version of MutableGraphModel. This class basically includes the code for event notifications, so that you don't have to write that. It also provides a few utility methods.
AdjacencyListGraphModel,
Serialized Form| Field Summary | |
protected java.util.Vector |
_graphListeners
Deprecated. 0.11, visibility will change use getGraphListeners and setGraphListeners instead |
| Constructor Summary | |
MutableGraphSupport()
|
|
| Method Summary | |
void |
addGraphEventListener(GraphListener listener)
|
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 fromPort,
java.lang.Object toPort,
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 the type of the given node can be mapped to a type supported by this type of diagram |
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 fromPort,
java.lang.Object toPort,
java.lang.Class edgeClass)
Contruct and add a new edge of the given kind. |
boolean |
containsEdge(java.lang.Object edge)
Return true if the given object is present as a edge in the graph |
boolean |
containsEdgePort(java.lang.Object port)
|
boolean |
containsNode(java.lang.Object node)
Return true if the given object is present as a node in the graph |
boolean |
containsNodePort(java.lang.Object port)
|
boolean |
containsPort(java.lang.Object port)
|
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. |
void |
fireEdgeAdded(java.lang.Object edge)
|
void |
fireEdgeRemoved(java.lang.Object edge)
|
void |
fireGraphChanged()
|
void |
fireNodeAdded(java.lang.Object node)
|
void |
fireNodeRemoved(java.lang.Object node)
|
java.util.Vector |
getGraphListeners()
|
void |
removeGraphEventListener(GraphListener listener)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.tigris.gef.graph.MutableGraphModel |
addEdge, addNode, addNodeRelatedEdges, canAddEdge, canAddNode, canConnect, connect, removeEdge, removeNode |
| Methods inherited from interface org.tigris.gef.graph.GraphModel |
getEdges, getInEdges, getNodes, getOutEdges, getPorts |
| Methods inherited from interface org.tigris.gef.graph.BaseGraphModel |
getDestPort, getOwner, getSourcePort |
| Field Detail |
protected java.util.Vector _graphListeners
| Constructor Detail |
public MutableGraphSupport()
| Method Detail |
public java.util.Vector getGraphListeners()
public java.lang.Object createNode(java.lang.String name,
java.util.Hashtable args)
createNode in interface MutableGraphModelpublic boolean canDragNode(java.lang.Object node)
canDragNode in interface MutableGraphModelpublic void dragNode(java.lang.Object node)
dragNode in interface MutableGraphModel
public boolean canChangeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge)
canChangeConnectedNode in interface MutableGraphModel
public boolean canConnect(java.lang.Object fromPort,
java.lang.Object toPort,
java.lang.Class edgeClass)
canConnect in interface MutableGraphModel
public void changeConnectedNode(java.lang.Object newNode,
java.lang.Object oldNode,
java.lang.Object edge,
boolean isSource)
changeConnectedNode in interface MutableGraphModel
public java.lang.Object connect(java.lang.Object fromPort,
java.lang.Object toPort,
java.lang.Class edgeClass)
connect in interface MutableGraphModelpublic boolean containsNode(java.lang.Object node)
MutableGraphModel
containsNode in interface MutableGraphModelpublic boolean containsEdge(java.lang.Object edge)
MutableGraphModel
containsEdge in interface MutableGraphModelpublic boolean containsNodePort(java.lang.Object port)
public boolean containsEdgePort(java.lang.Object port)
public boolean containsPort(java.lang.Object port)
public void addGraphEventListener(GraphListener listener)
addGraphEventListener in interface BaseGraphModelpublic void removeGraphEventListener(GraphListener listener)
removeGraphEventListener in interface BaseGraphModelpublic void fireNodeAdded(java.lang.Object node)
public void fireNodeRemoved(java.lang.Object node)
public void fireEdgeAdded(java.lang.Object edge)
public void fireEdgeRemoved(java.lang.Object edge)
public void fireGraphChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||