javax.swing.plaf.basic
Class BasicComboBoxUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI 
          extended by javax.swing.plaf.basic.BasicComboBoxUI
Direct Known Subclasses:
MetalComboBoxUI sample code for javax.swing.plaf.metal.MetalComboBoxUI definition code for javax.swing.plaf.metal.MetalComboBoxUI

public class BasicComboBoxUI
extends ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI

Basic UI implementation for JComboBox.

The combo box is a compound component which means that it is an agregate of many simpler components. This class creates and manages the listeners on the combo box and the combo box model. These listeners update the user interface in response to changes in the properties and state of the combo box.

All event handling is handled by listener classes created with the createxxxListener() methods and internal classes. You can change the behavior of this class by overriding the createxxxListener() methods and supplying your own event listeners or subclassing from the ones supplied in this class.

For adding specific actions, overide installKeyboardActions to add actions in response to KeyStroke bindings. See the article Keyboard Bindings in Swing at The Swing Connection.


Nested Class Summary
 class BasicComboBoxUI.ComboBoxLayoutManager sample code for javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager definition code for javax.swing.plaf.basic.BasicComboBoxUI.ComboBoxLayoutManager
          This layout manager handles the 'standard' layout of combo boxes.
 class BasicComboBoxUI.FocusHandler sample code for javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler definition code for javax.swing.plaf.basic.BasicComboBoxUI.FocusHandler
          This listener hides the popup when the focus is lost.
 class BasicComboBoxUI.ItemHandler sample code for javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler definition code for javax.swing.plaf.basic.BasicComboBoxUI.ItemHandler
          This listener watches for changes to the selection in the combo box.
 class BasicComboBoxUI.KeyHandler sample code for javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler definition code for javax.swing.plaf.basic.BasicComboBoxUI.KeyHandler
          This listener checks to see if the key event isn't a navigation key.
 class BasicComboBoxUI.ListDataHandler sample code for javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler definition code for javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler
          This listener watches for changes in the ComboBoxModel.
 class BasicComboBoxUI.PropertyChangeHandler sample code for javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler definition code for javax.swing.plaf.basic.BasicComboBoxUI.PropertyChangeHandler
          This listener watches for bound properties that have changed in the combo box.
 
Field Summary
protected  JButton sample code for javax.swing.JButton definition code for javax.swing.JButton arrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.arrowButton definition code for javax.swing.plaf.basic.BasicComboBoxUI.arrowButton
           
protected  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension cachedMinimumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.cachedMinimumSize definition code for javax.swing.plaf.basic.BasicComboBoxUI.cachedMinimumSize
           
protected  JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox comboBox sample code for javax.swing.plaf.basic.BasicComboBoxUI.comboBox definition code for javax.swing.plaf.basic.BasicComboBoxUI.comboBox
           
protected  CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane currentValuePane sample code for javax.swing.plaf.basic.BasicComboBoxUI.currentValuePane definition code for javax.swing.plaf.basic.BasicComboBoxUI.currentValuePane
           
protected  Component sample code for java.awt.Component definition code for java.awt.Component editor sample code for javax.swing.plaf.basic.BasicComboBoxUI.editor definition code for javax.swing.plaf.basic.BasicComboBoxUI.editor
           
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener focusListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.focusListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.focusListener
          This protected field is implementation specific.
protected  boolean hasFocus sample code for javax.swing.plaf.basic.BasicComboBoxUI.hasFocus definition code for javax.swing.plaf.basic.BasicComboBoxUI.hasFocus
          This protected field is implementation specific.
protected  boolean isMinimumSizeDirty sample code for javax.swing.plaf.basic.BasicComboBoxUI.isMinimumSizeDirty definition code for javax.swing.plaf.basic.BasicComboBoxUI.isMinimumSizeDirty
           
protected  ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener itemListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.itemListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.itemListener
          This protected field is implementation specific.
protected  KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener keyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.keyListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.keyListener
          This protected field is implementation specific.
protected  JList sample code for javax.swing.JList definition code for javax.swing.JList listBox sample code for javax.swing.plaf.basic.BasicComboBoxUI.listBox definition code for javax.swing.plaf.basic.BasicComboBoxUI.listBox
           
protected  ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener listDataListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.listDataListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.listDataListener
          This protected field is implementation specific.
