cs015.SketchySupport
Class FramedPolygonShape

java.lang.Object
  extended byNGP.Graphics.Shape
      extended bycs015.SketchySupport.PolygonShape
          extended bycs015.SketchySupport.FramedPolygonShape
All Implemented Interfaces:
Colorable, java.util.EventListener, Graphic, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, Reactor, Rotatable, Sizeable

public class FramedPolygonShape
extends PolygonShape

Used for defining non-rectangular geometric shapes that are drawn without being filled in.

Author:
Brent Shields

Field Summary
 
Fields inherited from class NGP.Graphics.Shape
_awtShape, _dpanel
 
Fields inherited from interface NGP.Colorable
DEFAULT_GRAY
 
Constructor Summary
FramedPolygonShape(DrawingPanel dp, java.awt.Polygon p)
          Create a FramedPolygonShape in the specified drawing panel with the given polygon as its outline and show the shape.
 
Method Summary
 void actualPaint(java.awt.Graphics2D g)
          Normal users don't use this method
 float getThickness()
          Get the thickness of the lines used for drawing the outline of this shape
 void setThickness(float thickness)
          Set the thickness of the lines used for drawing the outline of this shape
 
Methods inherited from class cs015.SketchySupport.PolygonShape
getCenterLocation, getDimension, setCenterLocation, setDimension, show
 
Methods inherited from class NGP.Graphics.Shape
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

FramedPolygonShape

public FramedPolygonShape(DrawingPanel dp,
                          java.awt.Polygon p)
Create a FramedPolygonShape in the specified drawing panel with the given polygon as its outline and show the shape.

Parameters:
dp - the DrawingPanel for this shape
p - the Polygon that describes this shape
Method Detail

getThickness

public float getThickness()
Get the thickness of the lines used for drawing the outline of this shape

Returns:
the value of the thickness as a floating point number

setThickness

public void setThickness(float thickness)
Set the thickness of the lines used for drawing the outline of this shape

Parameters:
thickness - the new thickness

actualPaint

public void actualPaint(java.awt.Graphics2D g)
Normal users don't use this method