|
||||||||||
| 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
edu.rit.draw.item.RectangularItem
public abstract class RectangularItem
Class RectangularItem is the abstract base class for a DrawingItem that has an outline, is filled with a paint, and occupies a rectangular area of a certain size at a certain location.
| 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 | |
|---|---|
RectangularItem()
Construct a new rectangular item. |
|
RectangularItem(RectangularItem theItem)
Construct a new rectangular item with the same outline, fill paint, location, and size as the given rectangular item. |
|
| Method Summary | |
|---|---|
RectangularItem |
add()
Add this rectangular item to the end of the default drawing's sequence of drawing items. |
RectangularItem |
add(Drawing theDrawing)
Add this rectangular item to the end of the given drawing's sequence of drawing items. |
RectangularItem |
addFirst()
Add this rectangular item to the beginning of the default drawing's sequence of drawing items. |
RectangularItem |
addFirst(Drawing theDrawing)
Add this rectangular item to the beginning of the given drawing's sequence of drawing items. |
RectangularItem |
c(double x,
double y)
Set the center point of this rectangular item's bounding box. |
RectangularItem |
c(Point thePoint)
Set the center point of this rectangular item's bounding box. |
RectangularItem |
e(double x,
double y)
Set the east middle point of this rectangular item's bounding box. |
RectangularItem |
e(Point thePoint)
Set the east middle point of this rectangular item's bounding box. |
RectangularItem |
fill(Fill theFill)
Set this rectangular item's fill paint. |
double |
height()
Returns the height of this rectangular item's bounding box. |
RectangularItem |
height(double theHeight)
Set the height of this rectangular item's bounding box. |
RectangularItem |
n(double x,
double y)
Set the north middle point of this rectangular item's bounding box. |
RectangularItem |
n(Point thePoint)
Set the north middle point of this rectangular item's bounding box. |
RectangularItem |
ne(double x,
double y)
Set the northeast corner point of this rectangular item's bounding box. |
RectangularItem |
ne(Point thePoint)
Set the northeast corner point of this rectangular item's bounding box. |
Point |
nw()
Returns the northwest corner point of this rectangular item's bounding box. |
RectangularItem |
nw(double x,
double y)
Set the northwest corner point of this rectangular item's bounding box. |
RectangularItem |
nw(Point thePoint)
Set the northwest corner point of this rectangular item's bounding box. |
RectangularItem |
outline(Outline theOutline)
Set this rectangular item's outline. |
void |
readExternal(ObjectInput in)
Read this rectangular item from the given object input stream. |
RectangularItem |
s(double x,
double y)
Set the south middle point of this rectangular item's bounding box. |
RectangularItem |
s(Point thePoint)
Set the south middle point of this rectangular item's bounding box. |
RectangularItem |
se(double x,
double y)
Set the southeast corner point of this rectangular item's bounding box. |
RectangularItem |
se(Point thePoint)
Set the southeast corner point of this rectangular item's bounding box. |
RectangularItem |
size(Size theSize)
Set the size of this rectangular item's bounding box. |
RectangularItem |
sw(double x,
double y)
Set the southwest corner point of this rectangular item's bounding box. |
RectangularItem |
sw(Point thePoint)
Set the southwest corner point of this rectangular item's bounding box. |
RectangularItem |
w(double x,
double y)
Set the west middle point of this rectangular item's bounding box. |
RectangularItem |
w(Point thePoint)
Set the west middle point of this rectangular item's bounding box. |
double |
width()
Returns the width of this rectangular item's bounding box. |
RectangularItem |
width(double theWidth)
Set the width of this rectangular item's bounding box. |
void |
writeExternal(ObjectOutput out)
Write this rectangular item to the given object output stream. |
| Methods inherited from class edu.rit.draw.item.ShapeItem |
|---|
draw |
| Methods inherited from class edu.rit.draw.item.FilledItem |
|---|
defaultFill, defaultFill, fill |
| Methods inherited from class edu.rit.draw.item.OutlinedItem |
|---|
defaultOutline, defaultOutline, outline |
| Methods inherited from class edu.rit.draw.item.DrawingItem |
|---|
boundingBox, c, e, n, ne, s, se, size, sw, w |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RectangularItem()
public RectangularItem(RectangularItem theItem)
theItem - Rectangular item.
NullPointerException - (unchecked exception) Thrown if theItem is null.| Method Detail |
|---|
public RectangularItem outline(Outline theOutline)
outline in class ShapeItemtheOutline - Outline, or Outline.NONE.
public RectangularItem fill(Fill theFill)
fill in class ShapeItemtheFill - Fill paint, or Fill.NONE.
public RectangularItem size(Size theSize)
theSize - Size.
IllegalArgumentException - (unchecked exception) Thrown if the width or the height of
theSize is less than 0.public double width()
width in class DrawingItempublic RectangularItem width(double theWidth)
theWidth - Width.
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than 0.public double height()
height in class DrawingItempublic RectangularItem height(double theHeight)
theHeight - Height.
IllegalArgumentException - (unchecked exception) Thrown if theHeight is less than 0.public Point nw()
nw in class DrawingItem
public RectangularItem nw(double x,
double y)
x - X coordinate of northwest corner point.y - Y coordinate of northwest corner point.
public RectangularItem nw(Point thePoint)
thePoint - Northwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem n(double x,
double y)
x - X coordinate of north middle point.y - Y coordinate of north middle point.
public RectangularItem n(Point thePoint)
thePoint - North middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem ne(double x,
double y)
x - X coordinate of northeast corner point.y - Y coordinate of northeast corner point.
public RectangularItem ne(Point thePoint)
thePoint - Northeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem w(double x,
double y)
x - X coordinate of west middle point.y - Y coordinate of west middle point.
public RectangularItem w(Point thePoint)
thePoint - West middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem c(double x,
double y)
x - X coordinate of center point.y - Y coordinate of center point.
public RectangularItem c(Point thePoint)
thePoint - Center point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem e(double x,
double y)
x - X coordinate of east middle point.y - Y coordinate of east middle point.
public RectangularItem e(Point thePoint)
thePoint - East middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem sw(double x,
double y)
x - X coordinate of southwest corner point.y - Y coordinate of southwest corner point.
public RectangularItem sw(Point thePoint)
thePoint - Southwest corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem s(double x,
double y)
x - X coordinate of south middle point.y - Y coordinate of south middle point.
public RectangularItem s(Point thePoint)
thePoint - South middle point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.
public RectangularItem se(double x,
double y)
x - X coordinate of southeast corner point.y - Y coordinate of southeast corner point.
public RectangularItem se(Point thePoint)
thePoint - Southeast corner point.
NullPointerException - (unchecked exception) Thrown if thePoint is null.public RectangularItem add()
add in class ShapeItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public RectangularItem add(Drawing theDrawing)
add in class ShapeItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.public RectangularItem addFirst()
addFirst in class ShapeItemNullPointerException - (unchecked exception) Thrown if there is no default drawing.Drawing.defaultDrawing()public RectangularItem addFirst(Drawing theDrawing)
addFirst in class ShapeItemtheDrawing - Drawing.
NullPointerException - (unchecked exception) Thrown if theDrawing is null.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class FilledItemout - 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 FilledItemin - Object input stream.
IOException - Thrown if an I/O error occurred.
ClassNotFoundException - Thrown if any class needed to deserialize this rectangular item
cannot be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||