--- a/jdk/src/share/classes/javax/swing/plaf/synth/Region.java Fri Jul 25 14:14:30 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/Region.java Fri Jul 25 17:50:36 2008 +0400
@@ -67,8 +67,8 @@
* @author Scott Violet
*/
public class Region {
- private static final Map uiToRegionMap = new HashMap();
- private static final Map lowerCaseNameMap = new HashMap();
+ private static final Map<String, Region> uiToRegionMap = new HashMap<String, Region>();
+ private static final Map<Region, String> lowerCaseNameMap = new HashMap<Region, String>();
/**
* ArrowButton's are special types of buttons that also render a
@@ -451,15 +451,11 @@
static Region getRegion(JComponent c) {
- return (Region)uiToRegionMap.get(c.getUIClassID());
+ return uiToRegionMap.get(c.getUIClassID());
}
static void registerUIs(UIDefaults table) {
- Iterator uis = uiToRegionMap.keySet().iterator();
-
- while (uis.hasNext()) {
- Object key = uis.next();
-
+ for (String key : uiToRegionMap.keySet()) {
table.put(key, "javax.swing.plaf.synth.SynthLookAndFeel");
}
}
@@ -521,7 +517,7 @@
*/
String getLowerCaseName() {
synchronized(lowerCaseNameMap) {
- String lowerCaseName = (String)lowerCaseNameMap.get(this);
+ String lowerCaseName = lowerCaseNameMap.get(this);
if (lowerCaseName == null) {
lowerCaseName = getName().toLowerCase();
lowerCaseNameMap.put(this, lowerCaseName);