public class MetalComboBoxUI extends BasicComboBoxUI
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
.
Modifier and Type | Class | Description |
---|---|---|
class |
MetalComboBoxUI.MetalComboBoxLayoutManager |
This class should be treated as a "protected" inner class. |
class |
MetalComboBoxUI.MetalComboPopup |
Deprecated. As of Java 2 platform v1.4. |
class |
MetalComboBoxUI.MetalPropertyChangeListener |
This class should be treated as a "protected" inner class. |
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, padding, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener, squareButton
Constructor | Description |
---|---|
MetalComboBoxUI() |
Constructs a MetalComboBoxUI . |
Modifier and Type | Method | Description |
---|---|---|
void |
configureEditor() |
This protected method is implementation specific and should be private. |
PropertyChangeListener |
createPropertyChangeListener() |
Creates a PropertyChangeListener which will be added to the combo box. |
static ComponentUI |
createUI |
Constructs an instance of MetalComboBoxUI . |
protected void |
editablePropertyChanged |
Deprecated. As of Java 2 platform v1.4. |
int |
getBaseline |
Returns the baseline. |
void |
layoutComboBox |
Lays out the JComboBox in the parent container. |
void |
paintCurrentValue |
If necessary paints the currently selected item. |
void |
paintCurrentValueBackground |
If necessary paints the background of the currently selected item. |
protected void |
removeListeners() |
Deprecated. As of Java 2 platform v1.4. |
void |
unconfigureEditor() |
This protected method is implementation specific and should be private. |
addEditor, configureArrowButton, createArrowButton, createEditor, createFocusListener, createItemListener, createKeyListener, createLayoutManager, createListDataListener, createPopup, createRenderer, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMinimumSize, getSizeForComponent, installComponents, installDefaults, installKeyboardActions, installListeners, isFocusTraversable, isNavigationKey, isPopupVisible, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getPreferredSize, installUI, paint, uninstallUI, update
public MetalComboBoxUI()
MetalComboBoxUI
.public static ComponentUI createUI(JComponent c)
MetalComboBoxUI
.c
- a componentMetalComboBoxUI
public void paintCurrentValue(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValue
in class BasicComboBoxUI
g
- Graphics to paint tobounds
- Region to paint current value tohasFocus
- whether or not the JComboBox has focusNullPointerException
- if any of the arguments are null.public void paintCurrentValueBackground(Graphics g, Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground
in class BasicComboBoxUI
g
- Graphics to paint tobounds
- Region to paint background tohasFocus
- whether or not the JComboBox has focusNullPointerException
- if any of the arguments are null.public int getBaseline(JComponent c, int width, int height)
getBaseline
in class BasicComboBoxUI
c
- JComponent
baseline is being requested forwidth
- the width to get the baseline forheight
- the height to get the baseline forNullPointerException
- if c
is null
IllegalArgumentException
- if width or height is < 0public PropertyChangeListener createPropertyChangeListener()
BasicComboBoxUI
PropertyChangeListener
which will be added to the combo box. If this method returns null then it will not be added to the combo box.createPropertyChangeListener
in class BasicComboBoxUI
PropertyChangeListener
or null@Deprecated protected void editablePropertyChanged(PropertyChangeEvent e)
e
- an instance of PropertyChangeEvent
public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
JComboBox
in the parent
container.parent
- a containermanager
- an instance of MetalComboBoxLayoutManager
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
configureEditor
in class BasicComboBoxUI
public void unconfigureEditor()
BasicComboBoxUI
unconfigureEditor
in class BasicComboBoxUI
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/metal/MetalComboBoxUI.html