Package com.formdev.flatlaf.ui
Class FlatLabelUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.LabelUI
-
- javax.swing.plaf.basic.BasicLabelUI
-
- com.formdev.flatlaf.ui.FlatLabelUI
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener
- Direct Known Subclasses:
FlatTitlePane.FlatTitleLabelUI
public class FlatLabelUI extends BasicLabelUI
Provides the Flat LaF UI delegate forJLabel.- UiDefault:
- Label.font Font, Label.background Color only used if opaque, Label.foreground Color , Label.disabledForeground Color
-
-
Field Summary
-
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI
-
-
Constructor Summary
Constructors Constructor Description FlatLabelUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUIcreateUI(JComponent c)protected voidinstallComponents(JLabel c)protected voidinstallDefaults(JLabel c)protected StringlayoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)Overridden to scale iconTextGap.voidpaint(Graphics g, JComponent c)protected voidpaintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)protected voidpaintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)voidpropertyChange(PropertyChangeEvent e)protected voiduninstallDefaults(JLabel c)-
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, installUI, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installDefaults
protected void installDefaults(JLabel c)
- Overrides:
installDefaultsin classBasicLabelUI
-
uninstallDefaults
protected void uninstallDefaults(JLabel c)
- Overrides:
uninstallDefaultsin classBasicLabelUI
-
installComponents
protected void installComponents(JLabel c)
- Overrides:
installComponentsin classBasicLabelUI
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBasicLabelUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicLabelUI
-
paintEnabledText
protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
- Overrides:
paintEnabledTextin classBasicLabelUI
-
paintDisabledText
protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
- Overrides:
paintDisabledTextin classBasicLabelUI
-
layoutCL
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Overridden to scale iconTextGap.- Overrides:
layoutCLin classBasicLabelUI
-
-