Check if the display mode is supported.

@param display The display mode to check.
@return Supported display, <code>null</code> else.
352576
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;
    }
421264
function(display) {
        OpenLayers.Layer.prototype.display.apply(this, arguments);
        this.pane.style.display = this.div.style.display;
    }
1168627
public boolean supportMethod(String msId) {
        Class<?> mapperClass = getMapperClass(msId);
        if (mapperClass != null && this.mapperClass.isAssignableFrom(mapperClass)) {
            String methodName = getMethodName(msId);
            return methodMap.get(methodName) != null;
        }
        return false;
    }
1239256
def eglGetDisplay(display=EGL_DEFAULT_DISPLAY):
    
    res = _lib.eglGetDisplay(display)
    if not res or res == EGL_NO_DISPLAY:
        raise RuntimeError('Could not create display')
    return res
315380
public function setDisplay($display)
    {
        if ($display === null) {
            $this->display = null;

            return $this;
        }

        if (!is_string($display)) {
            throw new InvalidArgumentException(sprintf(
                'Layout must be a string, received %s',
                (is_object($display) ? get_class($display) : gettype($display))
            ));
        }

        $supportedLayouts = $this->supportedDisplayLayouts();
        if (!in_array($display, $supportedLayouts)) {
            throw new OutOfBoundsException(sprintf(
                'Unsupported layout [%s]; must be one of %s',
                $display,
                implode(', ', $supportedLayouts)
            ));
        }

        $this->display = $display;

        return $this;
    }
1259207
public void setDisplayerSetting( DisplayerAttributeDef displayerAttributeDef, String value ) {
        settings.put(getSettingPath(displayerAttributeDef), value);
    }
317914
@Restricted(NoExternalUse.class)
    public static String getDisplayName(Task t) {
        try {
            return t.getDisplayName();
        } catch (RuntimeException | Error x) {
            LOGGER.log(Level.WARNING, "failed to find displayName of " + t, x);
            return t.toString();
        }
    }
1282683
function(display) {
        if (display != (this.div.style.display != "none")) {
            this.div.style.display = (display && this.calculateInRange()) ? "block" : "none";
        }
    }
93545
private static boolean validDeviceMode(String deviceMode) {
        Map<String, Boolean> validModes = new HashMap<>(3);
        validModes.put("r", true);
        validModes.put("w", true);
        validModes.put("m", true);

        if (isEmpty(deviceMode)) {
            return false;
        }

        for (char ch : deviceMode.toCharArray()) {
            final String mode = String.valueOf(ch);
            if (isNotTrue(validModes.get(mode))) {
                return false; // wrong mode
            }
            validModes.put(mode, false);
        }

        return true;
    }
881998
public void enableRendering(boolean flag) {
        if (flag) {
            egl.eglMakeCurrent(eglDisplay, eglSurface, eglSurface,
                                       eglContext);
        } else {
            egl.eglMakeCurrent(eglDisplay, 0, 0, eglContext);
        }
    }
612892
public boolean shouldDisplay(String operationId, PMSecurityUser user) {
        if (operationId == null) {
            return false;
        }
        //First we check permissions
        for (FieldOperationConfig config : getConfigs()) {
            if (config.includes(operationId)) {
                if (config.getPerm() != null && user != null && !user.hasPermission(config.getPerm())) {
                    return false;
                }
            }
        }
        if (getDisplay().equalsIgnoreCase("all")) {
            return true;
        }
        final String[] split = getDisplay().split("[ ]");
        for (String string : split) {
            if (string.equalsIgnoreCase(operationId)) {
                return true;
            }
        }
        return false;
    }
1003962
public String getDisplayType() {

        String value = getStringValue(null);
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
            return value.split(SEPARATOR)[0];
        }
        return null;
    }
997601
public static boolean isActivityFullscreen(Activity activity)
    {
        WindowManager.LayoutParams attrs = activity.getWindow().getAttributes();
        if ((attrs.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == WindowManager.LayoutParams.FLAG_FULLSCREEN)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
990814
@Override
    public boolean supports(final Credential credentials) {
        return credentials != null && WsFederationCredential.class.isAssignableFrom(credentials.getClass());
    }
100025
@Override
    public boolean isCharsetSupported(String charset) {
        if (null == charset) {
            return false;
        }
        Boolean supported = this.supportedEncodingsCache.get(charset);
        if (supported != null) {
            return supported.booleanValue();
        }
        try {
            new String(TEST_CHAR, charset);
            supported = Boolean.TRUE;
        } catch (UnsupportedEncodingException e) {
            supported = Boolean.FALSE;
        }
        this.supportedEncodingsCache.put(charset, supported);
        return supported.booleanValue();
    }
435359
public void setDisplayMode(final DisplayMode displayMode) {
		content.setDisplayMode(displayMode);
		link.setOpenNewWindow(DisplayMode.OPEN_NEW_WINDOW.equals(content.getDisplayMode()));
	}
957562
def set_display_mode(self, zoom,layout='continuous'):
        """"""
        
        if(zoom=='fullpage' or zoom=='fullwidth' or zoom=='real' or zoom=='default' or not isinstance(zoom,basestring)):
            self.zoom_mode=zoom
        else:
            self.error('Incorrect zoom display mode: '+zoom)
        if(layout=='single' or layout=='continuous' or layout=='two' or layout=='default'):
            self.layout_mode=layout
        else:
            self.error('Incorrect layout display mode: '+layout)