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.
MetalComboBoxEditor, MetalComboBoxButton
| Modifier and Type | Class and 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 public MetalComboBoxUI()
public static ComponentUI createUI(JComponent c)
public void paint(Graphics g,
JComponent c) Description copied from class: ComponentUI
Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.
paint in class BasicComboBoxUI
g - the Graphics context in which to paintc - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)public void paintCurrentValue(Graphics g,
Rectangle bounds,
boolean hasFocus) If necessary paints the currently selected item.
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) If necessary paints the background of the currently selected item.
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) Returns the baseline.
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 < 0JComponent.getBaseline(int, int)protected ComboBoxEditor createEditor()
Description copied from class: BasicComboBoxUI
Creates the default editor that will be used in editable combo boxes. A default editor will be used only if an editor has not been explicitly set with setEditor.
createEditor in class BasicComboBoxUI
ComboBoxEditor used for the combo boxJComboBox.setEditor(javax.swing.ComboBoxEditor)protected ComboPopup createPopup()
Description copied from class: BasicComboBoxUI
Creates the popup portion of the combo box.
createPopup in class BasicComboBoxUI
ComboPopup
ComboPopupprotected JButton createArrowButton()
Description copied from class: BasicComboBoxUI
Creates a button which will be used as the control to show or hide the popup portion of the combo box.
createArrowButton in class BasicComboBoxUI
public PropertyChangeListener createPropertyChangeListener()
Description copied from class: BasicComboBoxUI
Creates a 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)
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.
protected LayoutManager createLayoutManager()
Description copied from class: BasicComboBoxUI
Creates a layout manager for managing the components which make up the combo box.
createLayoutManager in class BasicComboBoxUI
public void layoutComboBox(Container parent,
MetalComboBoxUI.MetalComboBoxLayoutManager manager) @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.
public void configureEditor()
Description copied from class: BasicComboBoxUI
This protected method is implementation specific and should be private. do not call or override.
configureEditor in class BasicComboBoxUI
BasicComboBoxUI.addEditor()public void unconfigureEditor()
Description copied from class: BasicComboBoxUI
This protected method is implementation specific and should be private. Do not call or override.
unconfigureEditor in class BasicComboBoxUI
BasicComboBoxUI.addEditor()public Dimension getMinimumSize(JComponent c)
Description copied from class: BasicComboBoxUI
The minimum size is the size of the display area plus insets plus the button.
getMinimumSize in class BasicComboBoxUI
c - the component whose minimum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsDimension object or null
JComponent.getMinimumSize(), LayoutManager.minimumLayoutSize(java.awt.Container), ComponentUI.getPreferredSize(javax.swing.JComponent)
© 1993–2017, 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.