Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.lwjgl.util
Class Display

    java.lang.Object
      org.lwjgl.util.Display

    public final class Display

extends java.lang.Object

Display initialization utility, that can be used to find display modes and pick one for you based on your criteria.

Version:
  $Revision: 2301 $ $Id: Display.java 2301 2006-04-21 11:11:21Z cix_foo $
Author:
  $Author: cix_foo $

Constructor Summary
`Display()`

Method Summary
`static DisplayMode[]` | `getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP, int minFreq, int maxFreq)` Determine the available display modes that match the specified minimum and maximum criteria.
`static DisplayMode` | `setDisplayMode(DisplayMode[] dm, java.lang.String[] param)` Create the display by choosing from a list of display modes based on an order of preference.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Display

    public Display()

Method Detail

### getAvailableDisplayModes

    public static DisplayMode[] getAvailableDisplayModes(int minWidth,
                                                         int minHeight,
                                                         int maxWidth,
                                                         int maxHeight,
                                                         int minBPP,
                                                         int maxBPP,
                                                         int minFreq,
                                                         int maxFreq)
                                                  throws LWJGLException

  Determine the available display modes that match the specified minimum and maximum criteria. If any given criterium is specified as -1 then it is ignored.

  Parameters:
    `minWidth` - the minimum display resolution in pixels
    `minHeight` - the minimum display resolution in pixels
    `maxWidth` - the maximum display resolution in pixels
    `maxHeight` - the maximum display resolution in pixels
    `minBPP` - the minimum bit depth per pixel
    `maxBPP` - the maximum bit depth per pixel
    `minFreq` - the minimum display frequency in Hz
    `maxFreq` - the maximum display frequency in Hz
  Returns:
    an array of matching display modes
  Throws:
    `LWJGLException`

### setDisplayMode

    public static DisplayMode setDisplayMode(DisplayMode[] dm,
                                             java.lang.String[] param)
                                      throws java.lang.Exception

  Create the display by choosing from a list of display modes based on an order of preference. You must supply a list of allowable display modes, probably by calling getAvailableDisplayModes(), and an array with the order in which you would like them sorted in descending order. This method attempts to create the topmost display mode; if that fails, it will try the next one, and so on, until there are no modes left. If no mode is set at the end, an exception is thrown.

  Parameters:
    `dm` - a list of display modes to choose from
    `param` - the names of the DisplayMode fields in the order in which you would like them sorted.
  Returns:
    the chosen display mode
  Throws:
    `java.lang.NoSuchFieldException` - if one of the params is not a field in DisplayMode
    `java.lang.Exception` - if no display mode could be set
  See Also:
    `org.lwjgl.DisplayMode`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 lwjgl.org. All Rights Reserved.