gMessage-class            package:iSPlot            R Documentation

_C_l_a_s_s "_g_M_e_s_s_a_g_e": _A _v_i_r_t_u_a_l _c_l_a_s_s _f_o_r _m_e_s_s_a_g_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     gMessage is a virtual class from which all other message classes
     will  inherit.  Message objects will be created whenever there is
     communication between the model, view, and controller components. 
     Particularly important are messages between the data and its views
     (the model and view components).

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     A virtual Class: No objects may be created from it.

_M_e_t_h_o_d_s:

     No methods defined with class "gMessage" in the signature.

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'gUpdateMessage-class', 'gUpdateViewMessage-class',
     'gUpdateDataMessage-class', 'gAddMessage-class',
     'gAddViewMessage-class', 'gAddDataMessage-class'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # plotting the data should occur through Plot Data under the 
         # Display menu
         createView(type = "plotView", dataName = "USArrests", 
                    plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
                    dfColumns = 1:2)    
         # should modify using the control window (by choosing the view mode and
         # then clicking on a plot)
         # by interacting with a plot when the view mode is color, these 
         # functions will be called automatically
         modify("USArrests", Rname=c("Massachusetts","Ohio"), 
                Cname=c("color","color"), data=c("red","green")) 
         # create an update view message and then dispatch it so the points
         # that have changed will be replot
         plMessage<-new("gUpdateViewMessage",type="modify",Rname=c("Massachusetts",
                        "Ohio"))
         handleMessage(plMessage,dataName="USArrests")

         # now see if the message is inherited from gMessage
         is(plMessage,"gMessage")
       }

