jdk/src/share/classes/javax/swing/plaf/metal/MetalLabelUI.java
changeset 25178 dbab904451e9
parent 23010 6dadb192ad81
equal deleted inserted replaced
25177:487a5e71f6dd 25178:dbab904451e9
    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);