|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNGP.Graphics.Shape
cs015.SketchySupport.PolygonShape
Used for defining non-rectangular geometric shapes.
Field Summary |
Fields inherited from class NGP.Graphics.Shape |
_awtShape, _dpanel |
Fields inherited from interface NGP.Colorable |
DEFAULT_GRAY |
Constructor Summary | |
PolygonShape(DrawingPanel dp,
java.awt.Polygon p)
Create a PolygonShape in the specified drawing panel with the given polygon |
Method Summary | |
java.awt.Point |
getCenterLocation()
Get the location of this PolygonShape. |
java.awt.Dimension |
getDimension()
Get the dimensions of this PolygonShape. |
void |
setCenterLocation(java.awt.Point p)
Set the location of this PolygonShape. |
void |
setDimension(java.awt.Dimension d)
Set the dimensions of this PolygonShape. |
void |
show()
Make the shape appear |
Methods inherited from class NGP.Graphics.Shape |
actualPaint, contains, drag, getBounds, getColor, getDrawingPanel, getRotation, hide, intersects, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, react, setColor, setDrawingPanel, setRotation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PolygonShape(DrawingPanel dp, java.awt.Polygon p)
dp
- the DrawingPanel for this Shapep
- the Polygon that describes this ShapeMethod Detail |
public void show()
show
in interface Graphic
public java.awt.Dimension getDimension()
getDimension
in interface Sizeable
Dimension
of this PolygonShapepublic void setDimension(java.awt.Dimension d)
setDimension
in interface Sizeable
d
- the new Dimension
of this PolygonShapepublic java.awt.Point getCenterLocation()
getCenterLocation
in interface Graphic
Point
of this PolygonShapepublic void setCenterLocation(java.awt.Point p)
p
- the new Point
for this PolygonShape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |