Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

diva.graph
Interface MutableGraphModel

All Superinterfaces:
GraphModel
All Known Implementing Classes:
MutableModularGraphModel

public interface MutableGraphModel
extends GraphModel

A mutable graph model is a read-write subclass of the read-only graph model, allowing users to actually create new nodes and edges, and to modify the topology of the graph.

Version:
$Id: MutableGraphModel.java,v 1.14 2005年07月08日 19:55:02 cxh Exp $
Author:
Michael Shilman, John Reekie
Accepted Rating:
Yellow

Method Summary
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 whose source is the given source object.
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, and notify listeners with events whose source is the given eventSource object
void disconnectEdge(java.lang.Object eventSource, java.lang.Object edge)
Disconnect an edge from its two enpoints and notify graph listeners with an EDGE_HEAD_CHANGED and an EDGE_TAIL_CHANGED event whose source is the given source.
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 newHead)
Connect an edge to the given head node and notify listeners with an EDGE_HEAD_CHANGED event whose source is the given eventSource object.
void setEdgeTail(java.lang.Object eventSource, java.lang.Object edge, java.lang.Object newTail)
Connect an edge to the given tail node and notify listeners with an EDGE_TAIL_CHANGED event whose source is the given eventSource object.
Methods inherited from interface diva.graph.GraphModel
addGraphListener, containsNode, dispatchGraphEvent, getHead, getNodeCount, getParent, getProperty, getRoot, getSemanticObject, getTail, inEdges, isComposite, isDirected, isEdge, isNode, nodes, nodesAfterEdges, nodesBeforeEdges, outEdges, removeGraphListener, setDispatchEnabled, setProperty, setSemanticObject

Method Detail

acceptHead

public 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.


acceptTail

public 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.


addNode

public void addNode(java.lang.Object eventSource,
 java.lang.Object node,
 java.lang.Object parent)
 throws GraphException
Add a node to the given graph and notify listeners with a NODE_ADDED event whose source is the given source object.

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

connectEdge

public void connectEdge(java.lang.Object eventSource,
 java.lang.Object edge,
 java.lang.Object tailNode,
 java.lang.Object headNode)
 throws GraphException
Connect the given edge to the given tail and head nodes, and notify listeners with events whose source is the given eventSource object

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

disconnectEdge

public void disconnectEdge(java.lang.Object eventSource,
 java.lang.Object edge)
 throws GraphException
Disconnect an edge from its two enpoints and notify graph listeners with an EDGE_HEAD_CHANGED and an EDGE_TAIL_CHANGED event whose source is the given source.

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

removeNode

public void removeNode(java.lang.Object eventSource,
 java.lang.Object node)
 throws GraphException
Delete a node from its parent graph and notify graph listeners with a NODE_REMOVED event.

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

setEdgeHead

public void setEdgeHead(java.lang.Object eventSource,
 java.lang.Object edge,
 java.lang.Object newHead)
 throws GraphException
Connect an edge to the given head node and notify listeners with an EDGE_HEAD_CHANGED event whose source is the given eventSource object.

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

setEdgeTail

public void setEdgeTail(java.lang.Object eventSource,
 java.lang.Object edge,
 java.lang.Object newTail)
 throws GraphException
Connect an edge to the given tail node and notify listeners with an EDGE_TAIL_CHANGED event whose source is the given eventSource object.

Parameters:
eventSource - The source of the event that will be dispatched, e.g. the view that made this call.
Throws:
GraphException - if the operation fails.

Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

AltStyle によって変換されたページ (->オリジナル) /