org.pushingpixels.substance.internal.ui
Class SubstanceComboBoxUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ComboBoxUI
          extended by javax.swing.plaf.basic.BasicComboBoxUI
              extended by org.pushingpixels.substance.internal.ui.SubstanceComboBoxUI
All Implemented Interfaces:
TransitionAwareUI

public class SubstanceComboBoxUI
extends javax.swing.plaf.basic.BasicComboBoxUI
implements TransitionAwareUI

UI for combo boxes in Substance look and feel.


Nested Class Summary
 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
javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager, javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler, javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler, javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler, javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler, javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
 
Field Summary
protected  StateTransitionTracker stateTransitionTracker
           
protected  SubstanceComboBoxUI.ComboBoxPropertyChangeHandler substanceChangeHandler
          Property change handler on enabled property, componentOrientation property and on SubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATION property.
 
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener
 
Constructor Summary
SubstanceComboBoxUI(javax.swing.JComboBox combo)
           
 
Method Summary
 void configureArrowButton()
           
protected  void configureArrowButtonStraightSide()
          Configures the straight side of the arrow button.
protected  void configureEditor()
           
protected  javax.swing.JButton createArrowButton()
           
protected  javax.swing.ComboBoxEditor createEditor()
           
protected  java.awt.LayoutManager createLayoutManager()
           
protected  javax.swing.plaf.basic.ComboPopup createPopup()
           
protected  javax.swing.ListCellRenderer createRenderer()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
           
protected  java.awt.Dimension getDefaultSize()
           
 java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
           
 javax.swing.plaf.basic.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(javax.swing.JComponent c)
           
 boolean isInside(java.awt.event.MouseEvent me)
          Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
protected  void paintFocus(java.awt.Graphics g, java.awt.Rectangle bounds)
          Paints the focus indication.
protected  java.awt.Rectangle rectangleForCurrentValue()
           
 void unconfigureArrowButton()
           
protected  void uninstallListeners()
           
 void uninstallUI(javax.swing.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, 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 Detail

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
Constructor Detail

SubstanceComboBoxUI

public SubstanceComboBoxUI(javax.swing.JComboBox combo)
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.basic.BasicComboBoxUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.basic.BasicComboBoxUI

createArrowButton

protected javax.swing.JButton createArrowButton()
Overrides:
createArrowButton in class javax.swing.plaf.basic.BasicComboBoxUI

createRenderer

protected javax.swing.ListCellRenderer createRenderer()
Overrides:
createRenderer in class javax.swing.plaf.basic.BasicComboBoxUI

installListeners

protected void installListeners()
Overrides:
installListeners in class javax.swing.plaf.basic.BasicComboBoxUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicComboBoxUI

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class javax.swing.plaf.basic.BasicComboBoxUI

createLayoutManager

protected java.awt.LayoutManager createLayoutManager()
Overrides:
createLayoutManager in class javax.swing.plaf.basic.BasicComboBoxUI

rectangleForCurrentValue

protected java.awt.Rectangle rectangleForCurrentValue()
Overrides:
rectangleForCurrentValue in class javax.swing.plaf.basic.BasicComboBoxUI

getDefaultSize

protected java.awt.Dimension getDefaultSize()
Overrides:
getDefaultSize in class javax.swing.plaf.basic.BasicComboBoxUI

getMinimumSize

public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
Overrides:
getMinimumSize in class javax.swing.plaf.basic.BasicComboBoxUI

createPopup

protected javax.swing.plaf.basic.ComboPopup createPopup()
Overrides:
createPopup in class javax.swing.plaf.basic.BasicComboBoxUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.basic.BasicComboBoxUI

paintFocus

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

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

getPopup

public javax.swing.plaf.basic.ComboPopup getPopup()
Returns the popup of the associated combobox.

Returns:
The popup of the associated combobox.

configureArrowButton

public void configureArrowButton()
Overrides:
configureArrowButton in class javax.swing.plaf.basic.BasicComboBoxUI

configureArrowButtonStraightSide

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


unconfigureArrowButton

public void unconfigureArrowButton()
Overrides:
unconfigureArrowButton in class javax.swing.plaf.basic.BasicComboBoxUI

configureEditor

protected void configureEditor()
Overrides:
configureEditor in class javax.swing.plaf.basic.BasicComboBoxUI

createEditor

protected javax.swing.ComboBoxEditor createEditor()
Overrides:
createEditor in class javax.swing.plaf.basic.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(java.awt.event.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.