MetalLabelUIpublic 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. |
Fields Summary |
---|
protected static MetalLabelUI | metalLabelUIThe 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 |
Methods Summary |
---|
public static javax.swing.plaf.ComponentUI | createUI(javax.swing.JComponent c)
if (System.getSecurityManager() != null) {
return SAFE_METAL_LABEL_UI;
} else {
return metalLabelUI;
}
| protected void | paintDisabledText(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.
int mnemIndex = l.getDisplayedMnemonicIndex();
g.setColor(UIManager.getColor("Label.disabledForeground"));
SwingUtilities2.drawStringUnderlineCharAt(l, g, s, mnemIndex,
textX, textY);
|
|