This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt
class DisplayMode

java.lang.Object extended by java.awt.DisplayMode

Most common way to construct:

GraphicsDevice graphicsDevice = …;

DisplayMode originalDisplayMode = graphicsDevice.getDisplayMode();

Based on 42 examples


public final class DisplayMode
extends Object

The DisplayMode class encapsulates the bit depth, height, width, and refresh rate of a GraphicsDevice. The ability to change graphics device's display mode is platform- and configuration-dependent and may not always be available (see {@link GraphicsDevice#isDisplayChangeSupported}).

For more information on full-screen exclusive mode API, see the Full-Screen Exclusive Mode API Tutorial.


Field Summary
static int BIT_DEPTH_MULTI
          Value of the bit depth if multiple bit depths are supported in this display mode.
static int REFRESH_RATE_UNKNOWN
          Value of the refresh rate if not known.
 
Constructor Summary
DisplayMode(int width, int height, int bitDepth, int refreshRate)

          Create a new display mode object with the supplied parameters.
 
Method Summary
 boolean

          Returns whether the two display modes are equal.
 boolean

          Indicates whether some other object is "equal to" this one.
 int

          Returns the bit depth of the display, in bits per pixel.
 int

          Returns the height of the display, in pixels.
 int

          Returns the refresh rate of the display, in hertz.
 int

          Returns the width of the display, in pixels.
 int

          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIT_DEPTH_MULTI

public static final int BIT_DEPTH_MULTI
Value of the bit depth if multiple bit depths are supported in this display mode.

REFRESH_RATE_UNKNOWN

public static final int REFRESH_RATE_UNKNOWN
Value of the refresh rate if not known.
Constructor Detail

DisplayMode

public DisplayMode(int width,
                   int height,
                   int bitDepth,
                   int refreshRate)
Create a new display mode object with the supplied parameters.

Parameters:
width - the width of the display, in pixels
height - the height of the display, in pixels
bitDepth - the bit depth of the display, in bits per pixel. This can be BIT_DEPTH_MULTI if multiple bit depths are available.
refreshRate - the refresh rate of the display, in hertz. This can be REFRESH_RATE_UNKNOWN if the information is not available.
Method Detail

equals

public boolean equals(DisplayMode dm)
Returns whether the two display modes are equal.

Parameters:
dm
Returns:
whether the two display modes are equal

equals

public boolean equals(Object dm)
{@inheritDoc}

Overrides:
equals in class Object
Parameters:
dm

getBitDepth

public int getBitDepth()
Returns the bit depth of the display, in bits per pixel. This may be BIT_DEPTH_MULTI if multiple bit depths are supported in this display mode.

Returns:
the bit depth of the display, in bits per pixel.

getHeight

public int getHeight()
Returns the height of the display, in pixels.

Returns:
the height of the display, in pixels

getRefreshRate

public int getRefreshRate()
Returns the refresh rate of the display, in hertz. This may be REFRESH_RATE_UNKNOWN if the information is not available.

Returns:
the refresh rate of the display, in hertz.

getWidth

public int getWidth()
Returns the width of the display, in pixels.

Returns:
the width of the display, in pixels

hashCode

public int hashCode()
{@inheritDoc}

Overrides:
hashCode in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.