org.flexdock.plaf.theme

## Class ButtonUI

- java.lang.Object
- - javax.swing.plaf.ComponentUI
  - - javax.swing.plaf.ButtonUI
    - - javax.swing.plaf.basic.BasicButtonUI
      - - org.flexdock.plaf.theme.ButtonUI

All Implemented Interfaces:
  IFlexViewComponentUI, XMLConstants

    public class ButtonUI
    extends javax.swing.plaf.basic.BasicButtonUI
    implements IFlexViewComponentUI

Author:
  Christopher Butler

### Nested Class Summary

Nested Classes
`protected static class` `ButtonUI.ButtonListener`

### Field Summary

Fields
`static java.lang.String` `BORDER`
`static java.lang.String` `BORDER_ACTIVE`
`static java.lang.String` `BORDER_ACTIVE_HOVER`
`static java.lang.String` `BORDER_HOVER`
`static java.lang.String` `BORDER_PRESSED`
`protected javax.swing.border.Border` `borderActive`
`protected javax.swing.border.Border` `borderActiveHover`
`protected javax.swing.border.Border` `borderDefault`
`protected javax.swing.border.Border` `borderDefaultHover`
`protected javax.swing.border.Border` `borderPressed`
`protected PropertySet` `creationParameters`

### Fields inherited from class javax.swing.plaf.basic.BasicButtonUI

`defaultTextIconGap, defaultTextShiftOffset`

### Fields inherited from interface org.flexdock.plaf.IFlexViewComponentUI

`ICON_RESOURCE`

### Fields inherited from interface org.flexdock.plaf.XMLConstants

`ATTRIBUTE_KEY, CLASSNAME_KEY, CONSTRUCTOR_KEY, DESC_KEY, EXTENDS_KEY, HANDLER_KEY, INHERITS_KEY, NAME_KEY, OVERRIDDEN_KEY, PROP_HANDLER_KEY, PROPERTY_KEY, REFERENCE_KEY, VALUE_KEY`

### Constructor Summary

Constructors
Constructor and Description
`ButtonUI()`

### Method Summary

Methods
`protected javax.swing.plaf.basic.BasicButtonListener` `createButtonListener(javax.swing.AbstractButton b)`
`protected javax.swing.Icon` `getActionIcon(javax.swing.AbstractButton button, boolean pressed, boolean active, boolean hover)`
`protected javax.swing.border.Border` `getBorder(javax.swing.AbstractButton button)`
`PropertySet` `getCreationParameters()`
`protected javax.swing.border.Border` `getDefaultBorder(javax.swing.AbstractButton button, boolean active)`
`protected javax.swing.Icon` `getDefaultIcon(javax.swing.AbstractButton button, boolean active)`
`protected javax.swing.Icon` `getDisabledIcon(javax.swing.AbstractButton button, boolean active)`
`protected javax.swing.border.Border` `getHoverBorder(javax.swing.AbstractButton button, boolean active)`
`protected javax.swing.Icon` `getHoverIcon(javax.swing.AbstractButton button, boolean active)`
`protected javax.swing.Icon` `getIcon(javax.swing.AbstractButton button)`
`protected javax.swing.border.Border` `getPressedBorder(javax.swing.AbstractButton button)`
`protected javax.swing.Icon` `getPressedIcon(javax.swing.AbstractButton button)`
`void` `initializeCreationParameters()`
`protected void` `installKeyboardActions(javax.swing.AbstractButton b)`
`void` `installUI(javax.swing.JComponent c)`
`protected boolean` `isParentActive(javax.swing.AbstractButton button)`
`protected boolean` `isPressed(javax.swing.AbstractButton button)`
`void` `paint(java.awt.Graphics g, javax.swing.JComponent c)`
`protected void` `paintBackground(java.awt.Graphics g, javax.swing.AbstractButton b, boolean active, boolean hover, boolean pressed)`
`protected void` `paintBorder(java.awt.Graphics g, javax.swing.AbstractButton b)`
`protected void` `paintIcon(java.awt.Graphics g, javax.swing.AbstractButton b)`
`void` `setBorderActive(javax.swing.border.Border borderActive)`
`void` `setBorderActiveHover(javax.swing.border.Border borderActiveHover)`
`void` `setBorderDefault(javax.swing.border.Border borderDefault)`
`void` `setBorderDefaultHover(javax.swing.border.Border borderDefaultHover)`
`void` `setBorderPressed(javax.swing.border.Border borderPressed)`
`void` `setCreationParameters(PropertySet creationParameters)`
`void` `uninstallUI(javax.swing.JComponent c)`

### Methods inherited from class javax.swing.plaf.basic.BasicButtonUI

`clearTextShiftOffset, createUI, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installDefaults, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, 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`

### Field Detail

#### BORDER

    public static final java.lang.String BORDER

