本文整理匯總了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");
}
}
示例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);
}
示例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" );
}
示例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" );
}