Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/guiframe/data_processor.py

    re54dbc3e r44d20af  
    11""" 
    2 Implement grid used to store data 
     2Implement grid used to store results of a batch fit. 
     3 
     4This is in Guiframe rather than fitting which is probably where it should be. 
     5Actually could be a generic framework implemented in fit gui module.  At this 
     6point however there this grid behaves independently of the fitting panel and 
     7only knows about information sent to it but not about the fits or fit panel and 
     8thus cannot feed back to the fitting panel.  This could change in the future. 
     9 
     10The organization of the classes goes as: 
     11 
     12.. image::  ../../user/guiframe/BatchGridClassLayout.png 
     13   :align:   center 
     14 
    315""" 
    416import wx 
     
    2638    """ 
    2739    Object describing a cell in  the grid. 
    28  
    2940    """ 
    3041    def __init__(self): 
     42        """ 
     43        Initialize attributes of class (label, value, col, row, object) 
     44        """ 
    3145        self.label = "" 
    3246        self.value = None 
     
    3953    """ 
    4054    Return a dictionary of column label and index or row selected 
     55 
    4156    :param sentence: String to parse 
    4257    :param list: list of columns label 
     58    :returns: col_dict 
    4359    """ 
     60 
    4461    p2 = re.compile(r'\d+') 
    4562    p = re.compile(r'[\+\-\*\%\/]') 
     
    8198 
    8299class SPanel(ScrolledPanel): 
     100    """ 
     101    ensure proper scrolling of GridPanel  
     102     
     103    Adds a SetupScrolling call to the normal ScrolledPanel init.     
     104    GridPanel then subclasses this class 
     105     
     106    """ 
    83107    def __init__(self, parent, *args, **kwds): 
     108        """ 
     109        initialize ScrolledPanel then force a call to SetupScrolling 
     110 
     111        """ 
    84112        ScrolledPanel.__init__(self, parent, *args, **kwds) 
    85113        self.SetupScrolling() 
     
    87115 
    88116class GridCellEditor(sheet.CCellEditor): 
    89     """ Custom cell editor """ 
     117    """ 
     118    Custom cell editor 
     119 
     120    This subclasses the sheet.CCellEditor (itself a subclass of 
     121    grid.GridCellEditor) in order to override two of its methods: 
     122    PaintBackrgound and EndEdit. 
     123     
     124    This is necessary as the sheet module is broken in wx 3.0.2 and 
     125    improperly subclasses grid.GridCellEditor 
     126    """ 
    90127    def __init__(self, grid): 
     128        """ 
     129        Override of CCellEditor init. Runs the grid.GridCellEditor init code 
     130        """ 
    91131        super(GridCellEditor, self).__init__(grid) 
    92132 
     133    def PaintBackground(self, dc, rect, attr): 
     134        """ 
     135        Overrides wx.sheet.CCellEditor.PaintBackground which incorrectly calls 
     136        the base class method. 
     137 
     138        In wx3.0 all paint objects must explicitly 
     139        have a wxPaintDC (Device Context) object.  Thus the paint event which 
     140        generates a call to this method provides such a DC object and the 
     141        base class in grid expects to receive that object.  sheet was apparently 
     142        not updated to reflect this and hence fails.  This could thus 
     143        become obsolete in a future bug fix of wxPython. 
     144 
     145        Apart from adding a dc variable in the list of arguments in the def 
     146        and in the call to the base class the rest of this method is copied 
     147        as is from sheet.CCellEditor.PaintBackground 
     148 
     149        **From original GridCellEditor docs:** 
     150 
     151        Draws the part of the cell not occupied by the edit control.  The 
     152        base class version just fills it with background colour from the 
     153        attribute. 
     154 
     155        NOTE: There is no need to override this if you don't need 
     156        to do something out of the ordinary. 
     157 
     158        :param dc: the wxDC object for the paint 
     159        """ 
     160        # Call base class method. 
     161        DC = dc 
     162        super(sheet.CCellEditor,self).PaintBackground(DC, rect, attr) 
     163 
    93164    def EndEdit(self, row, col, grid, previous): 
    94         """  
    95             Commit editing the current cell. Returns True if the value has changed. 
    96             @param previous: previous value in the cell 
     165        """ 
     166        Commit editing the current cell. Returns True if the value has changed. 
     167 
     168        :param previous: previous value in the cell 
    97169        """ 
    98170        changed = False                             # Assume value not changed 
     
    108180class GridPage(sheet.CSheet): 
    109181    """ 
     182    Class that receives the results of a batch fit. 
     183 
     184    GridPage displays the received results in a wx.grid using sheet.  This is 
     185    then used by GridPanel and GridFrame to present the full GUI. 
    110186    """ 
    111187    def __init__(self, parent, panel=None): 
    112188        """ 
     189        Initialize 
     190 
     191        Initialize all the attributes of GridPage, and the events. include 
     192        the init stuff from sheet.CSheet as well. 
    113193        """ 
    114194        #sheet.CSheet.__init__(self, parent) 
    115          
     195 
    116196        # The following is the __init__ from CSheet. ########################## 
    117197        # We re-write it here because the class is broken in wx 3.0, 
     
    139219 
    140220        # Sink events 
     221        self.Bind(wx.grid.EVT_GRID_RANGE_SELECT, self.OnRangeSelect) 
     222        self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.OnRowSize) 
     223        self.Bind(wx.grid.EVT_GRID_COL_SIZE, self.OnColSize) 
     224        self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnGridSelectCell) 
     225        # NOTE: the following bind to standard sheet methods that are 
     226        # overriden in this subclassn - actually we have currently 
     227        # disabled the on_context_menu that would override the OnRightClick 
     228        self.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnCellChange) 
    141229        self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnLeftClick) 
    142230        self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnRightClick) 
    143231        #self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnLeftDoubleClick) 
    144         self.Bind(wx.grid.EVT_GRID_RANGE_SELECT, self.OnRangeSelect) 
    145         self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.OnRowSize) 
    146         self.Bind(wx.grid.EVT_GRID_COL_SIZE, self.OnColSize) 
    147         self.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnCellChange) 
    148         self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnGridSelectCell) 
    149232        # This ends the __init__ section for CSheet. ########################## 
     233 
     234 
     235 
     236        # The following events must be bound even if CSheet is working  
     237        # properly and does not need the above re-implementation of the 
     238        # CSheet init method.  Basically these override any intrinsic binding 
     239        self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) 
     240        self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 
    150241 
    151242        self.AdjustScrollbars() 
     
    187278        if self.GetNumberCols() > 0: 
    188279            self.default_col_width = self.GetColSize(0) 
     280        # We have moved these to the top of the init section with the 
     281        # rest of the grid event bindings from the sheet init when 
     282        # appropriate 
    189283        #self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 
    190284        #self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) 
     
    194288 
    195289    def OnLeftClick(self, event): 
     290        """ 
     291        Overrides sheet.CSheet.OnLefClick. 
     292 
     293        Processes when a cell is selected by left clicking on that cell. First 
     294        process the base Sheet method then the current class specific method 
     295        """ 
    196296        sheet.CSheet.OnLeftClick(self, event) 
    197297        self.on_selected_cell(event) 
    198          
    199     def on_edit_cell(self, event): 
    200         """ 
     298 
     299 
     300    def OnCellChange(self, event): 
     301        """ 
     302        Overrides sheet.CSheet.OnCellChange.   
     303 
     304        Processes when a cell has been edited by a cell editor. Checks for the 
     305        edited row being outside the max row to use attribute and if so updates 
     306        the last row.  Then calls the base handler using skip. 
    201307        """ 
    202308        row, _ = event.GetRow(), event.GetCol() 
     
    209315    def on_selected_cell(self, event): 
    210316        """ 
    211         Handler catching cell selection 
    212         """ 
     317        Handler catching cell selection. 
     318 
     319        Called after calling base 'on left click' method. 
     320        """ 
     321 
    213322        flag = event.CmdDown() or event.ControlDown() 
    214323        flag_shift = event.ShiftDown() 
     
    280389    def on_left_click(self, event): 
    281390        """ 
    282         Catch the left click on label mouse event 
    283         """ 
     391        Is triggered when the left mouse button is clicked while the mouse 
     392        is hovering over the column 'label.' 
     393 
     394        This processes the information on the selected column: the column name 
     395        (in row 0 of column) and the range of cells with a valid value to be 
     396        used by the GridPanel set_axis methods. 
     397        """ 
     398 
    284399        flag = event.CmdDown() or event.ControlDown() 
    285400 
     
    324439    def on_right_click(self, event): 
    325440        """ 
    326         Catch the right click mouse 
    327         """ 
     441        Is triggered when the right mouse button is clicked while the mouse 
     442        is hovering over the column 'label.' 
     443 
     444        This brings up a context menu that allows the deletion of the column, 
     445        or the insertion of a new column either to the right or left of the 
     446        current column.  If inserting a new column can insert a blank column or 
     447        choose a number of hidden columns.  By default all the error parameters 
     448        are in hidden columns so as to save space on the grid.  Also any other 
     449        intrinsic variables stored with the data such as Temperature, pressure, 
     450        time etc can be used to populate this menu. 
     451        """ 
     452 
    328453        col = event.GetCol() 
    329454        row = event.GetRow() 
     
    360485    def insert_col_menu(self, menu, label, window): 
    361486        """ 
    362         """ 
     487        method called to populate the 'insert column before current column' 
     488        submenu. 
     489        """ 
     490 
    363491        if self.data is None: 
    364492            return 
     
    380508    def insert_after_col_menu(self, menu, label, window): 
    381509        """ 
    382         """ 
     510        Method called to populate the 'insert column after current column' 
     511        submenu 
     512        """ 
     513 
    383514        if self.data is None: 
    384515            return 
     
    401532    def on_remove_column(self, event=None): 
    402533        """ 
    403         """ 
     534        Called when user chooses remove from the column right click menu 
     535        Checks the columnn exists then calls the remove_column method 
     536        """ 
     537 
    404538        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    405539            col = self.selected_cols[0] 
     
    408542    def remove_column(self, col, numCols=1): 
    409543        """ 
    410         Remove column to the current grid 
    411         """ 
     544        Remove the col column from the current grid 
     545        """ 
     546 
    412547        # add data to the grid     
    413548        row = 0 
     
    429564    def on_insert_column(self, event): 
    430565        """ 
    431         """ 
     566        Called when user chooses insert 'column before' submenu 
     567        of the column context menu obtained when right clicking on a given 
     568        column header. 
     569 
     570        Sets up to insert column into the current grid before the current 
     571        highlighted column location and sets up what to populate that column 
     572        with.  Then calls insert_column method to actually do the insertion.  
     573        """ 
     574 
    432575        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    433576            col = self.selected_cols[0] 
     
    442585    def on_insert_after_column(self, event): 
    443586        """ 
    444         Insert the given column after the highlighted column 
    445         """ 
     587        Called when user chooses insert 'column after' submenu 
     588        of the column context menu obtained when right clicking on a given 
     589        column header. 
     590 
     591        Sets up to insert column into the current grid after the current 
     592        highlighted column location and sets up what to populate that column 
     593        with.  Then calls insert_column method to actually do the insertion.  
     594        """ 
     595 
    446596        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    447597            col = self.selected_cols[0] + 1 
     
    455605    def insert_column(self, col, col_name): 
    456606        """ 
    457         """ 
     607        Insert column at position col with data[col_name] into the current 
     608        grid. 
     609        """ 
     610 
    458611        row = 0 
    459612        self.InsertCols(pos=col, numCols=1, updateLabels=True) 
     
    477630    def on_set_x_axis(self, event): 
    478631        """ 
    479         """ 
     632        Just calls the panel version of the method 
     633        """ 
     634 
    480635        self.panel.set_xaxis(x=self.axis_value, label=self.axis_label) 
    481636 
    482637    def on_set_y_axis(self, event): 
    483638        """ 
    484         """ 
     639        Just calls the panel version of the method 
     640        """ 
     641 
    485642        self.panel.set_yaxis(y=self.axis_value, label=self.axis_label) 
    486643 
     
    488645        """ 
    489646        Add data to the grid 
     647 
    490648        :param data_inputs: data to use from the context menu of the grid 
    491         :param data_ouputs: default columns deplayed 
    492         """ 
     649        :param data_ouputs: default columns displayed 
     650        """ 
     651 
    493652        self.file_name = file_name 
    494653        self.details = details 
     
    527686        Set the values in grids 
    528687        """ 
     688 
    529689        # add data to the grid 
    530690        row = 0 
     
    562722        Return value contained in the grid 
    563723        """ 
     724 
    564725        grid_view = {} 
    565726        for col in xrange(self.GetNumberCols()): 
     
    584745    def onContextMenu(self, event): 
    585746        """ 
    586         Default context menu 
    587         """ 
     747        Method to handle cell right click context menu.  
     748 
     749        THIS METHOD IS NOT CURRENTLY USED.  It is designed to provide a 
     750        cell pop up context by right clicking on a cell and gives the 
     751        option to cut, paste, and clear. This will probably be removed in 
     752        future versions and is being superceded by more traditional cut and 
     753        paste options. 
     754        """ 
     755 
    588756        wx_id = wx.NewId() 
    589757        c_menu = wx.Menu() 
     
    620788    def on_copy(self, event): 
    621789        """ 
    622         On copy event from the contextmenu 
    623         """ 
     790        Called when copy is chosen from cell right click context menu 
     791 
     792        THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell 
     793        context menu which is being removed. This will probably be removed in 
     794        future versions and is being superceded by more traditional cut and 
     795        paste options 
     796        """ 
     797 
    624798        self.Copy() 
    625799 
    626800    def on_paste(self, event): 
    627801        """ 
    628         On paste event from the contextmenu 
    629         """ 
     802        Called when paste is chosen from cell right click context menu 
     803 
     804        THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell 
     805        context menu which is being removed. This will probably be removed in 
     806        future versions and is being superceded by more traditional cut and 
     807        paste options 
     808        """ 
     809 
    630810        if self.data == None: 
    631811            self.data = {} 
     
    636816    def on_clear(self, event): 
    637817        """ 
    638         Clear the cells selected 
    639         """ 
     818        Called when clear cell is chosen from cell right click context menu 
     819 
     820        THIS METHOD IS NOT CURRENTLY USED.  it is part of right click cell 
     821        context menu which is being removed. This will probably be removed in 
     822        future versions and is being superceded by more traditional cut and 
     823        paste options 
     824        """ 
     825 
    640826        self.Clear() 
    641827 
     
    646832    ## Title to appear on top of the window 
    647833    """ 
     834 
    648835    window_caption = "Notebook " 
    649836 
     
    682869    def enable_close_button(self): 
    683870        """ 
    684         display the close button on tab for more than 1 tabs else remove the 
    685         close button 
    686         """ 
     871        display the close button on the tab if more than 1 tab exits. 
     872        Otherwise remove the close button 
     873        """ 
     874 
    687875        if self.GetPageCount() <= 1: 
    688876            style = self.GetWindowStyleFlag() 
     
    700888    def on_edit_axis(self): 
    701889        """ 
    702         Return the select cell of a given selected column. Check that all cells 
    703         are from the same column 
    704         """ 
     890        Return the select cell range from a given selected column. Checks that 
     891        all cells are from the same column 
     892        """ 
     893 
    705894        pos = self.GetSelection() 
    706895        grid = self.GetPage(pos) 
     
    732921        Add highlight rows 
    733922        """ 
     923 
    734924        pos = self.GetSelection() 
    735925        grid = self.GetPage(pos) 
     
    759949    def get_column_labels(self): 
    760950        """ 
    761         return dictionary of columns labels of the current page 
    762         """ 
     951        return dictionary of columns labels on the current page 
     952        """ 
     953 
    763954        pos = self.GetSelection() 
    764955        grid = self.GetPage(pos) 
     
    773964        """ 
    774965        Receive a list of cells and  create a string presenting the selected 
    775         cells. 
     966        cells that can be used as data for one axis of a plot. 
     967 
    776968        :param cell_list: list of tuple 
    777  
    778969        """ 
    779970        pos = self.GetSelection() 
     
    8531044        close the page 
    8541045        """ 
     1046 
    8551047        if self.GetPageCount() == 1: 
    8561048            event.Veto() 
     
    8581050 
    8591051    def set_data(self, data_inputs, data_outputs, details="", file_name=None): 
     1052        """ 
     1053        """ 
    8601054        if data_outputs is None or data_outputs == {}: 
    8611055            return 
     
    8801074    def get_odered_results(self, inputs, outputs=None): 
    8811075        """ 
    882         Get ordered the results 
    883         """ 
     1076        Order a list of 'inputs.' Used to sort rows and columns to present 
     1077        in batch results grid. 
     1078        """ 
     1079 
    8841080        # Let's re-order the data from the keys in 'Data' name. 
    8851081        if outputs == None: 
     
    9141110        Append a new column to the grid 
    9151111        """ 
     1112 
     1113        # I Believe this is no longer used now that we have removed the  
     1114        # edit menu from the menubar - PDB July 12, 2015 
    9161115        pos = self.GetSelection() 
    9171116        grid = self.GetPage(pos) 
     
    9221121        Remove the selected column from the grid 
    9231122        """ 
     1123        # I Believe this is no longer used now that we have removed the  
     1124        # edit menu from the menubar - PDB July 12, 2015 
    9241125        pos = self.GetSelection() 
    9251126        grid = self.GetPage(pos) 
     
    9271128 
    9281129class GridPanel(SPanel): 
     1130    """ 
     1131    A ScrolledPanel class that contains the grid sheet as well as a number of 
     1132    widgets to create interesting plots and buttons for help etc. 
     1133    """ 
     1134 
    9291135    def __init__(self, parent, data_inputs=None, 
    9301136                 data_outputs=None, *args, **kwds): 
     1137        """ 
     1138        Initialize the GridPanel 
     1139        """ 
     1140 
    9311141        SPanel.__init__(self, parent, *args, **kwds) 
    9321142 
     
    9901200    def get_plot_axis(self, col, list): 
    9911201        """ 
    992  
    9931202        """ 
    9941203        axis = [] 
     
    10151224    def on_view(self, event): 
    10161225        """ 
    1017         Get object represented buy the given cell and plot them. 
    1018         """ 
     1226        Get object represented by the given cells and plot them.  Basically 
     1227        plot the colum in y vs the column in x. 
     1228        """ 
     1229 
    10191230        pos = self.notebook.GetSelection() 
    10201231        grid = self.notebook.GetPage(pos) 
     
    10961307        Evaluate the contains of textcrtl and plot result 
    10971308        """ 
     1309 
    10981310        pos = self.notebook.GetSelection() 
    10991311        grid = self.notebook.GetPage(pos) 
     
    12031415        running "file:///...." 
    12041416 
    1205     :param evt: Triggers on clicking the help button 
    1206     """ 
     1417        :param evt: Triggers on clicking the help button 
     1418        """ 
     1419 
    12071420        #import documentation window here to avoid circular imports 
    12081421        #if put at top of file with rest of imports. 
     
    12181431        Get sentence from dict 
    12191432        """ 
     1433 
    12201434        for tok, (col_name, list) in dict.iteritems(): 
    12211435            col = column_names[col_name] 
     
    12301444    def layout_grid(self): 
    12311445        """ 
    1232         Draw the area related to the grid 
    1233         """ 
     1446        Draw the area related to the grid by adding it as the first element 
     1447        in the panel's grid_sizer 
     1448        """ 
     1449 
    12341450        self.notebook = Notebook(parent=self) 
    12351451        self.notebook.set_data(self._data_inputs, self._data_outputs) 
     
    12381454    def layout_plotting_area(self): 
    12391455        """ 
    1240         Draw area containing options to plot 
    1241         """ 
     1456        Add the area containing all the plot options, buttons etc to a plotting 
     1457        area sizer to later be added to the top level grid_sizer 
     1458        """ 
     1459 
    12421460        view_description = wx.StaticBox(self, -1, 'Plot Fits/Residuals') 
    12431461        note = "To plot the fits (or residuals), click the 'View Fits' button" 
     
    12811499                                   (self.plot_button, 0, 
    12821500                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12), 
    1283                                    (self.help_button,0,  
     1501                                   (self.help_button,0, 
    12841502                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12)]) 
    12851503 
     
    13161534        Get the selected column on  the visible grid and set values for axis 
    13171535        """ 
     1536 
    13181537        try: 
    13191538            cell_list = self.notebook.on_edit_axis() 
     
    13351554        Receive a list of cells and  create a string presenting the selected 
    13361555        cells. 
     1556 
    13371557        :param cell_list: list of tuple 
    1338  
    1339         """ 
     1558        """ 
     1559 
    13401560        if self.notebook is not None: 
    13411561            return self.notebook.create_axis_label(cell_list) 
     
    13451565        get controls to modify 
    13461566        """ 
     1567 
    13471568        if label != None: 
    13481569            tcrtl_label.SetValue(str(label)) 
     
    13531574        """ 
    13541575        """ 
     1576        # I Believe this is no longer used now that we have removed the 
     1577        # edit menu from the menubar - PDB July 12, 2015 
    13551578        if self.notebook is not None: 
    13561579            self.notebook.add_column() 
     
    13591582        """ 
    13601583        """ 
     1584        # I Believe this is no longer used now that we have removed the 
     1585        # edit menu from the menubar - PDB July 12, 2015 
    13611586        if self.notebook is not None: 
    13621587            self.notebook.on_remove_column() 
     
    13641589 
    13651590class GridFrame(wx.Frame): 
     1591    """ 
     1592    The main wx.Frame for the batch results grid 
     1593    """ 
     1594 
    13661595    def __init__(self, parent=None, data_inputs=None, data_outputs=None, id=-1, 
    1367                  title="Grid Window", size=(800, 500)): 
     1596                 title="Batch Fitting Results Panel", size=(800, 500)): 
     1597        """ 
     1598        Initialize the Frame 
     1599        """ 
     1600 
    13681601        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size) 
    13691602        self.parent = parent 
     
    13891622        wx.EVT_MENU(self, self.save_menu.GetId(), self.on_save_page) 
    13901623 
    1391         # To add the edit menu, call add_edit_menu() here. 
    1392         self.edit = None 
     1624        # We need to grab a WxMenu handle here, otherwise the next one to grab 
     1625        # the handle will be treated as the Edit Menu handle when checking in 
     1626        # on_menu_open event handler and thus raise an exception when it hits an  
     1627        # unitialized object.  Alternative is to comment out that whole section 
     1628        # in on_menu_open, but that would make it more difficult to undo the 
     1629        # hidding of the menu.   PDB  July 12, 2015. 
     1630        # 
     1631        # To enable the Edit menubar comment out next line and uncomment the 
     1632        # following line. 
     1633        self.edit = wx.Menu() 
     1634        #self.add_edit_menu() 
     1635 
    13931636        self.Bind(wx.EVT_MENU_OPEN, self.on_menu_open) 
    1394          
    13951637        self.Bind(wx.EVT_CLOSE, self.on_close) 
    13961638 
    13971639    def add_edit_menu(self, menubar): 
     1640        """ 
     1641        populates the edit menu on the menubar.  Not activated as of SasView 
     1642        3.1.0 
     1643        """ 
    13981644        self.edit = wx.Menu() 
    13991645 
     
    14291675    def on_copy(self, event): 
    14301676        """ 
    1431         On Copy 
    1432         """ 
     1677        On Copy from the Edit menu item on the menubar 
     1678        """ 
     1679        # I Believe this is no longer used now that we have removed the  
     1680        # edit menu from the menubar - PDB July 12, 2015 
    14331681        if event != None: 
    14341682            event.Skip() 
     
    14391687    def on_paste(self, event): 
    14401688        """ 
    1441         On Paste 
    1442         """ 
     1689        On Paste from the Edit menu item on the menubar 
     1690        """ 
     1691        # I Believe this is no longer used now that we have removed the  
     1692        # edit menu from the menubar - PDB July 12, 2015 
    14431693        if event != None: 
    14441694            event.Skip() 
     
    14491699    def on_clear(self, event): 
    14501700        """ 
    1451         On Clear 
    1452         """ 
     1701        On Clear from the Edit menu item on the menubar 
     1702        """ 
     1703        # I Believe this is no longer used now that we have removed the  
     1704        # edit menu from the menubar - PDB July 12, 2015 
    14531705        pos = self.panel.notebook.GetSelection() 
    14541706        grid = self.panel.notebook.GetPage(pos) 
     
    14661718    def on_remove_column(self, event): 
    14671719        """ 
    1468         On remove column 
    1469         """ 
     1720        On remove column from the Edit menu Item on the menubar 
     1721        """ 
     1722        # I Believe this is no longer used now that we have removed the  
     1723        # edit menu from the menubar - PDB July 12, 2015 
    14701724        pos = self.panel.notebook.GetSelection() 
    14711725        grid = self.panel.notebook.GetPage(pos) 
     
    15351789    def on_save_page(self, event): 
    15361790        """ 
    1537         """ 
     1791        Saves data in grid to a csv file. 
     1792 
     1793        At this time only the columns displayed get saved.  Thus any error 
     1794        bars not inserted before saving will not be saved in the file 
     1795        """ 
     1796 
    15381797        if self.parent is not None: 
    15391798            pos = self.panel.notebook.GetSelection() 
     
    15661825    def on_open(self, event): 
    15671826        """ 
    1568         Open file containg batch result 
    1569         """ 
     1827        Open file containing batch result 
     1828        """ 
     1829 
    15701830        if self.parent is not None: 
    15711831            self.parent.on_read_batch_tofile(self) 
     
    15751835        open excel and display batch result in Excel 
    15761836        """ 
     1837 
    15771838        if self.parent is not None: 
    15781839            pos = self.panel.notebook.GetSelection() 
     
    16251886                 details="", *args, **kwds): 
    16261887        """ 
     1888        Initialize dialog 
     1889 
    16271890        :param parent: Window instantiating this dialog 
    1628         :param result: result to display in a grid or export to an external 
     1891        :param result: result to display in a grid or export to an external\ 
    16291892                application. 
    16301893        """ 
     1894 
    16311895        #kwds['style'] = wx.CAPTION|wx.SYSTEM_MENU 
    16321896        wx.Frame.__init__(self, parent, *args, **kwds) 
     
    16511915        Draw the content of the current dialog window 
    16521916        """ 
     1917 
    16531918        vbox = wx.BoxSizer(wx.VERTICAL) 
    16541919        box_description = wx.StaticBox(self.panel, -1, str("Batch Outputs")) 
     
    17041969        Get the user selection and display output to the selected application 
    17051970        """ 
     1971 
    17061972        if self.flag == 1: 
    17071973            self.parent.open_with_localapp(data_inputs=self.data_inputs, 
     
    17151981        close the Window 
    17161982        """ 
     1983 
    17171984        self.Close() 
    17181985 
     
    17211988        Receive event and display data into third party application 
    17221989        or save data to file. 
    1723  
    17241990        """ 
    17251991        if self.save_to_file.GetValue(): 
Note: See TracChangeset for help on using the changeset viewer.