|
|||||||||
| 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.Curve
Represents an interactively drawable curve.
| Field Summary | |
protected java.util.Vector |
allPoints
|
protected boolean |
filled
|
protected int |
pointsCount
|
protected int[] |
prevxp
|
protected int[] |
prevyp
|
protected int[] |
xp
xp the x coordinates of the Box corners |
protected int[] |
yp
yp the y coordinates of the Box corners |
| 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 | |
Curve()
|
|
| 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 again |
void |
drawCurve(java.awt.Graphics2D g,
int[] x,
int[] y)
|
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. |
protected void |
drawSegment(java.awt.Graphics2D g)
Draws a segment of the curve. |
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 |
fillPolygon(java.awt.Graphics2D g,
int[] x,
int[] y)
|
void |
init(int x,
int y)
Initializes the Box parameters. |
void |
move(java.awt.Graphics2D g,
int diffx,
int diffy)
Moves the shape by a specified displacement. |
void |
setCurrentPosition(java.awt.Point cp)
Sets the current position. |
| Methods inherited from class com.vistech.shapes.Shapes |
contains, copy, getCurrentPosition, getDrawingColor, getFillColor, getFillOn, getFont, getGeneralPath, getShapeCount, getSmallRectsOn, getStartPosition, getStroke, 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 |
| Field Detail |
protected int[] xp
protected int[] prevxp
protected int[] yp
protected int[] prevyp
protected boolean filled
protected int pointsCount
protected java.util.Vector allPoints
| Constructor Detail |
public Curve()
| Method Detail |
public void init(int x,
int y)
init in interface Drawableinit in class Shapesx - the x coordinate of the starting position.y - the y coordinate of the starting poistion.public void setCurrentPosition(java.awt.Point cp)
setCurrentPosition in interface DrawablesetCurrentPosition in class Shapescp - Coordinate of the current position.public void drawInteractive(java.awt.Graphics2D g)
drawInteractive in interface Drawableg - 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.protected void drawSegment(java.awt.Graphics2D g)
g - the graphics object over which the shape is drawn.public void draw(java.awt.Graphics2D g)
draw in interface Drawableg - the graphics object over which the shape is drawn.
public void move(java.awt.Graphics2D g,
int diffx,
int diffy)
Drawablemove in interface Drawablecom.vistech.shapes.Drawablex - the displacement.y - the displacement.public void erase(java.awt.Graphics2D g)
Drawableerase in interface Drawablecom.vistech.shapes.Drawableg - the graphcs context on which the shape was drawn.
public void fill(java.awt.Graphics2D g,
java.awt.Color color)
g - the graphics object on which the shape is to be drawn.color - the filling color.
public boolean contains(java.awt.Graphics2D g,
int x,
int y)
Shapescontains in class Shapescom.vistech.shapes.Shapesg - 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)
ShapesdrawSmallRects in class Shapescom.vistech.shapes.Shapesg - the graphics context on which the shape was drawn.
public void drawCurve(java.awt.Graphics2D g,
int[] x,
int[] y)
public void fillPolygon(java.awt.Graphics2D g,
int[] x,
int[] y)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||