|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPopupMenu
javax.swing.plaf.basic.BasicComboPopup
public class BasicComboPopup
UI Delegate for ComboPopup
Nested Class Summary | |
---|---|
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 |
Nested classes/interfaces inherited from class javax.swing.JPopupMenu |
---|
JPopupMenu.AccessibleJPopupMenu, JPopupMenu.Separator |
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, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Timer |
autoscrollTimer
|
protected 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 ItemListener |
itemListener
ItemListener listening to the selection changes in the combo box |
protected KeyListener |
keyListener
This listener is not used |
protected JList |
list
JList which is used to display item is the combo box |
protected ListDataListener |
listDataListener
This listener is not used |
protected MouseListener |
listMouseListener
MouseListener listening to mouse events occuring in the combo box's list. |
protected MouseMotionListener |
listMouseMotionListener
MouseMotionListener listening to mouse motion events occuring in the combo box's list |
protected ListSelectionListener |
listSelectionListener
This listener is not used |
protected MouseListener |
mouseListener
MouseListener listening to mouse events occuring in the combo box |
protected MouseMotionListener |
mouseMotionListener
MouseMotionListener listening to mouse motion events occuring in the combo box |
protected 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 JScrollPane |
scroller
JScrollPane that contains list portion of the combo box |
protected boolean |
valueIsAdjusting
This field is not used |
Fields inherited from class javax.swing.JPopupMenu |
---|
selectionModel |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BasicComboPopup(JComboBox comboBox)
Creates a new BasicComboPopup object. |
Method Summary | |
---|---|
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 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 MouseEvent |
convertMouseEvent(MouseEvent e)
DOCUMENT ME! |
protected ItemListener |
createItemListener()
Creates new ItemListener that will listen to ItemEvents occuring in the combo box. |
protected KeyListener |
createKeyListener()
KeyListener created in this method is not used anymore. |
protected JList |
createList()
Creates JList that will be used to display items in the combo box. |
protected ListDataListener |
createListDataListener()
Creates ListDataListener. |
protected MouseListener |
createListMouseListener()
This method creates ListMouseListener to listen to mouse events occuring in the combo box's item list. |
protected MouseMotionListener |
createListMouseMotionListener()
Creates ListMouseMotionlistener to listen to mouse motion events occuring in the combo box's list. |
protected ListSelectionListener |
createListSelectionListener()
ListSelectionListener created in this method is not used anymore |
protected MouseListener |
createMouseListener()
Creates MouseListener to listen to mouse events occuring in the combo box. |
protected MouseMotionListener |
createMouseMotionListener()
Create Mouse listener that listens to mouse dragging events occuring in the combo box. |
protected PropertyChangeListener |
createPropertyChangeListener()
Creates PropertyChangeListener to handle changes in the JComboBox's bound properties. |
protected JScrollPane |
createScroller()
This method creates scroll pane that will contain the list of comboBox's items inside of it. |
protected void |
delegateFocus(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 |
KeyListener |
getKeyListener()
Returns KeyListener listening to key events occuring in the combo box. |
JList |
getList()
Return list cointaining JComboBox's items |
MouseListener |
getMouseListener()
Returns MouseListener that is listening to mouse events occuring in the combo box. |
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(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(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(MouseEvent anEvent,
boolean shouldScroll)
This method changes the selection in the list to the item over which the mouse is currently located. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.swing.plaf.basic.ComboPopup |
---|
isVisible |
Field Detail |
---|
protected Timer autoscrollTimer
protected JComboBox comboBox
protected boolean hasEntered
protected boolean isAutoScrolling
protected ItemListener itemListener
protected KeyListener keyListener
protected JList list
protected ListDataListener listDataListener
protected MouseListener listMouseListener
protected MouseMotionListener listMouseMotionListener
protected ListSelectionListener listSelectionListener
protected MouseListener mouseListener
protected MouseMotionListener mouseMotionListener
protected PropertyChangeListener propertyChangeListener
protected static final int SCROLL_DOWN
protected static final int SCROLL_UP
protected int scrollDirection
protected JScrollPane scroller
protected boolean valueIsAdjusting
Constructor Detail |
---|
public BasicComboPopup(JComboBox comboBox)
comboBox
- the combo box with which this popup should be associatedMethod Detail |
---|
public void show()
show
in interface ComboPopup
show
in class Component
public void hide()
hide
in interface ComboPopup
hide
in class Component
public JList getList()
getList
in interface ComboPopup
public MouseListener getMouseListener()
getMouseListener
in interface ComboPopup
public MouseMotionListener getMouseMotionListener()
getMouseMotionListener
in interface ComboPopup
public KeyListener getKeyListener()
getKeyListener
in interface ComboPopup
public void uninstallingUI()
uninstallingUI
in interface ComboPopup
protected void uninstallComboBoxModelListeners(ComboBoxModel model)
model
- data model for the combo box from which to uninstall
listenersprotected void uninstallKeyboardActions()
protected void firePopupMenuWillBecomeVisible()
firePopupMenuWillBecomeVisible
in class JPopupMenu
protected void firePopupMenuWillBecomeInvisible()
firePopupMenuWillBecomeInvisible
in class JPopupMenu
protected void firePopupMenuCanceled()
firePopupMenuCanceled
in class JPopupMenu
protected MouseListener createMouseListener()
protected MouseMotionListener createMouseMotionListener()
protected KeyListener createKeyListener()
protected ListSelectionListener createListSelectionListener()
protected ListDataListener createListDataListener()
protected MouseListener createListMouseListener()
protected MouseMotionListener createListMouseMotionListener()
protected PropertyChangeListener createPropertyChangeListener()
protected ItemListener createItemListener()
protected JList createList()
protected void configureList()
protected void installListListeners()
protected JScrollPane createScroller()
protected void configureScroller()
protected void configurePopup()
protected void installComboBoxListeners()
protected void installComboBoxModelListeners(ComboBoxModel model)
model
- data model for the combo box for which to install listenersprotected void installKeyboardActions()
public boolean isFocusTraversable()
isFocusTraversable
in class Component
Component.setFocusable(boolean)
protected void startAutoScrolling(int direction)
direction
- of the scrolling.protected void stopAutoScrolling()
protected void autoScrollUp()
protected void autoScrollDown()
protected void delegateFocus(MouseEvent e)
e
- MouseEventprotected void togglePopup()
protected MouseEvent convertMouseEvent(MouseEvent e)
e
- DOCUMENT ME!
protected int getPopupHeightForRowCount(int maxRowCount)
maxRowCount
- number of maximum visible rows in the combo box's
popup list of items
protected 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(MouseEvent anEvent, boolean shouldScroll)
anEvent
- MouseEventshouldScroll
- DOCUMENT ME!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |