|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.unizh.ini.friend.graphics.SynchronizedSeparateTransforms
public class SynchronizedSeparateTransforms
Wrapper for SeperateTransforms
to be thread-safe.
Field Summary | |
---|---|
protected SeparateTransforms |
st
The object to wrap. |
Constructor Summary | |
---|---|
SynchronizedSeparateTransforms(SeparateTransforms st)
Creates a new instance that wraps the given object |
Method Summary | |
---|---|
Transformable |
apply(AffineTransform at)
Applies the given transformation to the geometric object. |
Object |
clone()
Clones this geometric object. |
Transformable |
getGeometry()
Returns the original geometric object. |
AffineTransform |
getRotation()
Returns the buffered rotation. |
AffineTransform |
getScaling()
Returns the buffered scaling. |
AffineTransform |
getTransformation()
Returns the buffered generic transformation. |
Transformable |
getTransformed()
Returns a Transformable with the buffered
tranformation applied. |
AffineTransform |
getTranslation()
Returns the buffered translation. |
Transformable |
rotate(float phi)
Rotates the geometric object by the given angle around the origin. |
Transformable |
rotate(float phi,
float x,
float y)
Rotates the geometric object by the given angle around the given point. |
Transformable |
rotateTo(float phi)
Rotates the geometric object by the given angle around the origin. |
Transformable |
rotateTo(float phi,
float x,
float y)
Rotates the geometric object by the given angle around the given point. |
Transformable |
scale(float sx,
float sy)
Scales the geomtric object by the given values in x- and y-coordinates with the origin as center. |
Transformable |
scale(float sx,
float sy,
float x,
float y)
Scales the geomtric object by the given values in x- and y-coordinates with the given center (x, y). |
Transformable |
scaleTo(float sx,
float sy)
Scales the geomtric object by the given values in x- and y-coordinates with the origin as center. |
Transformable |
scaleTo(float sx,
float sy,
float x,
float y)
Scales the geomtric object by the given values in x- and y-coordinates with the given center (x, y). |
void |
setGeometry(Transformable geometry)
Sets the original geometric object. |
void |
setRotation(AffineTransform rotation)
Sets the buffered rotation. |
void |
setScaling(AffineTransform scaling)
Sets the buffered scaling. |
void |
setTransformation(AffineTransform transformation)
Sets the buffered generic transformation. |
void |
setTranslation(AffineTransform translation)
Sets the buffered translation. |
String |
toString()
return string representation of the transforms |
Transformable |
translate(float dx,
float dy)
Translates the geometric object by the given coordinates. |
Transformable |
translateTo(float dx,
float dy)
Translates the geometric object by the given coordinates. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SeparateTransforms st
Constructor Detail |
---|
public SynchronizedSeparateTransforms(SeparateTransforms st)
st
- The object to wrap.Method Detail |
---|
public Transformable apply(AffineTransform at)
apply
in interface Transformable
at
- The affine transformation to apply.
public Transformable getGeometry()
getGeometry
in interface SeparateTransforms
public AffineTransform getRotation()
getRotation
in interface SeparateTransforms
public AffineTransform getScaling()
getScaling
in interface SeparateTransforms
public AffineTransform getTransformation()
getTransformation
in interface SeparateTransforms
public Transformable getTransformed()
Transformable
with the buffered
tranformation applied. The returned object should
be a copy that is independent of this
.
getTransformed
in interface BufferedTransform
getTransformed
in interface SeparateTransforms
public AffineTransform getTranslation()
getTranslation
in interface SeparateTransforms
public Transformable rotate(float phi)
rotate
in interface Transformable
phi
- Rotation angle.
public Transformable rotate(float phi, float x, float y)
rotate
in interface Transformable
phi
- Rotation angle.x
- x-coordinate of the rotation center.y
- y-coordinate of the rotation center.
public Transformable scale(float sx, float sy)
scale
in interface Transformable
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.
public Transformable scale(float sx, float sy, float x, float y)
scale
in interface Transformable
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.x
- x-coordinate of the center.y
- y-coordinate of the center.
public void setGeometry(Transformable geometry)
setGeometry
in interface SeparateTransforms
geometry
- The geometric object.public void setRotation(AffineTransform rotation)
setRotation
in interface SeparateTransforms
rotation
- The rotation.public void setScaling(AffineTransform scaling)
setScaling
in interface SeparateTransforms
scaling
- The scaling.public void setTransformation(AffineTransform transformation)
setTransformation
in interface SeparateTransforms
transformation
- The generic transformation.public void setTranslation(AffineTransform translation)
setTranslation
in interface SeparateTransforms
translation
- The translation.public Transformable translate(float dx, float dy)
translate
in interface Transformable
dx
- Translation in x-coordinates.dy
- Translation in y-coordinates.
public Object clone()
clone
in interface Transformable
clone
in class Object
public Transformable rotateTo(float phi)
rotateTo
in interface SeparateTransforms
phi
- Rotation angle.
public Transformable rotateTo(float phi, float x, float y)
rotateTo
in interface SeparateTransforms
phi
- Rotation angle.x
- x-coordinate of the rotation center.y
- y-coordinate of the rotation center.
public Transformable scaleTo(float sx, float sy)
scaleTo
in interface SeparateTransforms
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.
public Transformable scaleTo(float sx, float sy, float x, float y)
scaleTo
in interface SeparateTransforms
sx
- Scalar for x-coordinates.sy
- Scalar for y-coordinates.x
- x-coordinate of the center.y
- y-coordinate of the center.
public Transformable translateTo(float dx, float dy)
translateTo
in interface SeparateTransforms
dx
- Translation in x-coordinates.dy
- Translation in y-coordinates.
public String toString()
toString
in class Object
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |