Java Code Examples for java.awt.DisplayMode#BIT_DEPTH_MULTI

The following examples show how to use java.awt.DisplayMode#BIT_DEPTH_MULTI . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: X11GraphicsDevice.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 2
Source File: X11GraphicsDevice.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 3
Source File: X11GraphicsDevice.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 4
Source File: X11GraphicsDevice.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 5
Source File: AltTabCrashTest.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 6
Source File: X11GraphicsDevice.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 7
Source File: AltTabCrashTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 8
Source File: X11GraphicsDevice.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 9
Source File: AltTabCrashTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 10
Source File: NonExistentDisplayModeTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static DisplayMode deriveDepth(DisplayMode dm) {
    int depth;
    if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI) {
        depth = 77;
    } else {
        depth = DisplayMode.BIT_DEPTH_MULTI;
    }
    return new DisplayMode(dm.getWidth(), dm.getHeight(),
                           depth, dm.getRefreshRate());
}
 
Example 11
Source File: X11GraphicsDevice.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 12
Source File: AltTabCrashTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 13
Source File: X11GraphicsDevice.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 14
Source File: AltTabCrashTest.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 15
Source File: X11GraphicsDevice.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 16
Source File: AltTabCrashTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 17
Source File: X11GraphicsDevice.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 18
Source File: AltTabCrashTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}
 
Example 19
Source File: X11GraphicsDevice.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode getDefaultDisplayMode() {
    GraphicsConfiguration gc = getDefaultConfiguration();
    Rectangle r = gc.getBounds();
    return new DisplayMode(r.width, r.height,
                           DisplayMode.BIT_DEPTH_MULTI,
                           DisplayMode.REFRESH_RATE_UNKNOWN);
}
 
Example 20
Source File: AltTabCrashTest.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private DisplayMode findDisplayMode() {
    GraphicsDevice gd = getGraphicsConfiguration().getDevice();
    DisplayMode dms[] = gd.getDisplayModes();
    DisplayMode currentDM = gd.getDisplayMode();
    for (DisplayMode dm : dms) {
        if (dm.getBitDepth() > 8 &&
            dm.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI &&
            dm.getBitDepth() != currentDM.getBitDepth() &&
            dm.getWidth() == currentDM.getWidth() &&
            dm.getHeight() == currentDM.getHeight())
        {
            // found a mode which has the same dimensions but different
            // depth
            return dm;
        }
        if (dm.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI &&
            (dm.getWidth() != currentDM.getWidth() ||
             dm.getHeight() != currentDM.getHeight()))
        {
            // found a mode which has the same depth but different
            // dimensions
            return dm;
        }
    }

    return null;
}