|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.ElementTransform
Constructor Summary | |
ElementTransform()
|
Method Summary | |
java.lang.String |
getValidElement(java.lang.String name)
Returns the (finest) element which will be accepted by the element transformation and which is a parent of the given element (or itself). |
void |
moveFromTo(java.lang.String element,
int sx,
int sy,
int ex,
int ey)
Transforms the given element according to the point move from (sx,sy) to (ex,ey) . |
void |
rotate(java.lang.String element,
double angle)
Rotates the element around the origin. |
void |
rotate(java.lang.String element,
int cx,
int cy,
double angle)
Rotates the element around an anchor point. |
void |
rotate(java.lang.String element,
int cx,
int cy,
int sx,
int sy,
int ex,
int ey)
Rotates the element around an anchor point with the angle of rotation given by the two points start and
end . |
void |
rotate(java.lang.String element,
java.awt.Point center,
double angle)
Rotates the element around an anchor point. |
void |
rotate(java.lang.String element,
java.awt.Point center,
java.awt.Point start,
java.awt.Point end)
Rotates the element around an anchor point with the angle of rotation given by the two points start and
end . |
void |
scale(java.lang.String element,
double xscale,
double yscale)
Scales the element with the given scale factors. |
void |
scale(java.lang.String element,
int cx,
int cy,
double xscale,
double yscale)
Scales the element with leaving the given center point unchanged. |
void |
scale(java.lang.String element,
java.awt.Point center,
double xscale,
double yscale)
Scales the element with leaving the given center point unchanged. |
abstract void |
transform(java.lang.String element,
double m00,
double m01,
double m02,
double m10,
double m11,
double m12)
Transforms the element with the given transformation matrix. |
void |
translate(java.lang.String element,
int dx,
int dy)
Translates the element by the given vector. |
void |
translate(java.lang.String element,
java.awt.Point v)
Translates the element by the given vector. |
protected boolean |
validateElement(java.lang.String name)
Validates an element name for element transformation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ElementTransform()
Method Detail |
public abstract void transform(java.lang.String element, double m00, double m01, double m02, double m10, double m11, double m12)
element
- the name of the element to transformm00,m01,m02
- first row of the transformation matrixm10,m11,m12
- second row of the transformation matrixpublic void scale(java.lang.String element, int cx, int cy, double xscale, double yscale)
element
- the name of the element to transformcx,cy
- the center point (will be unchanged)xscale
- scale factor for the x-axisyscale
- scale factor for the y-axispublic void scale(java.lang.String element, java.awt.Point center, double xscale, double yscale)
element
- the name of the element to transformcenter
- the center point (will be unchanged)xscale
- scale factor for the x-axisyscale
- scale factor for the y-axispublic void scale(java.lang.String element, double xscale, double yscale)
element
- the name of the element to transformxscale
- scale factor for the x-axisyscale
- scale factor for the y-axispublic void rotate(java.lang.String element, int cx, int cy, double angle)
element
- the name of the element to transformcx,cy
- anchor pointangle
- the angle of rotation in radianspublic void rotate(java.lang.String element, java.awt.Point center, double angle)
element
- the name of the element to transformcenter
- anchor pointangle
- the angle of rotation in radianspublic void rotate(java.lang.String element, int cx, int cy, int sx, int sy, int ex, int ey)
start
and
end
.element
- the name of the element to transformcx,cy
- anchor pointsx,sy
- start pointex,ey
- end pointpublic void rotate(java.lang.String element, java.awt.Point center, java.awt.Point start, java.awt.Point end)
start
and
end
.element
- the name of the element to transformcenter
- anchor pointstart
- start pointend
- end pointpublic void rotate(java.lang.String element, double angle)
element
- the name of the element to transformangle
- the angle of rotationpublic void translate(java.lang.String element, int dx, int dy)
element
- the name of the element to transformdx,dy
- the translational vectorpublic void translate(java.lang.String element, java.awt.Point v)
element
- the name of the element to transformv
- the translational vectorpublic void moveFromTo(java.lang.String element, int sx, int sy, int ex, int ey)
(sx,sy)
to (ex,ey)
. This should be
rather called than translate, because some element can react in
another way if the point where they are picked up is known.element
- the name of the element to transformsx,sy
- the start point of the moving operationex,ey
- the end point of the moving operationprotected boolean validateElement(java.lang.String name)
name
- member element name of the DisplayObject's shape.true, if the element was accepted
public java.lang.String getValidElement(java.lang.String name)
name
- the elements (full) name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |