-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.3.0
-
sparc
-
solaris_2.6
OS :Solaris and Windows
eventDispatched() method of AWTEventListener should be invoked when an InvocationEvent is triggered.
Description :
AWTEventListener can be added to a event source through addAWTEventListener
method of th toolkit class. An invocationEvent, when dispatched, invokes the
run() method of the Runnable interface. Triggering of this event, should
invoke the eventDispatched() method of AWTEventLIstener which is added to
this source to listen for InvocationEvents. But eventDispatched() is not
invoked when InvocationEvent is dispatched.
Observation :
InvocationEvent implements ActiveEvent interface and it is the only
event which can dispatch itself. It has got a method called
disptch() which can be called directly on any instance of InvocationEvent.
When an instance of InvocationEvent is posted to the eventQueue , EventQueue
invokes the dispatch() method of this event class itself.
AWTEventListener gets notified only inside the dispatchImpl() method of
Component class and since this event is not associated with any component
it is not dispatched to any component. So AWTEventListener does not get notified
anywhere in the event flow.
InvocationEvent Flow:
source ---> EventQueue ---> InvocationEvent.dispatch()
OR
source ---> InvocationEvent.dispatch()
Flow for other events:
source --> EventQueue --> Component.Dispatch() ---> comp.processEvent()-->
comp.processXXXEvent() ---> listener method.
Hence AWTEventListener has to be notified somewhere in the flow of
InvocationEvents.
How to reproduce the Bug? -------->
Run this sample code. This is fully automated. If you see the message
"AWTEventListener does not listen for InvocationEvents" , it is a bug.
eventDispatched() method of AWTEventListener should be invoked when an InvocationEvent is triggered.
Description :
AWTEventListener can be added to a event source through addAWTEventListener
method of th toolkit class. An invocationEvent, when dispatched, invokes the
run() method of the Runnable interface. Triggering of this event, should
invoke the eventDispatched() method of AWTEventLIstener which is added to
this source to listen for InvocationEvents. But eventDispatched() is not
invoked when InvocationEvent is dispatched.
Observation :
InvocationEvent implements ActiveEvent interface and it is the only
event which can dispatch itself. It has got a method called
disptch() which can be called directly on any instance of InvocationEvent.
When an instance of InvocationEvent is posted to the eventQueue , EventQueue
invokes the dispatch() method of this event class itself.
AWTEventListener gets notified only inside the dispatchImpl() method of
Component class and since this event is not associated with any component
it is not dispatched to any component. So AWTEventListener does not get notified
anywhere in the event flow.
InvocationEvent Flow:
source ---> EventQueue ---> InvocationEvent.dispatch()
OR
source ---> InvocationEvent.dispatch()
Flow for other events:
source --> EventQueue --> Component.Dispatch() ---> comp.processEvent()-->
comp.processXXXEvent() ---> listener method.
Hence AWTEventListener has to be notified somewhere in the flow of
InvocationEvents.
How to reproduce the Bug? -------->
Run this sample code. This is fully automated. If you see the message
"AWTEventListener does not listen for InvocationEvents" , it is a bug.