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
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
FieldsModifier and TypeFieldDescriptionprotected static MetalLabelUIThe defaultMetalLabelUIinstance.Fields declared in class javax.swing.plaf.basic.BasicLabelUI
labelUI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUIReturns an instance ofMetalLabelUI.protected voidpaintDisabledText(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, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListenersMethods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getPreferredSize, installUI, uninstallUI, update
-
Field Details
-
metalLabelUI
The defaultMetalLabelUIinstance. This field might not be used. To change the default instance use a subclass which overrides thecreateUImethod, and place that class name in defaults table under the key "LabelUI".
-
-
Constructor Details
-
MetalLabelUI
public MetalLabelUI()Constructs aMetalLabelUI.
-
-
Method Details
-
createUI
Returns an instance ofMetalLabelUI.- Parameters:
c- a component- Returns:
- an instance of
MetalLabelUI
-
paintDisabledText
Just paint the text gray (Label.disabledForeground) rather than in the labels foreground color.- Overrides:
paintDisabledTextin classBasicLabelUI- Parameters:
l- an instance ofJLabelg- an instance ofGraphicss- a texttextX- an X coordinatetextY- an Y coordinate- See Also:
-