gAddViewMessage-class {iSPlot}R Documentation

Class "gAddViewMessage": A class to represent an add view message

Description

gAddViewMessage is a class to represent an add view message. Whenever a view needs to be added, a gAddViewMessage object is created and the handleMessage method is called to act on the message. Currently, the two places where views can be added are the View Data and Plot Data menu options under the File menu. A gAddViewMessage object can add either a scatterplot or spreadsheet view, though new views may be added in the future. gAddViewMessage inherits from the class, gAddMessage, which inherits from the virtual class, gMessage.

Objects from the Class

Objects can be created by calls of the form new("gAddViewMessage", dataName, type, ...). When creating a gAddViewMessage, the dataName parameter will fill the dataName slot, the type parameter will fill the type slot, and any parameters in the ... parameter will fill the mData slot. dataName will be the name of the data that the view will show. type indicates whether the view will be "plotView" or "spreadView". mData is any extra information the view may need.

Slots

type:
a character string representing the type of view, will be either "plotView" or "spreadView"
dataName:
the name of the data that the view will show
mData:
any extra information the view may need, will be a list

Extends

Class "gAddMessage", directly. Class "gMessage", by class "gAddMessage".

Methods

handleMessage
Creates a view by calling the function, createView
initialize
Creates a gAddViewMessage object
type
Returns the type slot
type<-
Sets the type slot

Author(s)

Elizabeth Whalen

See Also

createView, gAddMessage-class, gAddDataMessage-class

Examples

  if (interactive())
  {
    createControlWindow()
    # should load data through Open Data or Open File under the File menu
    data("USArrests")
    dMessage<-new("gAddDataMessage", data="USArrests")
    handleMessage(dMessage)
    # plotting the data should occur through Plot Dataframe under 
    # the Display menu
    vMessage<-new("gAddViewMessage", dataName="USArrests", type="plotView",
                  plotType="sPlotView",  dfRows = 1:nrow(USArrests), 
                  dfColumns = 1:2)    
    handleMessage(vMessage)
    # check the class
    class(vMessage)
  }

[Package iSPlot version 1.0.3 Index]