gMessage-class {iSPlot}R Documentation

Class "gMessage": A virtual class for messages

Description

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).

Objects from the Class

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

Methods

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

Author(s)

Elizabeth Whalen

See Also

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

Examples

  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")
  }

[Package iSPlot version 1.0.3 Index]