com.tensegrity.graphics
Class View

java.lang.Object
  extended bycom.tensegrity.graphics.View
All Implemented Interfaces:
java.io.Serializable

public class View
extends java.lang.Object
implements java.io.Serializable

This class defines a view on a given child component.

A View consists of the following attributes:

Version:
$Id: View.java,v 1.15 2004/06/29 09:23:26 sr Exp $
Author:
MichaelKegel, S.Rutz
See Also:
Serialized Form

Constructor Summary
View()
          Constructor for View.
View(View view)
          Copy constructor for views.
 
Method Summary
 double getRotateAtX()
          Returns the rotation pivot point's x coordinate.
 double getRotateAtY()
          Returns the rotation pivot point's x coordinate.
 double getRotation()
          Returns the angle.
 double getScaleX()
          Returns the scaling in x-direction.
 double getScaleY()
          Returns the scaling in y-direction.
 void getTransform(Transform2D xform)
          Returns the transform that this View defines.
 double getTranslateX()
          Returns the x component for translation.
 double getTranslateY()
          Returns the y component for translation.
 void set(View view)
          Copies the attributes of another view into this view, effectively making a copy of the view.
 void setRotateAtX(double tx)
          Sets the rotation pivot point's x coordinate.
 void setRotateAtY(double ty)
          Sets the rotation pivot point's y coordinate.
 void setRotation(double angle)
          Sets the angle for rotation.
 void setRotation(double angle, double tx, double ty)
          Sets the angle for rotation and the rotation pivot point.
 void setScaleX(double sx)
          Sets the scaling in x-direction.
 void setScaleY(double sy)
          Sets the scaling in y-direction.
 void setTranslateX(double tx)
          Sets the x component for translation.
 void setTranslateY(double ty)
          Sets the y component for translation.
 java.lang.String toString()
          Returns a string representation of the this View.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

View

public View()
Constructor for View. All values are initialized to default values.


View

public View(View view)
Copy constructor for views.

Parameters:
view - the source View instance to copy values from.
Method Detail

getTranslateX

public double getTranslateX()
Returns the x component for translation.

Returns:
The x component for translation.

set

public final void set(View view)
Copies the attributes of another view into this view, effectively making a copy of the view.

Parameters:
view - the other view.

setTranslateX

public final void setTranslateX(double tx)
Sets the x component for translation.

Parameters:
tx - The x component for translation.

getTranslateY

public final double getTranslateY()
Returns the y component for translation.

Returns:
The y component for translation.

setTranslateY

public void setTranslateY(double ty)
Sets the y component for translation.

Parameters:
ty - The y component for translation.

getScaleX

public double getScaleX()
Returns the scaling in x-direction.

Returns:
Returns the scaling in x-direction.

setScaleX

public void setScaleX(double sx)
Sets the scaling in x-direction.

Parameters:
sx - The scaling in x-direction.

getScaleY

public double getScaleY()
Returns the scaling in y-direction.

Returns:
Returns the scaling in y-direction.

setScaleY

public void setScaleY(double sy)
Sets the scaling in y-direction.

Parameters:
sy - The scaling in y-direction.

getRotation

public double getRotation()
Returns the angle.

Returns:
the angle.

setRotation

public void setRotation(double angle)
Sets the angle for rotation.

Parameters:
angle - The angle to set

setRotation

public void setRotation(double angle,
                        double tx,
                        double ty)
Sets the angle for rotation and the rotation pivot point.

Parameters:
angle - The angle to set
tx - the x component of the rotation pivot point.
ty - the y component of the rotation pivot point.

getRotateAtX

public double getRotateAtX()
Returns the rotation pivot point's x coordinate.

Returns:
the rotation pivot point's x coordinate.

setRotateAtX

public void setRotateAtX(double tx)
Sets the rotation pivot point's x coordinate.

Parameters:
tx - the rotation pivot point's x coordinate.

getRotateAtY

public double getRotateAtY()
Returns the rotation pivot point's x coordinate.

Returns:
the rotation pivot point's x coordinate.

setRotateAtY

public void setRotateAtY(double ty)
Sets the rotation pivot point's y coordinate.

Parameters:
ty - the rotation pivot point's y coordinate.

getTransform

public final void getTransform(Transform2D xform)
Returns the transform that this View defines.

Parameters:
xform - the pointer to the element that should be used for returning the value.

toString

public java.lang.String toString()
Returns a string representation of the this View.

Returns:
string representation of the this View.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.