API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicComboBoxUI View Source
Author(s)
Arnaud Weber
Tom Santos
Mark Davidson
Since
Version
1.186 08/03/06
Serial
Hierarchy
 Object
      ComponentUI
          ComboBoxUI
              BasicComboBoxUI
Implements
Subclasses
Description
public class BasicComboBoxUI
  Basic UI implementation for JComboBox.
See also:   
Constructors
public BasicComboBoxUI ()
Methods
Hide/Show inherited methods
public void addEditor ()
  This public method is implementation specific and should be private.
public void configureArrowButton ()
  This public method is implementation specific and should be private.
protected void configureEditor ()
  This protected method is implementation specific and should be private.
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
protected JButton createArrowButton ()
  Creates an 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 FocusListener createFocusListener ()
  Creates a FocusListener which will be added to the combo box.
protected ItemListener createItemListener ()
  Creates an ItemListener which will be added to the combo box.
protected KeyListener createKeyListener ()
  Creates a KeyListener which will be added to the combo box.
protected LayoutManager createLayoutManager ()
  Creates a layout manager for managing the components which make up the combo box.
protected ListDataListener createListDataListener ()
  Creates a list data listener which will be added to the ComboBoxModel.
protected ComboPopup createPopup ()
  Creates the popup portion of the combo box.
protected PropertyChangeListener createPropertyChangeListener ()
  Creates a PropertyChangeListener which will be added to the combo box.
protected ListCellRenderer createRenderer ()
  Creates the default renderer that will be used in a non-editiable combo box.
publicstatic ComponentUI createUI (JComponent c) [Overrides ComponentUI]
public Accessible getAccessibleChild (JComponent c, int i) [Overrides ComponentUI]
public int getAccessibleChildrenCount (JComponent c) [Overrides ComponentUI]
public int getBaseline (JComponent c, int width, int height) [Overrides ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Overrides ComponentUI]
  Returns an enum indicating how the baseline of the component changes as the size changes.
protected Dimension getDefaultSize ()
  Return the default size of an empty display area of the combo box using the current renderer and font.
protected Dimension getDisplaySize ()
  Returns the calculated size of the display area.
pack-private InputMap getInputMap (int condition)
protected Insets getInsets ()
Gets the insets from the JComboBox.
public Dimension getMaximumSize (JComponent c) [Overrides ComponentUI]
public Dimension getMinimumSize (JComponent c) [Overrides ComponentUI]
The minumum size is the size of the display area plus insets plus the button.
public Dimension getPreferredSize (JComponent c) [Overrides ComponentUI]
protected void installComponents ()
  Creates and initializes the components which make up the aggregate combo box.
protected void installDefaults ()
Installs the default colors, default font, default renderer, and default editor into the JComboBox.
protected void installKeyboardActions ()
  Adds keyboard actions to the JComboBox.
protected void installListeners ()
  Create and install the listeners for the combo box and its model.
public void installUI (JComponent c) [Overrides ComponentUI]
public boolean isFocusTraversable (JComboBox c) [Specified in ComboBoxUI]
  Determines if the JComboBox is focus traversable.
protected boolean isNavigationKey (int keyCode)
  Returns whether or not the supplied keyCode maps to a key that is used for navigation.
public boolean isPopupVisible (JComboBox c) [Specified in ComboBoxUI]
Tells if the popup is visible or not.
pack-private boolean isTableCellEditor ()
pack-privatestatic void loadActionMap (LazyActionMap map)
Populates ComboBox's actions.
public void paint (Graphics g, JComponent c) [Overrides ComponentUI]
public void paintCurrentValue (Graphics g, Rectangle bounds, boolean hasFocus)
Paints the currently selected item.
public void paintCurrentValueBackground (Graphics g, Rectangle bounds, boolean hasFocus)
Paints the background of the currently selected item.
protected Rectangle rectangleForCurrentValue ()
Returns the area that is reserved for drawing the currently selected item.
public void removeEditor ()
  This public method is implementation specific and should be private.
pack-private void repaintCurrentValue ()
Repaint the currently selected item.
protected void selectNextPossibleValue ()
  Selects the next item in the list.
protected void selectPreviousPossibleValue ()
  Selects the previous item in the list.
public void setPopupVisible (JComboBox c, boolean v) [Specified in ComboBoxUI]
Hides the popup.
protected void toggleOpenClose ()
Hides the popup if it is showing and shows the popup if it is hidden.
public void unconfigureArrowButton ()
  This public method is implementation specific and should be private.
protected void unconfigureEditor ()
  This protected method is implementation specific and should be private.
protected void uninstallComponents ()
  The aggregate components which compise the combo box are unregistered and uninitialized.
protected void uninstallDefaults ()
Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.
protected void uninstallKeyboardActions ()
Removes the focus InputMap and ActionMap.
protected void uninstallListeners ()
  Remove the installed listeners from the combo box and its model.
public void uninstallUI (JComponent c) [Overrides ComponentUI]
public void update (Graphics g, JComponent c) [Inherited From ComponentUI]
  Notifies this UI delegate that it's time to paint the specified component.
Fields
Hide/Show inherited fields
protected JButton arrowButton
protected Dimension cachedMinimumSize
protected JComboBox comboBox
protected CellRendererPane currentValuePane
protected Component editor
protected FocusListener focusListener
  This protected field is implementation specific.
protected boolean hasFocus
  This protected field is implementation specific.
pack-privatefinalstatic StringBuffer HIDE_POPUP_KEY
protected boolean isMinimumSizeDirty
protected ItemListener itemListener
  This protected field is implementation specific.
protected KeyListener keyListener
  This protected field is implementation specific.
pack-private KeySelectionManager keySelectionManager
The default key selection manager
protected JList listBox
protected ListDataListener listDataListener
  This protected field is implementation specific.
protected ComboPopup popup
protected KeyListener popupKeyListener
protected MouseListener popupMouseListener
protected MouseMotionListener popupMouseMotionListener
protected PropertyChangeListener propertyChangeListener
  This protected field is implementation specific.
Nested Classes
  BasicComboBoxUI.KeyHandler
This listener checks to see if the key event isn't a navigation key.
  BasicComboBoxUI.FocusHandler
This listener hides the popup when the focus is lost.
  BasicComboBoxUI.ListDataHandler
This listener watches for changes in the ComboBoxModel.
  BasicComboBoxUI.ItemHandler
This listener watches for changes to the selection in the combo box.
  BasicComboBoxUI.PropertyChangeHandler
This listener watches for bound properties that have changed in the combo box.
  BasicComboBoxUI.ComboBoxLayoutManager
This layout manager handles the 'standard' layout of combo boxes.
  BasicComboBoxUI.DefaultKeySelectionManager
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar