|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.draw.item.DrawingItem
edu.rit.draw.item.OutlinedItem
edu.rit.draw.item.FilledItem
edu.rit.draw.item.ShapeItem
public abstract class ShapeItem
Class ShapeItem is the abstract base class for a DrawingItem that consists of a single 2-D graphics shape with an outline and an interior.
| Field Summary |
|---|
| Fields inherited from class edu.rit.draw.item.FilledItem |
|---|
NORMAL_FILL |
| Fields inherited from class edu.rit.draw.item.OutlinedItem |
|---|
NORMAL_OUTLINE |
| Constructor Summary | |
|---|---|
ShapeItem()
Construct a new shape item. |
|
ShapeItem(ShapeItem theItem)
Construct a new shape item with the same outline and fill paint as the given shape item. |
|
| Method Summary | |
|---|---|
ShapeItem |
add()
Add this shape item to the end of the default drawing's sequence of drawing items. |
ShapeItem |
add(Drawing theDrawing)
Add this shape item to the end of the given drawing's sequence of drawing items. |
ShapeItem |
addFirst()
Add this shape item to the beginning of the default drawing's sequence of drawing items. |
ShapeItem |
addFirst(Drawing theDrawing)
Add this shape item to the beginning of the given drawing's sequence of drawing items. |
void |
draw(Graphics2D g2d)
Draw this drawing item in the given graphics context. |
ShapeItem |
fill(Fill theFill)
Set this shape item's fill paint. |
ShapeItem |
outline(Outline theOutline)
Set this shape item's outline. |
| Methods inherited from class edu.rit.draw.item.FilledItem |
|---|
defaultFill, defaultFill, fill, readExternal, writeExternal |
| Methods inherited from class edu.rit.draw.item.OutlinedItem |
|---|
defaultOutline, defaultOutline, outline |
| Methods inherited from class edu.rit.draw.item.DrawingItem |
|---|
boundingBox, c, e, height, n, ne, nw, s, se, size, sw, w, width |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShapeItem()
public ShapeItem(ShapeItem theItem)
theItem - Shape item.
NullPointerException - (unchecked exception) Thrown if theItem is null.| Method Detail |
|---|
public ShapeItem outline(Outline theOutline)
outline in class FilledItemtheOutline - Outline, or Outline.NONE.
public ShapeItem fill(Fill theFill)
fill in class FilledItemtheFill - Fill paint, or Fill.NONE.
public ShapeItem add()
add in class FilledItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public ShapeItem add(Drawing theDrawing)
add in class FilledItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public ShapeItem addFirst()
addFirst in class FilledItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public ShapeItem addFirst(Drawing theDrawing)
addFirst in class FilledItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public void draw(Graphics2D g2d)
draw in class DrawingItemg2d - 2-D graphics context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||