Example Graphics Object Interaction

[IMAGE: Message Flow Diagram 2]

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.

  1. 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.
  2. Model Sends the event to the top level window (Window 1).
  3. 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.)
  4. 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.
  5. The window sends an update message to an object. No response is required.
  6. The window sends an update message to an object. No response is required.
  7. The window sends an update message to an object. No response is required.
  8. The window sends an update message to an object. No response is required.
  9. The window informs the model that the event has been successfully and completely handled.