javax.swing.plaf
public abstract class PopupMenuUI extends ComponentUI
JPopupMenu.
| Constructor Summary | |
|---|---|
| PopupMenuUI()
Constructs a new PopupMenuUI. | |
| Method Summary | |
|---|---|
| Popup | getPopup(JPopupMenu popup, int x, int y)
Creates a Popup for displaying the popup menu. |
| boolean | isPopupTrigger(MouseEvent event)
Tests whether or not a mouse event triggers a popup menu.
|
PopupMenuUI.Popup for displaying the popup menu. The
default implementation uses the {@link javax.swing.PopupFactory}
for retrieving a suitable Popup, but subclasses
might want to override this method if a LookAndFeel needs special
Popups.
Parameters: popup the JPopupMenu for whose display
a Popup is needed.
x the horizontal position where the popup will be
displayed.
y the vertical position where the popup will be
displayed.
Returns: a Popup for showing and hiding
the menu.
Since: 1.4
The default implementation calls
event.isPopupTrigger(), which checks for the gesture
that is common for the platform on which the application runs. If
a look and feel wants to employ non-standard conventions for
triggering a popup menu, it can override this method.
Parameters: event the event to check.
Returns: true if the event triggers a popup menu;
false otherwise.
Since: 1.3