prefuse.visual.tuple
Class TableNodeItem

java.lang.Object
  extended by prefuse.data.tuple.TableTuple
      extended by prefuse.visual.tuple.TableVisualItem
          extended by prefuse.visual.tuple.TableNodeItem
All Implemented Interfaces:
Node, Tuple, NodeItem, VisualItem

public class TableNodeItem
extends TableVisualItem
implements NodeItem

NodeItem implementation that used data values from a backing VisualTable of nodes.

Author:
jeffrey heer

Field Summary
protected  Graph m_graph
           
 
Fields inherited from class prefuse.data.tuple.TableTuple
m_row, m_table
 
Fields inherited from interface prefuse.visual.VisualItem
BOUNDS, DOI, ENDFILLCOLOR, ENDFONT, ENDPOLYGON, ENDSIZE, ENDSTROKECOLOR, ENDTEXTCOLOR, ENDVISIBLE, ENDX, ENDX2, ENDY, ENDY2, EXPANDED, FILLCOLOR, FIXED, FONT, HIGHLIGHT, HOVER, IDX_VALIDATED, INTERACTIVE, LABEL, POLYGON, SCHEMA, SHAPE, SIZE, STARTFILLCOLOR, STARTFONT, STARTPOLYGON, STARTSIZE, STARTSTROKECOLOR, STARTTEXTCOLOR, STARTVISIBLE, STARTX, STARTX2, STARTY, STARTY2, STROKE, STROKECOLOR, TEXTCOLOR, VALIDATED, VALUE, VISIBLE, X, X2, Y, Y2
 
Constructor Summary
TableNodeItem()
           
 
Method Summary
 java.util.Iterator childEdges()
          Get an iterator over the edges from this node to its tree children.
 java.util.Iterator children()
          Get an iterator over this node's tree children.
 java.util.Iterator edges()
          Get an iterator over all incident edges, those for which this node is either the source or the target.
 Node getChild(int idx)
          Get the tree child node at the given index.
 int getChildCount()
          Get the number of tree children of this node.
 int getChildIndex(Node child)
          Get the ordering index of the give node child in a tree structure.
 int getDegree()
          Get the degree of the node, the number of edges for which this node is either the source or the target.
 int getDepth()
          Get the tree depth of this node.
 Node getFirstChild()
          Get this node's first tree child.
 Graph getGraph()
          Get the Graph of which this Node is a member.
 int getInDegree()
          Get the in-degree of the node, the number of edges for which this node is the target.
 Node getLastChild()
          Get this node's last tree child.
 Node getNextSibling()
          Get this node's next tree sibling.
 int getOutDegree()
          Get the out-degree of the node, the number of edges for which this node is the source.
 Node getParent()
          Get the parent node of this node in a tree structure.
 Edge getParentEdge()
          Get the edge between this node and its parent node in a tree structure.
 Node getPreviousSibling()
          Get this node's previous tree sibling.
 java.util.Iterator inEdges()
          Get an iterator over all incoming edges, those for which this node is the target.
protected  void init(Table table, Graph graph, int row)
          Initialize a new TableNodeItem for the given graph, table, and row.
 java.util.Iterator inNeighbors()
          Get an iterator over all adjacent nodes connected to this node by an incoming edge (i.e., all nodes that "point" at this one).
 java.util.Iterator neighbors()
          Get an iterator over all nodes connected to this node.
 java.util.Iterator outEdges()
          Get an iterator over all outgoing edges, those for which this node is the source.
 java.util.Iterator outNeighbors()
          Get an iterator over all adjacent nodes connected to this node by an outgoing edge (i.e., all nodes "pointed" to by this one).
 
