prefuse.action.layout.graph
Class TreeLayout

java.lang.Object
  extended by prefuse.activity.Activity
      extended by prefuse.action.Action
          extended by prefuse.action.GroupAction
              extended by prefuse.action.layout.Layout
                  extended by prefuse.action.layout.graph.TreeLayout
Direct Known Subclasses:
BalloonTreeLayout, NodeLinkTreeLayout, RadialTreeLayout, SquarifiedTreeMapLayout

public abstract class TreeLayout
extends Layout

Abstract base class providing convenience methods for tree layout algorithms.

Version:
1.0
Author:
jeffrey heer

Field Summary
protected  NodeItem m_root
           
 
Fields inherited from class prefuse.action.layout.Layout
m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpb
 
Fields inherited from class prefuse.action.GroupAction
m_group
 
Fields inherited from class prefuse.action.Action
m_vis
 
Fields inherited from class prefuse.activity.Activity
DEFAULT_STEP_TIME, INFINITY
 
Constructor Summary
TreeLayout()
          Create a new TreeLayout.
TreeLayout(java.lang.String group)
          Create a new TreeLayout.
 
Method Summary
 NodeItem getLayoutRoot()
          Return the NodeItem to use as the root for this tree layout.
 void setLayoutRoot(NodeItem root)
          Explicitly set the node to use as the layout root.
 
Methods inherited from class prefuse.action.layout.Layout
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY
 
Methods inherited from class prefuse.action.GroupAction
getGroup, run, setGroup
 
Methods inherited from class prefuse.action.Action
getVisualization, run, setVisualization
 
Methods inherited from class prefuse.activity.Activity
addActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_root

protected NodeItem m_root
Constructor Detail

TreeLayout

public TreeLayout()
Create a new TreeLayout.


TreeLayout

public TreeLayout(java.lang.String group)
Create a new TreeLayout.

Parameters:
group - the data group to layout. This must resolve to a graph instance, otherwise an exception will result when subclasses attempt to retrieve the layout root.
Method Detail

setLayoutRoot

public void setLayoutRoot(NodeItem root)
Explicitly set the node to use as the layout root.

Parameters:
root - the node to use as the root. A null value is legal, and indicates that the root of the spanning tree of the backing graph will be used as the layout root. If the node is not a member of this layout's data group, an exception will be thrown.
Throws:
java.lang.IllegalArgumentException - if the provided root is not a member of this layout's data group.

getLayoutRoot

public NodeItem getLayoutRoot()
Return the NodeItem to use as the root for this tree layout.

Returns:
the root node to use for this tree layout.
Throws:
java.lang.IllegalStateException - if the action's data group does not resolve to a Graph instance.


Copyright © 2007 Regents of the University of California