protected  ComboPopup sample code for javax.swing.plaf.basic.ComboPopup definition code for javax.swing.plaf.basic.ComboPopup popup sample code for javax.swing.plaf.basic.BasicComboBoxUI.popup definition code for javax.swing.plaf.basic.BasicComboBoxUI.popup
           
protected  KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener popupKeyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupKeyListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.popupKeyListener
           
protected  MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener popupMouseListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseListener
           
protected  MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener popupMouseMotionListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseMotionListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseMotionListener
           
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener propertyChangeListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.propertyChangeListener definition code for javax.swing.plaf.basic.BasicComboBoxUI.propertyChangeListener
          This protected field is implementation specific.
 
Constructor Summary
BasicComboBoxUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.BasicComboBoxUI() definition code for javax.swing.plaf.basic.BasicComboBoxUI.BasicComboBoxUI() ()
           
 
Method Summary
 void addEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() ()
          This public method is implementation specific and should be private.
 void configureArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.configureArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.configureArrowButton() ()
          This public method is implementation specific and should be private.
protected  void configureEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.configureEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.configureEditor() ()
          This protected method is implementation specific and should be private.
protected  JButton sample code for javax.swing.JButton definition code for javax.swing.JButton createArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton() ()
          Creates an button which will be used as the control to show or hide the popup portion of the combo box.
protected  ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor createEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor() ()
          Creates the default editor that will be used in editable combo boxes.
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener createFocusListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener() ()
          Creates a FocusListener which will be added to the combo box.
protected  ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener createItemListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener() ()
          Creates an ItemListener which will be added to the combo box.
protected  KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener createKeyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener() ()
          Creates a KeyListener which will be added to the combo box.
protected  LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager createLayoutManager sample code for javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager() ()
          Creates a layout manager for managing the components which make up the combo box.
protected  ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener createListDataListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener() ()
          Creates a list data listener which will be added to the ComboBoxModel.
protected  ComboPopup sample code for javax.swing.plaf.basic.ComboPopup definition code for javax.swing.plaf.basic.ComboPopup createPopup sample code for javax.swing.plaf.basic.BasicComboBoxUI.createPopup() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createPopup() ()
          Creates the popup portion of the combo box.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener() ()
          Creates a PropertyChangeListener which will be added to the combo box.
protected  ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer createRenderer sample code for javax.swing.plaf.basic.BasicComboBoxUI.createRenderer() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createRenderer() ()
          Creates the default renderer that will be used in a non-editiable combo box.
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
           
 Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible getAccessibleChild sample code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChild(javax.swing.JComponent, int) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c, int i)
          Returns the ith Accessible child of the object.
 int getAccessibleChildrenCount sample code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the number of accessible children in the object.
protected  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getDefaultSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize() ()
          Return the default size of an empty display area of the combo box using the current renderer and font.
protected  Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getDisplaySize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize() ()
          Returns the calculated size of the display area.
protected  Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for javax.swing.plaf.basic.BasicComboBoxUI.getInsets() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getInsets() ()
          Gets the insets from the JComboBox.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMaximumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's maximum size appropriate for the look and feel.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          The minumum size is the size of the display area plus insets plus the button.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns the specified component's preferred size appropriate for the look and feel.
protected  void installComponents sample code for javax.swing.plaf.basic.BasicComboBoxUI.installComponents() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installComponents() ()
          Creates and initializes the components which make up the aggregate combo box.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicComboBoxUI.installDefaults() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installDefaults() ()
          Installs the default colors, default font, default renderer, and default editor into the JComboBox.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions() ()
          Adds keyboard actions to the JComboBox.
protected  void installListeners sample code for javax.swing.plaf.basic.BasicComboBoxUI.installListeners() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installListeners() ()
          Create and install the listeners for the combo box and its model.
 void installUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Configures the specified component appropriate for the look and feel.
 boolean isFocusTraversable sample code for javax.swing.plaf.basic.BasicComboBoxUI.isFocusTraversable(javax.swing.JComboBox) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isFocusTraversable(javax.swing.JComboBox) (JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c)
          Determines if the JComboBox is focus traversable.
