edu.uci.ics.jung.visualization.transform
Class MagnifyTransformer

java.lang.Object
  extended by edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
      extended by edu.uci.ics.jung.visualization.transform.LensTransformer
          extended by edu.uci.ics.jung.visualization.transform.MagnifyTransformer
All Implemented Interfaces:
BidirectionalTransformer, MutableTransformer, ShapeTransformer, ChangeEventSupport
Direct Known Subclasses:
MagnifyShapeTransformer

public class MagnifyTransformer
extends LensTransformer
implements MutableTransformer

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, magnification
 
Fields inherited from class edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
delegate
 
Constructor Summary
MagnifyTransformer(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
 Point2D inverseTransform(Point2D viewPoint)
          override base class to un-project the fisheye effect
 Point2D magnify(Point2D graphPoint)
          magnifies the point, without considering the Lens
 Point2D transform(Point2D graphPoint)
          override base class transform to project the fisheye effect
 
Methods inherited from class edu.uci.ics.jung.visualization.transform.LensTransformer
getDistanceFromCenter, getLensShape, getMagnification, getRatio, getViewCenter, getViewRadius, inverseTransform, setLensShape, setMagnification, setToIdentity, setViewCenter, setViewRadius, transform
 
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, setToIdentity, setTranslate, shear, translate
 
Methods inherited from interface edu.uci.ics.jung.visualization.transform.shape.ShapeTransformer
inverseTransform, transform
 
Methods inherited from interface edu.uci.ics.jung.visualization.util.ChangeEventSupport
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
 

Constructor Detail

MagnifyTransformer

public MagnifyTransformer(Component component)
create an instance, setting values from the passed component and registering to listen for size changes on the component

Parameters:
component -

MagnifyTransformer

public MagnifyTransformer(Component component,
                          MutableTransformer delegate)
create an instance with a possibly shared transform

Parameters:
component -
delegate -
Method Detail

transform

public Point2D transform(Point2D graphPoint)
override base class transform to project the fisheye effect

Specified by:
transform in interface BidirectionalTransformer
Specified by:
transform in class LensTransformer
Parameters:
graphPoint - graph point to convert
Returns:
screen point

inverseTransform

public Point2D inverseTransform(Point2D viewPoint)
override base class to un-project the fisheye effect

Specified by:
inverseTransform in interface BidirectionalTransformer
Specified by:
inverseTransform in class LensTransformer
Parameters:
viewPoint - screen point to convert
Returns:
the graph point

magnify

public Point2D magnify(Point2D graphPoint)
magnifies the point, without considering the Lens

Parameters:
graphPoint -
Returns:


Copyright © 2009. All Rights Reserved.