Module java.desktop

Class MetalComboBoxUI


  • public class MetalComboBoxUI
    extends BasicComboBoxUI
    Metal UI for JComboBox

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

    See Also:
    MetalComboBoxEditor, MetalComboBoxButton
    • Constructor Detail

      • MetalComboBoxUI

        public MetalComboBoxUI()
    • Method Detail

      • createUI

        public static ComponentUI createUI​(JComponent c)
        Constructs an instance of MetalComboBoxUI.
        Parameters:
        c - a component
        Returns:
        an instance of MetalComboBoxUI
      • paintCurrentValue

        public void paintCurrentValue​(Graphics g,
                                      Rectangle bounds,
                                      boolean hasFocus)
        If necessary paints the currently selected item.
        Overrides:
        paintCurrentValue in class BasicComboBoxUI
        Parameters:
        g - Graphics to paint to
        bounds - Region to paint current value to
        hasFocus - whether or not the JComboBox has focus
        Throws:
        NullPointerException - if any of the arguments are null.
        Since:
        1.5
      • paintCurrentValueBackground

        public void paintCurrentValueBackground​(Graphics g,
                                                Rectangle bounds,
                                                boolean hasFocus)
        If necessary paints the background of the currently selected item.
        Overrides:
        paintCurrentValueBackground in class BasicComboBoxUI
        Parameters:
        g - Graphics to paint to
        bounds - Region to paint background to
        hasFocus - whether or not the JComboBox has focus
        Throws:
        NullPointerException - if any of the arguments are null.
        Since:
        1.5
      • editablePropertyChanged

        @Deprecated
        protected void editablePropertyChanged​(PropertyChangeEvent e)
        Deprecated.
        As of Java 2 platform v1.4.
        As of Java 2 platform v1.4 this method is no longer used. Do not call or override. All the functionality of this method is in the MetalPropertyChangeListener.
        Parameters:
        e - an instance of PropertyChangeEvent
      • removeListeners

        @Deprecated
        protected void removeListeners()
        Deprecated.
        As of Java 2 platform v1.4.
        As of Java 2 platform v1.4 this method is no longer used.