|
||||||||||
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.distortion.Distortion
public abstract class Distortion
Abstract base class providing a structure for space-distortion techniques.
Field Summary | |
---|---|
protected boolean |
m_distortSize
|
protected boolean |
m_distortX
|
protected boolean |
m_distortY
|
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 | |
---|---|
Distortion()
Create a new Distortion instance. |
|
Distortion(java.lang.String group)
Create a new Distortion instance that processes the given data group. |
Method Summary | |
---|---|
protected java.awt.geom.Point2D |
correct(java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Corrects the anchor position, such that if the anchor is outside the layout bounds, the anchor is adjusted to be the nearest point on the edge of the bounds. |
protected abstract double |
distortSize(java.awt.geom.Rectangle2D bbox,
double x,
double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Returns the scaling factor by which to transform the size of an item. |
protected abstract double |
distortX(double x,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's x-coordinate. |
protected abstract double |
distortY(double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's y-coordinate. |
boolean |
isSizeDistorted()
Indicates whether the item sizes are distorted along with the item locations. |
void |
run(double frac)
Runs this Action, triggering whatever processing this Action performs. |
void |
setSizeDistorted(boolean s)
Controls whether item sizes are distorted along with the item locations. |
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 |
---|
protected boolean m_distortSize
protected boolean m_distortX
protected boolean m_distortY
Constructor Detail |
---|
public Distortion()
public Distortion(java.lang.String group)
group
- the data group processed by this Distortion instanceMethod Detail |
---|
public void setSizeDistorted(boolean s)
s
- true to distort size, false to distort positions onlypublic boolean isSizeDistorted()
public void run(double frac)
Action
run
in class GroupAction
frac
- the fraction of this Action's duration that has elapsed.Action.run(double)
protected java.awt.geom.Point2D correct(java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
anchor
- the un-corrected anchor pointbounds
- the layout bounds
protected abstract double distortX(double x, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
x
- the undistorted x coordinateanchor
- the anchor or focus point of the displaybounds
- the layout bounds
protected abstract double distortY(double y, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
y
- the undistorted y coordinateanchor
- the anchor or focus point of the displaybounds
- the layout bounds
protected abstract double distortSize(java.awt.geom.Rectangle2D bbox, double x, double y, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
bbox
- the bounding box of the undistorted itemx
- the x-coordinate of the distorted itemy
- the y-coordinate of the distorted itemanchor
- the anchor or focus point of the displaybounds
- the layout bounds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |