public class BalloonTreeLayout extends TreeLayout
Layout that computes a circular "balloon-tree" layout of a tree. This layout places children nodes radially around their parents, and is equivalent to a top-down flattened view of a ConeTree.
The algorithm used is that of G. Melan?on and I. Herman from their research paper Circular Drawings of Rooted Trees, Reports of the Centre for Mathematics and Computer Sciences, Report Number INS?9817, 1998.
Modifier and Type | Class and Description |
---|---|
static class |
BalloonTreeLayout.Params
Wrapper class holding parameters used for each node in this layout.
|
Modifier and Type | Field and Description |
---|---|
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.
|
m_root
m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpb
m_group
DEFAULT_STEP_TIME, INFINITY
Constructor and Description |
---|
BalloonTreeLayout(java.lang.String group)
Create a new BalloonTreeLayout
|
BalloonTreeLayout(java.lang.String group,
int minRadius)
Create a new BalloonTreeLayout
|
Modifier and Type | Method and Description |
---|---|
int |
getMinRadius()
Get the minimum radius used for a layout circle.
|
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs.
|
void |
setMinRadius(int minRadius)
Set the minimum radius used for a layout circle.
|
getLayoutRoot, setLayoutRoot
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY
getGroup, setGroup
getVisualization, run, setVisualization
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
public static final java.lang.String PARAMS
public static final Schema PARAMS_SCHEMA
public BalloonTreeLayout(java.lang.String group)
group
- the data group to layout. Must resolve to a Graph
or Tree instance.public BalloonTreeLayout(java.lang.String group, int minRadius)
group
- the data group to layout. Must resolve to a Graph
or Tree instance.minRadius
- the minimum radius to use for a layout circlepublic int getMinRadius()
public void setMinRadius(int minRadius)
minRadius
- the minimum layout radiuspublic void run(double frac)
Action
run
in class GroupAction
frac
- the fraction of this Action's duration that has elapsed.Action.run(double)
Copyright ? 2013 Regents of the University of California