private DisplayMode isSupported ( DisplayMode display ) { final DisplayMode [ ] supported = dev . getDisplayModes ( ) ; for ( final DisplayMode current : supported ) { final boolean multiDepth = current . getBitDepth ( ) != DisplayMode . BIT_DEPTH_MULTI && display . equals ( current ) ; if ( multiDepth || current . getBitDepth ( ) == DisplayMode . BIT_DEPTH_MULTI && display . getWidth ( ) == current . getWidth ( ) && display . getHeight ( ) == current . getHeight ( ) ) { return current ; } } return null ; }
Check if the display mode is supported .