Class RadianceComboBoxUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ComboBoxUI
-
- javax.swing.plaf.basic.BasicComboBoxUI
-
- org.pushingpixels.radiance.theming.internal.ui.RadianceComboBoxUI
-
- All Implemented Interfaces:
TransitionAwareUI
public class RadianceComboBoxUI extends javax.swing.plaf.basic.BasicComboBoxUI implements TransitionAwareUI
UI for combo boxes in Radiance look and feel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRadianceComboBoxUI.ComboBoxPropertyChangeHandlerThis property change handler changes combo box arrow icon based on the enabled status of the combo box.private classRadianceComboBoxUI.RadianceComboBoxLayoutManagerLayout manager for 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
Fields Modifier and Type Field Description private ComboBoxBackgroundDelegatedelegatePainting delegate.private java.awt.InsetslayoutInsetsprivate RadianceComboBoxUI.ComboBoxPropertyChangeHandlerradianceChangeHandlerProperty change handler.private RolloverTextControlListenerradianceRolloverListenerListener for transition animations.private StateTransitionTrackerstateTransitionTrackerprivate javax.swing.ButtonModeltransitionModelSurrogate button model for tracking the state transitions.private javax.swing.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 Modifier Constructor Description protectedRadianceComboBoxUI(javax.swing.JComboBox<java.lang.Object> combo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureArrowButton()protected voidconfigureEditor()protected javax.swing.JButtoncreateArrowButton()protected javax.swing.ComboBoxEditorcreateEditor()protected java.awt.LayoutManagercreateLayoutManager()protected javax.swing.plaf.basic.ComboPopupcreatePopup()protected javax.swing.ListCellRenderer<java.lang.Object>createRenderer()static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent comp)private javax.swing.IcongetCurrentIcon(javax.swing.JButton button)Returns the icon for the specified arrow button.protected java.awt.DimensiongetDefaultSize()java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)javax.swing.plaf.basic.ComboPopupgetPopup()Returns the popup of the associated combobox.java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults()protected voidinstallListeners()voidinstallUI(javax.swing.JComponent c)booleanisInside(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.voidpaint(java.awt.Graphics g, javax.swing.JComponent c)private voidpaintFocus(java.awt.Graphics g, java.awt.Rectangle bounds)Paints the focus indication.protected java.awt.RectanglerectangleForCurrentValue()protected voiduninstallListeners()voiduninstallUI(javax.swing.JComponent c)voidupdate(java.awt.Graphics g, javax.swing.JComponent c)private voidupdateComboBoxBorder()-
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI
addEditor, createFocusListener, createItemListener, createKeyListener, createListDataListener, createPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getDisplaySize, getInsets, getMaximumSize, getSizeForComponent, installComponents, installKeyboardActions, isFocusTraversable, isNavigationKey, isPopupVisible, paintCurrentValue, paintCurrentValueBackground, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, unconfigureEditor, uninstallComponents, uninstallDefaults, uninstallKeyboardActions
-
-
-
-
Field Detail
-
radianceChangeHandler
private RadianceComboBoxUI.ComboBoxPropertyChangeHandler radianceChangeHandler
Property change handler.
-
stateTransitionTracker
private StateTransitionTracker stateTransitionTracker
-
transitionModel
private javax.swing.ButtonModel transitionModel
Surrogate button model for tracking the state transitions.
-
radianceRolloverListener
private RolloverTextControlListener radianceRolloverListener
Listener for transition animations.
-
delegate
private ComboBoxBackgroundDelegate delegate
Painting delegate.
-
uneditableArrowIcon
private javax.swing.Icon uneditableArrowIcon
-
layoutInsets
private java.awt.Insets layoutInsets
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.basic.BasicComboBoxUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.basic.BasicComboBoxUI
-
createArrowButton
protected javax.swing.JButton createArrowButton()
- Overrides:
createArrowButtonin classjavax.swing.plaf.basic.BasicComboBoxUI
-
getCurrentIcon
private javax.swing.Icon getCurrentIcon(javax.swing.JButton button)
Returns the icon for the specified arrow button.- Parameters:
button- Arrow button.- Returns:
- Icon for the specified button.
-
createRenderer
protected javax.swing.ListCellRenderer<java.lang.Object> createRenderer()
- Overrides:
createRendererin classjavax.swing.plaf.basic.BasicComboBoxUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classjavax.swing.plaf.basic.BasicComboBoxUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classjavax.swing.plaf.basic.BasicComboBoxUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classjavax.swing.plaf.basic.BasicComboBoxUI
-
createLayoutManager
protected java.awt.LayoutManager createLayoutManager()
- Overrides:
createLayoutManagerin classjavax.swing.plaf.basic.BasicComboBoxUI
-
rectangleForCurrentValue
protected java.awt.Rectangle rectangleForCurrentValue()
- Overrides:
rectangleForCurrentValuein classjavax.swing.plaf.basic.BasicComboBoxUI
-
getDefaultSize
protected java.awt.Dimension getDefaultSize()
- Overrides:
getDefaultSizein classjavax.swing.plaf.basic.BasicComboBoxUI
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSizein classjavax.swing.plaf.basic.BasicComboBoxUI
-
createPopup
protected javax.swing.plaf.basic.ComboPopup createPopup()
- Overrides:
createPopupin classjavax.swing.plaf.basic.BasicComboBoxUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
paintin classjavax.swing.plaf.basic.BasicComboBoxUI
-
paintFocus
private 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:
configureArrowButtonin classjavax.swing.plaf.basic.BasicComboBoxUI
-
configureEditor
protected void configureEditor()
- Overrides:
configureEditorin classjavax.swing.plaf.basic.BasicComboBoxUI
-
createEditor
protected javax.swing.ComboBoxEditor createEditor()
- Overrides:
createEditorin classjavax.swing.plaf.basic.BasicComboBoxUI
-
updateComboBoxBorder
private void updateComboBoxBorder()
-
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(java.awt.event.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.
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
updatein classjavax.swing.plaf.ComponentUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classjavax.swing.plaf.basic.BasicComboBoxUI
-
-