spreadView-class {iSPlot}R Documentation

Class "spreadView": A class to represent a spreadsheet view

Description

spreadView is a class to represent a view that is a spreadsheet. spreadView inherits from the virtual class, genView.

Objects from the Class

Objects can be created by calls of the form new("spreadView", ...).

Slots

clist:
an object of class "GtkCList", i.e. the spreadsheet
dataName:
a character string describing what data is shown in the view
win:
an object of class "GtkWindow" that holds the view
winNum:
a number that tells what number view this is (for example, the first view created will have winNum=1)

Extends

Class "genView", directly.

Methods

clickEvent
Handles button press events on a spreadsheet: identifies the row clicked and creates and handles a gUpdateDataMessage object depending on the whether the row was selected or unselected
clist
Returns the clist slot
viewUpdateData
Called by the initialize method when creating an object of class, gUpdateDataMessage. The viewUpdateData method determines how the data will be updated based on the view mode, the view object, and the location of the event (which row was selected in this case). A list containing the slot values for the gUpdateDataMessage object is returned.

Author(s)

Elizabeth Whalen

See Also

genView-class, plotView-class, sPlotView-class, gUpdateDataMessage-class

Examples

  if (interactive())
  {
    createControlWindow()
    # should load data through Open Data or Open File under the File menu
    data(USArrests)
    loadDFData(USArrests, "USArrests")

    # viewing the data should occur through View Data under 
    # the Display menu
    vMessage<-new("gAddViewMessage", dataName="USArrests", type="spreadView")    
    handleMessage(vMessage)

    # this will create an object of class, spreadView
    is(getViewEnvVar("viewList")[[1]], "spreadView")  
  }

[Package iSPlot version 1.2.0 Index]