com.vistech.shapes
Class Shapes
java.lang.Object
|
+--com.vistech.shapes.Shapes
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- AnnoText, Arrow, Box, Curve, Ellipse, Line
- public abstract class Shapes
- extends java.lang.Object
- implements java.io.Serializable, java.lang.Cloneable
An abstract class that represents an interactively drawable shape.
A shape extends this class and typically implements one of the Drawable,
Fillabe, and Typable.
- Version:
- 1.0 20 Nov 1999
- Author:
- Larry Rodrigues
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
st
public java.awt.Point st
cur
public java.awt.Point cur
drawingColor
public java.awt.Color drawingColor
fillColor
public java.awt.Color fillColor
font
public java.awt.Font font
basicStroke
public java.awt.Stroke basicStroke
shapeCount
public int shapeCount
fillOn
public boolean fillOn
smallRectsOn
public boolean smallRectsOn
path
public java.awt.geom.GeneralPath path
Shapes
public Shapes()
setDrawingColor
public void setDrawingColor(java.awt.Color col)
getDrawingColor
public java.awt.Color getDrawingColor()
setFillColor
public void setFillColor(java.awt.Color col)
getFillColor
public java.awt.Color getFillColor()
setStartPosition
public void setStartPosition(java.awt.Point stp)
getStartPosition
public java.awt.Point getStartPosition()
setCurrentPosition
public void setCurrentPosition(java.awt.Point cp)
getCurrentPosition
public java.awt.Point getCurrentPosition()
setFont
public void setFont(java.awt.Font fnt)
getFont
public java.awt.Font getFont()
setStroke
public void setStroke(java.awt.Stroke stk)
getStroke
public java.awt.Stroke getStroke()
setShapeCount
public void setShapeCount(int count)
getShapeCount
public int getShapeCount()
setGeneralPath
public void setGeneralPath(java.awt.geom.GeneralPath pt)
getGeneralPath
public java.awt.geom.GeneralPath getGeneralPath()
setSmallRectsOn
public void setSmallRectsOn(boolean onOrOff)
getSmallRectsOn
public boolean getSmallRectsOn()
setFillOn
public void setFillOn(boolean onOrOff)
getFillOn
public boolean getFillOn()
contains
public boolean contains(int x,
int y)
copy
public java.lang.Object copy()
throws java.lang.CloneNotSupportedException
init
public abstract void init(int x,
int y)
contains
public abstract boolean contains(java.awt.Graphics2D g,
int x,
int y)
- Vhecks whether the specified point contained in the shape.
- Parameters:
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.
drawSmallRects
public abstract void drawSmallRects(java.awt.Graphics2D g)
- Draws small rectangle at the shape corners to indicate that
the shape is active. For example, a shape that is being moved is
surrounded by small rectagles at the shape corners.
small rectab
- Parameters:
g
- the graphics context on which the shape was drawn.