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 class
RadianceComboBoxUI.ComboBoxPropertyChangeHandler
This property change handler changes combo box arrow icon based on the enabled status of the combo box.private class
RadianceComboBoxUI.RadianceComboBoxLayoutManager
Layout 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 ComboBoxBackgroundDelegate
delegate
Painting delegate.private java.awt.Insets
layoutInsets
private RadianceComboBoxUI.ComboBoxPropertyChangeHandler
radianceChangeHandler
Property change handler.private RolloverTextControlListener
radianceRolloverListener
Listener for transition animations.private StateTransitionTracker
stateTransitionTracker
private javax.swing.ButtonModel
transitionModel
Surrogate button model for tracking the state transitions.private javax.swing.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 Modifier Constructor Description protected
RadianceComboBoxUI(javax.swing.JComboBox<java.lang.Object> combo)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureArrowButton()
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<java.lang.Object>
createRenderer()
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent comp)
private javax.swing.Icon
getCurrentIcon(javax.swing.JButton button)
Returns the icon for the specified arrow button.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.java.awt.Dimension
getPreferredSize(javax.swing.JComponent c)
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)
private void
paintFocus(java.awt.Graphics g, java.awt.Rectangle bounds)
Paints the focus indication.protected java.awt.Rectangle
rectangleForCurrentValue()
protected void
uninstallListeners()
void
uninstallUI(javax.swing.JComponent c)
void
update(java.awt.Graphics g, javax.swing.JComponent c)
private void
updateComboBoxBorder()
-
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:
installUI
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUI
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
createArrowButton
protected javax.swing.JButton createArrowButton()
- Overrides:
createArrowButton
in 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:
createRenderer
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
installListeners
protected void installListeners()
- Overrides:
installListeners
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
createLayoutManager
protected java.awt.LayoutManager createLayoutManager()
- Overrides:
createLayoutManager
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
rectangleForCurrentValue
protected java.awt.Rectangle rectangleForCurrentValue()
- Overrides:
rectangleForCurrentValue
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
getDefaultSize
protected java.awt.Dimension getDefaultSize()
- Overrides:
getDefaultSize
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSize
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
createPopup
protected javax.swing.plaf.basic.ComboPopup createPopup()
- Overrides:
createPopup
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
paint
in 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:
configureArrowButton
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
configureEditor
protected void configureEditor()
- Overrides:
configureEditor
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
createEditor
protected javax.swing.ComboBoxEditor createEditor()
- Overrides:
createEditor
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
updateComboBoxBorder
private void updateComboBoxBorder()
-
getTransitionTracker
public StateTransitionTracker getTransitionTracker()
Description copied from interface:TransitionAwareUI
Returns the model for tracking the transitions.- Specified by:
getTransitionTracker
in interfaceTransitionAwareUI
- 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 interfaceTransitionAwareUI
- 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.
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
update
in classjavax.swing.plaf.ComponentUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in classjavax.swing.plaf.basic.BasicComboBoxUI
-
-