Also see [ java.classes.html ] which displays the classes hierarchically complete with properties and selected fields and methods. This API is also indexed and documented by:
(ClassList_1_1):
[ classlist.html ]
(Packages_1_1):
[ packages.html ]
(Names_1_1):
[ a-names.html ]
anXListener---implements--->interface----used by---->aComponent
anXListener-passed by-addXListener(anXListener)-to-->aComponent
anXListener<------gets called when an XEvent hits----aComponentA more detailed model using the Unified Modeling Language can be downloaded: [ listener.mdl ] and viewed with Rational Rose.
To support this model Java1.2 makes it easier to construct and object and and describe its class in a single statement [ anonymous_class_object in java.syntax ] -- without having to name the class.
The event handling uses grouped classes of AWTEvents, addListener functions, Listener interfaces, and Adapter classes. To implement one of the interfaces below the class must (1) state that it "implements Interface_name" in its header and (2) define all the functions listed in the interface. The Adapter classes supply default empty functions for the functions in the interface, so by extending an Adapter class you only have to defined the listening functions that do something.
| Event | Sent by | To | Added by | Adapter |
| ActionEvent | Button,List,MenuItem,TextField | ActionListener:actionPerformed | addActionListener | ActionAdapter |
| AdjustmentEvent | Scrollbar | AdjustmentListener:adjustmentValueChanged | addAdjustmentListener | AdjustmentAdapter |
| ComponentEvent | Dialog, Frame | ComponentListener:componentMoved,componentHidden,componentResized,ComponentShown | addComponentListener | ComponentAdapter |
| FocusEvent | any Component | FocusListener:focusGained,focusLost | addFocusListener | FocusAdapter |
| ItemEvent | Checkbox,CheckboxMenuItem,Choice,List | ItemListener:itemStateChanged | addItemListener | ItemAdjuster |
| KeyEvent | any Component | KeyListener:keyPressed,keyReleased,keyTyped | addKeyListener | KeyAdapter
|
| MouseEvent | Canvas,Dialog,Frame,Panel,Window. | MouseListener:mouseDragged,mousePressed,mouseClicked,mouseEntered,mouseExited | addMouseListener | MouseAdapter |
| WindowEvent | Dialog,Frame. | WindowListener:windowClosing, windowOpened, windowIconified,windowDeiconified,windowClosed | addWindowListener | WindowAdapter |
| MouseMovedEvent | etc |
There is also a set of MouseMovedEvents...
Character-based Input/Output
These echo the structure of InputStream and OutputStream:
. . . . . . . . . ( end of section Java Application Programmers Interface) <<Contents | End>>