- 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 and Description protected static MetalLabelUI
metalLabelUI
The defaultMetalLabelUI
instance.-
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI
-
-
Constructor Summary
Constructors Constructor and Description MetalLabelUI()
-
Method Summary
Methods Modifier and Type Method and Description static ComponentUI
createUI(JComponent c)
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 inherited from class javax.swing.plaf.basic.BasicLabelUI
getBaseline, getBaselineResizeBehavior, 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
-
-
-
-
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)
-
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)
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/swing/plaf/metal/metallabelui.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.