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.
MetalComboBoxEditor,
MetalComboBoxButton
| Modifier and Type | Class and Description |
|---|---|
class |
MetalComboBoxUI
This class should be treated as a "protected" inner class.
|
class |
MetalComboBoxUI
Deprecated.
As of Java 2 platform v1.4.
|
class |
MetalComboBoxUI
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 and Description |
|---|
MetalComboBoxUI()
|
| Modifier and Type | Method and Description |
|---|---|
void |
configureEditor()
This protected method is implementation specific and should be private.
|
protected JButton |
createArrowButton()
Creates a button which will be used as the control to show or hide the popup portion of the combo box.
|
protected ComboBoxEditor |
createEditor()
Creates the default editor that will be used in editable combo boxes.
|
protected LayoutManager |
createLayoutManager()
Creates a layout manager for managing the components which make up the combo box.
|
protected ComboPopup |
createPopup()
Creates the popup portion of the combo box.
|
PropertyChangeListener |
createPropertyChangeListener()
Creates a
PropertyChangeListener which will be added to the combo box.
|
static ComponentUI |
createUI(JComponent
|
protected void |
editablePropertyChanged(PropertyChangeEvent
Deprecated.
As of Java 2 platform v1.4.
|
int |
getBaseline(JComponent
Returns the baseline.
|
Dimension |
getMinimumSize(JComponent
The minimum size is the size of the display area plus insets plus the button.
|
void |
layoutComboBox(Container
|
void |
paint(Graphics
Paints the specified component appropriately for the look and feel.
|
void |
paintCurrentValue(Graphics
If necessary paints the currently selected item.
|
void |
paintCurrentValueBackground(Graphics
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, createFocusListener, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getBaselineResizeBehavior, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, getSizeForComponent, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isFocusTraversable, isNavigationKey, isPopupVisible, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, updatepublic static ComponentUIcreateUI(JComponent c)
public void paint(Graphicsg, JComponent c)
ComponentUI
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 paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
public void paintCurrentValue(Graphicsg, Rectangle bounds, boolean hasFocus)
paintCurrentValue in class
BasicComboBoxUI
g - Graphics to paint to
bounds - Region to paint current value to
hasFocus - whether or not the JComboBox has focus
NullPointerException - if any of the arguments are null.
public void paintCurrentValueBackground(Graphicsg, Rectangle bounds, boolean hasFocus)
paintCurrentValueBackground in class
BasicComboBoxUI
g - Graphics to paint to
bounds - Region to paint background to
hasFocus - whether or not the JComboBox has focus
NullPointerException - if any of the arguments are null.
public int getBaseline(JComponentc, int width, int height)
getBaseline in class
BasicComboBoxUI
c -
JComponent baseline is being requested for
width - the width to get the baseline for
height - the height to get the baseline for
NullPointerException - if
c is
null
IllegalArgumentException - if width or height is < 0
JComponent.getBaseline(int, int)
protected ComboBoxEditorcreateEditor()
BasicComboBoxUI
setEditor.
createEditor in class
BasicComboBoxUI
ComboBoxEditor used for the combo box
JComboBox.setEditor(javax.swing.ComboBoxEditor)
protected ComboPopupcreatePopup()
BasicComboBoxUI
createPopup in class
BasicComboBoxUI
ComboPopup
ComboPopup
protected JButtoncreateArrowButton()
BasicComboBoxUI
createArrowButton in class
BasicComboBoxUI
public PropertyChangeListenercreatePropertyChangeListener()
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(PropertyChangeEvente)
protected LayoutManagercreateLayoutManager()
BasicComboBoxUI
createLayoutManager in class
BasicComboBoxUI
public void layoutComboBox(Containerparent, MetalComboBoxUI .MetalComboBoxLayoutManager manager)
@Deprecated protected void removeListeners()
public void configureEditor()
BasicComboBoxUI
configureEditor in class
BasicComboBoxUI
BasicComboBoxUI.addEditor()
public void unconfigureEditor()
BasicComboBoxUI
unconfigureEditor in class
BasicComboBoxUI
BasicComboBoxUI.addEditor()
public DimensiongetMinimumSize(JComponent c)
BasicComboBoxUI
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 components
Dimension object or
null
JComponent.getMinimumSize() ,
LayoutManager.minimumLayoutSize(java.awt.Container) ,
ComponentUI.getPreferredSize(javax.swing.JComponent)