javax.swing.plaf.metal.MetalLookAndFeel#setCurrentTheme ( )源码实例Demo

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

源代码1 项目: hottub   文件: bug6742358.java
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);
}
 
源代码2 项目: dragonwell8_jdk   文件: bug6742358.java
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);
}
 
源代码3 项目: TencentKona-8   文件: MetalThemeMenu.java
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
 
源代码4 项目: jdk8u-jdk   文件: bug6742358.java
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);
}
 
源代码5 项目: consulo   文件: DarculaLaf.java
@Nonnull
@Override
public UIDefaults getDefaultsImpl(UIDefaults superDefaults) {
  try {
    final UIDefaults metalDefaults = new MetalLookAndFeel().getDefaults();
    final UIDefaults defaults = base.getDefaults();
    if (SystemInfo.isLinux && !Registry.is("darcula.use.native.fonts.on.linux")) {
      Font font = findFont("DejaVu Sans");
      if (font != null) {
        for (Object key : defaults.keySet()) {
          if (key instanceof String && ((String)key).endsWith(".font")) {
            defaults.put(key, new FontUIResource(font.deriveFont(13f)));
          }
        }
      }
    }

    LafManagerImplUtil.initInputMapDefaults(defaults);
    defaults.put(SupportTextBoxWithExpandActionExtender.class, SupportTextBoxWithExpandActionExtender.INSTANCE);
    defaults.put(SupportTextBoxWithExtensionsExtender.class, SupportTextBoxWithExtensionsExtender.INSTANCE);

    initIdeaDefaults(defaults);
    patchStyledEditorKit(defaults);
    patchComboBox(metalDefaults, defaults);
    defaults.remove("Spinner.arrowButtonBorder");
    defaults.put("Spinner.arrowButtonSize", JBUI.size(16, 5).asUIResource());
    MetalLookAndFeel.setCurrentTheme(createMetalTheme());
    defaults.put("EditorPane.font", defaults.getFont("TextField.font"));
    return defaults;
  }
  catch (Exception e) {
    log(e);
  }
  return super.getDefaultsImpl(superDefaults);
}
 
源代码6 项目: jdk8u60   文件: MetalThemeMenu.java
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
 
源代码7 项目: jdk8u60   文件: bug6742358.java
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);
}
 
源代码8 项目: openjdk-8   文件: MetalThemeMenu.java
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
 
源代码9 项目: openjdk-jdk8u   文件: bug6742358.java
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);
}
 
源代码10 项目: jdk8u_jdk   文件: MetalThemeMenu.java
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
 
源代码11 项目: netbeans   文件: Startup.java
private boolean installTheme(LookAndFeel lf) {
    boolean themeInstalled = false;
    //Load the theme
    if (themeURL != null) {
        themeInstalled = true;
        NbTheme nbTheme = new NbTheme(themeURL, lf);
        MetalLookAndFeel.setCurrentTheme(nbTheme);
    }
    return themeInstalled;
}
 
源代码12 项目: openjdk-jdk8u-backup   文件: MetalThemeMenu.java
public void actionPerformed(ActionEvent e) {
    String numStr = e.getActionCommand();
    MetalTheme selectedTheme = themes[Integer.parseInt(numStr)];
    MetalLookAndFeel.setCurrentTheme(selectedTheme);
    try {
        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
        System.out.println("Failed loading Metal");
        System.out.println(ex);
    }

}
 
源代码13 项目: openjdk-jdk9   文件: bug6742358.java
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);
}
 
源代码14 项目: beautyeye   文件: SwingSet2.java
public void actionPerformed(ActionEvent e) {
	MetalLookAndFeel.setCurrentTheme(theme);
	swingset.updateLookAndFeel();
}
 
源代码15 项目: Darcula   文件: SwingSet2.java
public void actionPerformed(ActionEvent e) {
    MetalLookAndFeel.setCurrentTheme(theme);
    swingset.updateLookAndFeel();
}
 
源代码16 项目: dragonwell8_jdk   文件: bug6742358.java
public void init() {
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

    TestPanel panel = new TestPanel();

    setContentPane(panel);
}
 
源代码17 项目: openjdk-jdk8u-backup   文件: bug6742358.java
public void init() {
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

    TestPanel panel = new TestPanel();

    setContentPane(panel);
}
 
源代码18 项目: jdk8u_jdk   文件: bug6742358.java
public void init() {
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

    TestPanel panel = new TestPanel();

    setContentPane(panel);
}
 
源代码19 项目: openjdk-jdk9   文件: bug6742358.java
public void init() {
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

    TestPanel panel = new TestPanel();

    setContentPane(panel);
}
 
源代码20 项目: hottub   文件: bug6742358.java
public void init() {
    MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());

    TestPanel panel = new TestPanel();

    setContentPane(panel);
}