gUpdateViewMessage-class {iSPlot} | R Documentation |
gUpdateViewMessage is a class to represent an update view message. Thus, when either the controller or the model (i.e. the control window or the data) want to update the view(s), a gUpdateViewMessage object is created. gUpdateViewMessage is inherited from the class, gUpdateMessage, which inherits from the virtual class, gMessage. Whenever a gUpdateViewMessage is created (initialized), the next step is to call the handleMessage method to act upon that message and update the views.
Objects can be created by calls of the form new("gUpdateViewMessage", type, ...)
.
When creating a gUpdateViewMessage, the type parameter can be one of the
four following options: "add", "reset", "modify", or "delete". This
parameter shows what type of update occurred on the data. If the type is
"modify" or "delete", then an extra parameter is needed and this extra
parameter is Rname to indicate which row names or indices have changed in
the data.
type
:mData
:
Class "gUpdateMessage"
, directly.
Class "gMessage"
, by class "gUpdateMessage"
.
Elizabeth Whalen
updatePlots
,
updateSpread
,
gMessage-class
,
gUpdateMessage-class
,
gUpdateDataMessage-class
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,"gUpdateViewMessage") }