- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.LabelUI
-
- javax.swing.plaf.basic.BasicLabelUI
-
- javax.swing.plaf.metal.MetalLabelUI
-
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
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.
-
-
Field Summary
Fields Modifier and Type Field Description protected static MetalLabelUI
metalLabelUI
The defaultMetalLabelUI
instance.-
Fields declared in class javax.swing.plaf.basic.BasicLabelUI
labelUI
-
-
Constructor Summary
Constructors Constructor Description MetalLabelUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUI
createUI(JComponent c)
Returns an instance ofMetalLabelUI
.protected void
paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.-
Methods declared in class javax.swing.plaf.basic.BasicLabelUI
getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, installComponents, installDefaults, installKeyboardActions, installListeners, layoutCL, paint, paintEnabledText, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
-
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, installUI, uninstallUI, update
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface java.beans.PropertyChangeListener
propertyChange
-
-
-
-
Field Detail
-
metalLabelUI
protected static MetalLabelUI metalLabelUI
The defaultMetalLabelUI
instance. This field might not be used. To change the default instance use a subclass which overrides thecreateUI
method, and place that class name in defaults table under the key "LabelUI".
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
Returns an instance ofMetalLabelUI
.- Parameters:
c
- a component- Returns:
- an instance of
MetalLabelUI
-
paintDisabledText
protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.- Overrides:
paintDisabledText
in classBasicLabelUI
- Parameters:
l
- an instance ofJLabel
g
- an instance ofGraphics
s
- a texttextX
- an X coordinatetextY
- an Y coordinate- See Also:
BasicLabelUI.paint(java.awt.Graphics, javax.swing.JComponent)
,BasicLabelUI.paintEnabledText(javax.swing.JLabel, java.awt.Graphics, java.lang.String, int, int)
-
-