public abstract class LensTransformer extends MutableTransformerDecorator implements MutableTransformer
Modifier and Type | Class and Description |
---|---|
protected class |
LensTransformer.ComponentListenerImpl
react to size changes on a component
|
Modifier and Type | Field and Description |
---|---|
protected RectangularShape |
lensShape
the area affected by the transform
|
protected float |
magnification |
delegate
Constructor and Description |
---|
LensTransformer(Component component,
MutableTransformer delegate)
create an instance with a possibly shared transform
|
Modifier and Type | Method and Description |
---|---|
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
|
addChangeListener, concatenate, fireStateChanged, getChangeListeners, getDelegate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, removeChangeListener, rotate, rotate, scale, setDelegate, setScale, setTranslate, shear, translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
concatenate, getRotation, getScale, getScaleX, getScaleY, getShearX, getShearY, getTransform, getTranslateX, getTranslateY, preConcatenate, rotate, rotate, scale, setScale, setTranslate, shear, translate
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
protected RectangularShape lensShape
protected float magnification
public LensTransformer(Component component, MutableTransformer delegate)
component
- delegate
- 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 MutableTransformer
setToIdentity
in class MutableTransformerDecorator
public abstract Point2D transform(Point2D graphPoint)
transform
in interface BidirectionalTransformer
transform
in class MutableTransformerDecorator
graphPoint
- graph point to convertpublic abstract Point2D inverseTransform(Point2D viewPoint)
inverseTransform
in interface BidirectionalTransformer
inverseTransform
in class MutableTransformerDecorator
viewPoint
- screen point to convertpublic double getDistanceFromCenter(Point2D p)
public Shape transform(Shape shape)
transform
in interface BidirectionalTransformer
transform
in interface ShapeTransformer
transform
in class MutableTransformerDecorator
public Shape inverseTransform(Shape shape)
inverseTransform
in interface BidirectionalTransformer
inverseTransform
in interface ShapeTransformer
inverseTransform
in class MutableTransformerDecorator
Copyright © 2015. All rights reserved.