S
Srubys
hi
I understand events to a point. I know that event is an object that
describes a state change in a source. Source generates an event when
its internal state changes in some way. Listener is an object, which
if registered for particular event will be notified when event occurs.
Source registers listeners via registration methods, while listeners
are able to get registered only if they implement certain interface
for that event. This interface provides listener with method(s) that
actually receive and process events.
* I’m not sure how to get my point across, but I will try:
I don’t understand what the big deal is about event handling
mechanism. Meaning, all the procedures I described above a programmer
could create easily, even if Java didn’t provide us with the so
called event delegation model . Only difference is that Java has given
us some already defined events and some already defined interfaces to
handle those events and some already defined source classes with their
registration methods. Point being, I thought that internally this
event handling mechanism provided programmer with utility, which would
be very hard or almost imposible to achieve by programmer alone
( assuming if Java haven’t provide predefined classes for it ), but
that doesn’t seems to be the case ( on the other hand, exceptions are
something programmer would not be able to create by itself, if Java
didn’t internally provided support for them)
*All the tutorials I found on the net describe event handling within
the context of AWT, or SWING or … controls. Since I haven’t started
learning those yet and since I would like to figure out more of what
is happening under the hood, do you know of any tutorials, which would
explain ( and show code ) events without the use of those “fancy”
applet, AWT … libraries?
cheers
I understand events to a point. I know that event is an object that
describes a state change in a source. Source generates an event when
its internal state changes in some way. Listener is an object, which
if registered for particular event will be notified when event occurs.
Source registers listeners via registration methods, while listeners
are able to get registered only if they implement certain interface
for that event. This interface provides listener with method(s) that
actually receive and process events.
* I’m not sure how to get my point across, but I will try:
I don’t understand what the big deal is about event handling
mechanism. Meaning, all the procedures I described above a programmer
could create easily, even if Java didn’t provide us with the so
called event delegation model . Only difference is that Java has given
us some already defined events and some already defined interfaces to
handle those events and some already defined source classes with their
registration methods. Point being, I thought that internally this
event handling mechanism provided programmer with utility, which would
be very hard or almost imposible to achieve by programmer alone
( assuming if Java haven’t provide predefined classes for it ), but
that doesn’t seems to be the case ( on the other hand, exceptions are
something programmer would not be able to create by itself, if Java
didn’t internally provided support for them)
*All the tutorials I found on the net describe event handling within
the context of AWT, or SWING or … controls. Since I haven’t started
learning those yet and since I would like to figure out more of what
is happening under the hood, do you know of any tutorials, which would
explain ( and show code ) events without the use of those “fancy”
applet, AWT … libraries?
cheers