Home Segments Top Top Previous Next

782: Mainline

Now it is time to consolidate what you have learned. One way to consolidate is to follow what happens when you click on the meter:

The following diagram traces the call sequence:

Movie         LocalMovieObserver    LocalMeterListener      Meter 
instance      instance              instance                instance 
--------      ------------------    ------------------      -------- 
                                                            click event 
                                                              | 
                                      *-----------------------* 
                                      | 
                                      v 
                                    mouseClicked 
                                      | 
                                      *-> getX 
                                      | 
                                      *-> getY 
                                      | 
                                      *-----------------------* 
                                      |                       v 
                                      |           getValueAtCoordinates 
                                      | 
  *-----------------------------------*  
  | 
  v 
setScript 
  | 
  *-> setChanged 
  | 
  *-> notifyObservers  
        | 
        *-------* 
                v  
              update 
                | 
rating <--------* 
                | 
                *---------------------------------------------* 
                                                              | 
                                                              v 
                                                            setValue  
                                                              | 
                                                              v 
                                                            repaint 
                                                              | 
                                                              v 
                                                            paint