Inheritance diagram for org.jgraph.graph.DefaultGraphModel:
Public Member Functions | |
DefaultGraphModel () | |
DefaultGraphModel (List roots, AttributeMap attributes) | |
DefaultGraphModel (List roots, AttributeMap attributes, ConnectionSet cs) | |
List | getRoots () |
int | getRootCount () |
Object | getRootAt (int index) |
int | getIndexOfRoot (Object root) |
boolean | contains (Object node) |
AttributeMap | getAttributes (Object node) |
Object | getValue (Object cell) |
Map | getAttributes () |
Object | getSource (Object edge) |
Object | getTarget (Object edge) |
boolean | acceptsSource (Object edge, Object port) |
boolean | acceptsTarget (Object edge, Object port) |
Iterator | edges (Object port) |
boolean | isEdge (Object edge) |
boolean | isPort (Object port) |
ConnectionSet | getConnectionSet () |
Map | cloneCells (Object[] cells) |
Object | getParent (Object child) |
int | getIndexOfChild (Object parent, Object child) |
Object | getChild (Object parent, int index) |
int | getChildCount (Object parent) |
boolean | isLeaf (Object node) |
void | insert (Object[] roots, Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) |
void | remove (Object[] roots) |
void | edit (Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) |
void | edit (Object[] inserted, Object[] removed, Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) |
void | toBack (Object[] cells) |
void | toFront (Object[] cells) |
Object | valueForCellChanged (Object cell, Object newValue) |
void | addGraphModelListener (GraphModelListener l) |
void | removeGraphModelListener (GraphModelListener l) |
void | cellsChanged (final Object[] cells) |
GraphModelListener[] | getGraphModelListeners () |
Static Public Member Functions | |
static Object | cloneCell (GraphModel model, Object cell) |
static Object[] | cloneCell (GraphModel model, Object[] cells) |
static void | setSourcePort (GraphModel model, Object edge, Object port) |
static void | setTargetPort (GraphModel model, Object edge, Object port) |
static Object | getSourceVertex (GraphModel model, Object edge) |
static Object | getTargetVertex (GraphModel model, Object edge) |
static Object | getUserObject (Object cell) |
static boolean | isGroup (GraphModel model, Object cell) |
static Object[] | getAll (GraphModel model) |
static Object[] | getRoots (GraphModel model) |
static Object[] | getRoots (GraphModel model, Object[] cells) |
static Object[] | getTopmostCells (GraphModel model, Object[] cells) |
static boolean | hasAncestorIn (GraphModel model, Set parents, Object child) |
static List | getDescendants (GraphModel model, Object[] cells) |
static Object[] | order (GraphModel model, Object[] cells) |
static Set | getEdges (GraphModel model, Object[] cells) |
static Object | getOpposite (GraphModel model, Object edge, Object cell) |
static boolean | containsEdgeBetween (GraphModel model, Object v1, Object v2) |
static Object[] | getEdgesBetween (GraphModel model, Object cell1, Object cell2, boolean directed) |
static Object[] | getOutgoingEdges (GraphModel model, Object cell) |
static Object[] | getIncomingEdges (GraphModel model, Object cell) |
static Object[] | getEdges (GraphModel model, Object cell, boolean incoming) |
static boolean | isVertex (GraphModel model, Object vertex) |
Protected Member Functions | |
void | setParent (Object child, Object parent) |
Object | cloneCell (Object cellObj) |
Object | cloneUserObject (Object userObject) |
GraphModelLayerEdit | createLayerEdit (Object[] cells, int layer) |
GraphModelEdit | createRemoveEdit (Object[] cells) |
GraphModelEdit | createEdit (Object[] inserted, Object[] removed, Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) |
Object[] | handleInsert (Object[] cells) |
Object[] | handleRemove (Object[] cells) |
ParentMap | handleParentMap (ParentMap parentMap) |
Map | handleAttributes (Map attributes) |
ConnectionSet | handleConnectionSet (ConnectionSet cs) |
void | handleConnection (ConnectionSet.Connection c, boolean establish) |
void | connect (Object edge, Object port, boolean isSource, boolean insert) |
void | fireGraphChanged (Object source, GraphModelEvent.GraphModelChange edit) |
Protected Attributes | |
transient EventListenerList | listenerList = new EventListenerList() |
transient Iterator | emptyIterator = new EmptyIterator() |
List | roots = null |
boolean | asksAllowsChildren = false |
AttributeMap | attributes = null |
Private Member Functions | |
void | readObject (ObjectInputStream s) throws IOException, ClassNotFoundException |
Classes | |
class | EmptyIterator |
class | GraphModelEdit |
class | GraphModelLayerEdit |
|
Constructs a model that is not an attribute store. |
|
Constructs a model that is not an attribute store. |
|
Constructs a model using the specified information to construct the cells, attributes and connection data. |
|
Returns
Implements org.jgraph.graph.GraphModel. Reimplemented in manas.event.MyModel, and manas.gui.MyModel. |
|
Returns
Implements org.jgraph.graph.GraphModel. Reimplemented in manas.event.MyModel, and manas.gui.MyModel. |
|
Adds a listener for the GraphModelEvent posted after the graph changes.
Implements org.jgraph.graph.GraphModel. |
|
Invoke this method after you've changed how the cells are to be represented in the graph. |
|
Returns a deep clone of the specified cells, including all children. |
|
Returns a deep clone of the specified cell, including all children. |
|
Creates a shallow copy of the cell including a copy of the user object. Subclassers can override the cloneUserObject to provide a custom user object cloning mechanism. |
|
Returns a map of (cell, clone)-pairs for all Implements org.jgraph.graph.GraphModel. |
|
Clones the user object. Helper method that is invoked from cloneCells. You must use cloneCells (or cloneCell for single cells) to get a deep copy of a clone. Subclassers must override this and valueForCellChanged to implement custom user objects. This implementation returns |
|
Connects or disconnects the edge and port in this model based on |
|
Returns
Implements org.jgraph.graph.GraphModel. |
|
Returns true if the given vertices are conntected by a single edge in this document. |
|
|
|
|
|
Returns an edit that represents a remove. |
|
Returns an iterator of the edges connected to
Implements org.jgraph.graph.GraphModel. |
|
Applies |
|
Shortcut to the new edit method which allows inserts and removes to go along with an edit. Implements org.jgraph.graph.GraphModel. |
|
|
|
Returns all cells of the model in an array.
|
|
Returns the graph model's attribute. Shortcut to
|
|
Returns a
Implements org.jgraph.graph.GraphModel. |
|
Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index < getChildCount( parent )).
Implements org.jgraph.graph.GraphModel. |
|
Returns the number of children of parent . Returns 0 if the node is a leaf or if it has no children. parent must be a node previously obtained from this data source.
Implements org.jgraph.graph.GraphModel. |
|
A shortcut method to create a connection set that represents the connections in this model. Useful for encoding to avoid writing redundant connection data stored in the cells. |
|
Flattens the given array of root cells by adding the roots and their descandants. The resulting set contains all cells, which means it contains branches and leafs. Note: This is an iterative implementation. No recursion used. |
|
Returns the incoming or outgoing edges for cell. Cell should be a port or a vertex. |
|
Returns the set of all connected edges to |
|
Returns the edges between two specified ports or two specified vertices. If directed is true then |
|
Return an array of all GraphModelListeners that were added to this model. |
|
Returns the incoming edges for cell. Cell should be a port or a vertex. |
|
Returns the index of child in parent. If either the parent or child is
Implements org.jgraph.graph.GraphModel. |
|
Returns the index of
Implements org.jgraph.graph.GraphModel. |
|
|
|
Returns the outgoing edges for cell. Cell should be a port or a vertex. |
|
Returns the parent of child in the model. child must be a node previously obtained from this data source. This returns null if child is a root in the model.
Implements org.jgraph.graph.GraphModel. |
|
Returns the root at index index in the model. This should not return null if index is a valid index for the model (that is index >= 0 && index < getRootCount()).
Implements org.jgraph.graph.GraphModel. |
|
Returns the number of roots in the model. Returns 0 if the model is empty.
Implements org.jgraph.graph.GraphModel. |
|
Returns the roots in |
|
Returns the roots of the specified model as an array. This implementation uses the GraphModel interface in the general case, but if the model is a |
|
|
|
Returns the source of
Implements org.jgraph.graph.GraphModel. |
|
Returns the source vertex of the edge by calling getParent on getSource on the specified model. |
|
Returns the target of
Implements org.jgraph.graph.GraphModel. |
|
Returns the target vertex of the edge by calling getParent on getTarget on the specified model. |
|
|
|
|
|
Implements org.jgraph.graph.GraphModel. |
|
Applies |
|
Inserts the specified connection into the model. |
|
Applies |
|
Inserts |
|
Applies |
|
Removes |
|
Returns true if the specified child has an ancestor in parents. |
|
Inserts the Implements org.jgraph.graph.GraphModel. |
|
Returns
Implements org.jgraph.graph.GraphModel. |
|
Checks whether the cell has at least one child which is not a port. This implementation operates on the model, not taking into account visibility of cells. It returns true for groups regardless of their folded state.
|
|
Returns whether the specified node is a leaf node. The way the test is performed depends on the.
Implements org.jgraph.graph.GraphModel. |
|
Returns
Implements org.jgraph.graph.GraphModel. |
|
Returns
|
|
Orders cells so that they reflect the model order. |
|
|
|
Removes Implements org.jgraph.graph.GraphModel. |
|
Removes a listener previously added with addGraphModelListener() .
Implements org.jgraph.graph.GraphModel. |
|
Sets the parent of the specified cell. |
|
Helper methods that connects the source of |
|
Helper methods that connects the source of |
|
Sends Implements org.jgraph.graph.GraphModel. |
|
Brings Implements org.jgraph.graph.GraphModel. |
|
Applies the new value to the specified cell. Unfortunately for cloning the user object you must still override the attribute map and provide a custom cloneUserObject method. This is because the cloning of a cell is local to the cell, which in turn has a reference to its attribute map.
Implements org.jgraph.graph.GraphModel. |
|
Indicates whether isLeaf is based on a node's allowsChildren value. |
|
The model's own attributes as a map. Defaults to an empty Hashtable. |
|
Default instance of an empty iterator. |
|
The list of listeners that listen to the model. |
|
Set that contains all root cells of this model. |