|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
edu.uci.ics.jung.visualization.transform.LensTransformer
public abstract class LensTransformer
LensTransformer wraps a MutableAffineTransformer and modifies the transform and inverseTransform methods so that they create a projection of the graph points within an elliptical lens. LensTransformer uses an affine transform to cause translation, scaling, rotation, and shearing while applying a possibly non-affine filter in its transform and inverseTransform methods.
| Nested Class Summary | |
|---|---|
protected class |
LensTransformer.ComponentListenerImpl
react to size changes on a component |
| Field Summary | |
|---|---|
protected RectangularShape |
lensShape
the area affected by the transform |
protected float |
magnification
|
| Fields inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator |
|---|
delegate |
| Constructor Summary | |
|---|---|
LensTransformer(Component component,
MutableTransformer delegate)
create an instance with a possibly shared transform |
|
| Method Summary | |
|---|---|
double |
getDistanceFromCenter(Point2D p)
|
RectangularShape |
getLensShape()
|
float |
getMagnification()
|
double |
getRatio()
|
Point2D |
getViewCenter()
|
double |
getViewRadius()
|
abstract Point2D |
inverseTransform(Point2D viewPoint)
override base class to un-project the fisheye effect |
Shape |
inverseTransform(Shape shape)
return the supplied shape, translated to the coordinates that result from calling inverseTransform on its center |
void |
setLensShape(RectangularShape ellipse)
|
void |
setMagnification(float magnification)
|
void |
setToIdentity()
|
void |
setViewCenter(Point2D viewCenter)
|
void |
setViewRadius(double viewRadius)
|
abstract Point2D |
transform(Point2D graphPoint)
override base class transform to project the fisheye effect |
Shape |
transform(Shape shape)
return the supplied shape, translated to the coordinates that result from calling transform on its center |
| Methods inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator |
|---|
addChangeListener, concatenate, fireStateChanged, getChangeListeners, getDelegate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, removeChangeListener, rotate, rotate, scale, setDelegate, setScale, setTranslate, shear, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.uci.ics.jung.visualization.transform.MutableTransformer |
|---|
concatenate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, rotate, rotate, scale, setScale, setTranslate, shear, translate |
| Methods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport |
|---|
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener |
| Field Detail |
|---|
protected RectangularShape lensShape
protected float magnification
| Constructor Detail |
|---|
public LensTransformer(Component component,
MutableTransformer delegate)
component - delegate - | Method Detail |
|---|
public float getMagnification()
public void setMagnification(float magnification)
magnification - The magnification to set.public Point2D getViewCenter()
public void setViewCenter(Point2D viewCenter)
viewCenter - The viewCenter to set.public double getViewRadius()
public void setViewRadius(double viewRadius)
viewRadius - The viewRadius to set.public double getRatio()
public void setLensShape(RectangularShape ellipse)
public RectangularShape getLensShape()
public void setToIdentity()
setToIdentity in interface MutableTransformersetToIdentity in class MutableTransformerDecoratorpublic abstract Point2D transform(Point2D graphPoint)
transform in interface BidirectionalTransformertransform in class MutableTransformerDecoratorgraphPoint - graph point to convert
public abstract Point2D inverseTransform(Point2D viewPoint)
inverseTransform in interface BidirectionalTransformerinverseTransform in class MutableTransformerDecoratorviewPoint - screen point to convert
public double getDistanceFromCenter(Point2D p)
public Shape transform(Shape shape)
transform in interface BidirectionalTransformertransform in interface ShapeTransformertransform in class MutableTransformerDecoratorpublic Shape inverseTransform(Shape shape)
inverseTransform in interface BidirectionalTransformerinverseTransform in interface ShapeTransformerinverseTransform in class MutableTransformerDecorator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||