public class MousePopupable extends MouseWidgetAction
| Modifier and Type | Field and Description |
|---|---|
private int |
btn
The button on which the popup is associated.
|
private Menu |
popup
The popup associated with this widget.
|
gd, mouseActions, widget| Constructor and Description |
|---|
MousePopupable(int wid,
int btn,
int pid)
Create a new mouse popupable action, for the specified widget.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
drawPopup(java.awt.event.MouseEvent evt)
Draw the
popup, based on current popup state and mouse event. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event for this
MouseWidgetAction.widget. |
void |
mousePressed(java.awt.event.MouseEvent e)
Notification of a mouse pressed event for this
MouseWidgetAction.widget. |
getEventId, hasEventprivate final int btn
private Menu popup
public MousePopupable(int wid,
int btn,
int pid)
wid - The widget id.btn - The button to be pressed, when showing the popup.pid - The popup widget ID.public void mouseClicked(java.awt.event.MouseEvent e)
MouseWidgetAction.widget.mouseClicked in interface java.awt.event.MouseListenermouseClicked in class java.awt.event.MouseAdaptere - The mouse event.public void mousePressed(java.awt.event.MouseEvent e)
MouseWidgetAction.widget.mousePressed in interface java.awt.event.MouseListenermousePressed in class java.awt.event.MouseAdaptere - The mouse event.private void drawPopup(java.awt.event.MouseEvent evt)
popup, based on current popup state and mouse event.evt - The current mouse event.