| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
equals(DisplayMode dm) 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 |
getWidth() Returns the width of the display, in pixels. |
int |
hashCode() 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 |
---|
public static final int BIT_DEPTH_MULTI
public static final int REFRESH_RATE_UNKNOWN
Constructor Detail |
---|
public DisplayMode(int width, int height, int bitDepth, int refreshRate)
width
- the width of the display, in pixelsheight
- the height of the display, in pixelsbitDepth
- 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 |
---|
public boolean equals(DisplayMode dm)
dm
public boolean equals(Object dm)
equals
in class Object
dm
public int getBitDepth()
BIT_DEPTH_MULTI
if multiple bit depths are supported in
this display mode.
public int getHeight()
public int getRefreshRate()
REFRESH_RATE_UNKNOWN
if the information is not available.
public int getWidth()
public int hashCode()
hashCode
in class Object
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |