Package org.pushingpixels.substance.flamingo.common.ui

# Class SubstanceCommandButtonUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
org.pushingpixels.flamingo.internal.ui.common.CommandButtonUI
org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI
org.pushingpixels.substance.flamingo.common.ui.SubstanceCommandButtonUI

All Implemented Interfaces:
  `ActionPopupTransitionAwareUI`, `org.pushingpixels.substance.internal.animation.TransitionAwareUI`

Direct Known Subclasses:
  `SubstanceCommandMenuButtonUI`

public class SubstanceCommandButtonUI extends org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI implements ActionPopupTransitionAwareUI
UI for command buttons `JCommandButton` in Substance look and feel.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected org.pushingpixels.substance.internal.utils.ButtonBackgroundDelegate`
`backgroundDelegate`
Delegate for painting the background.
`protected org.pushingpixels.substance.internal.animation.StateTransitionTracker`
`overallStateTransitionTracker`
`protected org.pushingpixels.substance.internal.utils.RolloverControlListener`
`substanceOverallRolloverListener`
`protected PropertyChangeListener`
`substancePropertyListener`
Property change listener.
`protected CommandButtonVisualStateTracker`
`substanceVisualStateTracker`
Tracker for visual state transitions.

### Fields inherited from class org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI

`basicPopupButtonListener, buttonRendererPane, commandButton, disposePopupsActionListener, DONT_DISPOSE_POPUPS, EMULATE_SQUARE_BUTTON, isUnderMouse, layoutInfo, layoutManager, popupActionIcon, popupActionListener, propertyChangeListener, rendererButton, rendererSeparator`

## Constructor Summary

Constructors
Constructor
Description
`SubstanceCommandButtonUI(org.pushingpixels.flamingo.api.common.JCommandButton button)`
Creates a new UI delegate for ribbon button.

## Method Summary

Modifier and Type
Method
Description
`protected org.pushingpixels.flamingo.api.common.icon.ResizableIcon`
`createPopupActionIcon()`
`static ComponentUI`
`createUI(JComponent comp)`
`org.pushingpixels.substance.internal.animation.StateTransitionTracker`
`getActionTransitionTracker()`
`org.pushingpixels.substance.internal.animation.StateTransitionTracker`
`getPopupTransitionTracker()`
`Dimension`
`getPreferredSize(JComponent c)`
`org.pushingpixels.substance.internal.animation.StateTransitionTracker`
`getTransitionTracker()`
`protected void`
`installDefaults()`
`protected void`
`installListeners()`
`boolean`
`isInside(MouseEvent me)`
`protected boolean`
`isPaintingBackground()`
`protected boolean`
`isPaintingSeparators()`
`void`
`paint(Graphics g, JComponent c)`
`protected void`
`paintButtonBackground(Graphics graphics, Rectangle toFill)`
`protected void`
`paintButtonHorizontalSeparator(Graphics graphics, Rectangle separatorArea)`
`protected void`
`paintButtonIcon(Graphics g, Rectangle iconRect)`
`protected void`
`paintButtonVerticalSeparator(Graphics graphics, Rectangle separatorArea)`
`protected void`
`paintPopupActionIcon(Graphics g, Rectangle popupActionRect)`
`protected void`
`syncDisabledIcon()`
`protected void`
`uninstallListeners()`
`protected void`
`updateBorder()`

### Methods inherited from class org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI

`configureRenderer, createButtonListener, createPopupActionListener, createRendererButton, getForegroundColor, getIconToPaint, getKeyTipAnchorCenterPoint, getLayoutGap, getLayoutInfo, installComponents, installKeyboardActions, installUI, paintButtonBackground, processPopupAction, syncIconDimension, toUseDisabledIcon, unconfigureRenderer, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallUI, update, updateCustomDimension, updatePopupActionIcon`

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

`contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize`

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

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

## Field Details

### backgroundDelegate

protected org.pushingpixels.substance.internal.utils.ButtonBackgroundDelegate backgroundDelegate
Delegate for painting the background.

### substancePropertyListener

protected PropertyChangeListener substancePropertyListener
Property change listener. Listens on changes to `AbstractButton.MODEL_CHANGED_PROPERTY` property.

### substanceVisualStateTracker

protected CommandButtonVisualStateTracker substanceVisualStateTracker
Tracker for visual state transitions.

### substanceOverallRolloverListener

protected org.pushingpixels.substance.internal.utils.RolloverControlListener substanceOverallRolloverListener

### overallStateTransitionTracker

protected org.pushingpixels.substance.internal.animation.StateTransitionTracker overallStateTransitionTracker

## Constructor Details

### SubstanceCommandButtonUI

public SubstanceCommandButtonUI(org.pushingpixels.flamingo.api.common.JCommandButton button)
Creates a new UI delegate for ribbon button.

## Method Details

### createUI

public static ComponentUI createUI(JComponent comp)

### installDefaults

protected void installDefaults()

Overrides:
  `installDefaults` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### updateBorder

protected void updateBorder()

Overrides:
  `updateBorder` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### installListeners

protected void installListeners()

Overrides:
  `installListeners` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### uninstallListeners

protected void uninstallListeners()

Overrides:
  `uninstallListeners` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paintButtonBackground

protected void paintButtonBackground(Graphics graphics, Rectangle toFill)

Overrides:
  `paintButtonBackground` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paintButtonIcon

protected void paintButtonIcon(Graphics g, Rectangle iconRect)

Overrides:
  `paintButtonIcon` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paintButtonHorizontalSeparator

protected void paintButtonHorizontalSeparator(Graphics graphics, Rectangle separatorArea)

Overrides:
  `paintButtonHorizontalSeparator` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paintButtonVerticalSeparator

protected void paintButtonVerticalSeparator(Graphics graphics, Rectangle separatorArea)

Overrides:
  `paintButtonVerticalSeparator` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### isPaintingBackground

protected boolean isPaintingBackground()

Overrides:
  `isPaintingBackground` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### isPaintingSeparators

protected boolean isPaintingSeparators()

Overrides:
  `isPaintingSeparators` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### createPopupActionIcon

protected org.pushingpixels.flamingo.api.common.icon.ResizableIcon createPopupActionIcon()

Overrides:
  `createPopupActionIcon` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paint

public void paint(Graphics g, JComponent c)

Overrides:
  `paint` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### paintPopupActionIcon

protected void paintPopupActionIcon(Graphics g, Rectangle popupActionRect)

Overrides:
  `paintPopupActionIcon` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### getPreferredSize

public Dimension getPreferredSize(JComponent c)

Overrides:
  `getPreferredSize` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### syncDisabledIcon

protected void syncDisabledIcon()

Overrides:
  `syncDisabledIcon` in class `org.pushingpixels.flamingo.internal.ui.common.BasicCommandButtonUI`

### getTransitionTracker

public org.pushingpixels.substance.internal.animation.StateTransitionTracker getTransitionTracker()

Specified by:
  `getTransitionTracker` in interface `org.pushingpixels.substance.internal.animation.TransitionAwareUI`

### isInside

public boolean isInside(MouseEvent me)

Specified by:
  `isInside` in interface `org.pushingpixels.substance.internal.animation.TransitionAwareUI`

### getActionTransitionTracker

public org.pushingpixels.substance.internal.animation.StateTransitionTracker getActionTransitionTracker()

Specified by:
  `getActionTransitionTracker` in interface `ActionPopupTransitionAwareUI`

### getPopupTransitionTracker

public org.pushingpixels.substance.internal.animation.StateTransitionTracker getPopupTransitionTracker()

Specified by:
  `getPopupTransitionTracker` in interface `ActionPopupTransitionAwareUI`