All Packages Class Hierarchy This Package Previous Next Index
Class ejem02.Rectangle
java.lang.Object
|
+----ejem02.punto
|
+----ejem02.Rectangle
- public class Rectangle
- extends punto
Representa un rectangulo con base y altura
-
Rectangle(int, int, int, int)
- Construye un rectangulo
-
getHeight()
- Obtiene la altura.
-
getWidth()
- Obtiene la base.
-
setHeight(int)
- Cambia la altura.
-
setWidth(int)
- Cambia la base.
-
swapWidthHeight()
- Intercambia base y altura.
Rectangle
public Rectangle(int x,
int y,
int w,
int h)
- Construye un rectangulo
- Parameters:
- x - Posicion inicial x.
- y - Posicion inicial y.
- w - Base. Por defecto: 1.
- h - Altura. Por defecto: 1.
setWidth
public void setWidth(int w)
- Cambia la base.
setHeight
public void setHeight(int h)
- Cambia la altura.
getWidth
public int getWidth()
- Obtiene la base.
getHeight
public int getHeight()
- Obtiene la altura.
swapWidthHeight
public void swapWidthHeight()
- Intercambia base y altura.
All Packages Class Hierarchy This Package Previous Next Index