prefuse.visual.tuple
Class TableEdgeItem

java.lang.Object
  extended by prefuse.data.tuple.TableTuple
      extended by prefuse.visual.tuple.TableVisualItem
          extended by prefuse.visual.tuple.TableEdgeItem
All Implemented Interfaces:
Edge, Tuple, EdgeItem, VisualItem

public class TableEdgeItem
extends TableVisualItem
implements EdgeItem

EdgeItem implementation that used data values from a backing VisualTable of edges.

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
TableEdgeItem()
           
 
Method Summary
 NodeItem getAdjacentItem(NodeItem n)
          Get the NodeItem connected to the given NodeItem by this edge.
 Node getAdjacentNode(Node n)
          Given a Node upon which this Edge is incident, the opposite incident Node is returned.
 Graph getGraph()
          Returns the graph of which this Edge is a member.
 NodeItem getSourceItem()
          Get the first, or source, NodeItem upon which this edge is incident.
 Node getSourceNode()
          Returns the first, or source, node upon which this Edge is incident.
 NodeItem getTargetItem()
          Get the second, or target, NodeItem upon which this edge is incident.
 Node getTargetNode()
          Returns the second, or target, node upon which this Edge is incident.
protected  void init(Table table, Graph graph, int row)
          Initialize a new TableEdgeItem for the given graph, table, and row.
 boolean isDirected()
          Indicates if this edge is directed or undirected.
 
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

TableEdgeItem

public TableEdgeItem()
Method Detail

init

protected void init(Table table,
                    Graph graph,
                    int row)
Initialize a new TableEdgeItem 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 Edge instance corresponds.

getGraph

public Graph getGraph()
Description copied from interface: Edge
Returns the graph of which this Edge is a member.

Specified by:
getGraph in interface Edge
Returns:
the Graph containing this Edge
See Also:
Edge.getGraph()

isDirected

public boolean isDirected()
Description copied from interface: Edge
Indicates if this edge is directed or undirected.

Specified by:
isDirected in interface Edge
Returns:
true if directed, false if undirected.
See Also:
Edge.isDirected()

getSourceNode

public Node getSourceNode()
Description copied from interface: Edge
Returns the first, or source, node upon which this Edge is incident.

Specified by:
getSourceNode in interface Edge
Returns:
the source Node
See Also:
Edge.getSourceNode()

getTargetNode

public Node getTargetNode()
Description copied from interface: Edge
Returns the second, or target, node upon which this Edge is incident.

Specified by:
getTargetNode in interface Edge
Returns:
the source Node
See Also:
Edge.getTargetNode()

getAdjacentNode

public Node getAdjacentNode(Node n)
Description copied from interface: Edge
Given a Node upon which this Edge is incident, the opposite incident Node is returned. Throws an exception if the input node is not incident on this Edge.

Specified by:
getAdjacentNode in interface Edge
Parameters:
n - a Node upon which this Edge is incident
Returns:
the other Node touched by this Edge
See Also:
Edge.getAdjacentNode(prefuse.data.Node)

getSourceItem

public NodeItem getSourceItem()
Description copied from interface: EdgeItem
Get the first, or source, NodeItem upon which this edge is incident.

Specified by:
getSourceItem in interface EdgeItem
Returns:
the source NodeItem
See Also:
EdgeItem.getSourceItem()

getTargetItem

public NodeItem getTargetItem()
Description copied from interface: EdgeItem
Get the second, or target, NodeItem upon which this edge is incident.

Specified by:
getTargetItem in interface EdgeItem
Returns:
the target NodeItem
See Also:
EdgeItem.getTargetItem()

getAdjacentItem

public NodeItem getAdjacentItem(NodeItem n)
Description copied from interface: EdgeItem
Get the NodeItem connected to the given NodeItem by this edge.

Specified by:
getAdjacentItem in interface EdgeItem
Parameters:
n - a NodeItem upon which this edge is incident. If this item is not connected to this edge, a runtime exception will be thrown.
Returns:
the other NodeItem connected to this edge
See Also:
EdgeItem.getAdjacentItem(prefuse.visual.NodeItem)


Copyright © 2007 Regents of the University of California