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:
FlatStylingSupport.StyleableUI
,PropertyChangeListener
,EventListener
- Direct Known Subclasses:
FlatTitlePane.FlatTitleLabelUI
public class FlatLabelUI extends BasicLabelUI implements FlatStylingSupport.StyleableUI
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 Modifier and Type Field Description protected Color
disabledForeground
-
Fields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatLabelUI(boolean shared)
-
Method Summary
-
Methods inherited from class javax.swing.plaf.basic.BasicLabelUI
getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, uninstallComponents, uninstallKeyboardActions, uninstallListeners, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Field Detail
-
disabledForeground
protected Color disabledForeground
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicLabelUI
-
installDefaults
protected void installDefaults(JLabel c)
- Overrides:
installDefaults
in classBasicLabelUI
-
uninstallDefaults
protected void uninstallDefaults(JLabel c)
- Overrides:
uninstallDefaults
in classBasicLabelUI
-
installComponents
protected void installComponents(JLabel c)
- Overrides:
installComponents
in classBasicLabelUI
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classBasicLabelUI
-
installStyle
protected void installStyle(JLabel c)
- Since:
- 2
-
applyStyleProperty
protected Object applyStyleProperty(JLabel c, String key, Object value)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classBasicLabelUI
-
paintEnabledText
protected void paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
- Overrides:
paintEnabledText
in classBasicLabelUI
-
paintDisabledText
protected void paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
- Overrides:
paintDisabledText
in classBasicLabelUI
-
layoutCL
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
Overridden to scale iconTextGap.- Overrides:
layoutCL
in classBasicLabelUI
-
-