102 |
} |
} |
103 |
} |
} |
104 |
|
|
|
/** The shared UI instance for JTabbedPanes. */ |
|
|
private static HashMap instances = null; |
|
|
|
|
105 |
/** |
/** |
106 |
* Constructs a new instance of MetalTabbedPaneUI. |
* Constructs a new instance of MetalTabbedPaneUI. |
107 |
*/ |
*/ |
119 |
*/ |
*/ |
120 |
public static ComponentUI createUI(JComponent component) |
public static ComponentUI createUI(JComponent component) |
121 |
{ |
{ |
122 |
if (instances == null) |
return new MetalTabbedPaneUI(); |
|
instances = new HashMap(); |
|
|
|
|
|
Object o = instances.get(component); |
|
|
MetalTabbedPaneUI instance; |
|
|
if (o == null) |
|
|
{ |
|
|
instance = new MetalTabbedPaneUI(); |
|
|
instances.put(component, instance); |
|
|
} |
|
|
else |
|
|
instance = (MetalTabbedPaneUI) o; |
|
|
|
|
|
return instance; |
|
123 |
} |
} |
124 |
|
|
125 |
/** |
/** |