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
lightweight 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 support for following events types:
-
Lightweight component events listeners.
Use the
addComponentListener and removeComponentListener methods.
-
Lightweight container events listeners.
Use the
addContainerListener and removeContainerListener methods.
-
Lightweight mouse events listeners.
Use the
addMouseListener and removeMouseListener methods.
-
Lightweight mouse motion events listeners.
Use the
addMouseMotionListener and removeMouseMotionListener methods.
-
Lightweight key events listeners.
Use the
addKeyListener and removeKeyListener methods.
-
Lightweight focus events listeners.
Use the
addFocusListener and removeFocusListener methods.
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 the addXXXListener and removeXXXListener for the purposes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwEventManager
public LwEventManager()
addXXXListener
public void addXXXListener(java.util.EventListener l)
- Adds the specified events listener. The method checks what lightweight listeners interfaces
are implemented by the listener and adds the events listeners as appropriate lightweight
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 listeners interfaces
are implemented with the listener and removes the events listeners from the appropriate listeners
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.
dispose
public void dispose()
- Description copied from interface:
LwManager
- Disposes the manager. The method is supposed to be used for disposing different manager related structures
to free system resources. The method is invoked by LwVCL core when the manager ends its "live".
- Specified by:
dispose in interface LwManager
perform
public void perform(LwVCLEvent 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.
process
protected void process(LwComponentListener l,
LwVCLEvent e)
- The method knows how the specified component event has to be delivered to the given
component listener.
- Parameters:
l - the specified component listener.e - the specified component event.
process
protected void process(LwContainerListener l,
LwContainerEvent e)
- The method knows how the specified container event has to be delivered to the given
container listener.
- Parameters:
l - the specified container listener.e - the specified container event.
process
protected void process(LwFocusListener l,
LwVCLEvent e)
- The method knows how the specified focus event has to be delivered to the given
focus listener.
- Parameters:
l - the specified focus listener.e - the specified focus event.
process
protected void process(LwKeyListener l,
LwKeyEvent e)
- The method knows how the specified key event has to be delivered to the given
key listener.
- Parameters:
l - the specified key listener.e - the specified key event.
process
protected void process(LwMouseMotionListener l,
LwMouseEvent e)
- The method knows how the specified mouse motion event has to be delivered to the given
mouse motion listener.
- Parameters:
l - the specified mouse motion listener.e - the specified mouse motion event.
process
protected static void process(LwMouseListener l,
LwMouseEvent e)
- The method knows how the specified mouse event has to be delivered to the given
mouse listener.
- Parameters:
l - the specified mouse listener.e - the specified mouse event.
|