prefuse.visual.tuple
Class TableNodeItem

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

public class TableNodeItem
extends TableVisualItem<TableNodeItem>
implements NodeItem<TableNodeItem,TableEdgeItem>

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

Author:
jeffrey heer

Field Summary
protected  Graph<?,TableNodeItem,TableEdgeItem> 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, MINIMUM_DOI, POLYGON, SCHEMA, SHAPEBUILDER, 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.List<TableEdgeItem> childEdges()
          Get an iterator over the edges from this node to its tree children.
 java.util.List<TableNodeItem> children()
          Get an iterator over this node's tree children.
 java.util.List<TableEdgeItem> edges()
          Get an iterator over all incident edges, those for which this node is either the source or the target.
 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.
 Graph<?,TableNodeItem,TableEdgeItem> getGraph()
           
 int getInDegree()
          Get the in-degree of the node, the number of edges for which this node is the target.
 TableNodeItem 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.
 TableNodeItem getParent()
          Get the parent node of this node in a tree structure.
 TableEdgeItem getParentEdge()
          Get the edge between this node and its parent node in a tree structure.
 TableNodeItem getPreviousSibling()
          Get this node's previous tree sibling.
 java.util.List<TableEdgeItem> inEdges()
          Get an iterator over all incoming edges, those for which this node is the target.
 void init(Table table, Graph graph, int row)
          Initialize a new TableNodeItem for the given graph, table, and row.
 java.util.List<TableNodeItem> 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.List<TableNodeItem> neighbors()
          Get an iterator over all nodes connected to this node.
 java.util.List<TableEdgeItem> outEdges()
          Get an iterator over all outgoing edges, those for which this node is the source.
 java.util.List<TableNodeItem> 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, getShapeBuilder, 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, setShapeBuilder, 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, invalidate, 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, getShapeBuilder, 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, setShapeBuilder, 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, invalidate, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString
 

Field Detail

m_graph

protected Graph<?,TableNodeItem,TableEdgeItem> m_graph
Constructor Detail

TableNodeItem

public TableNodeItem()
Method Detail

init

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

Specified by:
init in interface Tuple<TableNodeItem>
Overrides:
init in class TableVisualItem<TableNodeItem>
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<?,TableNodeItem,TableEdgeItem> 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<TableNodeItem,TableEdgeItem>
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<TableNodeItem,TableEdgeItem>
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<TableNodeItem,TableEdgeItem>
Returns:
the total degree of the node
See Also:
Node.getDegree()

inEdges

public java.util.List<TableEdgeItem> 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<TableNodeItem,TableEdgeItem>
Returns:
an Iterator over all incoming edges
See Also:
Node.inEdges()

outEdges

public java.util.List<TableEdgeItem> 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<TableNodeItem,TableEdgeItem>
Returns:
an Iterator over all outgoing edges
See Also:
Node.outEdges()

edges

public java.util.List<TableEdgeItem> 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<TableNodeItem,TableEdgeItem>
Returns:
an Iterator over all incident edges
See Also:
Node.edges()

inNeighbors

public java.util.List<TableNodeItem> 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<TableNodeItem,TableEdgeItem>
Returns:
an Iterator over all neighbors with in-links on this node
See Also:
Node.inNeighbors()

outNeighbors

public java.util.List<TableNodeItem> 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<TableNodeItem,TableEdgeItem>
Returns:
an Iterator over all neighbors with out-links from this node
See Also:
Node.outNeighbors()

neighbors

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

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

getParent

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

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

getParentEdge

public TableEdgeItem 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<TableNodeItem,TableEdgeItem>
Returns:
the edge between this node and its parent
See Also:
Node.getParentEdge()

getPreviousSibling

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

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

getNextSibling

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

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

children

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

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

childEdges

public java.util.List<TableEdgeItem> 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<TableNodeItem,TableEdgeItem>
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<TableNodeItem,TableEdgeItem>
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 © 2008 Regents of the University of California