public abstract class MutableModularGraphModel extends ModularGraphModel implements MutableGraphModel
_graphListeners
Constructor and Description |
---|
MutableModularGraphModel(java.lang.Object root)
Construct an empty graph model whose
root is the given semantic object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptHead(java.lang.Object edge,
java.lang.Object node)
Return true if the head of the given edge can be attached to the
given node.
|
boolean |
acceptTail(java.lang.Object edge,
java.lang.Object node)
Return true if the tail of the given edge can be attached to the
given node.
|
void |
addNode(java.lang.Object eventSource,
java.lang.Object node,
java.lang.Object parent)
Add a node to the given graph and notify listeners with a
NODE_ADDED event.
|
void |
connectEdge(java.lang.Object eventSource,
java.lang.Object edge,
java.lang.Object tailNode,
java.lang.Object headNode)
Connect the given edge to the given tail and head nodes,
then dispatch events to the listeners.
|
void |
disconnectEdge(java.lang.Object eventSource,
java.lang.Object edge)
Disconnect an edge from its two endpoints and notify graph
listeners with an EDGE_HEAD_CHANGED and an EDGE_TAIL_CHANGED
event.
|
MutableEdgeModel |
getMutableEdgeModel(java.lang.Object edge)
Return the model for the given edge object, cast as a MutableEdgeModel.
|
MutableNodeModel |
getMutableNodeModel(java.lang.Object node)
Return the node model for the given object, cast as a MutableNodeModel.
|
void |
removeNode(java.lang.Object eventSource,
java.lang.Object node)
Delete a node from its parent graph and notify
graph listeners with a NODE_REMOVED event.
|
void |
setEdgeHead(java.lang.Object eventSource,
java.lang.Object edge,
java.lang.Object head)
Connect an edge to the given head node and notify listeners
with an EDGE_HEAD_CHANGED event.
|
void |
setEdgeTail(java.lang.Object eventSource,
java.lang.Object edge,
java.lang.Object tail)
Connect an edge to the given tail node and notify listeners
with an EDGE_TAIL_CHANGED event.
|
containsNode, getCompositeModel, getEdgeModel, getHead, getNodeCount, getNodeModel, getParent, getProperty, getRoot, getSemanticObject, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges, setProperty, setSemanticObject
addGraphListener, dispatchGraphEvent, removeGraphListener, setDispatchEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addGraphListener, containsNode, dispatchGraphEvent, getHead, getNodeCount, getParent, getProperty, getRoot, getSemanticObject, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges, removeGraphListener, setDispatchEnabled, setProperty, setSemanticObject
public MutableModularGraphModel(java.lang.Object root)
public boolean acceptHead(java.lang.Object edge, java.lang.Object node)
acceptHead
in interface MutableGraphModel
public boolean acceptTail(java.lang.Object edge, java.lang.Object node)
acceptTail
in interface MutableGraphModel
public void addNode(java.lang.Object eventSource, java.lang.Object node, java.lang.Object parent)
addNode
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.public void connectEdge(java.lang.Object eventSource, java.lang.Object edge, java.lang.Object tailNode, java.lang.Object headNode)
connectEdge
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.public void disconnectEdge(java.lang.Object eventSource, java.lang.Object edge)
disconnectEdge
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.public MutableEdgeModel getMutableEdgeModel(java.lang.Object edge)
public MutableNodeModel getMutableNodeModel(java.lang.Object node)
public void removeNode(java.lang.Object eventSource, java.lang.Object node)
removeNode
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.public void setEdgeHead(java.lang.Object eventSource, java.lang.Object edge, java.lang.Object head)
setEdgeHead
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.public void setEdgeTail(java.lang.Object eventSource, java.lang.Object edge, java.lang.Object tail)
setEdgeTail
in interface MutableGraphModel
eventSource
- The source of the event that will be dispatched, e.g.
the view that made this call.