org.zaval.lw
Class LwPopupManager

java.lang.Object
  |
  +--org.zaval.lw.LwPopupManager
All Implemented Interfaces:
java.util.EventListener, LwManager, LwMouseListener
Direct Known Subclasses:
AWTPopupManager

public abstract class LwPopupManager
extends java.lang.Object
implements LwManager, LwMouseListener

This abstract class should be used to implement a popup menu manager. Use the setPopup method to register or unregister the specified pop up menu for the specified light weight component.


Constructor Summary
LwPopupManager()
           
 
Method Summary
 void dispose()
           
abstract  void hidePopup(java.lang.Object popup)
          Hides the specified popup menu.
 void mouseClicked(LwMouseEvent e)
          Invoked when the mouse button has been clicked on a light weight component.
 void mouseEntered(LwMouseEvent e)
          Invoked when the mouse enters a light weight component.
 void mouseExited(LwMouseEvent e)
          Invoked when the mouse exits a light weight component.
 void mousePressed(LwMouseEvent e)
          Invoked when the mouse button has been pressed on a light weight component.
 void mouseReleased(LwMouseEvent e)
          Invoked when the mouse button has been released on a light weight component.
 void setPopup(LwComponent c, java.lang.Object p)
          Binds the specified pop up menu with the given light weight component.
abstract  void showPopup(LwComponent target, int x, int y, java.lang.Object popup)
          Shows the specified popup menu for the target light weight component at the given location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwPopupManager

public LwPopupManager()
Method Detail

setPopup

public void setPopup(LwComponent c,
                     java.lang.Object p)
Binds the specified pop up menu with the given light weight component. Use null value as the pop up menu to unbind a popup menu from the specified light weight component.
Parameters:
c - the given light weight component.
p - the specified pop up menu.

dispose

public void dispose()
Specified by:
dispose in interface LwManager

mousePressed

public void mousePressed(LwMouseEvent e)
Description copied from interface: LwMouseListener
Invoked when the mouse button has been pressed on a light weight component.
Specified by:
mousePressed in interface LwMouseListener
Following copied from interface: org.zaval.lw.event.LwMouseListener
Parameters:
e - the specified mouse event.

mouseClicked

public void mouseClicked(LwMouseEvent e)
Description copied from interface: LwMouseListener
Invoked when the mouse button has been clicked on a light weight component.
Specified by:
mouseClicked in interface LwMouseListener
Following copied from interface: org.zaval.lw.event.LwMouseListener
Parameters:
e - the specified mouse event.

mouseEntered

public void mouseEntered(LwMouseEvent e)
Description copied from interface: LwMouseListener
Invoked when the mouse enters a light weight component.
Specified by:
mouseEntered in interface LwMouseListener
Following copied from interface: org.zaval.lw.event.LwMouseListener
Parameters:
e - the specified mouse event.

mouseExited

public void mouseExited(LwMouseEvent e)
Description copied from interface: LwMouseListener
Invoked when the mouse exits a light weight component.
Specified by:
mouseExited in interface LwMouseListener
Following copied from interface: org.zaval.lw.event.LwMouseListener
Parameters:
e - the specified mouse event.

mouseReleased

public void mouseReleased(LwMouseEvent e)
Description copied from interface: LwMouseListener
Invoked when the mouse button has been released on a light weight component.
Specified by:
mouseReleased in interface LwMouseListener
Following copied from interface: org.zaval.lw.event.LwMouseListener
Parameters:
e - the specified mouse event.

showPopup

public abstract void showPopup(LwComponent target,
                               int x,
                               int y,
                               java.lang.Object popup)
Shows the specified popup menu for the target light weight component at the given location. The location should be relative to the desktop where the target component resides.
Parameters:
target - the given light weight component.
x - the x coordinate.
y - the y coordinate.
popup - the specified popup menu.

hidePopup

public abstract void hidePopup(java.lang.Object popup)
Hides the specified popup menu.
Parameters:
popup - the specified popup menu.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org