public class PopupWindow
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected javax.swing.event.EventListenerList |
listenerList
A list of event listeners for this component.
|
Constructor and Description |
---|
PopupWindow(java.awt.Container container) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.awt.Component component) |
void |
addAsExcludedComponents(java.awt.Component comp)
PopupWindow will add necessary listeners to some components so that mouse click etc can hide the popup window.
|
void |
addPopupMenuListener(javax.swing.event.PopupMenuListener l)
Adds a
PopupMenu listener which will listen to notification messages from the popup portion of the
combo box. |
void |
firePopupMenuCanceled()
Notifies
PopupMenuListener s that the popup portion of the combo box has been canceled. |
void |
firePopupMenuWillBecomeInvisible()
Notifies
PopupMenuListener s that the popup portion of the combo box has become invisible. |
void |
firePopupMenuWillBecomeVisible()
Notifies
PopupMenuListener s that the popup portion of the combo box will become visible. |
javax.swing.event.PopupMenuListener[] |
getPopupMenuListeners()
Returns an array of all the
PopupMenuListener s added to this JComboBox with addPopupMenuListener(). |
void |
hide() |
boolean |
isExcludedComponent(java.awt.Component comp) |
boolean |
isVisible()
Gets the visibility of this popup.
|
void |
removeFromExcludedComponents(java.awt.Component comp) |
void |
removePopupMenuListener(javax.swing.event.PopupMenuListener l)
Removes a
PopupMenuListener . |
void |
show(java.awt.Component relative,
int x,
int y) |
protected javax.swing.event.EventListenerList listenerList
public void add(java.awt.Component component)
public void show(java.awt.Component relative, int x, int y)
public void hide()
public boolean isVisible()
public void addPopupMenuListener(javax.swing.event.PopupMenuListener l)
PopupMenu
listener which will listen to notification messages from the popup portion of the
combo box.
For all standard look and feels shipped with Java 2, the popup list portion of combo box is implemented as a
JPopupMenu
. A custom look and feel may not implement it this way and will therefore not receive the
notification.l
- the PopupMenuListener
to addpublic void removePopupMenuListener(javax.swing.event.PopupMenuListener l)
PopupMenuListener
.l
- the PopupMenuListener
to removeaddPopupMenuListener(javax.swing.event.PopupMenuListener)
public javax.swing.event.PopupMenuListener[] getPopupMenuListeners()
PopupMenuListener
s added to this JComboBox with addPopupMenuListener().PopupMenuListener
s added or an empty array if no listeners have been addedpublic void firePopupMenuWillBecomeVisible()
PopupMenuListener
s that the popup portion of the combo box will become visible.
This method is public but should not be called by anything other than the UI delegate.addPopupMenuListener(javax.swing.event.PopupMenuListener)
public void firePopupMenuWillBecomeInvisible()
PopupMenuListener
s that the popup portion of the combo box has become invisible.
This method is public but should not be called by anything other than the UI delegate.addPopupMenuListener(javax.swing.event.PopupMenuListener)
public void firePopupMenuCanceled()
PopupMenuListener
s that the popup portion of the combo box has been canceled.
This method is public but should not be called by anything other than the UI delegate.addPopupMenuListener(javax.swing.event.PopupMenuListener)
public void addAsExcludedComponents(java.awt.Component comp)
comp
- component which will not hide popup when it is clicked.public void removeFromExcludedComponents(java.awt.Component comp)
public boolean isExcludedComponent(java.awt.Component comp)