|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--ITrapezoid
This class implements ITrapez and manage creating and managing Trapezim
| Field Summary | |
(package private) IPoint |
ne
North-East vertex |
(package private) IPoint |
nw
North-West vertex |
(package private) IPoint |
se
South-East vertex |
(package private) IPoint |
sw
South-West vertex |
| Fields inherited from interface ITrapez |
NE, NONE, NW, SE, SW |
| Constructor Summary | |
ITrapezoid(int nwX,
int nwY,
int swX,
int swY,
int seX,
int seY,
int neX,
int neY)
Construct a new ITrapezoid with the specified x,y |
|
ITrapezoid(IPoint nw,
IPoint sw,
int northernEdgeWidth,
int southernEdgeWidth)
Construct a new ITrapezoid with the given vertices and widths |
|
ITrapezoid(IPoint nw,
IPoint sw,
IPoint se,
IPoint ne)
Construct a new ITrapezoid with the specified vertices |
|
| Method Summary | |
IPoint |
getVertex(int position)
Return the vertex that is associated with the given position. |
void |
move(int deltaX,
int deltaY)
Construct a new circle with the specified center, radius and color |
void |
reshape(int position,
int deltaX,
int deltaY)
Reshape this ITrapezoid according to the given parameters. |
int |
whichVertex(IPoint v)
If the given IPoint vertex is one of this ITrapezoid's vertices then return its position within this ITrapezoid, otherwise return NONE. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
IPoint nw
IPoint sw
IPoint se
IPoint ne
| Constructor Detail |
public ITrapezoid(int nwX,
int nwY,
int swX,
int swY,
int seX,
int seY,
int neX,
int neY)
nwX - the X position of the North-West vertexnwY - the Y position of the North-West vertexswX - the X position of the South-West vertexswY - the Y position of the South-West vertexseX - the X position of the South-East vertexseY - the Y position of the South-East vertexneX - the X position of the North-East vertexneY - the Y position of the North-East vertex
public ITrapezoid(IPoint nw,
IPoint sw,
IPoint se,
IPoint ne)
nw - an IPoint (x,y) of the North-West vertexsw - an IPoint (x,y) of the South-West vertexse - an IPoint (x,y) of the South-East vertexne - an IPoint (x,y) of the North-East vertex
public ITrapezoid(IPoint nw,
IPoint sw,
int northernEdgeWidth,
int southernEdgeWidth)
nw - an IPoint (x,y) of the North-West vertexsw - an IPoint (x,y) of the South-West vertexnorthernEdgeWidth - the width of the northern edgesouthernEdgeWidth - the width of the southern edge| Method Detail |
public void move(int deltaX,
int deltaY)
move in interface ITrapezcenter - a 2D point representing the centerradius - a float representing the radiusshapeColor - the color of the circlepublic int whichVertex(IPoint v)
whichVertex in interface ITrapezv - an IPoint (x,y value) representing a positionpublic IPoint getVertex(int position)
getVertex in interface ITrapezposition - 1 - 4, indicating one of the vertices
public void reshape(int position,
int deltaX,
int deltaY)
reshape in interface ITrapezposition - 1 - 4, indicating one of the verticesdeltaX - the delta on the X asixdeltaY - the delta on the Y asix
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||