Methods inherited from class prefuse.visual.tuple.TableVisualItem
getBounds, getDOI, getEndFillColor, getEndFont, getEndSize, getEndStrokeColor, getEndTextColor, getEndX, getEndY, getFillColor, getFont, getGroup, getRenderer, getShape, getSize, getSourceData, getSourceTuple, getStartFillColor, getStartFont, getStartSize, getStartStrokeColor, getStartTextColor, getStartX, getStartY, getStroke, getStrokeColor, getTextColor, getVisualization, getX, getY, isEndVisible, isExpanded, isFixed, isHighlighted, isHover, isInGroup, isInteractive, isStartVisible, isValidated, isVisible, render, setBounds, setDOI, setEndFillColor, setEndFont, setEndSize, setEndStrokeColor, setEndTextColor, setEndVisible, setEndX, setEndY, setExpanded, setFillColor, setFixed, setFont, setHighlighted, setHover, setInteractive, setShape, setSize, setStartFillColor, setStartFont, setStartSize, setStartStrokeColor, setStartTextColor, setStartVisible, setStartX, setStartY, setStroke, setStrokeColor, setTextColor, setValidated, setVisible, setX, setY, toString, validateBounds
 
Methods inherited from class prefuse.data.tuple.TableTuple
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface prefuse.visual.VisualItem
getBounds, getDOI, getEndFillColor, getEndFont, getEndSize, getEndStrokeColor, getEndTextColor, getEndX, getEndY, getFillColor, getFont, getGroup, getRenderer, getShape, getSize, getSourceData, getSourceTuple, getStartFillColor, getStartFont, getStartSize, getStartStrokeColor, getStartTextColor, getStartX, getStartY, getStroke, getStrokeColor, getTextColor, getVisualization, getX, getY, isEndVisible, isExpanded, isFixed, isHighlighted, isHover, isInGroup, isInteractive, isStartVisible, isValidated, isVisible, render, setBounds, setDOI, setEndFillColor, setEndFont, setEndSize, setEndStrokeColor, setEndTextColor, setEndVisible, setEndX, setEndY, setExpanded, setFillColor, setFixed, setFont, setHighlighted, setHover, setInteractive, setShape, setSize, setStartFillColor, setStartFont, setStartSize, setStartStrokeColor, setStartTextColor, setStartVisible, setStartX, setStartY, setStroke, setStrokeColor, setTextColor, setValidated, setVisible, setX, setY, validateBounds
 
Methods inherited from interface prefuse.data.Tuple
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 

Field Detail

m_graph

protected Graph m_graph
Constructor Detail

TableNodeItem

public TableNodeItem()
Method Detail

init

protected void init(Table table,
                    Graph graph,
                    int row)
Initialize a new TableNodeItem for the given graph, table, and row. This method is used by the appropriate TupleManager instance, and should not be called directly by client code, unless by a client-supplied custom TupleManager.

Overrides:
init in class TableVisualItem
Parameters:
table - the backing VisualTable
graph - the backing VisualGraph
row - the row in the node table to which this Node instance corresponds.

getGraph

public Graph getGraph()
Description copied from interface: Node
Get the Graph of which this Node is a member.

Specified by:
getGraph in interface Node
Returns:
the backing Graph.
See Also:
Node.getGraph()

getInDegree

public int getInDegree()
Description copied from interface: Node
Get the in-degree of the node, the number of edges for which this node is the target.

Specified by:
getInDegree in interface Node
Returns:
the in-degree of the node
See Also:
Node.getInDegree()

getOutDegree

public int getOutDegree()
Description copied from interface: Node
Get the out-degree of the node, the number of edges for which this node is the source.

Specified by:
getOutDegree in interface Node
Returns:
the out-degree of the node
See Also:
Node.getOutDegree()

getDegree

public int getDegree()
Description copied from interface: Node
Get the degree of the node, the number of edges for which this node is either the source or the target.

Specified by:
getDegree in interface Node
Returns:
the total degree of the node
See Also:
Node.getDegree()

inEdges

public java.util.Iterator inEdges()
Description copied from interface: Node
Get an iterator over all incoming edges, those for which this node is the target.

Specified by:
inEdges in interface Node
Returns:
an Iterator over all incoming edges
See Also:
Node.inEdges()

outEdges

public java.util.Iterator outEdges()
Description copied from interface: Node
Get an iterator over all outgoing edges, those for which this node is the source.

Specified by:
outEdges in interface Node
Returns:
an Iterator over all outgoing edges
See Also:
Node.outEdges()

edges

public java.util.Iterator edges()
Description copied from interface: Node
Get an iterator over all incident edges, those for which this node is either the source or the target.

