| gUpdateDataMessage-class {iSPlot} | R Documentation |
gUpdateDataMessage is a class to represent an update data message.
When either the controller or the views (i.e. the control window or the
views) want to update the data, a gUpdateDataMessage object is created.
gUpdateDataMessage is inherited from the class, gUpdateMessage, which
inherits from the virtual class, gMessage. Whenever a gUpdateDataMessage
is created (initialized), the next step is to call the handleMessage method
to act upon that message and update the data.
Objects can be created by calls of the form new("gUpdateDataMessage", from, where, ...).
When creating a gUpdateDataMessage object, the from parameter is the object
that is telling the data to be updated. Currently, the from parameter will
be an object of class sPlotView or spreadView. The where parameter is what
point of the data should be updated (this is returned by the function,
identifyPoint). The initialize method for gUpdateDataMessage will call the
method, viewUpdateData, to ensure that the message is properly initialized
when it is created.
to:type:mData:
Class "gUpdateMessage", directly.
Class "gMessage", by class "gUpdateMessage".
to slot to slot Elizabeth Whalen
updateViews,
gMessage-class,
gUpdateMessage-class,
gUpdateViewMessage-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 set highlight mode through Highlight under the ViewMode menu
setHighlightMode()
# should create a gUpdateDataMessage object by clicking on the plot
curpt<-identifyPoint(curplot=getActivePlot(),xyloc=list(x=2.7,y=72))
dMessage<-new("gUpdateDataMessage",from=getActivePlot(),
where=curpt)
handleMessage(dMessage)
}