Class MyRectangle2D

java.lang.Object
  extended byMyRectangle2D
All Implemented Interfaces:
java.lang.Cloneable

public class MyRectangle2D
extends java.lang.Object
implements java.lang.Cloneable

Class MyRectangle2D Version 1


Constructor Summary
MyRectangle2D()
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones this MyRectangle2D.
 void escalar(java.awt.geom.Point2D mouseClicked, double factor)
          "Escala" this MyRectangle2D.
 java.awt.geom.Line2D getBottom()
          Returns the Line2D bottom.
 double getBottomLeftX()
          Returns the coordinate x of Point2D bottomLeft.
 double getBottomLeftY()
          Returns the coordinate y of Point2D bottomLeft.
 java.awt.geom.Point2D getBottomRight()
          Returns the Point2D bottomRight.
 double getBottomRightX()
          Returns the coordinate x of Point2D bottomRight.
 double getBottomRightY()
          Returns the coordinate y of Point2D bottomRight.
 java.awt.geom.Line2D getLeftSide()
          Returns the Line2D leftSide.
 java.awt.geom.Line2D getRightSide()
          Returns the Line2D rightSide.
 java.awt.geom.Line2D getTop()
          Returns the Line2D top.
 java.awt.geom.Point2D getTopLeft()
          Returns the Point2D topLeft.
 double getTopLeftX()
          Returns the coordinate x of Point2D topLeft.
 double getTopLeftY()
          Returns the coordinate y of Point2D topLeft.
 double getTopRightX()
          Returns the coordinate x of Point2D topRight.
 double getTopRightY()
          Returns the coordinate y of Point2D topRight.
 void move(Vector vMove)
          Moves this MyRectangle2D.
 void rotar(java.awt.geom.Point2D mousePressed, double ang)
          Rotates this MyRectangle2D.
 void set(java.awt.geom.Point2D xy1, java.awt.geom.Point2D xy2)
          Sets this MyRectangle2D.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyRectangle2D

public MyRectangle2D()
Constructor. Initializes a new myRectangle2D.

Method Detail

set

public void set(java.awt.geom.Point2D xy1,
                java.awt.geom.Point2D xy2)
Sets this MyRectangle2D.

Parameters:
xy1 - -
xy2 - -

escalar

public void escalar(java.awt.geom.Point2D mouseClicked,
                    double factor)
"Escala" this MyRectangle2D.

Parameters:
mouseClicked - -
factor - -

rotar

public void rotar(java.awt.geom.Point2D mousePressed,
                  double ang)
Rotates this MyRectangle2D.

Parameters:
mousePressed - -
ang - -

move

public void move(Vector vMove)
Moves this MyRectangle2D.

Parameters:
vMove - -

clone

public java.lang.Object clone()
Clones this MyRectangle2D.

Returns:
cloned.

getTop

public java.awt.geom.Line2D getTop()
Returns the Line2D top.

Returns:
top.

getBottom

public java.awt.geom.Line2D getBottom()
Returns the Line2D bottom.

Returns:
bottom.

getRightSide

public java.awt.geom.Line2D getRightSide()
Returns the Line2D rightSide.

Returns:
rightSide.

getLeftSide

public java.awt.geom.Line2D getLeftSide()
Returns the Line2D leftSide.

Returns:
leftSide.

getTopLeftX

public double getTopLeftX()
Returns the coordinate x of Point2D topLeft.

Returns:
topLeft.getX().

getTopLeftY

public double getTopLeftY()
Returns the coordinate y of Point2D topLeft.

Returns:
topLeft.getY().

getTopRightX

public double getTopRightX()
Returns the coordinate x of Point2D topRight.

Returns:
topRight.getX().

getTopRightY

public double getTopRightY()
Returns the coordinate y of Point2D topRight.

Returns:
topRight.getY().

getBottomLeftX

public double getBottomLeftX()
Returns the coordinate x of Point2D bottomLeft.

Returns:
bottomLeft.getX().

getBottomLeftY

public double getBottomLeftY()
Returns the coordinate y of Point2D bottomLeft.

Returns:
topRight.getY().

getBottomRightX

public double getBottomRightX()
Returns the coordinate x of Point2D bottomRight.

Returns:
bottomRight.getX().

getBottomRightY

public double getBottomRightY()
Returns the coordinate y of Point2D bottomRight.

Returns:
bottomRight.getY().

getTopLeft

public java.awt.geom.Point2D getTopLeft()
Returns the Point2D topLeft.

Returns:
topLeft.

getBottomRight

public java.awt.geom.Point2D getBottomRight()
Returns the Point2D bottomRight.

Returns:
bottomRight.