|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.awt.Component
![]()
![]()
![]()
java.awt.Container
![]()
![]()
![]()
javax.swing.JComponent
![]()
![]()
![]()
javax.swing.JPopupMenu
![]()
![]()
![]()
javax.swing.plaf.basic.BasicComboPopup
, MenuContainer
, Serializable
, Accessible
, MenuElement
, ComboPopup


public class BasicComboPopup


This is a basic implementation of the ComboPopup interface.
This class represents the ui for the popup portion 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.
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 JavaBeansTM
has been added to the java.beans package.
Please see XMLEncoder
.
| Nested Class Summary | |
|---|---|
class |
BasicComboPopup.InvocationKeyHandler
As of Java 2 platform v 1.4, this class is now obsolete and is only included for backwards API compatibility. |
protected class |
BasicComboPopup.InvocationMouseHandler
A listener to be registered upon the combo box (not its popup menu) to handle mouse events that affect the state of the popup menu. |
protected class |
BasicComboPopup.InvocationMouseMotionHandler
This listener watches for dragging and updates the current selection in the list if it is dragging over the list. |
protected class |
BasicComboPopup.ItemHandler
This listener watches for changes to the selection in the combo box. |
class |
BasicComboPopup.ListDataHandler
As of 1.4, this class is now obsolete, doesn't do anything, and is only included for backwards API compatibility. |
protected class |
BasicComboPopup.ListMouseHandler
This listener hides the popup when the mouse is released in the list. |
protected class |
BasicComboPopup.ListMouseMotionHandler
This listener changes the selected item as you move the mouse over the list. |
protected class |
BasicComboPopup.ListSelectionHandler
As of Java 2 platform v 1.4, this class is now obsolete, doesn't do anything, and is only included for backwards API compatibility. |
protected class |
BasicComboPopup.PropertyChangeHandler
This listener watches for bound properties that have changed in the combo box. |
Nested classes/interfaces inherited from class javax.swing.JPopupMenu ![]() |
|---|
JPopupMenu.AccessibleJPopupMenu |
Nested classes/interfaces inherited from class javax.swing.JComponent ![]() |
|---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container ![]() |
|---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component ![]() |
|---|
Component.AccessibleAWTComponent |
| Field Summary | |
|---|---|
protected Timer |
autoscrollTimer
This protected field is implementation specific. |
protected JComboBox |
comboBox
|
protected boolean |
hasEntered
|
protected boolean |
isAutoScrolling
|
protected ItemListener |
itemListener
This protected field is implementation specific. |
protected KeyListener |
keyListener
This protected field is implementation specific. |
protected JList |
list
This protected field is implementation specific. |
protected ListDataListener |
listDataListener
This protected field is implementation specific. |
protected MouseListener |
listMouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
listMouseMotionListener
This protected field is implementation specific. |
protected ListSelectionListener |
listSelectionListener
This protected field is implementation specific. |
protected MouseListener |
mouseListener
This protected field is implementation specific. |
protected MouseMotionListener |
mouseMotionListener
This protected field is implementation specific. |
protected PropertyChangeListener |
propertyChangeListener
This protected field is implementation specific. |
protected static int |
SCROLL_DOWN
|
protected static int |
SCROLL_UP
|
protected int |
scrollDirection
|
protected JScrollPane |
scroller
This protected field is implementation specific. |
protected boolean |
valueIsAdjusting
As of Java 2 platform v1.4 this previously undocumented field is no longer used. |
Fields inherited from class javax.swing.JComponent ![]() |
|---|
accessibleContext |
Fields inherited from class java.awt.Component ![]() |
|---|
BOTTOM_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver ![]() |
|---|
ABORT |
| Constructor Summary | |
|---|---|
BasicComboPopup
|
|
| Method Summary | |
|---|---|
protected void |
autoScrollDown
This protected method is implementation specific and should be private. |
protected void |
autoScrollUp
This protected method is implementation specific and should be private. |
protected Rectangle |
computePopupBounds
Calculate the placement and size of the popup portion of the combo box based on the combo box location and the enclosing screen bounds. |
protected void |
configureList
Configures the list which is used to hold the combo box items in the popup. |
protected void |
configurePopup
Configures the popup portion of the combo box. |
protected void |
configureScroller
Configures the scrollable portion which holds the list within the combo box popup. |
protected MouseEvent |
convertMouseEvent
|
protected ItemListener |
createItemListener
Creates an ItemListener which will be added to the
combo box. |
protected KeyListener |
createKeyListener
Creates the key listener that will be added to the combo box. |
protected JList |
createList
Creates the JList used in the popup to display the items in the combo box model. |
protected ListDataListener |
createListDataListener
Creates a list data listener which will be added to the ComboBoxModel. |
protected MouseListener |
createListMouseListener
Creates a mouse listener that watches for mouse events in the popup's list. |
protected MouseMotionListener |
createListMouseMotionListener
Creates a mouse motion listener that watches for mouse motion events in the popup's list. |
protected ListSelectionListener |
createListSelectionListener
Creates a list selection listener that watches for selection changes in the popup's list. |
protected MouseListener |
createMouseListener
Creates a listener that will watch for mouse-press and release events on the combo box. |
protected MouseMotionListener |
createMouseMotionListener
Creates the mouse motion listener which will be added to the combo box. |
protected PropertyChangeListener |
createPropertyChangeListener
Creates a PropertyChangeListener which will be added to
the combo box. |
protected JScrollPane |
createScroller
Creates the scroll pane which houses the scrollable list. |
protected void |
delegateFocus
This is is a utility method that helps event handlers figure out where to send the focus when the popup is brought up. |
protected void |
firePopupMenuCanceled
Notifies PopupMenuListeners that this popup menu is
cancelled. |
protected void |
firePopupMenuWillBecomeInvisible
Notifies PopupMenuListeners that this popup menu will
become invisible. |
protected void |
firePopupMenuWillBecomeVisible
Notifies PopupMenuListeners that this popup menu will
become visible. |
AccessibleContext |
getAccessibleContext
Gets the AccessibleContext associated with this BasicComboPopup. |
KeyListener |
getKeyListener
Implementation of ComboPopup.getKeyListener(). |
JList |
getList
Implementation of ComboPopup.getList(). |
MouseListener |
getMouseListener
Implementation of ComboPopup.getMouseListener(). |
MouseMotionListener |
getMouseMotionListener
Implementation of ComboPopup.getMouseMotionListener(). |
protected int |
getPopupHeightForRowCount
Retrieves the height of the popup based on the current ListCellRenderer and the maximum row count. |
void |
hide
Implementation of ComboPopup.hide(). |
protected void |
installComboBoxListeners |