當前位置: 首頁>>代碼示例>>Java>>正文


Java UIDefaults.addResourceBundle方法代碼示例

本文整理匯總了Java中javax.swing.UIDefaults.addResourceBundle方法的典型用法代碼示例。如果您正苦於以下問題:Java UIDefaults.addResourceBundle方法的具體用法?Java UIDefaults.addResourceBundle怎麽用?Java UIDefaults.addResourceBundle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.UIDefaults的用法示例。


在下文中一共展示了UIDefaults.addResourceBundle方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Bug6530694

import javax.swing.UIDefaults; //導入方法依賴的package包/類
Bug6530694() {
    Locale.setDefault(Locale.GERMANY);
    UIDefaults defs = UIManager.getDefaults();
    defs.addResourceBundle("Bug6530694");
    String str = defs.getString("testkey");
    if (!"testvalue".equals(str)) {
        throw new RuntimeException("Could not load the resource for de_DE locale");
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:10,代碼來源:Bug6530694.java

示例2: initResourceBundle

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Initialize the defaults table with the name of the other ResourceBundle
 * used for getting localized defaults.
 */
protected void initResourceBundle(UIDefaults table)
{
    table.addResourceBundle(BUNDLENAME);
}
 
開發者ID:freeseawind,項目名稱:littleluck,代碼行數:9,代碼來源:LittleLuckLookAndFeel.java

示例3: initResourceBundle

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Initialize the defaults table with the name of the ResourceBundle
 * used for getting localized defaults.  Also initialize the default
 * locale used when no locale is passed into UIDefaults.get().  The
 * default locale should generally not be relied upon. It is here for
 * compatibility with releases prior to 1.4.
 */
private void initResourceBundle(UIDefaults table) {
    table.setDefaultLocale( Locale.getDefault() );
    table.addResourceBundle( "com.sun.swing.internal.plaf.basic.resources.basic" );
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:12,代碼來源:BasicLookAndFeel.java

示例4: initResourceBundle

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Initialize the defaults table with the name of the ResourceBundle
 * used for getting localized defaults.  Also initialize the default
 * locale used when no locale is passed into UIDefaults.get().  The
 * default locale should generally not be relied upon. It is here for
 * compatability with releases prior to 1.4.
 */
private void initResourceBundle(UIDefaults table) {
    table.setDefaultLocale( Locale.getDefault() );
    table.addResourceBundle( "com.sun.swing.internal.plaf.basic.resources.basic" );
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:12,代碼來源:BasicLookAndFeel.java


注:本文中的javax.swing.UIDefaults.addResourceBundle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。