javax.swing.JWindow#getGraphicsConfiguration ( )源码实例Demo

下面列出了javax.swing.JWindow#getGraphicsConfiguration ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: CustomPopupFactory.java
private static void safeSetBackground(JWindow window, Color background) {
    GraphicsConfiguration gc = window.getGraphicsConfiguration();
    
    if (!gc.isTranslucencyCapable()) return; // PERPIXEL_TRANSLUCENT not supported
    if (gc.getDevice().getFullScreenWindow() == window) return; // fullscreen windows not supported
    
    window.setBackground(background);
}
 
源代码2 项目: netbeans   文件: ProfilerTableHovers.java
private static void safeSetBackground(JWindow window, Color background) {
    GraphicsConfiguration gc = window.getGraphicsConfiguration();
    
    if (!gc.isTranslucencyCapable()) return; // PERPIXEL_TRANSLUCENT not supported
    if (gc.getDevice().getFullScreenWindow() == window) return; // fullscreen windows not supported
    
    window.setBackground(background);
}
 
源代码3 项目: visualvm   文件: ProfilerTableHovers.java
private static void safeSetBackground(JWindow window, Color background) {
        GraphicsConfiguration gc = window.getGraphicsConfiguration();
        
//        if (!gc.isTranslucencyCapable()) return; // PERPIXEL_TRANSLUCENT not supported // doesn't work well with [email protected], handled in catch below
        if (gc.getDevice().getFullScreenWindow() == window) return; // fullscreen windows not supported
        
        // PERPIXEL_TRANSLUCENT not supported, safely ignore
        try { window.setBackground(background); }
        catch (UnsupportedOperationException e) {}
    }