java.awt.GraphicsDevice.WindowTranslucency Java Examples
The following examples show how to use
java.awt.GraphicsDevice.WindowTranslucency.
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: TranslucentShapedFrameTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #2
Source File: TranslucentShapedFrameTest.java From hottub with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #3
Source File: TranslucentShapedFrameTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #4
Source File: TranslucentShapedFrameTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #5
Source File: TranslucentShapedFrameTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #6
Source File: TranslucentShapedFrameTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #7
Source File: TranslucentShapedFrameTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #8
Source File: TranslucentShapedFrameTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #9
Source File: TranslucentShapedFrameTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #10
Source File: TranslucentShapedFrameTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #11
Source File: TranslucentShapedFrameTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #12
Source File: TranslucentShapedFrameTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #13
Source File: TranslucentShapedFrameTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private void checkEffects() { GraphicsDevice gd = getGraphicsConfiguration().getDevice(); if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSPARENT)) { shapedCb.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { transparencySld.setEnabled(false); } if (!gd.isWindowTranslucencySupported(WindowTranslucency.PERPIXEL_TRANSLUCENT)) { nonOpaqueChb.setEnabled(false); } }
Example #14
Source File: ImageHelper.java From magarena with GNU General Public License v3.0 | 4 votes |
public static boolean isWindowTranslucencySupported() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT); }
Example #15
Source File: Ruler.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #16
Source File: Ruler.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #17
Source File: Ruler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #18
Source File: Ruler.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #19
Source File: Ruler.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #20
Source File: Ruler.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #21
Source File: Ruler.java From hottub with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #22
Source File: Ruler.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #23
Source File: Ruler.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #24
Source File: Ruler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #25
Source File: Ruler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #26
Source File: Ruler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }
Example #27
Source File: BrowserAddonDlg.java From xdm with GNU General Public License v2.0 | 4 votes |
private void initUI() { setUndecorated(true); try { if (GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { if (!Config.getInstance().isNoTransparency()) { setOpacity(0.85f); } } } catch (Exception e) { Logger.log(e); } setIconImage(ImageResource.getImage("icon.png")); setSize(getScaledInt(400), getScaledInt(300)); setLocationRelativeTo(null); setAlwaysOnTop(true); getContentPane().setLayout(null); getContentPane().setBackground(ColorResource.getDarkestBgColor()); JPanel titlePanel = new TitlePanel(null, this); titlePanel.setOpaque(false); titlePanel.setBounds(0, 0, getScaledInt(400), getScaledInt(50)); JButton closeBtn = new CustomButton(); closeBtn.setBounds(getScaledInt(365), getScaledInt(5), getScaledInt(30), getScaledInt(30)); closeBtn.setBackground(ColorResource.getDarkestBgColor()); closeBtn.setBorderPainted(false); closeBtn.setFocusPainted(false); closeBtn.setName("CLOSE"); closeBtn.setIcon(ImageResource.getIcon("title_close.png", 20, 20)); closeBtn.addActionListener(this); titlePanel.add(closeBtn); JLabel titleLbl = new JLabel(StringResource.get("BROWSER_MONITORING")); titleLbl.setFont(FontResource.getBiggerFont()); titleLbl.setForeground(ColorResource.getSelectionColor()); titleLbl.setBounds(getScaledInt(25), getScaledInt(15), getScaledInt(200), getScaledInt(30)); titlePanel.add(titleLbl); JLabel lineLbl = new JLabel(); lineLbl.setBackground(ColorResource.getSelectionColor()); lineLbl.setBounds(0, getScaledInt(55), getScaledInt(400), 1); lineLbl.setOpaque(true); add(lineLbl); add(titlePanel); int y = getScaledInt(65); int h = getScaledInt(50); JTextArea lblMonitoringTitle = new JTextArea(); lblMonitoringTitle.setOpaque(false); lblMonitoringTitle.setWrapStyleWord(true); lblMonitoringTitle.setLineWrap(true); lblMonitoringTitle.setEditable(false); lblMonitoringTitle.setForeground(Color.WHITE); lblMonitoringTitle.setText(this.desc); lblMonitoringTitle.setFont(FontResource.getNormalFont()); lblMonitoringTitle.setBounds(getScaledInt(15), y, getScaledInt(370) - getScaledInt(30), h); add(lblMonitoringTitle); y += h; JButton btViewMonitoring = createButton1("CTX_COPY_URL", getScaledInt(15), y); btViewMonitoring.setName("COPY"); add(btViewMonitoring); y += btViewMonitoring.getHeight(); }
Example #28
Source File: MediaConversionWnd.java From xdm with GNU General Public License v2.0 | 4 votes |
private void init() { setUndecorated(true); try { if (GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { if (!Config.getInstance().isNoTransparency()) setOpacity(0.85f); } } catch (Exception e) { Logger.log(e); } setIconImage(ImageResource.getImage("icon.png")); setSize(getScaledInt(350), getScaledInt(200)); setLocationRelativeTo(null); setResizable(false); getContentPane().setLayout(null); getContentPane().setBackground(ColorResource.getDarkestBgColor()); titlePanel = new TitlePanel(null, this); titlePanel.setOpaque(false); titlePanel.setBounds(0, 0, getScaledInt(350), getScaledInt(50)); closeBtn = new CustomButton(); closeBtn.setBounds(getScaledInt(320), getScaledInt(5), getScaledInt(24), getScaledInt(24)); closeBtn.setIcon(ImageResource.getIcon("title_close.png",20,20)); closeBtn.setBackground(ColorResource.getDarkestBgColor()); closeBtn.setBorderPainted(false); closeBtn.setFocusPainted(false); closeBtn.setName("CLOSE"); closeBtn.addActionListener(this); minBtn = new CustomButton(); minBtn.setBounds(getScaledInt(296), getScaledInt(5), getScaledInt(24), getScaledInt(24)); minBtn.setIcon(ImageResource.getIcon("title_min.png",20,20)); minBtn.setBackground(ColorResource.getDarkestBgColor()); minBtn.setBorderPainted(false); minBtn.setFocusPainted(false); minBtn.setName("MIN"); minBtn.addActionListener(this); titleLbl = new JLabel(StringResource.get("TITLE_CONVERT")); titleLbl.setFont(FontResource.getBiggerFont()); titleLbl.setForeground(ColorResource.getSelectionColor()); titleLbl.setBounds(getScaledInt(25), getScaledInt(15), getScaledInt(250), getScaledInt(30)); JLabel lineLbl = new JLabel(); lineLbl.setBackground(ColorResource.getSelectionColor()); lineLbl.setBounds(0, getScaledInt(55), getScaledInt(400), 2); lineLbl.setOpaque(true); prg = new JProgressBar(); prg.setBounds(getScaledInt(20), getScaledInt(85), getScaledInt(350) - getScaledInt(40), getScaledInt(5)); statLbl = new JLabel(); statLbl.setForeground(Color.WHITE); statLbl.setBounds(getScaledInt(20), getScaledInt(100), getScaledInt(350) - getScaledInt(40), getScaledInt(25)); titlePanel.add(titleLbl); titlePanel.add(minBtn); titlePanel.add(closeBtn); add(lineLbl); add(titlePanel); add(prg); add(statLbl); panel = new JPanel(null); panel.setBounds(getScaledInt(0), getScaledInt(150), getScaledInt(350), getScaledInt(50)); panel.setBackground(Color.DARK_GRAY); btnCN = new CustomButton(StringResource.get("MENU_PAUSE")); btnCN.setBounds(0, 1, getScaledInt(350), getScaledInt(50)); btnCN.setName("CLOSE"); applyStyle(btnCN); panel.add(btnCN); add(panel); }
Example #29
Source File: FFmpegExtractorWnd.java From xdm with GNU General Public License v2.0 | 4 votes |
private void init() { setUndecorated(true); try { if (GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .isWindowTranslucencySupported(WindowTranslucency.TRANSLUCENT)) { if (!Config.getInstance().isNoTransparency()) setOpacity(0.85f); } } catch (Exception e) { Logger.log(e); } setIconImage(ImageResource.getImage("icon.png")); setSize(getScaledInt(350), getScaledInt(200)); setLocationRelativeTo(null); setResizable(false); getContentPane().setLayout(null); getContentPane().setBackground(ColorResource.getDarkestBgColor()); titlePanel = new TitlePanel(null, this); titlePanel.setOpaque(false); titlePanel.setBounds(0, 0, getScaledInt(350), getScaledInt(50)); closeBtn = new CustomButton(); closeBtn.setBounds(getScaledInt(320), getScaledInt(5), getScaledInt(24), getScaledInt(24)); closeBtn.setIcon(ImageResource.getIcon("title_close.png",20,20)); closeBtn.setBackground(ColorResource.getDarkestBgColor()); closeBtn.setBorderPainted(false); closeBtn.setFocusPainted(false); closeBtn.setName("CLOSE"); closeBtn.addActionListener(this); minBtn = new CustomButton(); minBtn.setBounds(getScaledInt(296), getScaledInt(5), getScaledInt(24), getScaledInt(24)); minBtn.setIcon(ImageResource.getIcon("title_min.png",20,20)); minBtn.setBackground(ColorResource.getDarkestBgColor()); minBtn.setBorderPainted(false); minBtn.setFocusPainted(false); minBtn.setName("MIN"); minBtn.addActionListener(this); titleLbl = new JLabel(StringResource.get("TITLE_CONVERT")); titleLbl.setFont(FontResource.getBiggerFont()); titleLbl.setForeground(ColorResource.getSelectionColor()); titleLbl.setBounds(getScaledInt(25), getScaledInt(15), getScaledInt(250), getScaledInt(30)); JLabel lineLbl = new JLabel(); lineLbl.setBackground(ColorResource.getSelectionColor()); lineLbl.setBounds(0, getScaledInt(55), getScaledInt(400), 2); lineLbl.setOpaque(true); prg = new JProgressBar(); prg.setBounds(getScaledInt(20), getScaledInt(85), getScaledInt(350) - getScaledInt(40), getScaledInt(5)); statLbl = new JLabel(); statLbl.setForeground(Color.WHITE); statLbl.setBounds(getScaledInt(20), getScaledInt(100), getScaledInt(350) - getScaledInt(40), getScaledInt(25)); titlePanel.add(titleLbl); titlePanel.add(minBtn); titlePanel.add(closeBtn); add(lineLbl); add(titlePanel); add(prg); add(statLbl); panel = new JPanel(null); panel.setBounds(0, getScaledInt(150), getScaledInt(350), getScaledInt(50)); panel.setBackground(Color.DARK_GRAY); btnCN = new CustomButton(StringResource.get("MENU_PAUSE")); btnCN.setBounds(0, 1, getScaledInt(350), getScaledInt(50)); btnCN.setName("CLOSE"); applyStyle(btnCN); panel.add(btnCN); add(panel); }
Example #30
Source File: Ruler.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static boolean checkTranslucencyMode(WindowTranslucency arg) { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.isWindowTranslucencySupported(arg); }