mind Mapping
One, event processing model based on monitoring
1. Based on three types of objects in the listening processing model
-
EventSourse (event source): the component that generates the event
-
Event: An operation by the user
-
EventListener (event listener): listen to the event source
and respond to it, can contain multiple event processors
2. Programming steps based on the event processing model of listening -
The first step: (Get Event Source)
-
The second step: (implementing an event listener): is a special Java class that must take time XxxListener interface
-
The third step: (register listener): the event source calls the setXxxListener () method to register the event listener object