javax.swing.plaf.metal

Class MetalLabelUI

public class MetalLabelUI extends BasicLabelUI

A UI delegate for the {@link JLabel} component.
Field Summary
protected static MetalLabelUImetalLabelUI
The shared instance of the UI delegate.
Constructor Summary
MetalLabelUI()
Constructs a new instance of MetalLabelUI.
Method Summary
static ComponentUIcreateUI(JComponent component)
Returns a shared instance of MetalLabelUI.
protected voidpaintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Draws the text for a disabled label, using the color defined in the {@link UIManager} defaults with the key Label.disabledForeground.

Field Detail

metalLabelUI

protected static MetalLabelUI metalLabelUI
The shared instance of the UI delegate.

Constructor Detail

MetalLabelUI

public MetalLabelUI()
Constructs a new instance of MetalLabelUI.

Method Detail

createUI

public static ComponentUI createUI(JComponent component)
Returns a shared instance of MetalLabelUI.

Parameters: component the component for which we return an UI instance

Returns: A shared instance of MetalLabelUI.

paintDisabledText

protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Draws the text for a disabled label, using the color defined in the {@link UIManager} defaults with the key Label.disabledForeground.

Parameters: l the label. g the graphics device. s the label text. textX the x-coordinate for the label. textY the y-coordinate for the label.