org.zaval.lw.event
Class LwEventManager

java.lang.Object
  |
  +--org.zaval.lw.event.LwEventManager
All Implemented Interfaces:
LwManager

public class LwEventManager
extends java.lang.Object
implements LwManager

This is one of the core classes of the light weight library that is used to define light weight events delivering strategy. Actually all light weight components events at first are passed to the manager and after that the manager decides how the events should be delivered.

The manager provides listeners supporting for following events types:

The manager provides universal methods to register and unregister light weight listeners, the method checks if the object implements one of the events listeners and calls appropriate method (see list above) to register or unregister appropriate listeners. Use addXXXListener and removeXXXListener for the purposes.


Constructor Summary
LwEventManager()
           
 
Method Summary
 void addComponentListener(LwComponentListener l)
          Adds the specified component events listener.
 void addContainerListener(LwContainerListener l)
          Adds the specified container events listener.
 void addFocusListener(LwFocusListener l)
          Adds the specified focus events listener.
 void addKeyListener(LwKeyListener l)
          Adds the specified key events listener.
 void addMouseListener(LwMouseListener l)
          Adds the specified mouse events listener.
 void addMouseMotionListener(LwMouseMotionListener l)
          Adds the specified mouse motion events listener.
 void addWinListener(LwWinListener l)
          Adds the specified window listener.
 void addXXXListener(java.util.EventListener l)
          Adds the specified events listener.
 void dispose()
           
 LwComponent getEventDestination(LwComponent target)
          Gets the event destination.
 void perform(LwAWTEvent e)
          Performs the specified light weight event.
 void removeComponentListener(LwComponentListener l)
          Removes the specified component events listener.
 void removeContainerListener(LwContainerListener l)
          Removes the specified container events listener.
 void removeFocusListener(LwFocusListener l)
          Removes the specified focus events listener.
 void removeKeyListener(LwKeyListener l)
          Removes the specified key events listener.
 void removeMouseListener(LwMouseListener l)
          Removes the specified mouse events listener.
 void removeMouseMotionListener(LwMouseMotionListener l)
          Removes the specified mouse motion events listener.
 void removeWinListener(LwWinListener l)
          Removes the specified window listener.
 void removeXXXListener(java.util.EventListener l)
          Removes the specified events listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LwEventManager

public LwEventManager()
Method Detail

addXXXListener

public void addXXXListener(java.util.EventListener l)
Adds the specified events listener. The method checks what light weight listeneres interfaces are implemented with the listener and adds the events listeners as appropriate light weight events listeners.
Parameters:
l - the specified events listener.

removeXXXListener

public void removeXXXListener(java.util.EventListener l)
Removes the specified events listener. The method checks what light weight listeneres interfaces are implemented with the listener and removes the events listeners from the appropriate listners lists.
Parameters:
l - the specified events listener.

addComponentListener

public void addComponentListener(LwComponentListener l)
Adds the specified component events listener.
Parameters:
l - the specified events listener.

removeComponentListener

public void removeComponentListener(LwComponentListener l)
Removes the specified component events listener.
Parameters:
l - the specified events listener.

addContainerListener

public void addContainerListener(LwContainerListener l)
Adds the specified container events listener.
Parameters:
l - the specified events listener.

removeContainerListener

public void removeContainerListener(LwContainerListener l)
Removes the specified container events listener.
Parameters:
l - the specified events listener.

addMouseListener

public void addMouseListener(LwMouseListener l)
Adds the specified mouse events listener.
Parameters:
l - the specified events listener.

removeMouseListener

public void removeMouseListener(LwMouseListener l)
Removes the specified mouse events listener.
Parameters:
l - the specified events listener.

addMouseMotionListener

public void addMouseMotionListener(LwMouseMotionListener l)
Adds the specified mouse motion events listener.
Parameters:
l - the specified events listener.

removeMouseMotionListener

public void removeMouseMotionListener(LwMouseMotionListener l)
Removes the specified mouse motion events listener.
Parameters:
l - the specified events listener.

addFocusListener

public void addFocusListener(LwFocusListener l)
Adds the specified focus events listener.
Parameters:
l - the specified events listener.

removeFocusListener

public void removeFocusListener(LwFocusListener l)
Removes the specified focus events listener.
Parameters:
l - the specified events listener.

addKeyListener

public void addKeyListener(LwKeyListener l)
Adds the specified key events listener.
Parameters:
l - the specified events listener.

removeKeyListener

public void removeKeyListener(LwKeyListener l)
Removes the specified key events listener.
Parameters:
l - the specified events listener.

removeWinListener

public void removeWinListener(LwWinListener l)
Removes the specified window listener.
Parameters:
l - the specified window listener.

addWinListener

public void addWinListener(LwWinListener l)
Adds the specified window listener.
Parameters:
l - the specified events listener.

dispose

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

perform

public void perform(LwAWTEvent e)
Performs the specified light weight event. The method is used to distribute the event according the manager functionality and it is utilized with different parts of the library.
Parameters:
e - the specified light weight event.

getEventDestination

public LwComponent getEventDestination(LwComponent target)
Gets the event destination. The method looks for composite parent of the specified target component and defines if the parent should be the event destination
Parameters:
target - the specified target component.
Returns:
an event destination.


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