protected  boolean isNavigationKey sample code for javax.swing.plaf.basic.BasicComboBoxUI.isNavigationKey(int) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isNavigationKey(int) (int keyCode)
          Returns whether or not the supplied keyCode maps to a key that is used for navigation.
 boolean isPopupVisible sample code for javax.swing.plaf.basic.BasicComboBoxUI.isPopupVisible(javax.swing.JComboBox) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isPopupVisible(javax.swing.JComboBox) (JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c)
          Tells if the popup is visible or not.
 void paint sample code for javax.swing.plaf.basic.BasicComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paints the specified component appropriate for the look and feel.
 void paintCurrentValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  bounds, boolean hasFocus)
          Paints the currently selected item.
 void paintCurrentValueBackground sample code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  bounds, boolean hasFocus)
          Paints the background of the currently selected item.
protected  Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle rectangleForCurrentValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue() ()
          Returns the area that is reserved for drawing the currently selected item.
 void removeEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.removeEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.removeEditor() ()
          This public method is implementation specific and should be private.
protected  void selectNextPossibleValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.selectNextPossibleValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.selectNextPossibleValue() ()
          Selects the next item in the list.
protected  void selectPreviousPossibleValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.selectPreviousPossibleValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.selectPreviousPossibleValue() ()
          Selects the previous item in the list.
 void setPopupVisible sample code for javax.swing.plaf.basic.BasicComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean) (JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c, boolean v)
          Hides the popup.
protected  void toggleOpenClose sample code for javax.swing.plaf.basic.BasicComboBoxUI.toggleOpenClose() definition code for javax.swing.plaf.basic.BasicComboBoxUI.toggleOpenClose() ()
          Hides the popup if it is showing and shows the popup if it is hidden.
 void unconfigureArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureArrowButton() ()
          This public method is implementation specific and should be private.
protected  void unconfigureEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureEditor() ()
          This protected method is implementation specific and should be private.
protected  void uninstallComponents sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents() ()
          The aggregate components which compise the combo box are unregistered and uninitialized.
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallDefaults() ()
          Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallKeyboardActions() ()
          Removes the focus InputMap and ActionMap.
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallListeners() ()
          Remove the installed listeners from the combo box and its model.
 void uninstallUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Reverses configuration which was done on the specified component during installUI.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

comboBox sample code for javax.swing.plaf.basic.BasicComboBoxUI.comboBox

protected JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  comboBox

hasFocus sample code for javax.swing.plaf.basic.BasicComboBoxUI.hasFocus

protected boolean hasFocus
This protected field is implementation specific. Do not access directly or override.


listBox sample code for javax.swing.plaf.basic.BasicComboBoxUI.listBox

protected JList sample code for javax.swing.JList definition code for javax.swing.JList  listBox

currentValuePane sample code for javax.swing.plaf.basic.BasicComboBoxUI.currentValuePane

protected CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane  currentValuePane

popup sample code for javax.swing.plaf.basic.BasicComboBoxUI.popup

protected ComboPopup sample code for javax.swing.plaf.basic.ComboPopup definition code for javax.swing.plaf.basic.ComboPopup  popup

editor sample code for javax.swing.plaf.basic.BasicComboBoxUI.editor

protected Component sample code for java.awt.Component definition code for java.awt.Component  editor

arrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.arrowButton

protected JButton sample code for javax.swing.JButton definition code for javax.swing.JButton  arrowButton

keyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.keyListener

protected KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener  keyListener
This protected field is implementation specific. Do not access directly or override. Override the listener construction method instead.

See Also:
createKeyListener() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener()

focusListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.focusListener

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  focusListener
This protected field is implementation specific. Do not access directly or override. Override the listener construction method instead.

See Also:
createFocusListener() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener()

propertyChangeListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.propertyChangeListener

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  propertyChangeListener
This protected field is implementation specific. Do not access directly or override. Override the listener construction method instead.

See Also:
createPropertyChangeListener() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener()

itemListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.itemListener

protected ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  itemListener
This protected field is implementation specific. Do not access directly or override. Override the listener construction method instead.

See Also:
createItemListener() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener()

popupMouseListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseListener

protected MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener  popupMouseListener

popupMouseMotionListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupMouseMotionListener

protected MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener  popupMouseMotionListener

popupKeyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.popupKeyListener

protected KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener  popupKeyListener

listDataListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.listDataListener

protected ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener  listDataListener
This protected field is implementation specific. Do not access directly or override. Override the listener construction method instead.

See Also:
createListDataListener() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener()

