|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--Forms.FormsAdministrator
This class provides tools to administrate the forms. The forms are in a vector and we can manipulate them.
Forms,
FormsError,
FormsAdministratorError,
MyCircle,
MyRectangle,
MyPolygon| Field Summary | |
protected Vector |
circleVector
The circle vector. |
protected Vector |
polygonVector
The polygon vector. |
protected Vector |
rectangleVector
The rectangle vector. |
| Constructor Summary | |
FormsAdministrator()
The constructor. |
|
| Method Summary | |
void |
addCircle(int xCenter,
int yCenter,
int radius)
We add a circle in the bag of circles. |
void |
addPolygon(int precision)
We add a polygon in the bag of polygons. |
void |
addRectangle(int xOrigin,
int yOrigin,
int width,
int height)
We add a rectangle in the bag of rectangles. |
void |
clearAll()
We remove all the elements from the different vector. |
int |
indexCircle()
This method return the size of the circle vector. |
int |
indexPolygon()
This method return the size of the polygon vector. |
int |
indexRectangle()
This method return the size of the rectangle vector. |
void |
removeCircle(int indexCircle)
We remove a circle in the bag of circles. |
void |
removePolygon(int indexPolygon)
We remove a polygon in the bag of polygons. |
void |
removeRectangle(int indexRectangle)
We remove a rectangle in the bag of rectangles. |
MyCircle |
returnCircle(int indexCircle)
This fonction return a circle in the bag of circles. |
int[] |
returnCircleCenter(int indexCircle)
This method return the center of a circle. |
int |
returnIndexCircle(int x,
int y)
This method return the circle (his index in the bag) if it contains the point specified in parameters. |
int |
returnIndexPolygon(int x,
int y)
This method return the polygon (his index in the bag) if it contains the point specified in parameters. |
int |
returnIndexRectangle(int x,
int y)
This method return the rectangle (his index in the bag) if it contains the point specified in parameters. |
MyPolygon |
returnPolygon(int indexPolygon)
This fonction return a polygon in the bag of polygons. |
int |
returnPolygonHeight(int indexPolygon)
This method return the height of a polygon. |
int |
returnPolygonWidth(int indexPolygon)
This method return the width of a polygon. |
int |
returnRadius(int indexCircle)
Return the radius of the circle at index indexCircle. |
MyRectangle |
returnRectangle(int indexRectangle)
This fonction return a rectangle in the bag of rectangles. |
int |
returnRectangleHeight(int indexRectangle)
This method return the height of a rectangle. |
int |
returnRectangleWidth(int indexRectangle)
This method return the width of a rectangle. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Vector circleVector
protected Vector rectangleVector
protected Vector polygonVector
| Constructor Detail |
public FormsAdministrator()
| Method Detail |
public void clearAll()
public void addCircle(int xCenter,
int yCenter,
int radius)
xCenter - The x center of the circle.yCenter - The y center of the circle.radius - The radius of the circle.
public void addRectangle(int xOrigin,
int yOrigin,
int width,
int height)
xOrigin - The x coordinate of the first corner of the rectangle.yOrigin - The y coordinate of the first corner of the rectangle.width - The width of the rectangle.height - The height of the rectangle.public void addPolygon(int precision)
precision - The final point of the segment will be taken has the final point if it is in a circle of radius precision, center first point.
public void removeCircle(int indexCircle)
throws FormsAdministratorError
indexCircle - The index of the circle we want to remove.FormsAdministratorError
public void removeRectangle(int indexRectangle)
throws FormsAdministratorError
indexRectangle - The index of the rectangle we want to remove.FormsAdministratorError
public void removePolygon(int indexPolygon)
throws FormsAdministratorError
indexPolygon - The index of the polygon we want to remove.FormsAdministratorError
public MyCircle returnCircle(int indexCircle)
throws FormsAdministratorError
indexCircle - The circle we want to return is at position indexCircle.FormsAdministratorError
public int returnIndexCircle(int x,
int y)
throws FormsAdministratorError
x - The x coordinate of the point to test if it is in the circle.y - The y coordinate of the point to test if it is in the circle.FormsAdministratorError
public int returnRadius(int indexCircle)
throws FormsAdministratorError
indexCircle - The index of the circle we want to have the radius.FormsAdministratorError
public int[] returnCircleCenter(int indexCircle)
throws FormsAdministratorError
indexCircle - The index of the circle we want to have the center.FormsAdministratorError
public MyRectangle returnRectangle(int indexRectangle)
throws FormsAdministratorError
indexRectangle - The rectangle we want to return is at position indexRectangle.FormsAdministratorError
public int returnIndexRectangle(int x,
int y)
throws FormsAdministratorError
x - The x coordinate of the point to test if it is in the rectangle.y - The y coordinate of the point to test if it is in the rectangle.FormsAdministratorError
public int returnRectangleWidth(int indexRectangle)
throws FormsAdministratorError
indexRectangle - The rectangle we want to return it's width is at position indexRectangle.FormsAdministratorError
public int returnRectangleHeight(int indexRectangle)
throws FormsAdministratorError
indexRectangle - The rectangle we want to return it's height is at position indexRectangle.FormsAdministratorError
public MyPolygon returnPolygon(int indexPolygon)
throws FormsAdministratorError
indexPolygon - The polygon we want to return is at position indexPolygon.FormsAdministratorError
public int returnIndexPolygon(int x,
int y)
throws FormsAdministratorError
x - The x coordinate of the point to test if it is in the polygon.y - The y coordinate of the point to test if it is in the polygon.FormsAdministratorError
public int returnPolygonWidth(int indexPolygon)
throws FormsAdministratorError
indexPolygon - The polygon we want to return it's width is at position indexPolygon.FormsAdministratorError
public int returnPolygonHeight(int indexPolygon)
throws FormsAdministratorError
indexPolygon - The polygon we want to return it's height is at position indexPolygon.FormsAdministratorErrorpublic int indexCircle()
public int indexRectangle()
public int indexPolygon()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||