|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNGP.Graphics.Shape
NGP.Graphics.RectangularShape
Used for defining the all of the geometric shapes except for a Line. Added capabilities are the Dimension and Location.
Field Summary |
Fields inherited from class NGP.Graphics.Shape |
_awtShape, _dpanel |
Fields inherited from interface NGP.Colorable |
DEFAULT_GRAY |
Constructor Summary | |
RectangularShape(DrawingPanel dp,
Shape s)
Create a RectangularShape in the specified DrawingPanel |
Method Summary | |
Dimension |
getDimension()
Get the dimensions of this RectangularShape. |
Point |
getLocation()
Get the location of this RectangularShape |
void |
setCenterLocation(Point p)
Set the location of the RectangularShape so that its center point is at the specified location. |
void |
setDimension(Dimension d)
Set the dimensions of this RectangularShape. |
void |
setLocation(Point p)
Set the location of this RectangularShape |
void |
unwrap()
Set this shape so that it will does not necessarily display in its DrawingPanel |
void |
wrap()
Set this shape so that it will always display in its DrawingPanel |
Methods inherited from class NGP.Graphics.Shape |
actualPaint, contains, drag, getBounds, getCenterLocation, getColor, getDrawingPanel, getRotation, hide, intersects, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, react, setColor, setDrawingPanel, setRotation, show |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RectangularShape(DrawingPanel dp, Shape s)
dp
- the DrawingPanel for this ShapeMethod Detail |
public Dimension getDimension()
getDimension
in interface Sizeable
Dimension
of this RectangularShapesetDimension
public void setDimension(Dimension d)
setDimension
in interface Sizeable
d
- the new Dimension
of this RectangularShapegetDimension
public Point getLocation()
getLocation
in interface Locatable
Point
of this RectangularShapesetLocation
public void setLocation(Point p)
setLocation
in interface Locatable
p
- the new Point
for this RectangularShapegetLocation
public void setCenterLocation(Point p)
p
- the new Point
for the center of this
RectangularShapepublic void wrap()
public void unwrap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |