Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt

Class DisplayMode

java.lang.Object
|
+--java.awt.DisplayMode


public final class DisplayMode

extends Object

This encapsulates information about the display mode for a graphics device configuration. They are device dependent, and may not always be available.

Since:Author:See Also:

Field Summary

static intBIT_DEPTH_MULTI

Value of the bit depth if multiple depths are supported.
static intREFRESH_RATE_UNKNOWN

Value of an unknown refresh rate.

Constructor Summary

DisplayMode(int width, int height, int bitDepth, int refreshRate)

Create a mode with the given parameters.

Method Summary

booleanequals(java.awt.DisplayMode dm)

Test for equality.
intgetBitDepth()

Returns the bit depth, in bits per pixel.
intgetHeight()

Returns the height, in pixels.
intgetRefreshRate()

Returns the refresh rate, in hertz.
intgetWidth()

Returns the width, in pixels.
inthashCode()

Returns a hash code for the display mode.

Field Details

BIT_DEPTH_MULTI

public static final int BIT_DEPTH_MULTI

Value of the bit depth if multiple depths are supported.

See Also:


REFRESH_RATE_UNKNOWN

public static final int REFRESH_RATE_UNKNOWN

Value of an unknown refresh rate.

See Also:


Constructor Details

DisplayMode

public DisplayMode(int width, int height, int bitDepth, int refreshRate)

Create a mode with the given parameters.

Parameters:

See Also:


Method Details

equals

public boolean equals(java.awt.DisplayMode dm)

Test for equality. This returns true for two modes with identical parameters.

Parameters:

Returns:


getBitDepth

public int getBitDepth()

Returns the bit depth, in bits per pixel. This may be BIT_DEPTH_MULTI.

Returns:

See Also:


getHeight

public int getHeight()

Returns the height, in pixels.

Returns:


getRefreshRate

public int getRefreshRate()

Returns the refresh rate, in hertz. This may be REFRESH_RATE_UNKNOWN.

Returns:

See Also:


getWidth

public int getWidth()

Returns the width, in pixels.

Returns:


hashCode

public int hashCode()

Returns a hash code for the display mode.

Returns: