createView {iSPlot} | R Documentation |
createView is called whenever a view is created. So createView is called when the user chooses View Data or Plot Data under the Display menu. Currently, the views can be either a scatterplot or a spreadsheet, but more can be added. createView will call another function to create the actual view based on the type parameter. Right now either the createDataView or createPlotView functions can be called, but again, more can be added if new views are needed. The new view object that is created to represent the new view will be added to viewList in viewEnv.
createView(type, dataName, ...)
type |
type of view to create, currently either "spreadView" or "plotView" |
dataName |
the name of the data to display in the view |
... |
extra parameters needed for the plot views |
Once the view has been created in createDataView or createPlotView, then createView adds key press events to the window (so each view acts like it has the same accelerators as the control window), adds the delete event callback, adds a sub menu item to the control window for this new view window, and adds a window title to the view.
Elizabeth Whalen
setPlotDView
,
setViewDataView
,
createDataView
,
createPlotView
,
createKeyPressEvent
,
closeWin
,
addSubMenuItem
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 # here you can see the extra parameters needed for the plot view createView(type = "plotView", dataName = "USArrests", plotType = "sPlotView", dfRows = 1:nrow(USArrests), dfColumns = 1:2) # creating the spreadsheet should occur through View Data under # the Display menu createView(type="spreadView",dataName="USArrests") }