javax.swing.plaf.metal

Class MetalComboBoxUI

public class MetalComboBoxUI extends BasicComboBoxUI

A UI delegate for the {@link JComboBox} component.
Nested Class Summary
classMetalComboBoxUI.MetalComboBoxLayoutManager
A layout manager that arranges the editor component (if active) and the button that make up the combo box.
classMetalComboBoxUI.MetalComboPopup
A popup menu for the combo-box.
classMetalComboBoxUI.MetalPropertyChangeListener
A listener used to handle property changes in the {@link JComboBox} component, to ensure that the UI delegate accurately reflects the current state in the rendering onscreen.
Constructor Summary
MetalComboBoxUI()
Constructs a new instance of MetalComboBoxUI.
Method Summary
voidconfigureEditor()
Configures the editor for this combo box.
protected JButtoncreateArrowButton()
Creates a new button for use in rendering the JComboBox.
protected ComboBoxEditorcreateEditor()
Creates an editor for the combo box.
protected LayoutManagercreateLayoutManager()
Creates a new layout manager for the UI delegate.
protected ComboPopupcreatePopup()
Creates a popup for the combo box.
PropertyChangeListenercreatePropertyChangeListener()
Creates a new property change listener.
static ComponentUIcreateUI(JComponent component)
Returns an instance of MetalComboBoxUI.
protected voideditablePropertyChanged(PropertyChangeEvent e)
Updates the button and text field to reflect a change in the 'editable' property.
DimensiongetMinimumSize(JComponent c)
Returns the minimum size for the combo.
voidlayoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
Lays out the ComboBox
voidpaint(Graphics g, JComponent c)
protected voidremoveListeners()
Not used in Classpath.
voidunconfigureEditor()
Unconfigures the editor for this combo box.

Constructor Detail

MetalComboBoxUI

public MetalComboBoxUI()
Constructs a new instance of MetalComboBoxUI.

Method Detail

configureEditor

public void configureEditor()
Configures the editor for this combo box.

createArrowButton

protected JButton createArrowButton()
Creates a new button for use in rendering the JComboBox.

Returns: A button.

createEditor

protected ComboBoxEditor createEditor()
Creates an editor for the combo box.

Returns: An editor.

createLayoutManager

protected LayoutManager createLayoutManager()
Creates a new layout manager for the UI delegate.

Returns: A new layout manager.

createPopup

protected ComboPopup createPopup()
Creates a popup for the combo box.

Returns: A popup.

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener()
Creates a new property change listener.

Returns: A new property change listener.

createUI

public static ComponentUI createUI(JComponent component)
Returns an instance of MetalComboBoxUI.

Parameters: component the component for which we return an UI instance

Returns: an instance of MetalComboBoxUI

editablePropertyChanged

protected void editablePropertyChanged(PropertyChangeEvent e)

Deprecated: 1.4

Updates the button and text field to reflect a change in the 'editable' property.

Parameters: e the event.

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Returns the minimum size for the combo.

Parameters: c the component

Returns: The minimum size for the combo box.

layoutComboBox

public void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
Lays out the ComboBox

paint

public void paint(Graphics g, JComponent c)

removeListeners

protected void removeListeners()

Deprecated: 1.4

Not used in Classpath.

unconfigureEditor

public void unconfigureEditor()
Unconfigures the editor for this combo box.