Class 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
    • 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
      • Methods inherited from class javax.swing.plaf.ComponentUI

        contains
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • transitionModel

        private javax.swing.ButtonModel transitionModel
        Surrogate button model for tracking the state transitions.
      • uneditableArrowIcon

        private javax.swing.Icon uneditableArrowIcon
      • layoutInsets

        private java.awt.Insets layoutInsets
    • Constructor Detail

      • RadianceComboBoxUI

        protected RadianceComboBoxUI​(javax.swing.JComboBox<java.lang.Object> 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
      • 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 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

        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 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
      • updateComboBoxBorder

        private void updateComboBoxBorder()
      • 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.
      • update

        public void update​(java.awt.Graphics g,
                           javax.swing.JComponent c)
        Overrides:
        update in class javax.swing.plaf.ComponentUI
      • getPreferredSize

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