public class DefaultCapabilitiesChooser extends Object implements CapabilitiesChooser
The default implementation of the
CapabilitiesChooser interface, which provides consistent visual
selection behavior across platforms. The precise algorithm is
deliberately left loosely specified. Some properties are:
|Constructor and Description|
|Modifier and Type||Method and Description|
Chooses the index (0..available.length - 1) of the
public int chooseCapabilities(CapabilitiesImmutable desired, List<? extends CapabilitiesImmutable> available, int windowSystemRecommendedChoice)
Capabilitiesmost closely matching the desired one from the list of all supported. Some of the entries in the
availablearray may be null; the chooser must ignore these. The windowSystemRecommendedChoice parameter may be provided to the chooser by the underlying window system; if this index is valid, it is recommended, but not necessarily required, that the chooser select that entry.
Note: this method is called automatically by the
GraphicsConfigurationFactory.chooseGraphicsConfiguration(com.jogamp.nativewindow.CapabilitiesImmutable, com.jogamp.nativewindow.CapabilitiesImmutable, com.jogamp.nativewindow.CapabilitiesChooser, com.jogamp.nativewindow.AbstractGraphicsScreen, int) method
when an instance of this class is passed in to it.
It should generally not be
invoked by users directly, unless it is desired to delegate the
choice to some other CapabilitiesChooser object.
Copyright 2010 JogAmp Community.