|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maryanovsky.gwtutils.client.Size
public final class Size
Defines two dimensional bounds, with integer coordinates.
| Constructor Summary | |
|---|---|
Size()
Creates a new 0x0 Size. |
|
Size(int width,
int height)
Creates a new Size with the specified width and height. |
|
Size(SizeView size)
Creates a new Size of the same size as the specified one. |
|
| Method Summary | |
|---|---|
boolean |
equals(int width,
int height)
Returns whether this Size object is of the specified width
and height. |
boolean |
equals(Object o)
Returns whether this Size object has the same width and
height as the specified one. |
boolean |
equals(SizeView size)
Returns whether this Size object has the same width and
height as the specified one. |
int |
getHeight()
Returns the height. |
int |
getWidth()
Returns the width. |
int |
hashCode()
Returns the hashcode of this object. |
boolean |
isEmpty()
Returns true if either the width or height are
0. |
static Size |
make(int width,
int height,
Size reusable)
Returns a Size with the specified size. |
Size |
multiplyBy(double coefficient)
Multiplies the dimensions of the Size by the specified
coefficient. |
Size |
set(int width,
int height)
Sets the size of this Size object. |
Size |
set(SizeView size)
Sets the size of this Size object from the values of the
specified one. |
Size |
setHeight(int height)
Sets the height. |
Size |
setWidth(int width)
Sets the width. |
String |
toString()
Returns a textual representation of this size. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Size(int width,
int height)
Size with the specified width and height.
public Size()
0x0 Size.
public Size(SizeView size)
Size of the same size as the specified one.
| Method Detail |
|---|
public static Size make(int width,
int height,
Size reusable)
Size with the specified size. If the given
Size object is not null, it is reused and
returned.
public Size set(int width,
int height)
Size object.
this.public Size set(SizeView size)
Size object from the values of the
specified one.
this.public Size multiplyBy(double coefficient)
Size by the specified
coefficient.
this.public int getWidth()
getWidth in interface SizeViewpublic Size setWidth(int width)
this.public int getHeight()
getHeight in interface SizeViewpublic Size setHeight(int height)
this.public boolean isEmpty()
true if either the width or height are
0.
isEmpty in interface SizeView
public boolean equals(int width,
int height)
Size object is of the specified width
and height.
public boolean equals(SizeView size)
Size object has the same width and
height as the specified one.
public boolean equals(Object o)
Size object has the same width and
height as the specified one.
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||