All Packages Class Hierarchy This Package Previous Next Index
Class tea.set.EventMgr
java.lang.Object
|
+----tea.set.EventMgr
- public class EventMgr
- extends Object
EventMgr is used internally to handle the event listeners and event
broadcasting. It is also used to work around a Java design flaw
which makes adding new event listener type to a component impossible.
- See Also:
- TextEdit
-
EventMgr(Component)
- Create an EventMgr for the specified component.
-
addListener(EventListener)
- Add an event listener to the event manager.
-
broadcastEvent(AWTEvent)
- Invoke all event listeners for this event.
-
postEvent(AWTEvent)
- Post an event to the event listeners registered with this
event manager.
-
processEvent(AWTEvent)
- Process an event.
-
removeListener(EventListener)
- Remove an event listener from the manager.
EventMgr
public EventMgr(Component comp)
- Create an EventMgr for the specified component.
- Parameters:
- comp - component the event mgr works for.
addListener
public long addListener(EventListener l)
- Add an event listener to the event manager. The return value of
this method is an event mask that should be enabled by the caller.
- Parameters:
- l - event listener.
- Returns:
- event mask.
removeListener
public void removeListener(EventListener l)
- Remove an event listener from the manager.
- Parameters:
- l - event listener.
processEvent
public boolean processEvent(AWTEvent e)
- Process an event. This method should be called by the processEvent()
method of the owner component. It returns true if the event has been
successfully processed. If it returns false, the caller should call
super.processEvent() to further process the event.
- Parameters:
- e - event object.
- Returns:
- true if event has been processed.
broadcastEvent
public void broadcastEvent(AWTEvent e)
- Invoke all event listeners for this event.
- Parameters:
- e - event object.
postEvent
public static synchronized void postEvent(AWTEvent e)
- Post an event to the event listeners registered with this
event manager.
- Parameters:
- e - event object.
All Packages Class Hierarchy This Package Previous Next Index