FileDocCategorySizeDatePackage
MetalLabelUI.javaAPI DocJava SE 6 API1809Tue Jun 10 00:26:50 BST 2008javax.swing.plaf.metal

MetalLabelUI

public class MetalLabelUI extends BasicLabelUI
A Windows L&F implementation of LabelUI. This implementation is completely static, i.e. there's only one UIView implementation that's shared by all JLabel objects.
version
1.15 11/30/05
author
Hans Muller

Fields Summary
protected static MetalLabelUI
metalLabelUI
The default MetalLabelUI instance. This field might not be used. To change the default instance use a subclass which overrides the createUI method, and place that class name in defaults table under the key "LabelUI".
private static final MetalLabelUI
SAFE_METAL_LABEL_UI
Constructors Summary
Methods Summary
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)



         
        if (System.getSecurityManager() != null) {
            return SAFE_METAL_LABEL_UI;
        } else {
            return metalLabelUI;
        }
    
protected voidpaintDisabledText(javax.swing.JLabel l, java.awt.Graphics g, java.lang.String s, int textX, int textY)
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.

see
#paint
see
#paintEnabledText

	int mnemIndex = l.getDisplayedMnemonicIndex();
	g.setColor(UIManager.getColor("Label.disabledForeground"));
	SwingUtilities2.drawStringUnderlineCharAt(l, g, s, mnemIndex,
                                                   textX, textY);