|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.Viewport
This class defines a viewport on a given child component.
A Viewport consists of the following attributes:
| Field Summary | |
static int |
ALIGN_CENTER
constant that tells about an alignment type of the viewport |
static int |
ALIGN_LEFTTOP
constant that tells about an alignment type of the viewport |
| Constructor Summary | |
Viewport()
Constructs a new default Viewport
with center alignment. |
|
Viewport(double tx,
double ty,
double sx,
double sy)
Constructs a new Viewport with center alignment and the given settings. |
|
Viewport(int alignment)
Constructs a new default Viewport.
|
|
Viewport(Viewport viewport)
Copy constructor for viewports. |
|
| Method Summary | |
double |
getScaleX()
Returns the x scale factor. |
double |
getScaleY()
Returns the y scale factor. |
void |
getTransform(Transform2D xform)
Returns the transform that this View
defines. |
double |
getTranslationX()
Returns the translation in x direction. |
double |
getTranslationY()
Returns the translation in y direction. |
void |
set(double tx,
double ty,
double sx,
double sy)
Sets the values of this Viewport. |
void |
set(Viewport viewport)
Set the viewport to the values of the given viewport. |
void |
setRectangle(int x,
int y,
int width,
int height)
Sets the values of this Viewport. |
void |
setScaleX(double sx)
Sets the x scale factor. |
void |
setScaleY(double sy)
Sets the y scale factor. |
void |
setTranslationX(double tx)
Sets the translation in x direction. |
void |
setTranslationY(double ty)
Sets the translation in y direction. |
java.lang.String |
toString()
Returns a string representation of the this Viewport. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ALIGN_CENTER
public static final int ALIGN_LEFTTOP
| Constructor Detail |
public Viewport()
Viewport
with center alignment.
public Viewport(int alignment)
Viewport.
with the given alignment.
alignment - the alignment to use.
public Viewport(double tx,
double ty,
double sx,
double sy)
tx - translation x component.ty - translation y component.sx - scaling in x direction.sy - scaling in y direction.public Viewport(Viewport viewport)
viewport - the source Viewport instance to copy
values from.| Method Detail |
public final void set(Viewport viewport)
viewport - the Viewport holding the values to set.
public final void set(double tx,
double ty,
double sx,
double sy)
Viewport.
tx - translation x component.ty - translation y component.sx - scaling in x direction.sy - scaling in y direction.
public final void setRectangle(int x,
int y,
int width,
int height)
Viewport.
x - the left corner of the Viewport.y - the top corner of the Viewport.width - the width of the Viewport.height - the height of the Viewport.public final double getTranslationX()
public final void setTranslationX(double tx)
tx - the translation in x direction.public final double getTranslationY()
public final void setTranslationY(double ty)
public final double getScaleX()
public final void setScaleX(double sx)
sx - the x scale factor.public final double getScaleY()
public final void setScaleY(double sy)
sy - the y scale factor.public final void getTransform(Transform2D xform)
View
defines.
xform - the pointer to the element that should be
used for returning the value.public java.lang.String toString()
Viewport.
Viewport.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||