createView              package:iSPlot              R Documentation

_C_r_e_a_t_e _a _V_i_e_w

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     createView(type, dataName, ...)

_A_r_g_u_m_e_n_t_s:

    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 

_D_e_t_a_i_l_s:

     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.

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'setPlotDView', 'setViewDataView', 'createDataView',
     'createPlotView', 'createKeyPressEvent', 'closeWin',
     'addSubMenuItem'

_E_x_a_m_p_l_e_s:

       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")
       }

