java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ComboBoxUI
javax.swing.plaf.basic.BasicComboBoxUI
javax.swing.plaf.metal.MetalComboBoxUI
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
This class should be treated as a "protected" inner class.class
Deprecated.As of Java 2 platform v1.4.class
This class should be treated as a "protected" inner class.Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
-
Field Summary
Fields declared in 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This protected method is implementation specific and should be private.Creates aPropertyChangeListener
which will be added to the combo box.static ComponentUI
Constructs an instance ofMetalComboBoxUI
.protected void
Deprecated.As of Java 2 platform v1.4.int
getBaseline
(JComponent c, int width, int height) Returns the baseline.void
layoutComboBox
(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager) Lays out theJComboBox
in theparent
container.void
paintCurrentValue
(Graphics g, Rectangle bounds, boolean hasFocus) If necessary paints the currently selected item.void
paintCurrentValueBackground
(Graphics g, Rectangle bounds, boolean hasFocus) If necessary paints the background of the currently selected item.protected void
Deprecated.As of Java 2 platform v1.4.void
This protected method is implementation specific and should be private.Methods declared in class javax.swing.plaf.basic.BasicComboBoxUI
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
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getPreferredSize, installUI, paint, uninstallUI, update
-
Constructor Details
-
MetalComboBoxUI
public MetalComboBoxUI()Constructs aMetalComboBoxUI
.
-
-
Method Details
-
createUI
Constructs an instance ofMetalComboBoxUI
.- Parameters:
c
- a component- Returns:
- an instance of
MetalComboBoxUI
-
paintCurrentValue
If necessary paints the currently selected item.- Overrides:
paintCurrentValue
in classBasicComboBoxUI
- Parameters:
g
- Graphics to paint tobounds
- Region to paint current value tohasFocus
- whether or not the JComboBox has focus- Throws:
NullPointerException
- if any of the arguments are null.- Since:
- 1.5
-
paintCurrentValueBackground
If necessary paints the background of the currently selected item.- Overrides:
paintCurrentValueBackground
in classBasicComboBoxUI
- Parameters:
g
- Graphics to paint tobounds
- Region to paint background tohasFocus
- whether or not the JComboBox has focus- Throws:
NullPointerException
- if any of the arguments are null.- Since:
- 1.5
-
getBaseline
Returns the baseline.- Overrides:
getBaseline
in classBasicComboBoxUI
- Parameters:
c
-JComponent
baseline is being requested forwidth
- the width to get the baseline forheight
- the height to get the baseline for- Returns:
- baseline or a value < 0 indicating there is no reasonable baseline
- Throws:
NullPointerException
- ifc
isnull
IllegalArgumentException
- if width or height is < 0- Since:
- 1.6
- See Also:
-
createPropertyChangeListener
Description copied from class:BasicComboBoxUI
Creates aPropertyChangeListener
which will be added to the combo box. If this method returns null then it will not be added to the combo box.- Overrides:
createPropertyChangeListener
in classBasicComboBoxUI
- Returns:
- an instance of a
PropertyChangeListener
or null
-
editablePropertyChanged
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 ofPropertyChangeEvent
-
layoutComboBox
Lays out theJComboBox
in theparent
container.- Parameters:
parent
- a containermanager
- an instance ofMetalComboBoxLayoutManager
-
removeListeners
Deprecated.As of Java 2 platform v1.4.As of Java 2 platform v1.4 this method is no longer used. -
configureEditor
public void configureEditor()Description copied from class:BasicComboBoxUI
This protected method is implementation specific and should be private. do not call or override.- Overrides:
configureEditor
in classBasicComboBoxUI
- See Also:
-
unconfigureEditor
public void unconfigureEditor()Description copied from class:BasicComboBoxUI
This protected method is implementation specific and should be private. Do not call or override.- Overrides:
unconfigureEditor
in classBasicComboBoxUI
- See Also:
-