|
-
August 5th, 1999, 10:06 AM
#1
creating the user defined event
Hello,
Please tell the procedure of creating the user defined event.
Thanks in advance
Shankar
-
August 6th, 1999, 12:55 AM
#2
Re: creating the user defined event
First thing u have to do is your Event should extend a existing Event for ex.AWTEvent.
Then write a Listener interface for your event which implements EventListener. Write a Adapter for the Listener and implement the methods there that u have included in your own Listener interface.
Then write a method called processXXXEvent(XXXEvent) which handles the dispatching of events generated to the listener that are registered for the component. Apart from that in your component class u have to add addXXXListener() and removeXXXListener() methods. Overide the processEvent() so that if your event has occured then call your event processor i.e processXXXEvent() to do the rest. In your processEvent(), if event for your component has occured , create your Event object and call your processXXXEvent() with that Event object as parameter.
If u can't understand mail me . [email protected]
I hope this will help u.
regards,
arun...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|