public class SquarifiedTreeMapLayout extends TreeLayout
TreeLayout instance computing a TreeMap layout that optimizes for low aspect ratios of visualized tree nodes. TreeMaps are a form of space-filling layout that represents nodes as boxes on the display, with children nodes represented as boxes placed within their parent's box.
This particular algorithm is taken from Bruls, D.M., C. Huizing, and J.J. van Wijk, "Squarified Treemaps" In Data Visualization 2000, Proceedings of the Joint Eurographics and IEEE TCVG Sumposium on Visualization, 2000, pp. 33-42. Available online at: http://www.win.tue.nl/~vanwijk/stm.pdf.
For more information on TreeMaps in general, see http://www.cs.umd.edu/hcil/treemap-history/.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AREA |
static Schema |
AREA_SCHEMA |
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 |
---|
SquarifiedTreeMapLayout(java.lang.String group)
Creates a new SquarifiedTreeMapLayout with no spacing between
parent areas and their enclosed children.
|
SquarifiedTreeMapLayout(java.lang.String group,
double frame)
Creates a new SquarifiedTreeMapLayout with the specified spacing between
parent areas and their enclosed children.
|
Modifier and Type | Method and Description |
---|---|
double |
getFrameWidth()
Gets the amount of desired framing space, in pixels, between
parent rectangles and their enclosed children.
|
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs.
|
void |
setFrameWidth(double frame)
Sets the amount of desired framing space between parent rectangles and
their enclosed children.
|
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 AREA
public static final Schema AREA_SCHEMA
public SquarifiedTreeMapLayout(java.lang.String group)
group
- the data group to layout. Must resolve to a Graph instance.public SquarifiedTreeMapLayout(java.lang.String group, double frame)
frame
- the amount of desired framing space between
parent areas and their enclosed children.group
- the data group to layout. Must resolve to a Graph instance.public void setFrameWidth(double frame)
frame
- the frame width, 0 for no framespublic double getFrameWidth()
public 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