javax.swing.plaf.metal.DefaultMetalTheme Java Examples
The following examples show how to use
javax.swing.plaf.metal.DefaultMetalTheme.
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: bug6742358.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #2
Source File: bug6742358.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #3
Source File: bug6742358.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #4
Source File: bug6742358.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #5
Source File: bug6742358.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #6
Source File: bug6742358.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #7
Source File: bug6742358.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #8
Source File: bug6742358.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #9
Source File: SwingSet2.java From Darcula with Apache License 2.0 | 5 votes |
/** * Creates a JRadioButtonMenuItem for the Themes menu */ public JMenuItem createThemesMenuItem(JMenu menu, String label, String mnemonic, String accessibleDescription, DefaultMetalTheme theme) { JRadioButtonMenuItem mi = (JRadioButtonMenuItem) menu.add(new JRadioButtonMenuItem(getString(label))); themesMenuGroup.add(mi); mi.setMnemonic(getMnemonic(mnemonic)); mi.getAccessibleContext().setAccessibleDescription(getString(accessibleDescription)); mi.addActionListener(new ChangeThemeAction(this, theme)); return mi; }
Example #10
Source File: bug6742358.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #11
Source File: bug6742358.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #12
Source File: bug6742358.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #13
Source File: bug6742358.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #14
Source File: bug6742358.java From hottub with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JFrame frame = new JFrame(); frame.setContentPane(new TestPanel()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }
Example #15
Source File: bug4252173.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #16
Source File: MetalworksFrame.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected void buildMenus() { menuBar = new JMenuBar(); menuBar.setOpaque(true); JMenu file = buildFileMenu(); JMenu edit = buildEditMenu(); JMenu views = buildViewsMenu(); JMenu speed = buildSpeedMenu(); JMenu help = buildHelpMenu(); // load a theme from a text file MetalTheme myTheme = null; try { InputStream istream = getClass().getResourceAsStream( "/resources/MyTheme.theme"); myTheme = new PropertiesMetalTheme(istream); } catch (NullPointerException e) { System.out.println(e); } // build an array of themes MetalTheme[] themes = { new OceanTheme(), new DefaultMetalTheme(), new GreenMetalTheme(), new AquaMetalTheme(), new KhakiMetalTheme(), new DemoMetalTheme(), new ContrastMetalTheme(), new BigContrastMetalTheme(), myTheme }; // put the themes in a menu JMenu themeMenu = new MetalThemeMenu("Theme", themes); menuBar.add(file); menuBar.add(edit); menuBar.add(views); menuBar.add(themeMenu); menuBar.add(speed); menuBar.add(help); setJMenuBar(menuBar); }
Example #17
Source File: bug4252173.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #18
Source File: bug4252173.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #19
Source File: MetalworksFrame.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected void buildMenus() { menuBar = new JMenuBar(); menuBar.setOpaque(true); JMenu file = buildFileMenu(); JMenu edit = buildEditMenu(); JMenu views = buildViewsMenu(); JMenu speed = buildSpeedMenu(); JMenu help = buildHelpMenu(); // load a theme from a text file MetalTheme myTheme = null; try { InputStream istream = getClass().getResourceAsStream( "/resources/MyTheme.theme"); myTheme = new PropertiesMetalTheme(istream); } catch (NullPointerException e) { System.out.println(e); } // build an array of themes MetalTheme[] themes = { new OceanTheme(), new DefaultMetalTheme(), new GreenMetalTheme(), new AquaMetalTheme(), new KhakiMetalTheme(), new DemoMetalTheme(), new ContrastMetalTheme(), new BigContrastMetalTheme(), myTheme }; // put the themes in a menu JMenu themeMenu = new MetalThemeMenu("Theme", themes); menuBar.add(file); menuBar.add(edit); menuBar.add(views); menuBar.add(themeMenu); menuBar.add(speed); menuBar.add(help); setJMenuBar(menuBar); }
Example #20
Source File: MetalworksFrame.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
protected void buildMenus() { menuBar = new JMenuBar(); menuBar.setOpaque(true); JMenu file = buildFileMenu(); JMenu edit = buildEditMenu(); JMenu views = buildViewsMenu(); JMenu speed = buildSpeedMenu(); JMenu help = buildHelpMenu(); // load a theme from a text file MetalTheme myTheme = null; try { InputStream istream = getClass().getResourceAsStream( "/resources/MyTheme.theme"); myTheme = new PropertiesMetalTheme(istream); } catch (NullPointerException e) { System.out.println(e); } // build an array of themes MetalTheme[] themes = { new OceanTheme(), new DefaultMetalTheme(), new GreenMetalTheme(), new AquaMetalTheme(), new KhakiMetalTheme(), new DemoMetalTheme(), new ContrastMetalTheme(), new BigContrastMetalTheme(), myTheme }; // put the themes in a menu JMenu themeMenu = new MetalThemeMenu("Theme", themes); menuBar.add(file); menuBar.add(edit); menuBar.add(views); menuBar.add(themeMenu); menuBar.add(speed); menuBar.add(help); setJMenuBar(menuBar); }
Example #21
Source File: bug4252173.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #22
Source File: KnopflerfishLookAndFeel.java From knopflerfish.org with BSD 3-Clause "New" or "Revised" License | 4 votes |
public void uninitialize() { super.uninitialize(); setCurrentTheme(new DefaultMetalTheme()); }
Example #23
Source File: MetalworksFrame.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
protected void buildMenus() { menuBar = new JMenuBar(); menuBar.setOpaque(true); JMenu file = buildFileMenu(); JMenu edit = buildEditMenu(); JMenu views = buildViewsMenu(); JMenu speed = buildSpeedMenu(); JMenu help = buildHelpMenu(); // load a theme from a text file MetalTheme myTheme = null; try { InputStream istream = getClass().getResourceAsStream( "/resources/MyTheme.theme"); myTheme = new PropertiesMetalTheme(istream); } catch (NullPointerException e) { System.out.println(e); } // build an array of themes MetalTheme[] themes = { new OceanTheme(), new DefaultMetalTheme(), new GreenMetalTheme(), new AquaMetalTheme(), new KhakiMetalTheme(), new DemoMetalTheme(), new ContrastMetalTheme(), new BigContrastMetalTheme(), myTheme }; // put the themes in a menu JMenu themeMenu = new MetalThemeMenu("Theme", themes); menuBar.add(file); menuBar.add(edit); menuBar.add(views); menuBar.add(themeMenu); menuBar.add(speed); menuBar.add(help); setJMenuBar(menuBar); }
Example #24
Source File: bug4252173.java From hottub with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #25
Source File: MetalworksFrame.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
protected void buildMenus() { menuBar = new JMenuBar(); menuBar.setOpaque(true); JMenu file = buildFileMenu(); JMenu edit = buildEditMenu(); JMenu views = buildViewsMenu(); JMenu speed = buildSpeedMenu(); JMenu help = buildHelpMenu(); // load a theme from a text file MetalTheme myTheme = null; try { InputStream istream = getClass().getResourceAsStream( "/resources/MyTheme.theme"); myTheme = new PropertiesMetalTheme(istream); } catch (NullPointerException e) { System.out.println(e); } // build an array of themes MetalTheme[] themes = { new OceanTheme(), new DefaultMetalTheme(), new GreenMetalTheme(), new AquaMetalTheme(), new KhakiMetalTheme(), new DemoMetalTheme(), new ContrastMetalTheme(), new BigContrastMetalTheme(), myTheme }; // put the themes in a menu JMenu themeMenu = new MetalThemeMenu("Theme", themes); menuBar.add(file); menuBar.add(edit); menuBar.add(views); menuBar.add(themeMenu); menuBar.add(speed); menuBar.add(help); setJMenuBar(menuBar); }
Example #26
Source File: bug4252173.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { public void run() { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); JComponent component = new JLabel(); Icon horizontalThumbIcon = UIManager.getIcon("Slider.horizontalThumbIcon"); Icon verticalThumbIcon = UIManager.getIcon("Slider.verticalThumbIcon"); Graphics g = new BufferedImage(100, 100, BufferedImage.TYPE_4BYTE_ABGR).getGraphics(); horizontalThumbIcon.paintIcon(component, g, 0, 0); verticalThumbIcon.paintIcon(component, g, 0, 0); } }); }
Example #27
Source File: SwingSet2.java From Darcula with Apache License 2.0 | 4 votes |
protected ChangeThemeAction(SwingSet2 swingset, DefaultMetalTheme theme) { super("ChangeTheme"); this.swingset = swingset; this.theme = theme; }
Example #28
Source File: ModernDarkLaf.java From consulo with Apache License 2.0 | 4 votes |
protected DefaultMetalTheme createMetalTheme() { return new DarculaMetalTheme(); }
Example #29
Source File: ModernWhiteLaf.java From consulo with Apache License 2.0 | 4 votes |
@Override protected DefaultMetalTheme createMetalTheme() { return new IdeaBlueMetalTheme(); }
Example #30
Source File: IntelliJLaf.java From consulo with Apache License 2.0 | 4 votes |
@Override protected DefaultMetalTheme createMetalTheme() { return new IdeaBlueMetalTheme(); }