Class MagnifyTransformer
java.lang.Object
edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
edu.uci.ics.jung.visualization.transform.LensTransformer
edu.uci.ics.jung.visualization.transform.MagnifyTransformer
- All Implemented Interfaces:
BidirectionalTransformer,MutableTransformer,ShapeTransformer,ChangeEventSupport
- Direct Known Subclasses:
MagnifyShapeTransformer
MagnifyTransformer wraps a MutableAffineTransformer and modifies
the transform and inverseTransform methods so that they create an
enlarging projection of the graph points.
MagnifyTransformer uses an
affine transform to cause translation, scaling, rotation, and shearing
while applying a separate magnification filter in its transform and
inverseTransform methods.
- Author:
- Tom Nelson
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.uci.ics.jung.visualization.transform.LensTransformer
LensTransformer.ComponentListenerImpl -
Field Summary
Fields inherited from class edu.uci.ics.jung.visualization.transform.LensTransformer
lensShape, magnificationFields inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
delegate -
Constructor Summary
ConstructorsConstructorDescriptionMagnifyTransformer(Component component) Create an instance, setting values from the passed component and registering to listen for size changes on the component.MagnifyTransformer(Component component, MutableTransformer delegate) Create an instance with a possibly shared transform. -
Method Summary
Modifier and TypeMethodDescriptioninverseTransform(Point2D viewPoint) override base class to un-project the fisheye effectMagnifies the point, without considering the Lens.override base class transform to project the fisheye effectMethods inherited from class edu.uci.ics.jung.visualization.transform.LensTransformer
getDistanceFromCenter, getLensShape, getMagnification, getRatio, getViewCenter, getViewRadius, inverseTransform, setLensShape, setMagnification, setToIdentity, setViewCenter, setViewRadius, transformMethods 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, translateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListenerMethods 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, setToIdentity, setTranslate, shear, translateMethods inherited from interface edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer
inverseTransform, transform
-
Constructor Details
-
MagnifyTransformer
Create an instance, setting values from the passed component and registering to listen for size changes on the component.- Parameters:
component- the component used for rendering
-
MagnifyTransformer
Create an instance with a possibly shared transform.- Parameters:
component- the component used for renderingdelegate- the transformer to use
-
-
Method Details
-
transform
override base class transform to project the fisheye effect- Specified by:
transformin interfaceBidirectionalTransformer- Specified by:
transformin classLensTransformer- Parameters:
graphPoint- graph point to convert- Returns:
- screen point
-
inverseTransform
override base class to un-project the fisheye effect- Specified by:
inverseTransformin interfaceBidirectionalTransformer- Specified by:
inverseTransformin classLensTransformer- Parameters:
viewPoint- screen point to convert- Returns:
- the graph point
-
magnify
Magnifies the point, without considering the Lens.- Parameters:
graphPoint- the point to transform via magnification- Returns:
- the transformed point
-