Class MutableTransformerDecorator
java.lang.Object
edu.uci.ics.jung.visualization.transform.MutableTransformerDecorator
- All Implemented Interfaces:
BidirectionalTransformer,MutableTransformer,ShapeTransformer,ChangeEventSupport
- Direct Known Subclasses:
LensTransformer
a complete decorator that wraps a MutableTransformer. Subclasses
use this to allow them to only declare methods they need to change.
- Author:
- Tom Nelson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconcatenate(AffineTransform transform) voidReturns an array of all theChangeListeners added with addChangeListener().doubledoublegetScale()doubledoubledoubledoubledoubledoubleconvert the supplied screen coordinate to the graph coordinate.inverseTransform(Shape shape) voidpreConcatenate(AffineTransform transform) voidRemoves a ChangeListener.voidrotate(double radians, double x, double y) voidvoidvoidsetDelegate(MutableTransformer delegate) voidvoidvoidsetTranslate(double dx, double dy) voidconvert the supplied graph coordinate to the screen coordinatemap a shape from graph coordinate system to the screen coordinate systemvoidtranslate(double dx, double dy)
-
Field Details
-
delegate
-
-
Constructor Details
-
MutableTransformerDecorator
-
-
Method Details
-
getDelegate
-
setDelegate
-
addChangeListener
- Specified by:
addChangeListenerin interfaceChangeEventSupport
-
concatenate
- Specified by:
concatenatein interfaceMutableTransformer
-
fireStateChanged
public void fireStateChanged()- Specified by:
fireStateChangedin interfaceChangeEventSupport
-
getChangeListeners
Description copied from interface:ChangeEventSupportReturns an array of all theChangeListeners added with addChangeListener().- Specified by:
getChangeListenersin interfaceChangeEventSupport- Returns:
- all of the
ChangeListeners added or an empty array if no listeners have been added
-
getScale
public double getScale()- Specified by:
getScalein interfaceMutableTransformer
-
getScaleX
public double getScaleX()- Specified by:
getScaleXin interfaceMutableTransformer
-
getScaleY
public double getScaleY()- Specified by:
getScaleYin interfaceMutableTransformer
-
getShearX
public double getShearX()- Specified by:
getShearXin interfaceMutableTransformer
-
getShearY
public double getShearY()- Specified by:
getShearYin interfaceMutableTransformer
-
getTransform
- Specified by:
getTransformin interfaceMutableTransformer
-
getTranslateX
public double getTranslateX()- Specified by:
getTranslateXin interfaceMutableTransformer
-
getTranslateY
public double getTranslateY()- Specified by:
getTranslateYin interfaceMutableTransformer
-
inverseTransform
Description copied from interface:BidirectionalTransformerconvert the supplied screen coordinate to the graph coordinate.- Specified by:
inverseTransformin interfaceBidirectionalTransformer- Parameters:
p- screen point to convert- Returns:
- the graph point
-
inverseTransform
- Specified by:
inverseTransformin interfaceShapeTransformer
-
preConcatenate
- Specified by:
preConcatenatein interfaceMutableTransformer
-
removeChangeListener
Description copied from interface:ChangeEventSupportRemoves a ChangeListener.- Specified by:
removeChangeListenerin interfaceChangeEventSupport- Parameters:
l- the listener to be removed
-
rotate
- Specified by:
rotatein interfaceMutableTransformer
-
scale
- Specified by:
scalein interfaceMutableTransformer
-
setScale
- Specified by:
setScalein interfaceMutableTransformer
-
setToIdentity
public void setToIdentity()- Specified by:
setToIdentityin interfaceMutableTransformer
-
setTranslate
public void setTranslate(double dx, double dy) - Specified by:
setTranslatein interfaceMutableTransformer
-
shear
- Specified by:
shearin interfaceMutableTransformer
-
transform
Description copied from interface:BidirectionalTransformerconvert the supplied graph coordinate to the screen coordinate- Specified by:
transformin interfaceBidirectionalTransformer- Parameters:
p- graph point to convert- Returns:
- screen point
-
transform
Description copied from interface:ShapeTransformermap a shape from graph coordinate system to the screen coordinate system- Specified by:
transformin interfaceShapeTransformer- Parameters:
shape- the Shape to transform- Returns:
- a GeneralPath (Shape) representing the screen points of the shape
-
translate
public void translate(double dx, double dy) - Specified by:
translatein interfaceMutableTransformer
-
getRotation
public double getRotation()- Specified by:
getRotationin interfaceMutableTransformer
-
rotate
public void rotate(double radians, double x, double y) - Specified by:
rotatein interfaceMutableTransformer
-