javax.swing.plaf.metal
Class MetalComboBoxUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ComboBoxUI
          extended by javax.swing.plaf.basic.BasicComboBoxUI
              extended by javax.swing.plaf.metal.MetalComboBoxUI

public class MetalComboBoxUI
extends BasicComboBoxUI

A UI delegate for the JComboBox component.


Nested Class Summary
 class MetalComboBoxUI.MetalComboBoxLayoutManager
          A layout manager that arranges the editor component (if active) and the button that make up the combo box.
 class MetalComboBoxUI.MetalComboPopup
          Deprecated. 1.4
 class MetalComboBoxUI.MetalPropertyChangeListener
          A listener used to handle property changes in the JComboBox component, to ensure that the UI delegate accurately reflects the current state in the rendering onscreen.
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicComboBoxUI
BasicComboBoxUI.ComboBoxLayoutManager, BasicComboBoxUI.FocusHandler, BasicComboBoxUI.ItemHandler, BasicComboBoxUI.KeyHandler, BasicComboBoxUI.ListDataHandler, BasicComboBoxUI.PropertyChangeHandler
 
Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, listBox, listDataListener, popup, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener
 
Constructor Summary
MetalComboBoxUI()
          Constructs a new instance of MetalComboBoxUI.
 
Method Summary
 void configureEditor()
          Configures the editor for this combo box.
protected  JButton createArrowButton()
          Creates a new button for use in rendering the JComboBox.
protected  ComboBoxEditor createEditor()
          Creates an editor for the combo box.
protected  LayoutManager createLayoutManager()
          Creates a new layout manager for the UI delegate.
protected  ComboPopup createPopup()
          Creates a popup for the combo box.
 PropertyChangeListener createPropertyChangeListener()
          Creates a new property change listener.
static ComponentUI createUI(JComponent component)
          Returns an instance of MetalComboBoxUI.
protected  void editablePropertyChanged(PropertyChangeEvent e)
          Deprecated. 1.4
 Dimension getMinimumSize(JComponent c)
          Returns the minimum size for the combo.
 void layoutComboBox(Container parent, MetalComboBoxUI.MetalComboBoxLayoutManager manager)
          Lays out the ComboBox
 void paint(Graphics g, JComponent c)
          Paints given menu item using specified graphics context
protected  void removeListeners()
          Deprecated. 1.4
 void unconfigureEditor()
          Unconfigures the editor for this combo box.
 
Methods inherited from class javax.swing.plaf.basic.BasicComboBoxUI
addEditor, configureArrowButton, createFocusListener, createItemListener, createKeyListener, createListDataListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getDefaultSize, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, installComponents, installDefaults, installKeyboardActions, installListeners, installUI, isFocusTraversable, isNavigationKey, isPopupVisible, paintCurrentValue, paintCurrentValueBackground, rectangleForCurrentValue, removeEditor, selectNextPossibleValue, selectPreviousPossibleValue, setPopupVisible, toggleOpenClose, unconfigureArrowButton, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalComboBoxUI

public MetalComboBoxUI()
Constructs a new instance of MetalComboBoxUI.

Method Detail

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

createEditor

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

Overrides:
createEditor in class BasicComboBoxUI
Returns:
An editor.

createPopup

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

Overrides:
createPopup in class BasicComboBoxUI
Returns:
A popup.

createArrowButton

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

Overrides:
createArrowButton in class BasicComboBoxUI
Returns:
A button.

createPropertyChangeListener

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

Overrides:
createPropertyChangeListener in class BasicComboBoxUI
Returns:
A new property change listener.

paint

public void paint(Graphics g,
                  JComponent c)
Description copied from class: BasicComboBoxUI
Paints given menu item using specified graphics context

Overrides:
paint in class BasicComboBoxUI
Parameters:
g - The graphics context used to paint this combo box
c - comboBox which needs to be painted.

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.

createLayoutManager

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

Overrides:
createLayoutManager in class BasicComboBoxUI
Returns:
A new layout manager.

removeListeners

protected void removeListeners()
Deprecated. 1.4

Not used in Classpath.


getMinimumSize

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

Overrides:
getMinimumSize in class BasicComboBoxUI
Parameters:
c - the component
Returns:
The minimum size for the combo box.

configureEditor

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

Overrides:
configureEditor in class BasicComboBoxUI

unconfigureEditor

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

Overrides:
unconfigureEditor in class BasicComboBoxUI

layoutComboBox

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