Previous | Next |
The framework provides special event handling classes that are used to ensure that changes to the model and model selection are reflected in the component's presentation. This figure shows the Bean Works event handling classes:
ModelChangeEvent and ModelSelectionChangeEvent are used to notify any listeners (generally the view currently displaying the model) of changes to the model data or to the current selection, respectively. This gives the view a chance to display the changed data or to redraw visual feedback indicating what is selected. ModelChangeEvent objects identify the event source and the event data (a piece of data you specify that describes the change). ModelSelectionChangeEvent objects identify the source of the event and the current ModelSelection object.
ModelChangeListener and ModelSelectionChangeListener are interfaces that are implemented by classes that want to be notified of changes to the model and to the model selection, respectively. They define the methods that are called when a relevant event occurs. Currently these interfaces are both implemented by ModelView.
Previous | Next |
Copyright ©
Taligent, Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved.