SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class representing the size of a rectangle.
Author: BREConstructor Summary | |
IWSize(width, height)
Creates a new size object with the specified dimension. |
Method Summary | |
IWSize
|
clone()
Returns a new instance of this object. |
int
|
compareTo(other)
Compares values and returns an int which tells if the values compare less than, equal, or greater than. |
boolean
|
containsPoint(point)
Checks whether the specified point stands inside or outside this size. |
void
|
divide(scalar)
Divides size with a scalar |
boolean
|
equals(other)
Checks whether the specified size and this one are the same. |
int
|
getHeight()
Returns the height value. |
int
|
getWidth()
Returns the width value. |
void
|
multiplicate(scalar)
Multiplicates size with a scalar |
void
|
setHeight(height)
Sets the height value. |
void
|
setWidth(width)
Sets the width value. |
String
|
toString()
Returns a string representation of this size in the form width x height .
|
Constructor Detail |
IWSize(width, height)
int width
- the width in pixels
int height
- the height in pixels
Method Detail |
IWSize clone()
IWSize
int compareTo(other)
IWSize other
- another size
int
boolean containsPoint(point)
IWPoint point
- a point
boolean
returns true
if the point is part of the size, otherwise it returns
false
.
void divide(scalar)
Number scalar
void
boolean equals(other)
IWSize other
- another size object
boolean
int getHeight()
int
int getWidth()
int
void multiplicate(scalar)
Number scalar
void
void setHeight(height)
int height
- the new height
void
void setWidth(width)
int width
- the new width
void
String toString()
width x height
.
String