ITSE 2317 OOP
Event Handling in JDK 1.1, A First Look, Delegation Event Model
Lesson # 80
Run: Tue May 22 09:41:02 CDT 2012
Baldwin

Slides
aa  -  ITSE 2317 Java Programming (Intermediate)
ab  -  Event Handling, Delegation Event Model
ac  -  Figures
ad  -  Listings
ae  -  Design goals for the model
af  -  Design goals for the model (cont'd)
ag  -  Simplified overview
ah  -  Callbacks
ai  -  Event classes
aj  -  Source
ak  -  Programmer's responsibility
al  -  Listener
am  -  Listener methods
an  -  Example event class
ao  -  A rare case
ap  -  Registration
aq  -  Notification methodology
ar  -  Event sub types
as  -  More on programmer responsibility
at  -  More on programmer responsibility (cont'd)
au  -  Adapter classes
av  -  Can be burdensome
aw  -  Adapter class structure
ax  -  Using adapter class
ay  -  Sample program named Event08
az  -  Structure of the program
ba  -  Implementing interface
bb  -  Extending adapter
bc  -  Program designed for simplicity
bd  -  Program illustrates
be  -  User interface
bf  -   Frame is Event Source
bg  -  Implementing vs. extending
bh  -   Purpose of Adapter classes (as used in this context)
bi  -  Using adapter class - to emphasize
bj  -  The class named Event08
bk  -  The GUI class
bl  -  GUI class is used to
bm  -  Beginning of GUI constructor
bn  -  What is a Frame?
bo  -  Events fired by a Frame
bp  -  Instantiate listener objects
bq  -  Pass Frame object as parameter
br  -  Register listener objects
bs  -  Interpretation of Listing 4
bt  -  Important Concept
bu  -  WindowEvent is a type
bv  -  WINDOW_CLOSING is a sub type
bw  -  Make Frame object visible
bx  -   Create events
by  -  Next assignment
bz  -  Implementing the WindowListener interface
ca  -  Beginning of the class named WProc1
cb  -  Reference to a source object
cc  -  Class implements WindowListener interface
cd  -  Method definitions
ce  -  The windowClosing() event handler method
cf  -  Call the dispose method
cg  -  A WindowClosed event
ch  -  Ignore incoming parameter
ci  -  Extending the adapter class
cj  -  The class named WProc2
ck  -  Program output
cl  -  Miscellaneous details
cm  -  Sub types of events
cn  -  EventListener interface
co  -  EventListener interface (cont'd)
cp  -  EventListener interface (cont'd)
cq  -  Event Source
cr  -  Registration of event listeners
cs  -  Notification of listener objects
ct  -  Non-GUI sources
cu  -  Event hierarchy
cv  -  Multiple event types (sub types)
cw  -  Sub type ID
cx  -  Event data
cy  -  Creating event classes
cz  -  Not an independent API
da  -  Low level vs. semantic events
db  -  Low level vs. semantic events cont'd
dc  -  Listener interface methods
dd  -  Event sources - Multicast model
de  -  Must take inheritance into account
df  -  Must take inheritance into account (cont'd)
dg  -  Must take inheritance into account (cont'd)
dh  -  Why have adapter classes?
di  -  Why have adapter classes (cont'd)?
dj  -  Why have adapter classes (cont'd)?
dk  -  Why have adapter classes (cont'd)?
dl  -  Extending adapter can be less burdensome
dm  -  Sample program named Event09
dn  -  Different wiring pattern
do  -  Different wiring pattern (cont'd)
dp  -  Implement MouseListener on Frame
dq  -  Program behavior
dr  -  The class named Event09
ds  -  The paint() and repaint() methods
dt  -  The paint() and repaint() methods (cont'd)
du  -  Need to extend Frame
dv  -  The class named MyFrame
dw  -  Overriding paint()
dx  -  The drawString() method
dy  -  Coordinate values
dz  -  Overridden drawString() method
ea  -  Constructor for GUI class
eb  -  Registering listener objects
ec  -  End of class
ed  -  MouseListener class
ee  -  Event handler method
ef  -  Display coordinate information
eg  -  The MouseEvent object
eh  -  A variety of information
ei  -  The mousePressed() method
ej  -  The mousePressed() method (cont'd)
ek  -  Window listener class
el  -  Summary
em  -  Step 1
en  -  Step 2
eo  -  Step 2 (cont'd)
ep  -  Step 3
eq  -  Complete program listings
er  -  The End

-end-