org.jrabbit.base.managers.window
Class WindowUtils

java.lang.Object
  extended by org.jrabbit.base.managers.window.WindowUtils

public class WindowUtils
extends java.lang.Object

WindowUtils provides some convenience methods for managing the Display.

Author:
Chris Molini

Nested Class Summary
private static class WindowUtils.DisplayModeRank
          An internal class used to simplify finding the closest DisplayMode to an unobtainable target resolution.
 
Constructor Summary
WindowUtils()
           
 
Method Summary
static java.util.ArrayList<org.lwjgl.opengl.DisplayMode> availableFullscreenModes()
          Learns what fullscreen DisplayModes are available.
static org.lwjgl.opengl.DisplayMode closestFullscreenMode(int width, int height)
          Obtains the fullscreen DisplayMode closest to the indicated values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowUtils

public WindowUtils()
Method Detail

availableFullscreenModes

public static java.util.ArrayList<org.lwjgl.opengl.DisplayMode> availableFullscreenModes()
Learns what fullscreen DisplayModes are available.

Returns:
A list of all available fullscreen modes that match the desktop's BPP.

closestFullscreenMode

public static org.lwjgl.opengl.DisplayMode closestFullscreenMode(int width,
                                                                 int height)
Obtains the fullscreen DisplayMode closest to the indicated values.

Parameters:
width - The desired width of the fullscreen mode.
height - The desired height of the fullscreen mode.
Returns:
The closest fullscreen mode possible on the current computer.