isMinimumSizeDirty sample code for javax.swing.plaf.basic.BasicComboBoxUI.isMinimumSizeDirty

protected boolean isMinimumSizeDirty

cachedMinimumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.cachedMinimumSize

protected Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  cachedMinimumSize
Constructor Detail

BasicComboBoxUI sample code for javax.swing.plaf.basic.BasicComboBoxUI() definition code for javax.swing.plaf.basic.BasicComboBoxUI()

public BasicComboBoxUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)

installUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent)
Configures the specified component appropriate for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install any default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) , JComponent.setUI(javax.swing.plaf.ComponentUI) sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

uninstallUI sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent)
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installDefaults sample code for javax.swing.plaf.basic.BasicComboBoxUI.installDefaults() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installDefaults()

protected void installDefaults()
Installs the default colors, default font, default renderer, and default editor into the JComboBox.


installListeners sample code for javax.swing.plaf.basic.BasicComboBoxUI.installListeners() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installListeners()

protected void installListeners()
Create and install the listeners for the combo box and its model. This method is called when the UI is installed.


uninstallDefaults sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallDefaults()

protected void uninstallDefaults()
Uninstalls the default colors, default font, default renderer, and default editor into the JComboBox.


uninstallListeners sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallListeners()

protected void uninstallListeners()
Remove the installed listeners from the combo box and its model. The number and types of listeners removed and in this method should be the same that was added in installListeners


createPopup sample code for javax.swing.plaf.basic.BasicComboBoxUI.createPopup() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createPopup()

protected ComboPopup sample code for javax.swing.plaf.basic.ComboPopup definition code for javax.swing.plaf.basic.ComboPopup  createPopup()
Creates the popup portion of the combo box.

Returns:
an instance of ComboPopup
See Also:
ComboPopup sample code for javax.swing.plaf.basic.ComboPopup definition code for javax.swing.plaf.basic.ComboPopup

createKeyListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createKeyListener()

protected KeyListener sample code for java.awt.event.KeyListener definition code for java.awt.event.KeyListener  createKeyListener()
Creates a KeyListener which will be added to the combo box. If this method returns null then it will not be added to the combo box.

Returns:
an instance KeyListener or null

createFocusListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createFocusListener()

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  createFocusListener()
Creates a FocusListener which will be added to the combo box. If this method returns null then it will not be added to the combo box.

Returns:
an instance of a FocusListener or null

createListDataListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createListDataListener()

protected ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener  createListDataListener()
Creates a list data listener which will be added to the ComboBoxModel. If this method returns null then it will not be added to the combo box model.

Returns:
an instance of a ListDataListener or null

createItemListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createItemListener()

protected ItemListener sample code for java.awt.event.ItemListener definition code for java.awt.event.ItemListener  createItemListener()
Creates an ItemListener which will be added to the combo box. If this method returns null then it will not be added to the combo box.

Subclasses may override this method to return instances of their own ItemEvent handlers.

Returns:
an instance of an ItemListener or null

createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createPropertyChangeListener()

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createPropertyChangeListener()
Creates a PropertyChangeListener which will be added to the combo box. If this method returns null then it will not be added to the combo box.

Returns:
an instance of a PropertyChangeListener or null

createLayoutManager sample code for javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createLayoutManager()

protected LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  createLayoutManager()
Creates a layout manager for managing the components which make up the combo box.

Returns:
an instance of a layout manager

createRenderer sample code for javax.swing.plaf.basic.BasicComboBoxUI.createRenderer() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createRenderer()

protected ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  createRenderer()
Creates the default renderer that will be used in a non-editiable combo box. A default renderer will used only if a renderer has not been explicitly set with setRenderer.

Returns:
a ListCellRender used for the combo box
See Also:
JComboBox.setRenderer(javax.swing.ListCellRenderer) sample code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer) definition code for javax.swing.JComboBox.setRenderer(javax.swing.ListCellRenderer)

createEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor()

protected ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor  createEditor()
Creates the default editor that will be used in editable combo boxes. A default editor will be used only if an editor has not been explicitly set with setEditor.

Returns:
a ComboBoxEditor used for the combo box
See Also:
JComboBox.setEditor(javax.swing.ComboBoxEditor) sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor)

installComponents sample code for javax.swing.plaf.basic.BasicComboBoxUI.installComponents() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installComponents()