See Also:
  Constant Field Values

#### BORDER_HOVER

    public static final java.lang.String BORDER_HOVER

See Also:
  Constant Field Values

#### BORDER_ACTIVE

    public static final java.lang.String BORDER_ACTIVE

See Also:
  Constant Field Values

#### BORDER_ACTIVE_HOVER

    public static final java.lang.String BORDER_ACTIVE_HOVER

See Also:
  Constant Field Values

#### BORDER_PRESSED

    public static final java.lang.String BORDER_PRESSED

See Also:
  Constant Field Values

#### creationParameters

    protected PropertySet creationParameters

#### borderDefault

    protected javax.swing.border.Border borderDefault

#### borderDefaultHover

    protected javax.swing.border.Border borderDefaultHover

#### borderActive

    protected javax.swing.border.Border borderActive

#### borderActiveHover

    protected javax.swing.border.Border borderActiveHover

#### borderPressed

    protected javax.swing.border.Border borderPressed

### Constructor Detail

#### ButtonUI

    public ButtonUI()

### Method Detail

#### paint

    public void paint(java.awt.Graphics g,
             javax.swing.JComponent c)

Overrides:
  `paint` in class `javax.swing.plaf.basic.BasicButtonUI`

#### paintBackground

    protected void paintBackground(java.awt.Graphics g,
                       javax.swing.AbstractButton b,
                       boolean active,
                       boolean hover,
                       boolean pressed)

#### paintBorder

    protected void paintBorder(java.awt.Graphics g,
                   javax.swing.AbstractButton b)

#### getBorder

    protected javax.swing.border.Border getBorder(javax.swing.AbstractButton button)

#### getPressedBorder

    protected javax.swing.border.Border getPressedBorder(javax.swing.AbstractButton button)

#### getHoverBorder

    protected javax.swing.border.Border getHoverBorder(javax.swing.AbstractButton button,
                                           boolean active)

#### getDefaultBorder

    protected javax.swing.border.Border getDefaultBorder(javax.swing.AbstractButton button,
                                             boolean active)

#### paintIcon

    protected void paintIcon(java.awt.Graphics g,
                 javax.swing.AbstractButton b)

#### getIcon

    protected javax.swing.Icon getIcon(javax.swing.AbstractButton button)

#### getDisabledIcon

    protected javax.swing.Icon getDisabledIcon(javax.swing.AbstractButton button,
                                   boolean active)

#### getPressedIcon

    protected javax.swing.Icon getPressedIcon(javax.swing.AbstractButton button)

#### getHoverIcon

    protected javax.swing.Icon getHoverIcon(javax.swing.AbstractButton button,
                                boolean active)

#### getDefaultIcon

    protected javax.swing.Icon getDefaultIcon(javax.swing.AbstractButton button,
                                  boolean active)

#### getActionIcon

    protected javax.swing.Icon getActionIcon(javax.swing.AbstractButton button,
                                 boolean pressed,
                                 boolean active,
                                 boolean hover)

#### isPressed

    protected boolean isPressed(javax.swing.AbstractButton button)

#### isParentActive

    protected boolean isParentActive(javax.swing.AbstractButton button)

#### installUI

    public void installUI(javax.swing.JComponent c)

Overrides:
  `installUI` in class `javax.swing.plaf.basic.BasicButtonUI`

#### uninstallUI

    public void uninstallUI(javax.swing.JComponent c)

Overrides:
  `uninstallUI` in class `javax.swing.plaf.basic.BasicButtonUI`

#### installKeyboardActions

    protected void installKeyboardActions(javax.swing.AbstractButton b)

Overrides:
  `installKeyboardActions` in class `javax.swing.plaf.basic.BasicButtonUI`

#### createButtonListener

    protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)

Overrides:
  `createButtonListener` in class `javax.swing.plaf.basic.BasicButtonUI`

#### setBorderActive

    public void setBorderActive(javax.swing.border.Border borderActive)

#### setBorderActiveHover

    public void setBorderActiveHover(javax.swing.border.Border borderActiveHover)

#### setBorderDefault

    public void setBorderDefault(javax.swing.border.Border borderDefault)

#### setBorderDefaultHover

    public void setBorderDefaultHover(javax.swing.border.Border borderDefaultHover)

#### setBorderPressed

    public void setBorderPressed(javax.swing.border.Border borderPressed)

#### getCreationParameters

    public PropertySet getCreationParameters()

Specified by:
  `getCreationParameters` in interface `IFlexViewComponentUI`

#### setCreationParameters

    public void setCreationParameters(PropertySet creationParameters)

Specified by:
  `setCreationParameters` in interface `IFlexViewComponentUI`

#### initializeCreationParameters

    public void initializeCreationParameters()

Specified by:
  `initializeCreationParameters` in interface `IFlexViewComponentUI`