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


Constructor Index

 o Rectangle(int, int, int, int)
Construye un rectangulo

Method Index

 o getHeight()
Obtiene la altura.
 o getWidth()
Obtiene la base.
 o setHeight(int)
Cambia la altura.
 o setWidth(int)
Cambia la base.
 o swapWidthHeight()
Intercambia base y altura.

Constructors

 o 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.

Methods

 o setWidth
 public void setWidth(int w)
Cambia la base.

 o setHeight
 public void setHeight(int h)
Cambia la altura.

 o getWidth
 public int getWidth()
Obtiene la base.

 o getHeight
 public int getHeight()
Obtiene la altura.

 o swapWidthHeight
 public void swapWidthHeight()
Intercambia base y altura.


All Packages  Class Hierarchy  This Package  Previous  Next  Index