Statecharts Events Events originate in the analysis process as “happenings” within the system to which objects respond. Their concrete realizations are information entities carrying data about the occurrence they describe. For designers, an event is a one-way, asynchronous communication between objects or between some external interface and the system (see Events and operations ). The following figure shows an event. You can specify an event using the following methods: Љ An event name Љ The name of a triggered operation Љ tm(time expression) For timeout events, the time expression must be an integer expression, in milliseconds.
Event usage Classes and their statecharts can receive events defined in any package in the model. Cross- package inheritance of statecharts for reactive classes is not allowed. Event class hierarchy An event is an instance of a particular event-class. Events can be subclassed to add attributes (event parameters). The base class for all events is OMEvent . For example, windowing systems define several event classes: MouseEvent is a subclass of InputEvent , and MouseClickEvent and MouseMotionEvent are subclasses of MouseEvent . To make an event a subclass of another event: 1. Open the Features window for the event. 2. From the Inherits:
list, select the event that is to serve as the base class. 3. Click Apply or OK . 742 User Guide