亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? thememanager.java

?? 164個(gè)完整的Java代碼,資源比較大
?? JAVA
字號:
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.gui;import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.plaf.*;import javax.swing.plaf.metal.MetalLookAndFeel;import javax.swing.plaf.metal.DefaultMetalTheme;/** * This class reads theme descriptions from a GUIResourceBundle and uses them * to specify colors and fonts for the Metal look-and-feel. **/public class ThemeManager {    JFrame frame;                  // The frame which themes are applied to    GUIResourceBundle resources;   // Properties describing the themes    /**      * Build a ThemeManager for the frame and resource bundle.  If there     * is a default theme specified, apply it to the frame     **/    public ThemeManager(JFrame frame, GUIResourceBundle resources) {	this.frame = frame;	this.resources = resources;	String defaultName = getDefaultThemeName();	if (defaultName != null) setTheme(defaultName);    }    /** Look up the named theme, and apply it to the frame */    public void setTheme(String themeName) {	// Look up the theme in the resource bundle	Theme theme = new Theme(resources, themeName);	// Make it the current theme	MetalLookAndFeel.setCurrentTheme(theme);	// Re-apply the Metal look-and-feel to install new theme	try { UIManager.setLookAndFeel(new MetalLookAndFeel()); }	catch(UnsupportedLookAndFeelException e) {}	// Propagate the new l&f across the entire component tree of the frame	SwingUtilities.updateComponentTreeUI(frame);    }    /** Get the "display name" or label of the named theme */    public String getDisplayName(String themeName) {	return resources.getString(themeName + ".name", null);    }    /** Get the name of the default theme, or null */    public String getDefaultThemeName() {	return resources.getString("defaultTheme", null);    }    /**     * Get the list of all known theme names.  The returned values are     * theme property names, not theme display names.     **/    public String[] getAllThemeNames() {	java.util.List names = resources.getStringList("themelist");	return (String[]) names.toArray(new String[names.size()]);    }    /**     * Get a JMenu that lists all known themes by display name and     * installs any selected theme.     **/    public JMenu getThemeMenu() {	String[] names = getAllThemeNames();	String defaultName = getDefaultThemeName();	JMenu menu = new JMenu("Themes");	ButtonGroup buttongroup = new ButtonGroup();	for(int i = 0; i < names.length; i++) {	    final String themeName = names[i];	    String displayName = getDisplayName(themeName);	    JMenuItem item = menu.add(new JRadioButtonMenuItem(displayName));	    buttongroup.add(item);	    if (themeName.equals(defaultName)) item.setSelected(true);	    item.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent event) {			setTheme(themeName);		    }		});	}	return menu;    }    /**     * This class extends the DefaultMetalTheme class to return Color and     * Font values read from a GUIResourceBundle     **/    public static class Theme extends DefaultMetalTheme {	// These fields are the values returned by this Theme	String displayName;	FontUIResource controlFont, menuFont, smallFont;	FontUIResource systemFont, userFont, titleFont;	ColorUIResource primary1, primary2, primary3;	ColorUIResource secondary1, secondary2, secondary3;	/**	 * This constructor reads all the values it needs from the	 * GUIResourceBundle.  It uses intelligent defaults if properties	 * are not specified.	 **/	public Theme(GUIResourceBundle resources, String name) {	    // Use this theme object to get default font values from	    DefaultMetalTheme defaultTheme = new DefaultMetalTheme();	    // Look up the display name of the theme	    displayName = resources.getString(name + ".name", null);	    // Look up the fonts for the theme	    Font control = resources.getFont(name + ".controlFont", null);	    Font menu = resources.getFont(name + ".menuFont", null);	    Font small = resources.getFont(name + ".smallFont", null);	    Font system = resources.getFont(name + ".systemFont", null);	    Font user = resources.getFont(name + ".userFont", null);	    Font title = resources.getFont(name + ".titleFont", null);	    // Convert fonts to FontUIResource, or get defaults	    if (control != null) controlFont = new FontUIResource(control);	    else controlFont = defaultTheme.getControlTextFont();	    if (menu != null) menuFont = new FontUIResource(menu);	    else menuFont = defaultTheme.getMenuTextFont();	    if (small != null) smallFont = new FontUIResource(small);	    else smallFont = defaultTheme.getSubTextFont();	    if (system != null) systemFont = new FontUIResource(system);	    else systemFont = defaultTheme.getSystemTextFont();	    if (user != null) userFont = new FontUIResource(user);	    else userFont = defaultTheme.getUserTextFont();	    if (title != null) titleFont = new FontUIResource(title);	    else titleFont = defaultTheme.getWindowTitleFont();	    // Look up primary and secondary colors	    Color primary = resources.getColor(name + ".primary", null);	    Color secondary = resources.getColor(name + ".secondary", null);	    // Derive all six colors from these two, using defaults if needed	    if (primary != null) primary1 = new ColorUIResource(primary);	    else primary1 = new ColorUIResource(102, 102, 153);	    primary2 = new ColorUIResource(primary1.brighter());	    primary3 = new ColorUIResource(primary2.brighter());	    if (secondary != null) secondary1 = new ColorUIResource(secondary);	    else secondary1 = new ColorUIResource(102, 102, 102);	    secondary2 = new ColorUIResource(secondary1.brighter());	    secondary3 = new ColorUIResource(secondary2.brighter());	}	// These methods override DefaultMetalTheme and return the property	// values we looked up and computed for this theme	public String getName() { return displayName; }	public FontUIResource getControlTextFont() { return controlFont;}	public FontUIResource getSystemTextFont() { return systemFont;}	public FontUIResource getUserTextFont() { return userFont;}	public FontUIResource getMenuTextFont() { return menuFont;}	public FontUIResource getWindowTitleFont() { return titleFont;}	public FontUIResource getSubTextFont() { return smallFont;}	protected ColorUIResource getPrimary1() { return primary1; } 	protected ColorUIResource getPrimary2() { return primary2; }	protected ColorUIResource getPrimary3() { return primary3; }	protected ColorUIResource getSecondary1() { return secondary1; }	protected ColorUIResource getSecondary2() { return secondary2; }	protected ColorUIResource getSecondary3() { return secondary3; }    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频资源在线| 亚洲精品一区二区三区影院| 亚洲少妇屁股交4| av午夜一区麻豆| 亚洲免费在线电影| 欧美性受xxxx黑人xyx性爽| 亚洲愉拍自拍另类高清精品| 色综合久久久久| 亚洲精品成人在线| 欧美一区二区三区小说| 精品一区二区三区香蕉蜜桃 | 白白色亚洲国产精品| 国产精品亲子乱子伦xxxx裸| 99久久婷婷国产| 午夜av区久久| 国产欧美一区二区精品久导航 | 国产69精品一区二区亚洲孕妇| 欧美激情中文不卡| 欧美亚洲国产bt| 久久精品99国产国产精| 亚洲国产成人在线| 色8久久精品久久久久久蜜| 视频一区二区三区入口| 国产日韩欧美亚洲| 欧美自拍偷拍一区| 国产一区二区在线观看视频| 亚洲色欲色欲www| 日韩亚洲电影在线| 91美女精品福利| 看电影不卡的网站| 亚洲三级小视频| 精品不卡在线视频| 欧美羞羞免费网站| 成人精品一区二区三区中文字幕 | 国产精品嫩草久久久久| 欧美伦理电影网| jizzjizzjizz欧美| 蜜臀av性久久久久蜜臀av麻豆| 国产精品国产三级国产aⅴ入口| 欧美天堂一区二区三区| 高清国产午夜精品久久久久久| 亚洲一区二区三区在线| 国产精品美女一区二区在线观看| 5858s免费视频成人| 色婷婷综合在线| 国产成人av影院| 美女性感视频久久| 亚洲国产精品自拍| 国产精品视频一二三| 日韩精品一区二区三区视频播放 | 一卡二卡三卡日韩欧美| 国产欧美在线观看一区| 日韩欧美国产午夜精品| 欧美日韩亚洲综合| 色国产精品一区在线观看| 成人一区在线观看| 国产激情精品久久久第一区二区| 日韩av不卡在线观看| 亚洲国产精品一区二区久久 | 91官网在线免费观看| 不卡电影一区二区三区| 国产不卡一区视频| 国产成人免费xxxxxxxx| 国产精品一区二区在线看| 美日韩黄色大片| 青青草97国产精品免费观看无弹窗版| 亚洲一区av在线| 一区二区三区在线视频免费观看| 国产精品三级在线观看| 国产欧美日韩综合| 国产欧美一区视频| 久久久.com| 国产精品乱码一区二区三区软件| 国产欧美一区二区精品秋霞影院| 久久综合色鬼综合色| 精品动漫一区二区三区在线观看| 日韩一二在线观看| 欧美电影免费观看高清完整版在线 | 一级日本不卡的影视| 亚洲精品国产第一综合99久久 | 91久久国产最好的精华液| 91亚洲国产成人精品一区二三| 成人黄色小视频| av在线不卡观看免费观看| 91视频在线观看免费| 在线欧美小视频| 欧美日韩亚洲不卡| 日韩视频免费观看高清在线视频| 日韩一区二区三| 久久久99免费| 亚洲欧洲精品天堂一级| 亚洲精品久久久蜜桃| 五月天激情小说综合| 久久99国产精品尤物| 国产成人综合网| 色香色香欲天天天影视综合网| 欧洲精品在线观看| 日韩一区二区三区四区五区六区| 久久这里都是精品| 成人免费在线观看入口| 午夜精品成人在线视频| 紧缚奴在线一区二区三区| 成人永久aaa| 欧美视频在线观看一区二区| 欧美成人一区二区三区在线观看 | 国产精品美女www爽爽爽| 一区二区高清在线| 久久精品国产色蜜蜜麻豆| 国产成人在线视频网站| 色老综合老女人久久久| 日韩一区二区免费在线观看| 国产精品女主播在线观看| 亚洲成人激情综合网| 国产在线精品一区二区三区不卡| 99久久伊人精品| 欧美一区二区三区四区高清| 欧美国产一区二区在线观看| 亚洲一区二区三区四区五区黄| 麻豆91免费观看| 91一区二区三区在线观看| 日韩欧美国产一二三区| 亚洲精品国产视频| 国产麻豆精品一区二区| 在线观看国产精品网站| 久久久久久99久久久精品网站| 亚洲精品高清在线观看| 国产精品18久久久久久久久| 欧美视频一区在线| 国产精品久线观看视频| 偷拍一区二区三区四区| www.亚洲免费av| 欧美mv日韩mv亚洲| 亚洲国产成人va在线观看天堂| 国产精品亚洲一区二区三区妖精 | www.激情成人| 久久综合九色综合久久久精品综合 | 三级不卡在线观看| 色综合亚洲欧洲| 久久久91精品国产一区二区三区| 午夜精品久久久久久久久久久| 99久久精品国产导航| 久久精品夜夜夜夜久久| 免费人成在线不卡| 欧美性xxxxxxxx| 日韩理论电影院| 国产成人亚洲精品青草天美| 日韩美女在线视频| 免费高清成人在线| 欧美伦理影视网| 亚洲在线视频免费观看| 色综合久久中文综合久久牛| 国产亚洲欧美一级| 国产真实乱子伦精品视频| 欧美日韩国产大片| 亚洲一区二区在线免费观看视频 | 久久影院视频免费| 久久福利视频一区二区| 欧美一二三四在线| 日产精品久久久久久久性色 | 欧美xfplay| 蜜桃视频一区二区| 日韩久久久久久| 麻豆国产欧美日韩综合精品二区| 欧美日本韩国一区| 香蕉乱码成人久久天堂爱免费| 色综合久久久网| 亚洲精品乱码久久久久久日本蜜臀| 成人高清视频免费观看| 国产精品麻豆欧美日韩ww| 成人性生交大合| 国产精品乱码一区二区三区软件| 粉嫩aⅴ一区二区三区四区五区 | 91精品中文字幕一区二区三区| 亚洲成av人影院在线观看网| 欧美日韩国产综合久久| 日韩精彩视频在线观看| 日韩一区二区免费视频| 久久 天天综合| 国产日韩欧美高清| 91一区二区在线观看| 亚洲国产美国国产综合一区二区| 欧美日韩大陆一区二区| 麻豆精品视频在线观看免费 | 中文一区二区完整视频在线观看| 丁香啪啪综合成人亚洲小说| 国产欧美一区二区精品仙草咪| 不卡av免费在线观看| 老司机免费视频一区二区三区| 欧美电影免费提供在线观看| 国产毛片精品视频| 一色桃子久久精品亚洲| 欧美系列在线观看| 久久se精品一区精品二区| 国产人久久人人人人爽| 色拍拍在线精品视频8848| 日韩高清在线电影| 2019国产精品| 在线精品视频一区二区| 青青青伊人色综合久久| 中文字幕精品一区|