Package javax.swing.plaf.metal

Examples of javax.swing.plaf.metal.DefaultMetalTheme$FontDelegate


  public static void initLookAndFeel() throws Exception{
    LookAndFeel lf = UIManager.getLookAndFeel();
    if (lf instanceof MetalLookAndFeel) {
      MetalLookAndFeel mlf = (MetalLookAndFeel)lf;
     
      mlf.setCurrentTheme(new DefaultMetalTheme());
      UIManager.setLookAndFeel(mlf);
      UIManager.put("TextField.font",new Font("Arial",Font.BOLD,14));
      UIManager.put("PasswordField.font",new Font("Arial",Font.BOLD,14));
    }
  }
View Full Code Here


        mi.setSelected(true); // This is the default theme

        createThemesMenuItem(themesMenu, "ThemesMenu.steel_label",
                             "ThemesMenu.steel_mnemonic",
                             "ThemesMenu.steel_accessible_description",
                             new DefaultMetalTheme());
 
  createThemesMenuItem(themesMenu, "ThemesMenu.aqua_label", "ThemesMenu.aqua_mnemonic",
           "ThemesMenu.aqua_accessible_description", new AquaTheme());

  createThemesMenuItem(themesMenu, "ThemesMenu.charcoal_label", "ThemesMenu.charcoal_mnemonic",
View Full Code Here

            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(),
View Full Code Here

    public void actionPerformed(ActionEvent action) {
  String actionName = action.getActionCommand();
  String lafName = null;
  if (actionName.equals("Metal-default-theme")) {
      lafName = "javax.swing.plaf.metal.MetalLookAndFeel";
      MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
  } else if (actionName.equals("Metal-ocean-theme")) {
      lafName = "javax.swing.plaf.metal.MetalLookAndFeel";
      MetalLookAndFeel.setCurrentTheme(new OceanTheme());
  } else if (actionName.equals("System")) {
      lafName = UIManager.getSystemLookAndFeelClassName();
View Full Code Here

    try
    {
      if (LOOKANDFEEL.equals("Metal"))
      {
        if (THEME.equals("DefaultMetal"))
          MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        else if (THEME.equals("Ocean"))
          MetalLookAndFeel.setCurrentTheme(new OceanTheme());

        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
View Full Code Here

    try
    {
      if (LOOKANDFEEL.equals("Metal"))
      {
        if (THEME.equals("DefaultMetal"))
          MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        else if (THEME.equals("Ocean"))
          MetalLookAndFeel.setCurrentTheme(new OceanTheme());

        UIManager.setLookAndFeel(new MetalLookAndFeel());
      }
View Full Code Here

            PlasticLookAndFeel.setPlasticTheme(settings.getSelectedTheme());
            PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle());
            PlasticLookAndFeel.setHighContrastFocusColorsEnabled(
                settings.isPlasticHighContrastFocusEnabled());
        } else if (selectedLaf.getClass() == MetalLookAndFeel.class) {
            MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
        }

        // Work around caching in MetalRadioButtonUI
        JRadioButton radio = new JRadioButton();
        radio.getUI().uninstallUI(radio);
View Full Code Here

    if (selectedLaf instanceof PlasticLookAndFeel) {
      PlasticLookAndFeel.setPlasticTheme(PlasticLookAndFeel.createMyDefaultTheme());
      PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE);
      PlasticLookAndFeel.setHighContrastFocusColorsEnabled(false);
    } else if (selectedLaf != null && selectedLaf.getClass() == MetalLookAndFeel.class) {
      MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
    }

    // Work around caching in MetalRadioButtonUI
    JRadioButton radio = new JRadioButton();
    radio.getUI().uninstallUI(radio);
View Full Code Here

        mi.setSelected(true); // This is the default theme

        createThemesMenuItem(themesMenu, "ThemesMenu.steel_label",
                             "ThemesMenu.steel_mnemonic",
                             "ThemesMenu.steel_accessible_description",
                             new DefaultMetalTheme());
 
  createThemesMenuItem(themesMenu, "ThemesMenu.aqua_label", "ThemesMenu.aqua_mnemonic",
           "ThemesMenu.aqua_accessible_description", new AquaTheme());

  createThemesMenuItem(themesMenu, "ThemesMenu.charcoal_label", "ThemesMenu.charcoal_mnemonic",
View Full Code Here

    if (selectedLaf instanceof PlasticLookAndFeel) {
      PlasticLookAndFeel.setPlasticTheme(PlasticLookAndFeel.createMyDefaultTheme());
      PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_DEFAULT_VALUE);
      PlasticLookAndFeel.setHighContrastFocusColorsEnabled(false);
    } else if (selectedLaf != null && selectedLaf.getClass() == MetalLookAndFeel.class) {
      MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
    }

    // Work around caching in MetalRadioButtonUI
    JRadioButton radio = new JRadioButton();
    radio.getUI().uninstallUI(radio);
View Full Code Here

TOP

Related Classes of javax.swing.plaf.metal.DefaultMetalTheme$FontDelegate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.