47 |
public class MetalTextFieldUI |
public class MetalTextFieldUI |
48 |
extends BasicTextFieldUI |
extends BasicTextFieldUI |
49 |
{ |
{ |
|
|
|
|
/** The UI instances for MetalTextFieldUIs */ |
|
|
private static HashMap instances = null; |
|
|
|
|
50 |
/** |
/** |
51 |
* Constructs a new instance of MetalTextFieldUI. |
* Constructs a new instance of MetalTextFieldUI. |
52 |
*/ |
*/ |
64 |
*/ |
*/ |
65 |
public static ComponentUI createUI(JComponent component) |
public static ComponentUI createUI(JComponent component) |
66 |
{ |
{ |
67 |
if (instances == null) |
return new MetalTextFieldUI(); |
|
instances = new HashMap(); |
|
|
|
|
|
Object o = instances.get(component); |
|
|
MetalTextFieldUI instance; |
|
|
if (o == null) |
|
|
{ |
|
|
instance = new MetalTextFieldUI(); |
|
|
instances.put(component, instance); |
|
|
} |
|
|
else |
|
|
instance = (MetalTextFieldUI) o; |
|
|
|
|
|
return instance; |
|
68 |
} |
} |
69 |
} |
} |