equal
deleted
inserted
replaced
54 */ |
54 */ |
55 protected static MetalLabelUI metalLabelUI = new MetalLabelUI(); |
55 protected static MetalLabelUI metalLabelUI = new MetalLabelUI(); |
56 |
56 |
57 private static final Object METAL_LABEL_UI_KEY = new Object(); |
57 private static final Object METAL_LABEL_UI_KEY = new Object(); |
58 |
58 |
|
59 /** |
|
60 * Returns an instance of {@code MetalLabelUI}. |
|
61 * |
|
62 * @param c a component |
|
63 * @return an instance of {@code MetalLabelUI} |
|
64 */ |
59 public static ComponentUI createUI(JComponent c) { |
65 public static ComponentUI createUI(JComponent c) { |
60 if (System.getSecurityManager() != null) { |
66 if (System.getSecurityManager() != null) { |
61 AppContext appContext = AppContext.getAppContext(); |
67 AppContext appContext = AppContext.getAppContext(); |
62 MetalLabelUI safeMetalLabelUI = |
68 MetalLabelUI safeMetalLabelUI = |
63 (MetalLabelUI) appContext.get(METAL_LABEL_UI_KEY); |
69 (MetalLabelUI) appContext.get(METAL_LABEL_UI_KEY); |