public abstract class MutableModularGraphModel extends ModularGraphModel implements MutableGraphModel
_graphListeners| Constructor and Description |
|---|
MutableModularGraphModel(Object root)
Construct an empty graph model whose
root is the given semantic object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptHead(Object edge,
Object node)
Return true if the head of the given edge can be attached to the
given node.
|
boolean |
acceptTail(Object edge,
Object node)
Return true if the tail of the given edge can be attached to the
given node.
|
void |
addNode(Object eventSource,
Object node,
Object parent)
Add a node to the given graph and notify listeners with a
NODE_ADDED event.
|
void |
connectEdge(Object eventSource,
Object edge,
Object tailNode,
Object headNode)
Connect the given edge to the given tail and head nodes,
then dispatch events to the listeners.
|
void |
disconnectEdge(Object eventSource,
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(Object edge)
Return the model for the given edge object, cast as a MutableEdgeModel.
|
MutableNodeModel |
getMutableNodeModel(Object node)
Return the node model for the given object, cast as a MutableNodeModel.
|
void |
removeNode(Object eventSource,
Object node)
Delete a node from its parent graph and notify
graph listeners with a NODE_REMOVED event.
|
void |
setEdgeHead(Object eventSource,
Object edge,
Object head)
Connect an edge to the given head node and notify listeners
with an EDGE_HEAD_CHANGED event.
|
void |
setEdgeTail(Object eventSource,
Object edge,
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, outEdges, setProperty, setSemanticObjectaddGraphListener, dispatchGraphEvent, removeGraphListener, setDispatchEnabledclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddGraphListener, containsNode, dispatchGraphEvent, getHead, getNodeCount, getParent, getProperty, getRoot, getSemanticObject, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, outEdges, removeGraphListener, setDispatchEnabled, setProperty, setSemanticObjectpublic MutableModularGraphModel(Object root)
public boolean acceptHead(Object edge, Object node)
acceptHead in interface MutableGraphModelpublic boolean acceptTail(Object edge, Object node)
acceptTail in interface MutableGraphModelpublic void addNode(Object eventSource, Object node, Object parent)
addNode in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.public void connectEdge(Object eventSource, Object edge, Object tailNode, Object headNode)
connectEdge in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.public void disconnectEdge(Object eventSource, Object edge)
disconnectEdge in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.public MutableEdgeModel getMutableEdgeModel(Object edge)
public MutableNodeModel getMutableNodeModel(Object node)
public void removeNode(Object eventSource, Object node)
removeNode in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.public void setEdgeHead(Object eventSource, Object edge, Object head)
setEdgeHead in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.public void setEdgeTail(Object eventSource, Object edge, Object tail)
setEdgeTail in interface MutableGraphModeleventSource - The source of the event that will be dispatched, e.g.
the view that made this call.Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.