| public final class java.awt DisplayMode
|
Java SE 6 |
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 GraphicsDevice#isDisplayChangeSupported).
For more information on full-screen exclusive mode API, see the Full-Screen Exclusive Mode API Tutorial.
| since | 1.4 |
| See also | java.awt.GraphicsDevice, isDisplayChangeSupported, getDisplayModes, setDisplayMode |
| Fields | |||
|---|---|---|---|
| final public static int | BIT_DEPTH_MULTI Details
Value of the bit depth if multiple bit depths are supported in this
display mode.
| ||
| final public static int | REFRESH_RATE_UNKNOWN Details
Value of the refresh rate if not known.
| ||
| Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public | DisplayMode(int width, int height, int bitDepth, int refreshRate) Details
Create a new display mode object with the supplied parameters.
| ||||||||||
| Methods | |||
|---|---|---|---|
| public boolean | equals(DisplayMode dm) Details
Returns whether the two display modes are equal.
| ||
| public boolean | equals(Object dm) Indicates whether some other object is "equal to" this one.
The
The equals method for class Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes. | ||
| public int | hashCode() Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
The general contract of
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.) | ||
| Properties | |||||
|---|---|---|---|---|---|
| public int | getBitDepth() Details
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.
| ||||
| public int | getHeight() Details
Returns the height of the display, in pixels.
| ||||
| public int | getRefreshRate() Details
Returns the refresh rate of the display, in hertz. This may be
REFRESH_RATE_UNKNOWN if the information is not available.
| ||||
| public int | getWidth() Details
Returns the width of the display, in pixels.
| ||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2013 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|