Specified by:
edges in interface Node
Returns:
an Iterator over all incident edges
See Also:
Node.edges()

inNeighbors

public java.util.Iterator inNeighbors()
Description copied from interface: Node
Get an iterator over all adjacent nodes connected to this node by an incoming edge (i.e., all nodes that "point" at this one).

Specified by:
inNeighbors in interface Node
Returns:
an Iterator over all neighbors with in-links on this node
See Also:
Node.inNeighbors()

outNeighbors

public java.util.Iterator outNeighbors()
Description copied from interface: Node
Get an iterator over all adjacent nodes connected to this node by an outgoing edge (i.e., all nodes "pointed" to by this one).

Specified by:
outNeighbors in interface Node
Returns:
an Iterator over all neighbors with out-links from this node
See Also:
Node.outNeighbors()

neighbors

public java.util.Iterator neighbors()
Description copied from interface: Node
Get an iterator over all nodes connected to this node.

Specified by:
neighbors in interface Node
Returns:
an Iterator over all neighbors of this node
See Also:
Node.neighbors()

getParent

public Node getParent()
Description copied from interface: Node
Get the parent node of this node in a tree structure.

Specified by:
getParent in interface Node
Returns:
this node's parent node, or null if there is none.
See Also:
Node.getParent()

getParentEdge

public Edge getParentEdge()
Description copied from interface: Node
Get the edge between this node and its parent node in a tree structure.

Specified by:
getParentEdge in interface Node
Returns:
the edge between this node and its parent
See Also:
Node.getParentEdge()

getChildCount

public int getChildCount()
Description copied from interface: Node
Get the number of tree children of this node.

Specified by:
getChildCount in interface Node
Returns:
the number of child nodes
See Also:
Node.getChildCount()

getChildIndex

public int getChildIndex(Node child)
Description copied from interface: Node
Get the ordering index of the give node child in a tree structure.

Specified by:
getChildIndex in interface Node
Parameters:
child - the child node to look up
Returns:
the index of the child node, or -1 if the node is not a child of this one.
See Also:
Node.getChildIndex(prefuse.data.Node)

getChild

public Node getChild(int idx)
Description copied from interface: Node
Get the tree child node at the given index.

Specified by:
getChild in interface Node
Parameters:
idx - the ordering index
Returns:
the child node at the given index
See Also:
Node.getChild(int)

getFirstChild

public Node getFirstChild()
Description copied from interface: Node
Get this node's first tree child. This is the same as looking up the node at index 0.

Specified by:
getFirstChild in interface Node
Returns:
this node's first child node
See Also:
Node.getFirstChild()

getLastChild

public Node getLastChild()
Description copied from interface: Node
Get this node's last tree child. This is the same as looking up the node at the child count minus 1.

Specified by:
getLastChild in interface Node
Returns:
this node's last child node
See Also:
Node.getLastChild()

getPreviousSibling

public Node getPreviousSibling()
Description copied from interface: Node
Get this node's previous tree sibling.

Specified by:
getPreviousSibling in interface Node
Returns:
the previous sibling, or null if none
See Also:
Node.getPreviousSibling()

getNextSibling

public Node getNextSibling()
Description copied from interface: Node
Get this node's next tree sibling.

Specified by:
getNextSibling in interface Node
Returns:
the next sibling, or null if none
See Also:
Node.getNextSibling()

children

public java.util.Iterator children()
Description copied from interface: Node
Get an iterator over this node's tree children.

Specified by:
children in interface Node
Returns:
an iterator over this node's children
See Also:
Node.children()

childEdges

public java.util.Iterator childEdges()
Description copied from interface: Node
Get an iterator over the edges from this node to its tree children.

Specified by:
childEdges in interface Node
Returns:
an iterator over the edges to the child nodes
See Also:
Node.childEdges()

getDepth

public int getDepth()
Description copied from interface: Node
Get the tree depth of this node.

Specified by:
getDepth in interface Node
Returns:
the tree depth of this node. The root's tree depth is zero, and each level of the tree is one depth level greater.
See Also:
Node.getDepth()


Copyright © 2007 Regents of the University of California