edu.rit.slides.items
Class ShapeItem
java.lang.Object
edu.rit.slides.items.SlideItem
edu.rit.slides.items.OutlinedItem
edu.rit.slides.items.FilledItem
edu.rit.slides.items.ShapeItem
- All Implemented Interfaces:
- Externalizable, Serializable
- Direct Known Subclasses:
- RectangleItem
public abstract class ShapeItem
- extends FilledItem
Class ShapeItem is the abstract base class for a
SlideItem
that consists of a single 2-D graphics
shape with an outline and an interior.
- See Also:
- Serialized Form
Method Summary |
void |
draw(Graphics2D g2d)
Draw this slide item in the given graphics context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShapeItem
public ShapeItem()
- Construct a new empty shape item.
ShapeItem
public ShapeItem(Shape theShape,
Outline theOutline,
Fill theFill)
- Construct a new shape item. The given outline is used. The given fill
paint is used.
- Parameters:
theShape
- Shape.theOutline
- Outline, or Outline.NONE.theFill
- Fill paint, or Fill.NONE.
- Throws:
NullPointerException
- (unchecked exception) Thrown if theShape is null.
IllegalArgumentException
- (unchecked exception) Thrown if both theOutline is
Outline.NONE (null) and theFill is
Fill.NONE (null).
draw
public void draw(Graphics2D g2d)
- Draw this slide item in the given graphics context. This method is
allowed to change the graphics context's paint, stroke, and transform,
and it doesn't have to change them back.
- Specified by:
draw
in class SlideItem
- Parameters:
g2d
- 2-D graphics context.
Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.