Package org.pushingpixels.substance.internal.ui

# Class SubstanceComboBoxUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
org.pushingpixels.substance.internal.ui.SubstanceComboBoxUI

All Implemented Interfaces:
  `TransitionAwareUI`

public class SubstanceComboBoxUI extends BasicComboBoxUI implements TransitionAwareUI
UI for combo boxes in Substance look and feel.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`SubstanceComboBoxUI.ComboBoxPropertyChangeHandler`
This property change handler changes combo box arrow icon based on the enabled status of the combo box.

## Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxUI

`BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected ComboBoxBackgroundDelegate`
`delegate`
Painting delegate.
`protected Insets`
`layoutInsets`
`protected StateTransitionTracker`
`stateTransitionTracker`
`protected SubstanceComboBoxUI.ComboBoxPropertyChangeHandler`
`substanceChangeHandler`
Property change handler on `enabled` property, `componentOrientation` property and on `SubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATION` property.
`protected RolloverTextControlListener`
`substanceRolloverListener`
Listener for transition animations.
`protected ButtonModel`
`transitionModel`
Surrogate button model for tracking the state transitions.
`protected Icon`
`uneditableArrowIcon`

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

`arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, padding, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener, squareButton`

## Constructor Summary

Constructors
Constructor
Description
`SubstanceComboBoxUI(JComboBox combo)`

## Method Summary

Modifier and Type
Method
Description
`void`
`configureArrowButton()`
`protected void`
`configureArrowButtonStraightSide()`
Configures the straight side of the arrow button.
`protected void`
`configureEditor()`
`protected JButton`
`createArrowButton()`
`protected ComboBoxEditor`
`createEditor()`
`protected LayoutManager`
`createLayoutManager()`
`protected ComboPopup`
`createPopup()`
`protected ListCellRenderer`
`createRenderer()`
`static ComponentUI`
`createUI(JComponent comp)`
`protected Dimension`
`getDefaultSize()`
`Dimension`
`getMinimumSize(JComponent c)`
`ComboPopup`
`getPopup()`
Returns the popup of the associated combobox.
`StateTransitionTracker`
`getTransitionTracker()`
Returns the model for tracking the transitions.
`protected void`
`installDefaults()`
`protected void`
`installListeners()`
`void`
`installUI(JComponent c)`
`boolean`
`isInside(MouseEvent me)`
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
`void`
`paint(Graphics g, JComponent c)`
`protected void`
`paintFocus(Graphics g, Rectangle bounds)`
Paints the focus indication.
`protected Rectangle`
`rectangleForCurrentValue()`
`void`
`unconfigureArrowButton()`
`protected void`
`uninstallListeners()`
`void`
`uninstallUI(JComponent c)`

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

`addEditor, createFocusListener, createItemListener, createKeyListener, createListDataListener, createPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, getSizeForComponent, installComponents, installKeyboardActions, isFocusTraversable, isNavigationKey, isPopupVisible, paintCurrentValue, paintCurrentValueBackground, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureEditor, uninstallComponents, uninstallDefaults, uninstallKeyboardActions`

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

`contains, update`

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

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

## Field Details

### substanceChangeHandler

protected SubstanceComboBoxUI.ComboBoxPropertyChangeHandler substanceChangeHandler
Property change handler on `enabled` property, `componentOrientation` property and on `SubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATION` property.

### stateTransitionTracker

protected StateTransitionTracker stateTransitionTracker

### transitionModel

protected ButtonModel transitionModel
Surrogate button model for tracking the state transitions.

### substanceRolloverListener

protected RolloverTextControlListener substanceRolloverListener
Listener for transition animations.

### delegate

protected ComboBoxBackgroundDelegate delegate
Painting delegate.

### uneditableArrowIcon

protected Icon uneditableArrowIcon

### layoutInsets

protected Insets layoutInsets

## Constructor Details

### SubstanceComboBoxUI

public SubstanceComboBoxUI(JComboBox combo)

## Method Details

### createUI

public static ComponentUI createUI(JComponent comp)

### installUI

public void installUI(JComponent c)

Overrides:
  `installUI` in class `BasicComboBoxUI`

### uninstallUI

public void uninstallUI(JComponent c)

Overrides:
  `uninstallUI` in class `BasicComboBoxUI`

### createArrowButton

protected JButton createArrowButton()

Overrides:
  `createArrowButton` in class `BasicComboBoxUI`

### createRenderer

protected ListCellRenderer createRenderer()

Overrides:
  `createRenderer` in class `BasicComboBoxUI`

### installListeners

protected void installListeners()

Overrides:
  `installListeners` in class `BasicComboBoxUI`

### uninstallListeners

protected void uninstallListeners()

Overrides:
  `uninstallListeners` in class `BasicComboBoxUI`

### installDefaults

protected void installDefaults()

Overrides:
  `installDefaults` in class `BasicComboBoxUI`

### createLayoutManager

protected LayoutManager createLayoutManager()

Overrides:
  `createLayoutManager` in class `BasicComboBoxUI`

### rectangleForCurrentValue

protected Rectangle rectangleForCurrentValue()

Overrides:
  `rectangleForCurrentValue` in class `BasicComboBoxUI`

### getDefaultSize

protected Dimension getDefaultSize()

Overrides:
  `getDefaultSize` in class `BasicComboBoxUI`

### getMinimumSize

public Dimension getMinimumSize(JComponent c)

Overrides:
  `getMinimumSize` in class `BasicComboBoxUI`

### createPopup

protected ComboPopup createPopup()

Overrides:
  `createPopup` in class `BasicComboBoxUI`

### paint

public void paint(Graphics g, JComponent c)

Overrides:
  `paint` in class `BasicComboBoxUI`

### paintFocus

protected void paintFocus(Graphics g, Rectangle bounds)
Paints the focus indication.

Parameters:
  `g` - Graphics.
  `bounds` - Bounds for text.

### getPopup

public ComboPopup getPopup()
Returns the popup of the associated combobox.

Returns:
  The popup of the associated combobox.

### configureArrowButton

public void configureArrowButton()

Overrides:
  `configureArrowButton` in class `BasicComboBoxUI`

### configureArrowButtonStraightSide

protected void configureArrowButtonStraightSide()
Configures the straight side of the arrow button.

### unconfigureArrowButton

public void unconfigureArrowButton()

Overrides:
  `unconfigureArrowButton` in class `BasicComboBoxUI`

### configureEditor

protected void configureEditor()

Overrides:
  `configureEditor` in class `BasicComboBoxUI`

### createEditor

protected ComboBoxEditor createEditor()

Overrides:
  `createEditor` in class `BasicComboBoxUI`

### getTransitionTracker

public StateTransitionTracker getTransitionTracker()
Description copied from interface: `TransitionAwareUI`
Returns the model for tracking the transitions.

Specified by:
  `getTransitionTracker` in interface `TransitionAwareUI`
Returns:
  Model for tracking the transitions.

### isInside

public boolean isInside(MouseEvent me)
Description copied from interface: `TransitionAwareUI`
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.

Specified by:
  `isInside` in interface `TransitionAwareUI`
Parameters:
  `me` - Mouse event.
Returns:
  `true` if the mouse position of the specified event lies inside the area of the component designated for transition effects, `false` otherwise.