Example Graphics Object Interaction
In this diagram, Window 1 is the main window for the program. Window
2 is some pop-up window (a clone pop-up window, for example). Not all
graphics objects are represented. Not intended for children under 3
years of age.
- Keyboard or Mouse Controller sends an event to the Model. In this example, we will say that there was a mouse action repositioning the locator.
- Model Sends the event to the top level window (Window 1).
- Since the mouse event is within the window's coordinates, Win 1 sends the event to the object at the specified location (the locator). (If the coordinates were not within the window, Win 1 would return a "Try again" message to the Model.)
- After doing internal processing of the event, the locator graphics object returns an ActionEvent to the window, indicating that the window needs to be redrawn.
- The window sends an update message to an object. No response is required.
- The window sends an update message to an object. No response is required.
- The window sends an update message to an object. No response is required.
- The window sends an update message to an object. No response is required.
- The window informs the model that the event has been successfully and completely handled.