Top Description Fields Constructors Methods
org.lwjgl.util

public final Class Dimension

extends Object
implements Serializable, ReadableDimension, WritableDimension
Class Inheritance
All Implemented Interfaces
org.lwjgl.util.WritableDimension, org.lwjgl.util.ReadableDimension, java.io.Serializable
Imports
java.io.Serializable

A 2D integer Dimension class, which looks remarkably like an AWT one.
Author
$Author$
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private int
height

The dimensions!

pack-priv static final long
private int
width

The dimensions!

Constructor Summary

AccessConstructor and Description
public
Dimension()

Constructor for Dimension.

public
Dimension(int w, int h)

Constructor for Dimension.

public
Dimension(ReadableDimension d)

Constructor for Dimension.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Checks whether two dimension objects have equal values.
public int

Returns:

Returns a int
getHeight
()

Implements org.lwjgl.util.ReadableDimension.getHeight.

Gets the height.
public void
getSize(WritableDimension
The destination
dest
)

Implements org.lwjgl.util.ReadableDimension.getSize.

Copy this ReadableDimension into a destination Dimension
public int

Returns:

Returns a int
getWidth
()

Implements org.lwjgl.util.ReadableDimension.getWidth.

Gets the width.
public int

Returns:

a hash code for this Dimension
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code for this Dimension.
public void
setHeight(int
The height to set
height
)

Implements org.lwjgl.util.WritableDimension.setHeight.

Sets the height.
public void
public void
public void
setWidth(int
The width to set
width
)

Implements org.lwjgl.util.WritableDimension.setWidth.

Sets the width.
public String

Returns:

a string representation of this Dimension object
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the values of this Dimension object's height and width fields.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

heightback to summary
private int height

The dimensions!

serialVersionUIDback to summary
pack-priv static final long serialVersionUID
widthback to summary
private int width

The dimensions!

Constructor Detail

Dimensionback to summary
public Dimension()

Constructor for Dimension.

Dimensionback to summary
public Dimension(int w, int h)

Constructor for Dimension.

Dimensionback to summary
public Dimension(ReadableDimension d)

Constructor for Dimension.

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Checks whether two dimension objects have equal values.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

getHeightback to summary
public int getHeight()

Implements org.lwjgl.util.ReadableDimension.getHeight.

Gets the height.

Returns:int

Returns a int

getSizeback to summary
public void getSize(WritableDimension dest)

Implements org.lwjgl.util.ReadableDimension.getSize.

Doc from org.lwjgl.util.ReadableDimension.getSize.

Copy this ReadableDimension into a destination Dimension

Parameters
dest:WritableDimension

The destination

getWidthback to summary
public int getWidth()

Implements org.lwjgl.util.ReadableDimension.getWidth.

Gets the width.

Returns:int

Returns a int

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code for this Dimension.

Returns:int

a hash code for this Dimension

setHeightback to summary
public void setHeight(int height)

Implements org.lwjgl.util.WritableDimension.setHeight.

Sets the height.

Parameters
height:int

The height to set

setSizeback to summary
public void setSize(int w, int h)

Implements org.lwjgl.util.WritableDimension.setSize.

setSizeback to summary
public void setSize(ReadableDimension d)

Implements org.lwjgl.util.WritableDimension.setSize.

setWidthback to summary
public void setWidth(int width)

Implements org.lwjgl.util.WritableDimension.setWidth.

Sets the width.

Parameters
width:int

The width to set

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of the values of this 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.

Returns:String

a string representation of this Dimension object