|
||||||||||
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 prefuse.action.distortion.FisheyeDistortion
public class FisheyeDistortion
Computes a graphical fisheye distortion of a graph view. This distortion allocates more space to items near the layout anchor and less space to items further away, magnifying space near the anchor and demagnifying distant space in a continuous fashion.
For more details on this form of transformation, see Manojit Sarkar and Marc H. Brown, "Graphical Fisheye Views of Graphs", in Proceedings of CHI'92, Human Factors in Computing Systems, p. 83-91, 1992. Available online at http://citeseer.ist.psu.edu/sarkar92graphical.html.
Field Summary |
---|
Fields inherited from class prefuse.action.distortion.Distortion |
---|
m_distortSize, m_distortX, 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 | |
---|---|
FisheyeDistortion()
Create a new FisheyeDistortion with default distortion factor. |
|
FisheyeDistortion(double dfactor)
Create a new FisheyeDistortion with the given distortion factor for use along both the x and y directions. |
|
FisheyeDistortion(double xfactor,
double yfactor)
Create a new FisheyeDistortion with the given distortion factors along the x and y directions. |
Method Summary | |
---|---|
protected 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 double |
distortX(double x,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's x-coordinate. |
protected double |
distortY(double y,
java.awt.geom.Point2D anchor,
java.awt.geom.Rectangle2D bounds)
Distorts an item's y-coordinate. |
double |
getXDistortionFactor()
Returns the distortion factor for the x-axis. |
double |
getYDistortionFactor()
Returns the distortion factor for the y-axis. |
void |
setXDistortionFactor(double d)
Sets the distortion factor for the x-axis. |
void |
setYDistortionFactor(double d)
Sets the distortion factor for the y-axis. |
Methods inherited from class prefuse.action.distortion.Distortion |
---|
correct, isSizeDistorted, run, setSizeDistorted |
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 |
Constructor Detail |
---|
public FisheyeDistortion()
public FisheyeDistortion(double dfactor)
dfactor
- the distortion factor (same for both axes)public FisheyeDistortion(double xfactor, double yfactor)
xfactor
- the distortion factor along the x axisyfactor
- the distortion factor along the y axisMethod Detail |
---|
public double getXDistortionFactor()
public void setXDistortionFactor(double d)
d
- The distortion factor to set.public double getYDistortionFactor()
public void setYDistortionFactor(double d)
d
- The distortion factor to set.protected double distortX(double x, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
Distortion
distortX
in class Distortion
x
- the undistorted x coordinateanchor
- the anchor or focus point of the displaybounds
- the layout bounds
Distortion.distortX(double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)
protected double distortY(double y, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
Distortion
distortY
in class Distortion
y
- the undistorted y coordinateanchor
- the anchor or focus point of the displaybounds
- the layout bounds
Distortion.distortY(double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)
protected double distortSize(java.awt.geom.Rectangle2D bbox, double x, double y, java.awt.geom.Point2D anchor, java.awt.geom.Rectangle2D bounds)
Distortion
distortSize
in class Distortion
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
Distortion.distortSize(java.awt.geom.Rectangle2D, double, double, java.awt.geom.Point2D, java.awt.geom.Rectangle2D)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |