|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.activity.Activity prefuse.action.Action prefuse.action.GroupAction prefuse.action.layout.Layout prefuse.action.layout.graph.TreeLayout prefuse.action.layout.graph.RadialTreeLayout
public class RadialTreeLayout
TreeLayout instance that computes a radial layout, laying out subsequent depth levels of a tree on circles of progressively increasing radius.
The algorithm used is that of Ka-Ping Yee, Danyel Fisher, Rachna Dhamija, and Marti Hearst in their research paper Animated Exploration of Dynamic Graphs with Radial Layout, InfoVis 2001. This algorithm computes a radial layout which factors in possible variation in sizes, and maintains both orientation and ordering constraints to facilitate smooth and understandable transitions between layout configurations.
Nested Class Summary | |
---|---|
static class |
RadialTreeLayout.Params
Wrapper class holding parameters used for each node in this layout. |
Field Summary | |
---|---|
static int |
DEFAULT_RADIUS
|
protected boolean |
m_autoScale
|
protected int |
m_maxDepth
|
protected java.awt.geom.Point2D |
m_origin
|
protected NodeItem |
m_prevRoot
|
protected double |
m_radiusInc
|
protected boolean |
m_setTheta
|
protected double |
m_theta1
|
protected double |
m_theta2
|
static java.lang.String |
PARAMS
The data field in which the parameters used by this layout are stored. |
static Schema |
PARAMS_SCHEMA
The schema for the parameters used by this layout. |
Fields inherited from class prefuse.action.layout.graph.TreeLayout |
---|
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 | |
---|---|
RadialTreeLayout(java.lang.String group)
Creates a new RadialTreeLayout. |
|
RadialTreeLayout(java.lang.String group,
int radius)
Creates a new RadialTreeLayout using the specified radius increment between levels of the layout. |
Method Summary | |
---|---|
boolean |
getAutoScale()
Indicates if the layout automatically scales to fit the layout bounds. |
double |
getRadiusIncrement()
Set the radius increment to use between concentric circles. |
protected void |
initSchema(TupleSet ts)
|
protected void |
layout(NodeItem n,
double r,
double theta1,
double theta2)
Compute the layout. |
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs. |
void |
setAngularBounds(double theta,
double width)
Constrains this layout to the specified angular sector |
void |
setAutoScale(boolean s)
Set whether or not the layout should automatically scale itself to fit the layout bounds. |
protected void |
setPolarLocation(NodeItem n,
NodeItem p,
double r,
double t)
Set the position of the given node, given in polar co-ordinates. |
void |
setRadiusIncrement(double inc)
Set the radius increment to use between concentric circles. |
protected void |
setScale(java.awt.geom.Rectangle2D bounds)
|
Methods inherited from class prefuse.action.layout.graph.TreeLayout |
---|
getLayoutRoot, setLayoutRoot |
Methods inherited from class prefuse.action.layout.Layout |
---|
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY |
Methods inherited from class prefuse.action.GroupAction |
---|
getGroup, 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 |
---|
public static final int DEFAULT_RADIUS
protected int m_maxDepth
protected double m_radiusInc
protected double m_theta1
protected double m_theta2
protected boolean m_setTheta
protected boolean m_autoScale
protected java.awt.geom.Point2D m_origin
protected NodeItem m_prevRoot
public static final java.lang.String PARAMS
public static final Schema PARAMS_SCHEMA
Constructor Detail |
---|
public RadialTreeLayout(java.lang.String group)
group
- the data group to process. This should resolve to
either a Graph or Tree instance.public RadialTreeLayout(java.lang.String group, int radius)
group
- the data group to process. This should resolve to
either a Graph or Tree instance.radius
- the radius increment to use between subsequent rings
in the layout.Method Detail |
---|
public double getRadiusIncrement()
public void setRadiusIncrement(double inc)
inc
- the radius increment between subsequent rings of the layoutsetAutoScale(boolean)
public boolean getAutoScale()
public void setAutoScale(boolean s)
s
- true to automatically scale to fit display, false otherwisepublic void setAngularBounds(double theta, double width)
theta
- the starting angle, in radianswidth
- the angular width, in radianspublic void run(double frac)
Action
run
in class GroupAction
frac
- the fraction of this Action's duration that has elapsed.Action.run(double)
protected void setScale(java.awt.geom.Rectangle2D bounds)
protected void layout(NodeItem n, double r, double theta1, double theta2)
n
- the root of the current subtree under considerationr
- the radius, current distance from the centertheta1
- the start (in radians) of this subtree's angular regiontheta2
- the end (in radians) of this subtree's angular regionprotected void setPolarLocation(NodeItem n, NodeItem p, double r, double t)
n
- the NodeItem to set the positionp
- the referrer parent NodeItemr
- the radiust
- the angle thetaprotected void initSchema(TupleSet ts)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |