javax.swing.plaf.metal
Class MetalLabelUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.LabelUI
          extended by javax.swing.plaf.basic.BasicLabelUI
              extended by javax.swing.plaf.metal.MetalLabelUI
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class MetalLabelUI
extends BasicLabelUI

A UI delegate for the JLabel component.


Field Summary
protected static MetalLabelUI metalLabelUI
          The shared instance of the UI delegate.
 
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI
 
Constructor Summary
MetalLabelUI()
          Constructs a new instance of MetalLabelUI.
 
Method Summary
static ComponentUI createUI(JComponent component)
          Returns a shared instance of MetalLabelUI.
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 UIManager defaults with the key Label.disabledForeground.
 
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, layoutCL, paint, paintEnabledText, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 UIManager defaults with the key Label.disabledForeground.

Overrides:
paintDisabledText in class BasicLabelUI
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.