public final class Dimension extends java.lang.Object implements java.io.Serializable, ReadableDimension, WritableDimension
Constructor and Description |
---|
Dimension()
Constructor for Dimension.
|
Dimension(int w,
int h)
Constructor for Dimension.
|
Dimension(ReadableDimension d)
Constructor for Dimension.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Checks whether two dimension objects have equal values.
|
int |
getHeight()
Gets the height.
|
void |
getSize(WritableDimension dest)
Copy this ReadableDimension into a destination Dimension
|
int |
getWidth()
Gets the width.
|
int |
hashCode()
Returns the hash code for this
Dimension . |
void |
setHeight(int height)
Sets the height.
|
void |
setSize(int w,
int h) |
void |
setSize(ReadableDimension d) |
void |
setWidth(int width)
Sets the width.
|
java.lang.String |
toString()
Returns a string representation of the values of this
Dimension object's height and
width fields. |
public Dimension()
public Dimension(int w, int h)
public Dimension(ReadableDimension d)
public void setSize(int w, int h)
setSize
in interface WritableDimension
public void setSize(ReadableDimension d)
setSize
in interface WritableDimension
public void getSize(WritableDimension dest)
ReadableDimension
getSize
in interface ReadableDimension
dest
- The destinationpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
Dimension
.hashCode
in class java.lang.Object
Dimension
public java.lang.String toString()
Dimension
object's height
and
width
fields. This method is intended to be used only
for debugging purposes, and the content and format of the returned
string may vary between implementations. The returned string may be
empty but may not be null
.toString
in class java.lang.Object
Dimension
objectpublic int getHeight()
getHeight
in interface ReadableDimension
public void setHeight(int height)
setHeight
in interface WritableDimension
height
- The height to setpublic int getWidth()
getWidth
in interface ReadableDimension
public void setWidth(int width)
setWidth
in interface WritableDimension
width
- The width to setCopyright © 2002-2009 lwjgl.org. All Rights Reserved.