|
||||||||||
| 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
public abstract class FilledItem
Class FilledItem is the abstract base class for a DrawingItem that has an outline and is filled with a paint. Specify Fill.NONE for the fill paint to omit filling a drawing item's interior.
The static defaultFill() method is provided to set the default fill paint. If the fill paint is not specified, the current default fill paint is used.
| Field Summary | |
|---|---|
static Fill |
NORMAL_FILL
The normal fill paint: White. |
| Fields inherited from class edu.rit.draw.item.OutlinedItem |
|---|
NORMAL_OUTLINE |
| Constructor Summary | |
|---|---|
FilledItem()
Construct a new filled item with the default fill paint. |
|
FilledItem(FilledItem theItem)
Construct a new filled item with the same outline and fill paint as the given filled item. |
|
| Method Summary | |
|---|---|
FilledItem |
add()
Add this filled item to the end of the default drawing's sequence of drawing items. |
FilledItem |
add(Drawing theDrawing)
Add this filled item to the end of the given drawing's sequence of drawing items. |
FilledItem |
addFirst()
Add this filled item to the beginning of the default drawing's sequence of drawing items. |
FilledItem |
addFirst(Drawing theDrawing)
Add this filled item to the beginning of the given drawing's sequence of drawing items. |
static Fill |
defaultFill()
Returns the default fill paint. |
static void |
defaultFill(Fill theFill)
Set the default fill paint. |
Fill |
fill()
Returns this filled item's fill paint. |
FilledItem |
fill(Fill theFill)
Set this filled item's fill paint. |
FilledItem |
outline(Outline theOutline)
Set this filled item's outline. |
void |
readExternal(ObjectInput in)
Read this filled item from the given object input stream. |
void |
writeExternal(ObjectOutput out)
Write this filled item to the given object output stream. |
| Methods inherited from class edu.rit.draw.item.OutlinedItem |
|---|
defaultOutline, defaultOutline, outline |
| Methods inherited from class edu.rit.draw.item.DrawingItem |
|---|
boundingBox, c, draw, 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 |
| Field Detail |
|---|
public static final Fill NORMAL_FILL
| Constructor Detail |
|---|
public FilledItem()
public FilledItem(FilledItem theItem)
theItem - Filled item.
NullPointerException - (unchecked exception) Thrown if theItem is null.| Method Detail |
|---|
public static Fill defaultFill()
public static void defaultFill(Fill theFill)
theFill - Default fill paint, or Fill.NONE.public FilledItem outline(Outline theOutline)
outline in class OutlinedItemtheOutline - Outline, or Outline.NONE.
public Fill fill()
public FilledItem fill(Fill theFill)
theFill - Fill paint, or Fill.NONE.
public FilledItem add()
add in class OutlinedItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public FilledItem add(Drawing theDrawing)
add in class OutlinedItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public FilledItem addFirst()
addFirst in class OutlinedItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public FilledItem addFirst(Drawing theDrawing)
addFirst in class OutlinedItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class OutlinedItemout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class OutlinedItemin - Object input stream.
IOException - Thrown if an I/O error occurred.
ClassNotFoundException - Thrown if any class needed to deserialize this filled item cannot be
found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||