com.jogamp.newt.util

## Class MonitorModeUtil

- java.lang.Object
- - com.jogamp.newt.util.MonitorModeUtil

-     public class MonitorModeUtil
      extends Object

  Convenient `MonitorMode` utility methods, filters etc.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MonitorModeUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<MonitorMode>` | `filterByBpp(List<MonitorMode> monitorModes, int bitsPerPixel)`
    `static List<MonitorMode>` | `filterByFlags(List<MonitorMode> monitorModes, int flags)`
    `static List<MonitorMode>` | `filterByRate(List<MonitorMode> monitorModes, float refreshRate)`
    `static List<MonitorMode>` | `filterByResolution(List<MonitorMode> monitorModes, DimensionImmutable resolution)`
    `static List<MonitorMode>` | `filterByRotation(List<MonitorMode> monitorModes, int rotation)`
    `static List<MonitorMode>` | `filterBySurfaceSize(List<MonitorMode> monitorModes, SurfaceSize surfaceSize)`
    `static MonitorMode` | `getByNativeSizeRateIdAndRotation(List<MonitorMode> monitorModes, MonitorMode.SizeAndRRate sizeAndRate, int modeId, int rotation)`
    `static List<MonitorMode>` | `getHighestAvailableBpp(List<MonitorMode> monitorModes)`
    `static List<MonitorMode>` | `getHighestAvailableRate(List<MonitorMode> monitorModes)`
    `static int` | `getIndex(List<MonitorMode> monitorModes, MonitorMode search)`
    `static int` | `getIndexByHashCode(List<MonitorMode> monitorModes, MonitorMode search)`
    `static void` | `sort(List<MonitorMode> monitorModes, boolean ascendingOrder)` Sort the given `MonitorMode` collection w/ `MonitorMode.compareTo(MonitorMode)` function.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MonitorModeUtil

          public MonitorModeUtil()

  - ### Method Detail

    - #### getIndex

          public static int getIndex(List<MonitorMode> monitorModes,
                     MonitorMode search)

    - #### getIndexByHashCode

          public static int getIndexByHashCode(List<MonitorMode> monitorModes,
                               MonitorMode search)

    - #### getByNativeSizeRateIdAndRotation

          public static MonitorMode getByNativeSizeRateIdAndRotation(List<MonitorMode> monitorModes,
                                                     MonitorMode.SizeAndRRate sizeAndRate,
                                                     int modeId,
                                                     int rotation)

    - #### sort

          public static void sort(List<MonitorMode> monitorModes,
                  boolean ascendingOrder)

      Sort the given `MonitorMode` collection w/ `MonitorMode.compareTo(MonitorMode)` function.

    - #### filterBySurfaceSize

          public static List<MonitorMode> filterBySurfaceSize(List<MonitorMode> monitorModes,
                                              SurfaceSize surfaceSize)

      Parameters:
        `monitorModes` -
        `surfaceSize` -
      Returns:
        modes with exact `SurfaceSize`. May return zero sized list for non.

    - #### filterByRotation

          public static List<MonitorMode> filterByRotation(List<MonitorMode> monitorModes,
                                           int rotation)

      Parameters:
        `monitorModes` -
        `rotation` -
      Returns:
        modes with exact rotation. May return zero sized list for non.

    - #### filterByBpp

          public static List<MonitorMode> filterByBpp(List<MonitorMode> monitorModes,
                                      int bitsPerPixel)

      Parameters:
        `monitorModes` -
        `bitsPerPixel` -
      Returns:
        modes with exact bpp. May return zero sized list for non.

    - #### filterByFlags

          public static List<MonitorMode> filterByFlags(List<MonitorMode> monitorModes,
                                        int flags)

      Parameters:
        `monitorModes` -
        `flags` -
      Returns:
        modes with exact flags. May return zero sized list for non.

    - #### filterByResolution

          public static List<MonitorMode> filterByResolution(List<MonitorMode> monitorModes,
                                             DimensionImmutable resolution)

      Parameters:
        `monitorModes` -
        `resolution` - in pixel units
      Returns:
        modes with nearest resolution, or matching ones. May return zero sized list for non.

    - #### filterByRate

          public static List<MonitorMode> filterByRate(List<MonitorMode> monitorModes,
                                       float refreshRate)

      Parameters:
        `monitorModes` -
        `refreshRate` -
      Returns:
        modes with nearest refreshRate, or matching ones. May return zero sized list for non.

    - #### getHighestAvailableBpp

          public static List<MonitorMode> getHighestAvailableBpp(List<MonitorMode> monitorModes)

      Parameters:
        `monitorModes` -
      Returns:
        modes with highest available bpp (color depth). May return zero sized list for non.

    - #### getHighestAvailableRate

          public static List<MonitorMode> getHighestAvailableRate(List<MonitorMode> monitorModes)

      Parameters:
        `monitorModes` -
      Returns:
        modes with highest available refresh rate. May return zero sized list for non.

Copyright 2010 JogAmp Community.