protected void installComponents()
Creates and initializes the components which make up the aggregate combo box. This method is called as part of the UI installation process.


uninstallComponents sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallComponents()

protected void uninstallComponents()
The aggregate components which compise the combo box are unregistered and uninitialized. This method is called as part of the UI uninstallation process.


addEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor()

public void addEditor()
This public method is implementation specific and should be private. do not call or override. To implement a specific editor create a custom ComboBoxEditor

See Also:
createEditor() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createEditor() , JComboBox.setEditor(javax.swing.ComboBoxEditor) sample code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) definition code for javax.swing.JComboBox.setEditor(javax.swing.ComboBoxEditor) , ComboBoxEditor sample code for javax.swing.ComboBoxEditor definition code for javax.swing.ComboBoxEditor

removeEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.removeEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.removeEditor()

public void removeEditor()
This public method is implementation specific and should be private. do not call or override.

See Also:
addEditor() sample code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor()

configureEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.configureEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.configureEditor()

protected void configureEditor()
This protected method is implementation specific and should be private. do not call or override.

See Also:
addEditor() sample code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor()

unconfigureEditor sample code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureEditor()

protected void unconfigureEditor()
This protected method is implementation specific and should be private. Do not call or override.

See Also:
addEditor() sample code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor() definition code for javax.swing.plaf.basic.BasicComboBoxUI.addEditor()

configureArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.configureArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.configureArrowButton()

public void configureArrowButton()
This public method is implementation specific and should be private. Do not call or override.

See Also:
createArrowButton() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton()

unconfigureArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.unconfigureArrowButton()

public void unconfigureArrowButton()
This public method is implementation specific and should be private. Do not call or override.

See Also:
createArrowButton() sample code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton()

createArrowButton sample code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton() definition code for javax.swing.plaf.basic.BasicComboBoxUI.createArrowButton()

protected JButton sample code for javax.swing.JButton definition code for javax.swing.JButton  createArrowButton()
Creates an button which will be used as the control to show or hide the popup portion of the combo box.

Returns:
a button which represents the popup control

isPopupVisible sample code for javax.swing.plaf.basic.BasicComboBoxUI.isPopupVisible(javax.swing.JComboBox) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isPopupVisible(javax.swing.JComboBox)

public boolean isPopupVisible(JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c)
Tells if the popup is visible or not.

Specified by:
isPopupVisible sample code for javax.swing.plaf.ComboBoxUI.isPopupVisible(javax.swing.JComboBox) definition code for javax.swing.plaf.ComboBoxUI.isPopupVisible(javax.swing.JComboBox) in class ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI

setPopupVisible sample code for javax.swing.plaf.basic.BasicComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean)

public void setPopupVisible(JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c,
                            boolean v)
Hides the popup.

Specified by:
setPopupVisible sample code for javax.swing.plaf.ComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean) definition code for javax.swing.plaf.ComboBoxUI.setPopupVisible(javax.swing.JComboBox, boolean) in class ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI

isFocusTraversable sample code for javax.swing.plaf.basic.BasicComboBoxUI.isFocusTraversable(javax.swing.JComboBox) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isFocusTraversable(javax.swing.JComboBox)

public boolean isFocusTraversable(JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox  c)
Determines if the JComboBox is focus traversable. If the JComboBox is editable this returns false, otherwise it returns true.

Specified by:
isFocusTraversable sample code for javax.swing.plaf.ComboBoxUI.isFocusTraversable(javax.swing.JComboBox) definition code for javax.swing.plaf.ComboBoxUI.isFocusTraversable(javax.swing.JComboBox) in class ComboBoxUI sample code for javax.swing.plaf.ComboBoxUI definition code for javax.swing.plaf.ComboBoxUI

paint sample code for javax.swing.plaf.basic.BasicComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
Paints the specified component appropriate for the look and feel. This method is invoked from the 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.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
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
See Also:
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)

getPreferredSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)
Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

getMinimumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
The minumum size is the size of the display area plus insets plus the button.

Overrides:
getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
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
Returns:
a Dimension object or null
See Also:
JComponent.getMinimumSize() sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , LayoutManager.minimumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.minimumLayoutSize(java.awt.Container) , ComponentUI.getPreferredSize(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent)

getMaximumSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getMaximumSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMaximumSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent)
Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

