|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vistech.shapes.Shapes | +--com.vistech.shapes.Ellipse
Represents an interactively drawable ellipse.
Field Summary | |
protected boolean |
filled
|
protected int |
ht
Bounding box parameters. |
protected int |
wid
Bounding box parameters. |
Fields inherited from class com.vistech.shapes.Shapes |
basicStroke, cur, drawingColor, fillColor, fillOn, font, path, shapeCount, smallRectsOn, st |
Fields inherited from interface com.vistech.shapes.Drawable |
ANNOTEXT, ARROW, BOX, CUBIC_CURVE, CURVE, DOUBLE_HEADED_ARROW, ELLIPSE, LINE, NONE, POLYGON |
Constructor Summary | |
Ellipse()
|
Method Summary | |
boolean |
contains(java.awt.Graphics2D g,
int x,
int y)
Vhecks whether the specified point contained in the shape. |
void |
draw(java.awt.Graphics2D g)
Draws the shape permanently, which happens when the mouse is released. |
void |
drawEllipse(java.awt.Graphics2D g)
|
void |
drawInteractive(java.awt.Graphics2D g)
Draws interactively on a Graphics context g. |
void |
drawPermanent(java.awt.Graphics2D g)
Draws on a Graphics context g. |
void |
drawSmallRects(java.awt.Graphics2D g)
Draws small rectangle at the shape corners to indicate that the shape is active. |
void |
erase(java.awt.Graphics2D g)
Erase the shape. |
void |
fill(java.awt.Graphics2D g,
java.awt.Color color)
Fills with a given color. |
void |
fillEllipse(java.awt.Graphics2D g)
|
void |
init(int x,
int y)
Initializes the Ellipse parameters. |
void |
move(java.awt.Graphics2D g,
int diffx,
int diffy)
Moves the shape by a specified displacement. |
Shapes |
saveCurShape(java.awt.Graphics2D g,
int shCnt)
Draws and returns itself. |
void |
setCurrentPosition(int x,
int y)
Sets the current point. |
Methods inherited from class com.vistech.shapes.Shapes |
contains, copy, getCurrentPosition, getDrawingColor, getFillColor, getFillOn, getFont, getGeneralPath, getShapeCount, getSmallRectsOn, getStartPosition, getStroke, setCurrentPosition, setDrawingColor, setFillColor, setFillOn, setFont, setGeneralPath, setShapeCount, setSmallRectsOn, setStartPosition, setStroke |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vistech.shapes.Drawable |
setCurrentPosition |
Field Detail |
protected int wid
protected int ht
protected boolean filled
Constructor Detail |
public Ellipse()
Method Detail |
public void init(int x, int y)
init
in interface Drawable
init
in class Shapes
x
- the x coordinate of the starting position.y
- the y coordinate of the starting poistion.public void setCurrentPosition(int x, int y)
x
- the x coordinate of the current position.y
- the y coordinate of the current poistion.public void drawInteractive(java.awt.Graphics2D g)
drawInteractive
in interface Drawable
g
- the graphics object on which the shape is to be drawn.public void drawPermanent(java.awt.Graphics2D g)
g
- the graphics object on which the shape is to be drawn.public boolean contains(java.awt.Graphics2D g, int x, int y)
Shapes
contains
in class Shapes
com.vistech.shapes.Shapes
g
- the graphics context on which the shape was drawn.x
- the coordinate of the point that is being checked for containment.y
- the coordinate of the point that is being checked for containment.public void drawSmallRects(java.awt.Graphics2D g)
Shapes
drawSmallRects
in class Shapes
com.vistech.shapes.Shapes
g
- the graphics context on which the shape was drawn.public void draw(java.awt.Graphics2D g)
Drawable
draw
in interface Drawable
com.vistech.shapes.Drawable
g
- the graphcs context on which the shape is drawn.public void move(java.awt.Graphics2D g, int diffx, int diffy)
Drawable
move
in interface Drawable
com.vistech.shapes.Drawable
x
- the displacement.y
- the displacement.public void erase(java.awt.Graphics2D g)
Drawable
erase
in interface Drawable
com.vistech.shapes.Drawable
g
- the graphcs context on which the shape was drawn.public void fill(java.awt.Graphics2D g, java.awt.Color color)
fill
in interface Fillable
g
- the graphics object on which the shape is to be drawnpublic Shapes saveCurShape(java.awt.Graphics2D g, int shCnt)
g
- the graphics object on which the shape is to be drawn.shCnt
- the shape count.public void drawEllipse(java.awt.Graphics2D g)
public void fillEllipse(java.awt.Graphics2D g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |