prefuse.visual
Class VisualTree
java.lang.Object
prefuse.data.tuple.AbstractTupleSet
prefuse.data.tuple.CompositeTupleSet
prefuse.data.Graph
prefuse.data.Tree
prefuse.visual.VisualTree
- All Implemented Interfaces:
- TupleSet, VisualTupleSet
public class VisualTree
- extends Tree
- implements VisualTupleSet
A visual abstraction of a tree data structure. NodeItem and EdgeItem tuples
provide the visual representations for the nodes and edges of the tree.
VisualTrees should not be created directly, they are created automatically
by adding data to a Visualization, for example by using the
Visualization.addTree(String, Tree)
method.
- Author:
- jeffrey heer
Fields inherited from class prefuse.data.Graph |
DEFAULT_NODE_KEY, EDGES, INDEGREE, INEDGES, INLINKS, LINKS_SCHEMA, m_directed, m_edgeTuples, m_links, m_longKey, m_nidx, m_nkey, m_nodeTuples, m_skey, m_spanning, m_tkey, NODES, OUTDEGREE, OUTEDGES, OUTLINKS, UNDIRECTED |
Constructor Summary |
VisualTree(VisualTable nodes,
VisualTable edges,
java.lang.String nodeKey,
java.lang.String sourceKey,
java.lang.String targetKey)
Create a new VisualTree. |
Method Summary |
protected void |
fireGraphEvent(Table t,
int first,
int last,
int col,
int type)
Fire a graph event. |
java.lang.String |
getGroup()
Get the visualization data group name for this graph |
Visualization |
getVisualization()
Get the Visualization associated with this VisualTupleSet. |
void |
setGroup(java.lang.String group)
Set the visualization data group name for this graph |
void |
setVisualization(Visualization vis)
Set the visualization associated with this VisualGraph |
Methods inherited from class prefuse.data.Tree |
addChild, addChild, addChildEdge, addChildEdge, addRoot, addRootRow, childEdgeRows, childEdges, children, createLinkTable, getChild, getChildCount, getChildIndex, getChildIndex, getChildRow, getDepth, getFirstChild, getFirstChildRow, getLastChild, getLastChildRow, getNextSibling, getNextSiblingRow, getParent, getParent, getParentEdge, getParentEdge, getPreviousSibling, getPreviousSiblingRow, getRoot, getRootRow, getSpanningTree, getSpanningTree, isValidTree, removeChild, removeChild, removeChildEdge, removeChildEdge, updateDegrees |
Methods inherited from class prefuse.data.Graph |
addEdge, addEdge, addGraphModelListener, addLink, addNode, addNodeRow, clear, clearEdges, clearSpanningTree, dispose, edgeCheck, edgeRows, edgeRows, edgeRows, edges, edges, getAdjacentNode, getAdjacentNode, getDegree, getDegree, getEdge, getEdge, getEdge, getEdgeCount, getEdges, getEdgeSourceField, getEdgeTable, getEdgeTargetField, getInDegree, getInDegree, getKey, getNode, getNodeCount, getNodeFromKey, getNodeIndex, getNodeKeyField, getNodes, getNodeTable, getOutDegree, getOutDegree, getSourceNode, getSourceNode, getTargetNode, getTargetNode, inEdgeRows, inEdges, init, initLinkTable, inNeighbors, isDirected, neighbors, nodeCheck, nodeRows, nodes, outEdgeRows, outEdges, outNeighbors, remLink, removeAllGraphModelListeners, removeEdge, removeEdge, removeGraphModelListener, removeNode, removeNode, removeTuple, setEdgeTable, setTupleManagers, tuples, tuples, updateDegrees, updateNodeData |
Methods inherited from class prefuse.data.tuple.CompositeTupleSet |
addColumn, addColumn, addColumn, addColumn, addSet, addTuple, containsSet, containsTuple, getSet, getTupleCount, hasSet, isAddColumnSupported, removeAllSets, removeSet, setNames, sets, setTuple |
Methods inherited from class prefuse.data.tuple.AbstractTupleSet |
addColumns, addPropertyChangeListener, addPropertyChangeListener, addTupleSetListener, fireTupleEvent, fireTupleEvent, fireTupleEvent, getClientProperty, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTupleSetListener, tuples |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface prefuse.data.tuple.TupleSet |
addColumn, addColumn, addColumn, addColumn, addColumns, addPropertyChangeListener, addPropertyChangeListener, addTuple, addTupleSetListener, clear, containsTuple, getClientProperty, getTupleCount, isAddColumnSupported, putClientProperty, removePropertyChangeListener, removePropertyChangeListener, removeTuple, removeTupleSetListener, setTuple, tuples, tuples, tuples |
VisualTree
public VisualTree(VisualTable nodes,
VisualTable edges,
java.lang.String nodeKey,
java.lang.String sourceKey,
java.lang.String targetKey)
- Create a new VisualTree.
- Parameters:
nodes
- the visual node tableedges
- the visual edge tablenodeKey
- the node table field by which to index the nodes.
This value can be null, indicating that just the row indices should be
used.sourceKey
- the edge table field storing source (parent) node keystargetKey
- the edge table field storing target (child) node keys
fireGraphEvent
protected void fireGraphEvent(Table t,
int first,
int last,
int col,
int type)
- Fire a graph event. Makes sure to invalidate all edges connected
to a node that has been updated.
- Overrides:
fireGraphEvent
in class Graph
- Parameters:
t
- the backing table where the change occurred (either a
node table or an edge table)first
- the first modified table rowlast
- the last (inclusive) modified table rowcol
- the number of the column modified, or
EventConstants.ALL_COLUMNS
for operations
affecting all columnstype
- the type of modification, one of
EventConstants.INSERT
,
EventConstants.DELETE
, or
EventConstants.UPDATE
.- See Also:
Graph.fireGraphEvent(prefuse.data.Table, int, int, int, int)
getVisualization
public Visualization getVisualization()
- Description copied from interface:
VisualTupleSet
- Get the Visualization associated with this VisualTupleSet.
- Specified by:
getVisualization
in interface VisualTupleSet
- Returns:
- the Visualization instance
- See Also:
VisualTupleSet.getVisualization()
setVisualization
public void setVisualization(Visualization vis)
- Set the visualization associated with this VisualGraph
- Parameters:
vis
- the visualization to set
getGroup
public java.lang.String getGroup()
- Get the visualization data group name for this graph
- Specified by:
getGroup
in interface VisualTupleSet
- Returns:
- the data group name
setGroup
public void setGroup(java.lang.String group)
- Set the visualization data group name for this graph
- Parameters:
group
- the data group name to use
Copyright © 2007 Regents of the University of California