本文整理匯總了Java中javax.swing.UIDefaults.getString方法的典型用法代碼示例。如果您正苦於以下問題:Java UIDefaults.getString方法的具體用法?Java UIDefaults.getString怎麽用?Java UIDefaults.getString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.UIDefaults
的用法示例。
在下文中一共展示了UIDefaults.getString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: installStrings
import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
* Installs the strings used by this UI delegate.
*
* @param fc the file chooser.
*/
protected void installStrings(JFileChooser fc)
{
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
dirDescText = defaults.getString("FileChooser.directoryDescriptionText");
fileDescText = defaults.getString("FileChooser.fileDescriptionText");
acceptAllFileFilterText = defaults.getString("FileChooser.acceptAllFileFilterText");
cancelButtonText = "Cancel";
cancelButtonToolTipText = "Abort file chooser dialog";
cancelButtonMnemonic = new Integer((String) UIManager.get("FileChooser.cancelButtonMnemonic")).intValue();
directoryOpenButtonText = "Open";
directoryOpenButtonToolTipText = "Open selected directory";
directoryOpenButtonMnemonic
= new Integer((String) UIManager.get("FileChooser.directoryOpenButtonMnemonic")).intValue();
helpButtonText = "Help";
helpButtonToolTipText = "FileChooser help";
helpButtonMnemonic = new Integer((String) UIManager.get("FileChooser.helpButtonMnemonic")).intValue();
openButtonText = "Open";
openButtonToolTipText = "Open selected file";
openButtonMnemonic = new Integer((String) UIManager.get("FileChooser.openButtonMnemonic")).intValue();
saveButtonText = "Save";
saveButtonToolTipText = "Save selected file";
saveButtonMnemonic = new Integer((String) UIManager.get("FileChooser.saveButtonMnemonic")).intValue();
updateButtonText = "Update";
updateButtonToolTipText = "Update directory listing";
updateButtonMnemonic = new Integer((String) UIManager.get("FileChooser.updateButtonMnemonic")).intValue();
}