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 classSubstanceComboBoxUI.ComboBoxPropertyChangeHandlerThis 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 ComboBoxBackgroundDelegatedelegatePainting delegate.protected InsetslayoutInsetsprotected StateTransitionTrackerstateTransitionTrackerprotected SubstanceComboBoxUI.ComboBoxPropertyChangeHandlersubstanceChangeHandlerProperty change handler onenabledproperty,componentOrientationproperty and onSubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATIONproperty.protected RolloverTextControlListenersubstanceRolloverListenerListener for transition animations.protected ButtonModeltransitionModelSurrogate button model for tracking the state transitions.protected IconuneditableArrowIcon-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureArrowButton()protected voidconfigureArrowButtonStraightSide()Configures the straight side of the arrow button.protected voidconfigureEditor()protected JButtoncreateArrowButton()protected ComboBoxEditorcreateEditor()protected LayoutManagercreateLayoutManager()protected ComboPopupcreatePopup()protected ListCellRenderercreateRenderer()static ComponentUIcreateUI(JComponent comp)protected DimensiongetDefaultSize()DimensiongetMinimumSize(JComponent c)ComboPopupgetPopup()Returns the popup of the associated combobox.StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults()protected voidinstallListeners()voidinstallUI(JComponent c)booleanisInside(MouseEvent me)Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.voidpaint(Graphics g, JComponent c)protected voidpaintFocus(Graphics g, Rectangle bounds)Paints the focus indication.protected RectanglerectangleForCurrentValue()voidunconfigureArrowButton()protected voiduninstallListeners()voiduninstallUI(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
-
-
-
-
Field Detail
-
substanceChangeHandler
protected SubstanceComboBoxUI.ComboBoxPropertyChangeHandler substanceChangeHandler
Property change handler onenabledproperty,componentOrientationproperty and onSubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATIONproperty.
-
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 Detail
-
SubstanceComboBoxUI
public SubstanceComboBoxUI(JComboBox combo)
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent comp)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUIin classBasicComboBoxUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUIin classBasicComboBoxUI
-
createArrowButton
protected JButton createArrowButton()
- Overrides:
createArrowButtonin classBasicComboBoxUI
-
createRenderer
protected ListCellRenderer createRenderer()
- Overrides:
createRendererin classBasicComboBoxUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicComboBoxUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicComboBoxUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicComboBoxUI
-
createLayoutManager
protected LayoutManager createLayoutManager()
- Overrides:
createLayoutManagerin classBasicComboBoxUI
-
rectangleForCurrentValue
protected Rectangle rectangleForCurrentValue()
- Overrides:
rectangleForCurrentValuein classBasicComboBoxUI
-
getDefaultSize
protected Dimension getDefaultSize()
- Overrides:
getDefaultSizein classBasicComboBoxUI
-
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
getMinimumSizein classBasicComboBoxUI
-
createPopup
protected ComboPopup createPopup()
- Overrides:
createPopupin classBasicComboBoxUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicComboBoxUI
-
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:
configureArrowButtonin classBasicComboBoxUI
-
configureArrowButtonStraightSide
protected void configureArrowButtonStraightSide()
Configures the straight side of the arrow button.
-
unconfigureArrowButton
public void unconfigureArrowButton()
- Overrides:
unconfigureArrowButtonin classBasicComboBoxUI
-
configureEditor
protected void configureEditor()
- Overrides:
configureEditorin classBasicComboBoxUI
-
createEditor
protected ComboBoxEditor createEditor()
- Overrides:
createEditorin classBasicComboBoxUI
-
getTransitionTracker
public StateTransitionTracker getTransitionTracker()
Description copied from interface:TransitionAwareUIReturns the model for tracking the transitions.- Specified by:
getTransitionTrackerin interfaceTransitionAwareUI- Returns:
- Model for tracking the transitions.
-
isInside
public boolean isInside(MouseEvent me)
Description copied from interface:TransitionAwareUIChecks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInsidein interfaceTransitionAwareUI- Parameters:
me- Mouse event.- Returns:
trueif the mouse position of the specified event lies inside the area of the component designated for transition effects,falseotherwise.
-
-