Overrides:
getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component whose maximum size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
Returns:
a Dimension object or null
See Also:
JComponent.getMaximumSize() sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , LayoutManager2.maximumLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager2.maximumLayoutSize(java.awt.Container)

getAccessibleChildrenCount sample code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChildrenCount(javax.swing.JComponent)

public int getAccessibleChildrenCount(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, this method should return the number of children of this object. UIs might wish to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas. Note: As of v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChildrenCount() instead of this method.

Overrides:
getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Returns:
the number of accessible children in the object
See Also:
ComponentUI.getAccessibleChild(javax.swing.JComponent, int) sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int)

getAccessibleChild sample code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.basic.BasicComboBoxUI.getAccessibleChild(javax.swing.JComponent, int)

public Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible  getAccessibleChild(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c,
                                     int i)
Description copied from class: ComponentUI sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int)
Returns the ith Accessible child of the object. UIs might need to override this if they present areas on the screen that can be viewed as components, but actual components are not used for presenting those areas.

Note: As of v1.3, it is recommended that developers call Component.AccessibleAWTComponent.getAccessibleChild() instead of this method.

Overrides:
getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
i - zero-based index of child
Returns:
the ith Accessible child of the object
See Also:
ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent)

isNavigationKey sample code for javax.swing.plaf.basic.BasicComboBoxUI.isNavigationKey(int) definition code for javax.swing.plaf.basic.BasicComboBoxUI.isNavigationKey(int)

protected boolean isNavigationKey(int keyCode)
Returns whether or not the supplied keyCode maps to a key that is used for navigation. This is used for optimizing key input by only passing non- navigation keys to the type-ahead mechanism. Subclasses should override this if they change the navigation keys.


selectNextPossibleValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.selectNextPossibleValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.selectNextPossibleValue()

protected void selectNextPossibleValue()
Selects the next item in the list. It won't change the selection if the currently selected item is already the last item.


selectPreviousPossibleValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.selectPreviousPossibleValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.selectPreviousPossibleValue()

protected void selectPreviousPossibleValue()
Selects the previous item in the list. It won't change the selection if the currently selected item is already the first item.


toggleOpenClose sample code for javax.swing.plaf.basic.BasicComboBoxUI.toggleOpenClose() definition code for javax.swing.plaf.basic.BasicComboBoxUI.toggleOpenClose()

protected void toggleOpenClose()
Hides the popup if it is showing and shows the popup if it is hidden.


rectangleForCurrentValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue() definition code for javax.swing.plaf.basic.BasicComboBoxUI.rectangleForCurrentValue()

protected Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  rectangleForCurrentValue()
Returns the area that is reserved for drawing the currently selected item.


getInsets sample code for javax.swing.plaf.basic.BasicComboBoxUI.getInsets() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getInsets()

protected Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets()
Gets the insets from the JComboBox.


paintCurrentValue sample code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(java.awt.Graphics, java.awt.Rectangle, boolean)

public void paintCurrentValue(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                              Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  bounds,
                              boolean hasFocus)
Paints the currently selected item.


paintCurrentValueBackground sample code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean) definition code for javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValueBackground(java.awt.Graphics, java.awt.Rectangle, boolean)

public void paintCurrentValueBackground(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                                        Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  bounds,
                                        boolean hasFocus)
Paints the background of the currently selected item.


getDefaultSize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getDefaultSize()

protected Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getDefaultSize()
Return the default size of an empty display area of the combo box using the current renderer and font.

Returns:
the size of an empty display area
See Also:
getDisplaySize() sample code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize()

getDisplaySize sample code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize() definition code for javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize()

protected Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getDisplaySize()
Returns the calculated size of the display area. The display area is the portion of the combo box in which the selected item is displayed. This method will use the prototype display value if it has been set.

For combo boxes with a non trivial number of items, it is recommended to use a prototype display value to significantly speed up the display size calculation.

Returns:
the size of the display area calculated from the combo box items
See Also:
JComboBox.setPrototypeDisplayValue(java.lang.Object) sample code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object) definition code for javax.swing.JComboBox.setPrototypeDisplayValue(java.lang.Object)

installKeyboardActions sample code for javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions()

protected void installKeyboardActions()
Adds keyboard actions to the JComboBox. Actions on enter and esc are already supplied. Add more actions as you need them.


uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicComboBoxUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()
Removes the focus InputMap and ActionMap.