public final class VideoMode extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
int |
bitsPerPixel
The pixel depth, in bits per pixel, of the video mode.
|
int |
height
The height of the video mode, in pixels.
|
int |
width
The width of the video mode, in pixels.
|
Constructor and Description |
---|
VideoMode(int width,
int height)
Constructs a new video mode with a pixel depth of 32 bits per pixel.
|
VideoMode(int width,
int height,
int bitsPerPixel)
Constructs a new video mode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static VideoMode |
getDesktopMode()
Retrieves the desktop's current video mode / screen resolution.
|
static VideoMode[] |
getFullscreenModes()
Retrieves the list of supported fullscreen video modes.
|
int |
hashCode() |
boolean |
isValid()
Checks whether this display mode is a valid fullscreen mode, ie whether
the current monitor supports it for fullscreen.
|
String |
toString() |
public final int width
public final int height
public final int bitsPerPixel
public VideoMode(int width, int height, int bitsPerPixel)
width
- the width, in pixels.height
- the height, in pixels.bitsPerPixel
- the pixel depth, in bits per pixel.public VideoMode(int width, int height)
width
- the width, in pixels.height
- the height, in pixels.public static VideoMode getDesktopMode()
public static VideoMode[] getFullscreenModes()
public boolean isValid()
true
if this video mode is a valid fullscreen mode,
false
otherwise.