DisplayModepublic final class DisplayMode extends Object The DisplayMode class contains the bit depth, height, width and refresh rate
of a GraphicsDevice. |
Fields Summary |
---|
private final int | widthThe width. | private final int | heightThe height. | private final int | bitDepthThe bit depth. | private final int | refreshRateThe refresh rate. | public static final int | BIT_DEPTH_MULTIThe Constant Value BIT_DEPTH_MULTI indicates the bit depth | public static final int | REFRESH_RATE_UNKNOWNThe Constant REFRESH_RATE_UNKNOWN indicates the refresh rate. |
Constructors Summary |
---|
public DisplayMode(int width, int height, int bitDepth, int refreshRate)Creates a new DisplayMode object with the specified parameters.
this.width = width;
this.height = height;
this.bitDepth = bitDepth;
this.refreshRate = refreshRate;
|
Methods Summary |
---|
public boolean | equals(java.lang.Object dm)Compares if this DisplayMode is equal to the specified object or not.
if (dm instanceof DisplayMode) {
return equals((DisplayMode)dm);
}
return false;
| public boolean | equals(java.awt.DisplayMode dm)Compares if this DisplayMode is equal to the specified DisplayMode object
or not.
if (dm == null) {
return false;
}
if (dm.bitDepth != bitDepth) {
return false;
}
if (dm.refreshRate != refreshRate) {
return false;
}
if (dm.width != width) {
return false;
}
if (dm.height != height) {
return false;
}
return true;
| public int | getBitDepth()Gets the bit depth of the DisplayMode, returns BIT_DEPTH_MULTI value if
multiple bit depths are supported in this display mode.
return bitDepth;
| public int | getHeight()Gets the height of the DisplayMode.
return height;
| public int | getRefreshRate()Gets the refresh rate of the DisplayMode, returns REFRESH_RATE_UNKNOWN
value if the information is not available.
return refreshRate;
| public int | getWidth()Gets the width of the DisplayMode.
return width;
|
|