javax.swing.plaf.metal.OceanTheme Java Examples

The following examples show how to use javax.swing.plaf.metal.OceanTheme. 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: MetalworksFrame.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
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 #2
Source File: MetalworksFrame.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
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 #3
Source File: MetalworksFrame.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
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 #4
Source File: MetalworksFrame.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
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 #5
Source File: MetalworksFrame.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
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 #6
Source File: MetalworksFrame.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
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 #7
Source File: MetalworksFrame.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
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 #8
Source File: MetalworksFrame.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
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 #9
Source File: MetalworksFrame.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
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 #10
Source File: MetalworksFrame.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
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 #11
Source File: MetalworksFrame.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
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 #12
Source File: MetalworksFrame.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
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 #13
Source File: MetalworksFrame.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
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);
}