com.dlsc.flexgantt.swing.mac

## Class EmphasizedLabelUI

- java.lang.Object
- - javax.swing.plaf.ComponentUI
  - - javax.swing.plaf.LabelUI
    - - javax.swing.plaf.basic.BasicLabelUI
      - - com.dlsc.flexgantt.swing.mac.EmphasizedLabelUI

- All Implemented Interfaces:
    PropertyChangeListener, EventListener

      public class EmphasizedLabelUI
      extends BasicLabelUI

  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.

- - ### Field Summary

    - ### Fields inherited from class javax.swing.plaf.basic.BasicLabelUI

      `labelUI`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EmphasizedLabelUI()` Creates an `EmphasizedLabelUI` using the default colors.
    `EmphasizedLabelUI(Color focusedTextColor, Color unfocusedTextColor, Color emphasisColor)` Creates an `EmphasizedLabelUI` using the given colors.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `installUI(JComponent c)`
    `protected void` | `paintDisabledText(JLabel label, Graphics g, String s, int textX, int textY)`
    `protected void` | `paintEnabledText(JLabel label, Graphics g, String s, int textX, int textY)`
    `void` | `uninstallUI(JComponent c)`

    - ### Methods inherited from class javax.swing.plaf.basic.BasicLabelUI

      `createUI, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, layoutCL, paint, propertyChange, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners`

    - ### Methods inherited from class javax.swing.plaf.ComponentUI

      `contains, getAccessibleChild, getAccessibleChildrenCount, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EmphasizedLabelUI

          public EmphasizedLabelUI()

      Creates an `EmphasizedLabelUI` using the default colors.

    - #### EmphasizedLabelUI

          public EmphasizedLabelUI(Color focusedTextColor,
                                   Color unfocusedTextColor,
                                   Color emphasisColor)

      Creates an `EmphasizedLabelUI` using the given colors.
      Parameters:
        `focusedTextColor` - the color to draw the text with when the parent `Window` has focus.
        `unfocusedTextColor` - the color to draw the text with when the parent `Window` does not have focus.
        `emphasisColor` - the color to draw the emphasis text with.

  - ### Method Detail

    - #### installUI

          public void installUI(JComponent c)

      Overrides:
        `installUI` in class `BasicLabelUI`

    - #### uninstallUI

          public void uninstallUI(JComponent c)

      Overrides:
        `uninstallUI` in class `BasicLabelUI`

    - #### paintEnabledText

          protected void paintEnabledText(JLabel label,
                                          Graphics g,
                                          String s,
                                          int textX,
                                          int textY)

      Overrides:
        `paintEnabledText` in class `BasicLabelUI`

    - #### paintDisabledText

          protected void paintDisabledText(JLabel label,
                                           Graphics g,
                                           String s,
                                           int textX,
                                           int textY)

      Overrides:
        `paintDisabledText` in class `BasicLabelUI`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.