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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
concatenate
(AffineTransform transform) void
Returns an array of all theChangeListener
s added with addChangeListener().double
double
getScale()
double
double
double
double
double
double
convert the supplied screen coordinate to the graph coordinate.inverseTransform
(Shape shape) void
preConcatenate
(AffineTransform transform) void
Removes a ChangeListener.void
rotate
(double radians, double x, double y) void
void
void
setDelegate
(MutableTransformer delegate) void
void
void
setTranslate
(double dx, double dy) void
convert the supplied graph coordinate to the screen coordinatemap a shape from graph coordinate system to the screen coordinate systemvoid
translate
(double dx, double dy)
-
Field Details
-
delegate
-
-
Constructor Details
-
MutableTransformerDecorator
-
-
Method Details
-
getDelegate
-
setDelegate
-
addChangeListener
- Specified by:
addChangeListener
in interfaceChangeEventSupport
-
concatenate
- Specified by:
concatenate
in interfaceMutableTransformer
-
fireStateChanged
public void fireStateChanged()- Specified by:
fireStateChanged
in interfaceChangeEventSupport
-
getChangeListeners
Description copied from interface:ChangeEventSupport
Returns an array of all theChangeListener
s added with addChangeListener().- Specified by:
getChangeListeners
in interfaceChangeEventSupport
- Returns:
- all of the
ChangeListener
s added or an empty array if no listeners have been added
-
getScale
public double getScale()- Specified by:
getScale
in interfaceMutableTransformer
-
getScaleX
public double getScaleX()- Specified by:
getScaleX
in interfaceMutableTransformer
-
getScaleY
public double getScaleY()- Specified by:
getScaleY
in interfaceMutableTransformer
-
getShearX
public double getShearX()- Specified by:
getShearX
in interfaceMutableTransformer
-
getShearY
public double getShearY()- Specified by:
getShearY
in interfaceMutableTransformer
-
getTransform
- Specified by:
getTransform
in interfaceMutableTransformer
-
getTranslateX
public double getTranslateX()- Specified by:
getTranslateX
in interfaceMutableTransformer
-
getTranslateY
public double getTranslateY()- Specified by:
getTranslateY
in interfaceMutableTransformer
-
inverseTransform
Description copied from interface:BidirectionalTransformer
convert the supplied screen coordinate to the graph coordinate.- Specified by:
inverseTransform
in interfaceBidirectionalTransformer
- Parameters:
p
- screen point to convert- Returns:
- the graph point
-
inverseTransform
- Specified by:
inverseTransform
in interfaceShapeTransformer
-
preConcatenate
- Specified by:
preConcatenate
in interfaceMutableTransformer
-
removeChangeListener
Description copied from interface:ChangeEventSupport
Removes a ChangeListener.- Specified by:
removeChangeListener
in interfaceChangeEventSupport
- Parameters:
l
- the listener to be removed
-
rotate
- Specified by:
rotate
in interfaceMutableTransformer
-
scale
- Specified by:
scale
in interfaceMutableTransformer
-
setScale
- Specified by:
setScale
in interfaceMutableTransformer
-
setToIdentity
public void setToIdentity()- Specified by:
setToIdentity
in interfaceMutableTransformer
-
setTranslate
public void setTranslate(double dx, double dy) - Specified by:
setTranslate
in interfaceMutableTransformer
-
shear
- Specified by:
shear
in interfaceMutableTransformer
-
transform
Description copied from interface:BidirectionalTransformer
convert the supplied graph coordinate to the screen coordinate- Specified by:
transform
in interfaceBidirectionalTransformer
- Parameters:
p
- graph point to convert- Returns:
- screen point
-
transform
Description copied from interface:ShapeTransformer
map a shape from graph coordinate system to the screen coordinate system- Specified by:
transform
in 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:
translate
in interfaceMutableTransformer
-
getRotation
public double getRotation()- Specified by:
getRotation
in interfaceMutableTransformer
-
rotate
public void rotate(double radians, double x, double y) - Specified by:
rotate
in interfaceMutableTransformer
-