public class BasicComboPopup extends javax.swing.JPopupMenu implements ComboPopup
| Modifier and Type | Class and Description |
|---|---|
class |
BasicComboPopup.InvocationKeyHandler
This class is not used anymore
|
protected class |
BasicComboPopup.InvocationMouseHandler
InvocationMouseHandler is a listener that listens to mouse events
occuring in the combo box.
|
protected class |
BasicComboPopup.InvocationMouseMotionHandler
InvocationMouseMotionListener is a mouse listener that listens to mouse
dragging events occuring in the combo box.
|
protected class |
BasicComboPopup.ItemHandler
ItemHandler is an item listener that listens to selection events occuring
in the combo box.
|
class |
BasicComboPopup.ListDataHandler
This class is not used any more.
|
protected class |
BasicComboPopup.ListMouseHandler
ListMouseHandler is a listener that listens to mouse events occuring in
the combo box's list of items.
|
protected class |
BasicComboPopup.ListMouseMotionHandler
ListMouseMotionHandler listens to mouse motion events occuring in the
combo box's list.
|
protected class |
BasicComboPopup.ListSelectionHandler
This class is not used anymore
|
protected class |
BasicComboPopup.PropertyChangeHandler
This class listens to changes occuring in the bound properties of the
combo box
|
javax.swing.JPopupMenu.AccessibleJPopupMenu, javax.swing.JPopupMenu.Separatorjavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.Timer |
autoscrollTimer |
protected javax.swing.JComboBox |
comboBox
ComboBox associated with this popup
|
protected boolean |
hasEntered
FIXME: Need to document
|
protected boolean |
isAutoScrolling
Indicates whether the scroll bar located in popup menu with comboBox's
list of items is currently autoscrolling.
|
protected java.awt.event.ItemListener |
itemListener
ItemListener listening to the selection changes in the combo box
|
protected java.awt.event.KeyListener |
keyListener
This listener is not used
|
protected javax.swing.JList |
list
JList which is used to display item is the combo box
|
protected javax.swing.event.ListDataListener |
listDataListener
This listener is not used
|
protected java.awt.event.MouseListener |
listMouseListener
MouseListener listening to mouse events occuring in the combo box's
list.
|
protected java.awt.event.MouseMotionListener |
listMouseMotionListener
MouseMotionListener listening to mouse motion events occuring in the
combo box's list
|
protected javax.swing.event.ListSelectionListener |
listSelectionListener
This listener is not used
|
protected java.awt.event.MouseListener |
mouseListener
MouseListener listening to mouse events occuring in the combo box
|
protected java.awt.event.MouseMotionListener |
mouseMotionListener
MouseMotionListener listening to mouse motion events occuring in the
combo box
|
protected java.beans.PropertyChangeListener |
propertyChangeListener
PropertyChangeListener listening to changes occuring in the bound
properties of the combo box
|
protected static int |
SCROLL_DOWN
direction for scrolling down list of combo box's items
|
protected static int |
SCROLL_UP
direction for scrolling up list of combo box's items
|
protected int |
scrollDirection
Indicates auto scrolling direction
|
protected javax.swing.JScrollPane |
scroller
JScrollPane that contains list portion of the combo box
|
protected boolean |
valueIsAdjusting
This field is not used
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
BasicComboPopup(javax.swing.JComboBox comboBox)
Creates a new BasicComboPopup object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
autoScrollDown()
This method scrolls down list of combo box's and highlights item in the
list that just became visible.
|
protected void |
autoScrollUp()
This method scrolls up list of combo box's items up and highlights that
just became visible.
|
protected java.awt.Rectangle |
computePopupBounds(int px,
int py,
int pw,
int ph)
DOCUMENT ME!
|
protected void |
configureList()
This method configures the list of comboBox's items by setting default
properties and installing listeners.
|
protected void |
configurePopup()
This method configures popup menu that will be used to display Scrollpane
with list of items inside of it.
|
protected void |
configureScroller()
This method configures scroll pane to contain list of comboBox's items
|
protected java.awt.event.MouseEvent |
convertMouseEvent(java.awt.event.MouseEvent e)
DOCUMENT ME!
|
protected java.awt.event.ItemListener |
createItemListener()
Creates new ItemListener that will listen to ItemEvents occuring in the
combo box.
|
protected java.awt.event.KeyListener |
createKeyListener()
KeyListener created in this method is not used anymore.
|
protected javax.swing.JList |
createList()
Creates JList that will be used to display items in the combo box.
|
protected javax.swing.event.ListDataListener |
createListDataListener()
Creates ListDataListener.
|
protected java.awt.event.MouseListener |
createListMouseListener()
This method creates ListMouseListener to listen to mouse events occuring
in the combo box's item list.
|
protected java.awt.event.MouseMotionListener |
createListMouseMotionListener()
Creates ListMouseMotionlistener to listen to mouse motion events occuring
in the combo box's list.
|
protected javax.swing.event.ListSelectionListener |
createListSelectionListener()
ListSelectionListener created in this method is not used anymore
|
protected java.awt.event.MouseListener |
createMouseListener()
Creates MouseListener to listen to mouse events occuring in the combo
box.
|
protected java.awt.event.MouseMotionListener |
createMouseMotionListener()
Create Mouse listener that listens to mouse dragging events occuring in
the combo box.
|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
Creates PropertyChangeListener to handle changes in the JComboBox's bound
properties.
|
protected javax.swing.JScrollPane |
createScroller()
This method creates scroll pane that will contain the list of comboBox's
items inside of it.
|
protected void |
delegateFocus(java.awt.event.MouseEvent e)
This method helps to delegate focus to the right component in the
JComboBox.
|
protected void |
firePopupMenuCanceled()
This method fires PopupMenuEvent indicating that combo box's popup list
of items was closed without selection.
|
protected void |
firePopupMenuWillBecomeInvisible()
This method fires PopupMenuEvent indicating that combo box's popup list
of items will become invisible.
|
protected void |
firePopupMenuWillBecomeVisible()
This method fires PopupMenuEvent indicating that combo box's popup list
of items will become visible
|
java.awt.event.KeyListener |
getKeyListener()
Returns KeyListener listening to key events occuring in the combo box.
|
javax.swing.JList |
getList()
Return list cointaining JComboBox's items
|
java.awt.event.MouseListener |
getMouseListener()
Returns MouseListener that is listening to mouse events occuring in the
combo box.
|
java.awt.event.MouseMotionListener |
getMouseMotionListener()
Returns MouseMotionListener that is listening to mouse motion events
occuring in the combo box.
|
protected int |
getPopupHeightForRowCount(int maxRowCount)
Returns required height of the popup such that number of items visible in
it are equal to the maximum row count.
|
void |
hide()
This method hides drop down list of items
|
protected void |
installComboBoxListeners() |
protected void |
installComboBoxModelListeners(javax.swing.ComboBoxModel model)
This method installs listeners that will listen to changes occuring in
the comb box's data model
|
protected void |
installKeyboardActions()
Installs the keyboard actions.
|
protected void |
installListListeners()
This method installs list listeners.
|
boolean |
isFocusTraversable()
This method always returns false to indicate that items in the combo box
list are not focus traversable.
|
void |
show()
This method displays drow down list of combo box items on the screen.
|
protected void |
startAutoScrolling(int direction)
This method start scrolling combo box's list of items either up or down
depending on the specified 'direction'
|
protected void |
stopAutoScrolling()
This method stops scrolling the combo box's list of items
|
protected void |
togglePopup()
This method displays combo box popup if the popup is not currently shown
on the screen and hides it if it is currently visible
|
protected void |
uninstallComboBoxModelListeners(javax.swing.ComboBoxModel model)
This method uninstalls listeners that were listening to changes occuring
in the comb box's data model
|
void |
uninstallingUI()
This method uninstalls the UI for the given JComponent.
|
protected void |
uninstallKeyboardActions()
This method uninstalls keyboard actions installed by the UI.
|
protected void |
updateListBoxSelectionForEvent(java.awt.event.MouseEvent anEvent,
boolean shouldScroll)
This method changes the selection in the list to the item over which the
mouse is currently located.
|
add, add, add, addMenuKeyListener, addPopupMenuListener, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponent, getComponentAtIndex, getComponentIndex, getDefaultLightWeightPopupEnabled, getInvoker, getLabel, getMargin, getMenuKeyListeners, getPopupMenuListeners, getSelectionModel, getSubElements, getUI, getUIClassID, insert, insert, isBorderPainted, isLightWeightPopupEnabled, isPopupTrigger, isVisible, menuSelectionChanged, pack, paramString, processKeyEvent, processMouseEvent, remove, removeMenuKeyListener, removePopupMenuListener, setBorderPainted, setDefaultLightWeightPopupEnabled, setInvoker, setLabel, setLightWeightPopupEnabled, setLocation, setPopupSize, setPopupSize, setSelected, setSelectionModel, setUI, setVisible, show, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisVisibleprotected javax.swing.Timer autoscrollTimer
protected javax.swing.JComboBox comboBox
protected boolean hasEntered
protected boolean isAutoScrolling
protected java.awt.event.ItemListener itemListener
protected java.awt.event.KeyListener keyListener
protected javax.swing.JList list
protected javax.swing.event.ListDataListener listDataListener
protected java.awt.event.MouseListener listMouseListener
protected java.awt.event.MouseMotionListener listMouseMotionListener
protected javax.swing.event.ListSelectionListener listSelectionListener
protected java.awt.event.MouseListener mouseListener
protected java.awt.event.MouseMotionListener mouseMotionListener
protected java.beans.PropertyChangeListener propertyChangeListener
protected static final int SCROLL_DOWN
protected static final int SCROLL_UP
protected int scrollDirection
protected javax.swing.JScrollPane scroller
protected boolean valueIsAdjusting
public BasicComboPopup(javax.swing.JComboBox comboBox)
comboBox - the combo box with which this popup should be associatedpublic void show()
show in interface ComboPopupshow in class java.awt.Componentpublic void hide()
hide in interface ComboPopuphide in class java.awt.Componentpublic javax.swing.JList getList()
getList in interface ComboPopuppublic java.awt.event.MouseListener getMouseListener()
getMouseListener in interface ComboPopuppublic java.awt.event.MouseMotionListener getMouseMotionListener()
getMouseMotionListener in interface ComboPopuppublic java.awt.event.KeyListener getKeyListener()
getKeyListener in interface ComboPopuppublic void uninstallingUI()
uninstallingUI in interface ComboPopupprotected void uninstallComboBoxModelListeners(javax.swing.ComboBoxModel model)
model - data model for the combo box from which to uninstall
listenersprotected void uninstallKeyboardActions()
protected void firePopupMenuWillBecomeVisible()
firePopupMenuWillBecomeVisible in class javax.swing.JPopupMenuprotected void firePopupMenuWillBecomeInvisible()
firePopupMenuWillBecomeInvisible in class javax.swing.JPopupMenuprotected void firePopupMenuCanceled()
firePopupMenuCanceled in class javax.swing.JPopupMenuprotected java.awt.event.MouseListener createMouseListener()
protected java.awt.event.MouseMotionListener createMouseMotionListener()
protected java.awt.event.KeyListener createKeyListener()
protected javax.swing.event.ListSelectionListener createListSelectionListener()
protected javax.swing.event.ListDataListener createListDataListener()
protected java.awt.event.MouseListener createListMouseListener()
protected java.awt.event.MouseMotionListener createListMouseMotionListener()
protected java.beans.PropertyChangeListener createPropertyChangeListener()
protected java.awt.event.ItemListener createItemListener()
protected javax.swing.JList createList()
protected void configureList()
protected void installListListeners()
protected javax.swing.JScrollPane createScroller()
protected void configureScroller()
protected void configurePopup()
protected void installComboBoxListeners()
protected void installComboBoxModelListeners(javax.swing.ComboBoxModel model)
model - data model for the combo box for which to install listenersprotected void installKeyboardActions()
public boolean isFocusTraversable()
isFocusTraversable in class java.awt.ComponentComponent.setFocusable(boolean)protected void startAutoScrolling(int direction)
direction - of the scrolling.protected void stopAutoScrolling()
protected void autoScrollUp()
protected void autoScrollDown()
protected void delegateFocus(java.awt.event.MouseEvent e)
e - MouseEventprotected void togglePopup()
protected java.awt.event.MouseEvent convertMouseEvent(java.awt.event.MouseEvent e)
e - DOCUMENT ME!protected int getPopupHeightForRowCount(int maxRowCount)
maxRowCount - number of maximum visible rows in the combo box's
popup list of itemsprotected java.awt.Rectangle computePopupBounds(int px, int py, int pw, int ph)
px - DOCUMENT ME!py - DOCUMENT ME!pw - DOCUMENT ME!ph - DOCUMENT ME!protected void updateListBoxSelectionForEvent(java.awt.event.MouseEvent anEvent, boolean shouldScroll)
anEvent - MouseEventshouldScroll - DOCUMENT ME!