|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavalib.worldimages.AImage
javalib.worldimages.ColoredImage
javalib.worldimages.RectangularImage
abstract class RectangularImage
An image that directly stores its own width and height.
Field Summary |
---|
Fields inherited from class javalib.worldimages.ColoredImage |
---|
defaultColor |
Fields inherited from interface javalib.worldimages.WorldImage |
---|
LOOKS_SAME |
Constructor Summary | |
---|---|
RectangularImage(int width,
int height,
Color color,
Mode mode)
The full constructor |
|
RectangularImage(int width,
int height,
IColor color,
Mode mode)
|
Method Summary | |
---|---|
boolean |
equals(Object other)
Is this the same as another WorldImage, as expression trees? Define this at every level that has instance variables. |
int |
getBottom()
Produce the bottom of the bounding box. |
int |
getRight()
Produce the bottom of the bounding box. |
int |
hashCode()
Get a hash code for the WorldImage. |
(package private) abstract RectangularImage |
replaceDimensions(int width,
int height)
Functional setter for width and height. |
(package private) RectangularImage |
replaceHeight(int height)
Functional setter for height. |
(package private) RectangularImage |
replaceWidth(int width)
Functional setter for width. |
Methods inherited from class javalib.worldimages.ColoredImage |
---|
getColor, getMode, replaceColor, replaceColor, replaceMode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javalib.worldimages.WorldImage |
---|
draw, toIndentedString |
Constructor Detail |
---|
RectangularImage(int width, int height, Color color, Mode mode)
width
- height
- color
- RectangularImage(int width, int height, IColor color, Mode mode)
Method Detail |
---|
public boolean equals(Object other)
WorldImage
equals
in interface WorldImage
equals
in class ColoredImage
other
- the object to compare with this
public int getBottom()
WorldImage
public int getRight()
WorldImage
public int hashCode()
WorldImage
hashCode
in interface WorldImage
hashCode
in class ColoredImage
abstract RectangularImage replaceDimensions(int width, int height)
width
- height
-
RectangularImage replaceHeight(int height)
height
-
RectangularImage replaceWidth(int width)
width
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |