adavid.awt
Class PopupManager
java.lang.Object
|
+--java.awt.event.MouseAdapter
|
+--adavid.awt.PopupManager
- public class PopupManager
- extends java.awt.event.MouseAdapter
PopupManager
attach, dettach popup menus to components and
manages the open/close
Method Summary |
static void |
attachJPopupMenu(javax.swing.JComponent compo,
javax.swing.JPopupMenu popup)
attach a JPopupMenu to a JComponent |
static void |
attachPopupMenu(java.awt.Component compo,
java.awt.PopupMenu popup)
attach a PopupMenu to a component |
void |
dettachPopup(java.awt.Component compo)
detach a PopupMenu from a component |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked,
mouseEntered,
mouseExited,
mouseReleased |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PopupManager
public PopupManager()
attachPopupMenu
public static void attachPopupMenu(java.awt.Component compo,
java.awt.PopupMenu popup)
- attach a PopupMenu to a component
attachJPopupMenu
public static void attachJPopupMenu(javax.swing.JComponent compo,
javax.swing.JPopupMenu popup)
- attach a JPopupMenu to a JComponent
dettachPopup
public void dettachPopup(java.awt.Component compo)
- detach a PopupMenu from a component
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Invoked when a mouse button has been pressed on a component.
opens the popup menu
- Overrides:
- mousePressed in class java.awt.event.MouseAdapter