FileDocCategorySizeDatePackage
DisplayMode.javaAPI DocAndroid 1.5 API4361Wed May 06 22:41:54 BST 2009java.awt

DisplayMode

public final class DisplayMode extends Object
The DisplayMode class contains the bit depth, height, width and refresh rate of a GraphicsDevice.
since
Android 1.0

Fields Summary
private final int
width
The width.
private final int
height
The height.
private final int
bitDepth
The bit depth.
private final int
refreshRate
The refresh rate.
public static final int
BIT_DEPTH_MULTI
The Constant Value BIT_DEPTH_MULTI indicates the bit depth
public static final int
REFRESH_RATE_UNKNOWN
The 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.

param
width the width of the display.
param
height the height of the display.
param
bitDepth the bit depth of the display.
param
refreshRate the refresh rate of the display.


                                                                                             

             
        this.width = width;
        this.height = height;
        this.bitDepth = bitDepth;
        this.refreshRate = refreshRate;
    
Methods Summary
public booleanequals(java.lang.Object dm)
Compares if this DisplayMode is equal to the specified object or not.

param
dm the Object to be compared.
return
true, if the specified object is a DisplayMode with the same data values as this DisplayMode, false otherwise.

        if (dm instanceof DisplayMode) {
            return equals((DisplayMode)dm);
        }
        return false;
    
public booleanequals(java.awt.DisplayMode dm)
Compares if this DisplayMode is equal to the specified DisplayMode object or not.

param
dm the DisplayMode to be compared.
return
true, if all of the data values of this DisplayMode are equal to the values of the specified DisplayMode object, false otherwise.

        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 intgetBitDepth()
Gets the bit depth of the DisplayMode, returns BIT_DEPTH_MULTI value if multiple bit depths are supported in this display mode.

return
the bit depth of the DisplayMode.

        return bitDepth;
    
public intgetHeight()
Gets the height of the DisplayMode.

return
the height of the DisplayMode.

        return height;
    
public intgetRefreshRate()
Gets the refresh rate of the DisplayMode, returns REFRESH_RATE_UNKNOWN value if the information is not available.

return
the refresh rate of the DisplayMode.

        return refreshRate;
    
public intgetWidth()
Gets the width of the DisplayMode.

return
the width of the DisplayMode.

        return width;