Class EmphasizedLabelUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.LabelUI
javax.swing.plaf.basic.BasicLabelUI
com.explodingpixels.macwidgets.plaf.EmphasizedLabelUI
- All Implemented Interfaces:
PropertyChangeListener,EventListener
A BasicLabelUI that paints a shadow under the text using the given shadow color, which
helps emphasize the text. The UI delegate also provides a facility for drawing a different shadow
color when the corresponding label's containing Window is unfocused.
JLabels, it is
recommended that you use the
MacWidgetFactory.createEmphasizedLabel(String) or
MacWidgetFactory.makeEmphasizedLabel(JLabel, Color, Color, Color)
factory methods.
Here's a close-up of an emphasized label:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Colorstatic final Colorstatic final Colorstatic final ColorFields inherited from class javax.swing.plaf.basic.BasicLabelUI
labelUI -
Constructor Summary
ConstructorsConstructorDescriptionCreates anEmphasizedLabelUIusing the default colors.EmphasizedLabelUI(Color focusedTextColor, Color unfocusedTextColor, Color emphasisColor) Creates anEmphasizedLabelUIusing the given colors. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidpaintDisabledText(JLabel label, Graphics g, String s, int textX, int textY) protected voidpaintEnabledText(JLabel label, Graphics g, String s, int textX, int textY) voidMethods inherited from class javax.swing.plaf.basic.BasicLabelUI
createUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, layoutCL, paint, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListenersMethods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Field Details
-
DEFAULT_EMPHASIS_COLOR
-
DEFAULT_FOCUSED_FONT_COLOR
-
DEFAULT_UNFOCUSED_FONT_COLOR
-
DEFAULT_DISABLED_FONT_COLOR
-
-
Constructor Details
-
EmphasizedLabelUI
public EmphasizedLabelUI()Creates anEmphasizedLabelUIusing the default colors. -
EmphasizedLabelUI
Creates anEmphasizedLabelUIusing the given colors.
-
-
Method Details
-
installUI
- Overrides:
installUIin classBasicLabelUI
-
uninstallUI
- Overrides:
uninstallUIin classBasicLabelUI
-
paintEnabledText
- Overrides:
paintEnabledTextin classBasicLabelUI
-
paintDisabledText
- Overrides:
paintDisabledTextin classBasicLabelUI
-