Ignore:
File:
1 edited

Legend:

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

    r44d20af re54dbc3e  
    11""" 
    2 Implement grid used to store results of a batch fit. 
    3  
    4 This is in Guiframe rather than fitting which is probably where it should be. 
    5 Actually could be a generic framework implemented in fit gui module.  At this 
    6 point however there this grid behaves independently of the fitting panel and 
    7 only knows about information sent to it but not about the fits or fit panel and 
    8 thus cannot feed back to the fitting panel.  This could change in the future. 
    9  
    10 The organization of the classes goes as: 
    11  
    12 .. image::  ../../user/guiframe/BatchGridClassLayout.png 
    13    :align:   center 
    14  
     2Implement grid used to store data 
    153""" 
    164import wx 
     
    3826    """ 
    3927    Object describing a cell in  the grid. 
     28 
    4029    """ 
    4130    def __init__(self): 
    42         """ 
    43         Initialize attributes of class (label, value, col, row, object) 
    44         """ 
    4531        self.label = "" 
    4632        self.value = None 
     
    5339    """ 
    5440    Return a dictionary of column label and index or row selected 
    55  
    5641    :param sentence: String to parse 
    5742    :param list: list of columns label 
    58     :returns: col_dict 
    5943    """ 
    60  
    6144    p2 = re.compile(r'\d+') 
    6245    p = re.compile(r'[\+\-\*\%\/]') 
     
    9881 
    9982class 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     """ 
    10783    def __init__(self, parent, *args, **kwds): 
    108         """ 
    109         initialize ScrolledPanel then force a call to SetupScrolling 
    110  
    111         """ 
    11284        ScrolledPanel.__init__(self, parent, *args, **kwds) 
    11385        self.SetupScrolling() 
     
    11587 
    11688class GridCellEditor(sheet.CCellEditor): 
    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     """ 
     89    """ Custom cell editor """ 
    12790    def __init__(self, grid): 
    128         """ 
    129         Override of CCellEditor init. Runs the grid.GridCellEditor init code 
    130         """ 
    13191        super(GridCellEditor, self).__init__(grid) 
    13292 
    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  
    16493    def EndEdit(self, row, col, grid, previous): 
    165         """ 
    166         Commit editing the current cell. Returns True if the value has changed. 
    167  
    168         :param previous: previous value in the cell 
     94        """  
     95            Commit editing the current cell. Returns True if the value has changed. 
     96            @param previous: previous value in the cell 
    16997        """ 
    17098        changed = False                             # Assume value not changed 
     
    180108class GridPage(sheet.CSheet): 
    181109    """ 
    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. 
    186110    """ 
    187111    def __init__(self, parent, panel=None): 
    188112        """ 
    189         Initialize 
    190  
    191         Initialize all the attributes of GridPage, and the events. include 
    192         the init stuff from sheet.CSheet as well. 
    193113        """ 
    194114        #sheet.CSheet.__init__(self, parent) 
    195  
     115         
    196116        # The following is the __init__ from CSheet. ########################## 
    197117        # We re-write it here because the class is broken in wx 3.0, 
     
    219139 
    220140        # Sink events 
     141        self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnLeftClick) 
     142        self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnRightClick) 
     143        #self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnLeftDoubleClick) 
    221144        self.Bind(wx.grid.EVT_GRID_RANGE_SELECT, self.OnRangeSelect) 
    222145        self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.OnRowSize) 
    223146        self.Bind(wx.grid.EVT_GRID_COL_SIZE, self.OnColSize) 
     147        self.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnCellChange) 
    224148        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) 
    229         self.Bind(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnLeftClick) 
    230         self.Bind(wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnRightClick) 
    231         #self.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnLeftDoubleClick) 
    232149        # 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) 
    241150 
    242151        self.AdjustScrollbars() 
     
    278187        if self.GetNumberCols() > 0: 
    279188            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 
    283189        #self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.on_left_click) 
    284190        #self.Bind(wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, self.on_right_click) 
     
    288194 
    289195    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         """ 
    296196        sheet.CSheet.OnLeftClick(self, event) 
    297197        self.on_selected_cell(event) 
    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. 
     198         
     199    def on_edit_cell(self, event): 
     200        """ 
    307201        """ 
    308202        row, _ = event.GetRow(), event.GetCol() 
     
    315209    def on_selected_cell(self, event): 
    316210        """ 
    317         Handler catching cell selection. 
    318  
    319         Called after calling base 'on left click' method. 
    320         """ 
    321  
     211        Handler catching cell selection 
     212        """ 
    322213        flag = event.CmdDown() or event.ControlDown() 
    323214        flag_shift = event.ShiftDown() 
     
    389280    def on_left_click(self, event): 
    390281        """ 
    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  
     282        Catch the left click on label mouse event 
     283        """ 
    399284        flag = event.CmdDown() or event.ControlDown() 
    400285 
     
    439324    def on_right_click(self, event): 
    440325        """ 
    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  
     326        Catch the right click mouse 
     327        """ 
    453328        col = event.GetCol() 
    454329        row = event.GetRow() 
     
    485360    def insert_col_menu(self, menu, label, window): 
    486361        """ 
    487         method called to populate the 'insert column before current column' 
    488         submenu. 
    489         """ 
    490  
     362        """ 
    491363        if self.data is None: 
    492364            return 
     
    508380    def insert_after_col_menu(self, menu, label, window): 
    509381        """ 
    510         Method called to populate the 'insert column after current column' 
    511         submenu 
    512         """ 
    513  
     382        """ 
    514383        if self.data is None: 
    515384            return 
     
    532401    def on_remove_column(self, event=None): 
    533402        """ 
    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  
     403        """ 
    538404        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    539405            col = self.selected_cols[0] 
     
    542408    def remove_column(self, col, numCols=1): 
    543409        """ 
    544         Remove the col column from the current grid 
    545         """ 
    546  
     410        Remove column to the current grid 
     411        """ 
    547412        # add data to the grid     
    548413        row = 0 
     
    564429    def on_insert_column(self, event): 
    565430        """ 
    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  
     431        """ 
    575432        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    576433            col = self.selected_cols[0] 
     
    585442    def on_insert_after_column(self, event): 
    586443        """ 
    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  
     444        Insert the given column after the highlighted column 
     445        """ 
    596446        if self.selected_cols is not None or len(self.selected_cols) > 0: 
    597447            col = self.selected_cols[0] + 1 
     
    605455    def insert_column(self, col, col_name): 
    606456        """ 
    607         Insert column at position col with data[col_name] into the current 
    608         grid. 
    609         """ 
    610  
     457        """ 
    611458        row = 0 
    612459        self.InsertCols(pos=col, numCols=1, updateLabels=True) 
     
    630477    def on_set_x_axis(self, event): 
    631478        """ 
    632         Just calls the panel version of the method 
    633         """ 
    634  
     479        """ 
    635480        self.panel.set_xaxis(x=self.axis_value, label=self.axis_label) 
    636481 
    637482    def on_set_y_axis(self, event): 
    638483        """ 
    639         Just calls the panel version of the method 
    640         """ 
    641  
     484        """ 
    642485        self.panel.set_yaxis(y=self.axis_value, label=self.axis_label) 
    643486 
     
    645488        """ 
    646489        Add data to the grid 
    647  
    648490        :param data_inputs: data to use from the context menu of the grid 
    649         :param data_ouputs: default columns displayed 
    650         """ 
    651  
     491        :param data_ouputs: default columns deplayed 
     492        """ 
    652493        self.file_name = file_name 
    653494        self.details = details 
     
    686527        Set the values in grids 
    687528        """ 
    688  
    689529        # add data to the grid 
    690530        row = 0 
     
    722562        Return value contained in the grid 
    723563        """ 
    724  
    725564        grid_view = {} 
    726565        for col in xrange(self.GetNumberCols()): 
     
    745584    def onContextMenu(self, event): 
    746585        """ 
    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  
     586        Default context menu 
     587        """ 
    756588        wx_id = wx.NewId() 
    757589        c_menu = wx.Menu() 
     
    788620    def on_copy(self, event): 
    789621        """ 
    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  
     622        On copy event from the contextmenu 
     623        """ 
    798624        self.Copy() 
    799625 
    800626    def on_paste(self, event): 
    801627        """ 
    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  
     628        On paste event from the contextmenu 
     629        """ 
    810630        if self.data == None: 
    811631            self.data = {} 
     
    816636    def on_clear(self, event): 
    817637        """ 
    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  
     638        Clear the cells selected 
     639        """ 
    826640        self.Clear() 
    827641 
     
    832646    ## Title to appear on top of the window 
    833647    """ 
    834  
    835648    window_caption = "Notebook " 
    836649 
     
    869682    def enable_close_button(self): 
    870683        """ 
    871         display the close button on the tab if more than 1 tab exits. 
    872         Otherwise remove the close button 
    873         """ 
    874  
     684        display the close button on tab for more than 1 tabs else remove the 
     685        close button 
     686        """ 
    875687        if self.GetPageCount() <= 1: 
    876688            style = self.GetWindowStyleFlag() 
     
    888700    def on_edit_axis(self): 
    889701        """ 
    890         Return the select cell range from a given selected column. Checks that 
    891         all cells are from the same column 
    892         """ 
    893  
     702        Return the select cell of a given selected column. Check that all cells 
     703        are from the same column 
     704        """ 
    894705        pos = self.GetSelection() 
    895706        grid = self.GetPage(pos) 
     
    921732        Add highlight rows 
    922733        """ 
    923  
    924734        pos = self.GetSelection() 
    925735        grid = self.GetPage(pos) 
     
    949759    def get_column_labels(self): 
    950760        """ 
    951         return dictionary of columns labels on the current page 
    952         """ 
    953  
     761        return dictionary of columns labels of the current page 
     762        """ 
    954763        pos = self.GetSelection() 
    955764        grid = self.GetPage(pos) 
     
    964773        """ 
    965774        Receive a list of cells and  create a string presenting the selected 
    966         cells that can be used as data for one axis of a plot. 
    967  
     775        cells. 
    968776        :param cell_list: list of tuple 
     777 
    969778        """ 
    970779        pos = self.GetSelection() 
     
    1044853        close the page 
    1045854        """ 
    1046  
    1047855        if self.GetPageCount() == 1: 
    1048856            event.Veto() 
     
    1050858 
    1051859    def set_data(self, data_inputs, data_outputs, details="", file_name=None): 
    1052         """ 
    1053         """ 
    1054860        if data_outputs is None or data_outputs == {}: 
    1055861            return 
     
    1074880    def get_odered_results(self, inputs, outputs=None): 
    1075881        """ 
    1076         Order a list of 'inputs.' Used to sort rows and columns to present 
    1077         in batch results grid. 
    1078         """ 
    1079  
     882        Get ordered the results 
     883        """ 
    1080884        # Let's re-order the data from the keys in 'Data' name. 
    1081885        if outputs == None: 
     
    1110914        Append a new column to the grid 
    1111915        """ 
    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 
    1115916        pos = self.GetSelection() 
    1116917        grid = self.GetPage(pos) 
     
    1121922        Remove the selected column from the grid 
    1122923        """ 
    1123         # I Believe this is no longer used now that we have removed the  
    1124         # edit menu from the menubar - PDB July 12, 2015 
    1125924        pos = self.GetSelection() 
    1126925        grid = self.GetPage(pos) 
     
    1128927 
    1129928class 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  
    1135929    def __init__(self, parent, data_inputs=None, 
    1136930                 data_outputs=None, *args, **kwds): 
    1137         """ 
    1138         Initialize the GridPanel 
    1139         """ 
    1140  
    1141931        SPanel.__init__(self, parent, *args, **kwds) 
    1142932 
     
    1200990    def get_plot_axis(self, col, list): 
    1201991        """ 
     992 
    1202993        """ 
    1203994        axis = [] 
     
    12241015    def on_view(self, event): 
    12251016        """ 
    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  
     1017        Get object represented buy the given cell and plot them. 
     1018        """ 
    12301019        pos = self.notebook.GetSelection() 
    12311020        grid = self.notebook.GetPage(pos) 
     
    13071096        Evaluate the contains of textcrtl and plot result 
    13081097        """ 
    1309  
    13101098        pos = self.notebook.GetSelection() 
    13111099        grid = self.notebook.GetPage(pos) 
     
    14151203        running "file:///...." 
    14161204 
    1417         :param evt: Triggers on clicking the help button 
    1418         """ 
    1419  
     1205    :param evt: Triggers on clicking the help button 
     1206    """ 
    14201207        #import documentation window here to avoid circular imports 
    14211208        #if put at top of file with rest of imports. 
     
    14311218        Get sentence from dict 
    14321219        """ 
    1433  
    14341220        for tok, (col_name, list) in dict.iteritems(): 
    14351221            col = column_names[col_name] 
     
    14441230    def layout_grid(self): 
    14451231        """ 
    1446         Draw the area related to the grid by adding it as the first element 
    1447         in the panel's grid_sizer 
    1448         """ 
    1449  
     1232        Draw the area related to the grid 
     1233        """ 
    14501234        self.notebook = Notebook(parent=self) 
    14511235        self.notebook.set_data(self._data_inputs, self._data_outputs) 
     
    14541238    def layout_plotting_area(self): 
    14551239        """ 
    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  
     1240        Draw area containing options to plot 
     1241        """ 
    14601242        view_description = wx.StaticBox(self, -1, 'Plot Fits/Residuals') 
    14611243        note = "To plot the fits (or residuals), click the 'View Fits' button" 
     
    14991281                                   (self.plot_button, 0, 
    15001282                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12), 
    1501                                    (self.help_button,0, 
     1283                                   (self.help_button,0,  
    15021284                                    wx.LEFT | wx.TOP | wx.BOTTOM, 12)]) 
    15031285 
     
    15341316        Get the selected column on  the visible grid and set values for axis 
    15351317        """ 
    1536  
    15371318        try: 
    15381319            cell_list = self.notebook.on_edit_axis() 
     
    15541335        Receive a list of cells and  create a string presenting the selected 
    15551336        cells. 
    1556  
    15571337        :param cell_list: list of tuple 
    1558         """ 
    1559  
     1338 
     1339        """ 
    15601340        if self.notebook is not None: 
    15611341            return self.notebook.create_axis_label(cell_list) 
     
    15651345        get controls to modify 
    15661346        """ 
    1567  
    15681347        if label != None: 
    15691348            tcrtl_label.SetValue(str(label)) 
     
    15741353        """ 
    15751354        """ 
    1576         # I Believe this is no longer used now that we have removed the 
    1577         # edit menu from the menubar - PDB July 12, 2015 
    15781355        if self.notebook is not None: 
    15791356            self.notebook.add_column() 
     
    15821359        """ 
    15831360        """ 
    1584         # I Believe this is no longer used now that we have removed the 
    1585         # edit menu from the menubar - PDB July 12, 2015 
    15861361        if self.notebook is not None: 
    15871362            self.notebook.on_remove_column() 
     
    15891364 
    15901365class GridFrame(wx.Frame): 
    1591     """ 
    1592     The main wx.Frame for the batch results grid 
    1593     """ 
    1594  
    15951366    def __init__(self, parent=None, data_inputs=None, data_outputs=None, id=-1, 
    1596                  title="Batch Fitting Results Panel", size=(800, 500)): 
    1597         """ 
    1598         Initialize the Frame 
    1599         """ 
    1600  
     1367                 title="Grid Window", size=(800, 500)): 
    16011368        wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size) 
    16021369        self.parent = parent 
     
    16221389        wx.EVT_MENU(self, self.save_menu.GetId(), self.on_save_page) 
    16231390 
    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  
     1391        # To add the edit menu, call add_edit_menu() here. 
     1392        self.edit = None 
    16361393        self.Bind(wx.EVT_MENU_OPEN, self.on_menu_open) 
     1394         
    16371395        self.Bind(wx.EVT_CLOSE, self.on_close) 
    16381396 
    16391397    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         """ 
    16441398        self.edit = wx.Menu() 
    16451399 
     
    16751429    def on_copy(self, event): 
    16761430        """ 
    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 
     1431        On Copy 
     1432        """ 
    16811433        if event != None: 
    16821434            event.Skip() 
     
    16871439    def on_paste(self, event): 
    16881440        """ 
    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 
     1441        On Paste 
     1442        """ 
    16931443        if event != None: 
    16941444            event.Skip() 
     
    16991449    def on_clear(self, event): 
    17001450        """ 
    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 
     1451        On Clear 
     1452        """ 
    17051453        pos = self.panel.notebook.GetSelection() 
    17061454        grid = self.panel.notebook.GetPage(pos) 
     
    17181466    def on_remove_column(self, event): 
    17191467        """ 
    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 
     1468        On remove column 
     1469        """ 
    17241470        pos = self.panel.notebook.GetSelection() 
    17251471        grid = self.panel.notebook.GetPage(pos) 
     
    17891535    def on_save_page(self, event): 
    17901536        """ 
    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  
     1537        """ 
    17971538        if self.parent is not None: 
    17981539            pos = self.panel.notebook.GetSelection() 
     
    18251566    def on_open(self, event): 
    18261567        """ 
    1827         Open file containing batch result 
    1828         """ 
    1829  
     1568        Open file containg batch result 
     1569        """ 
    18301570        if self.parent is not None: 
    18311571            self.parent.on_read_batch_tofile(self) 
     
    18351575        open excel and display batch result in Excel 
    18361576        """ 
    1837  
    18381577        if self.parent is not None: 
    18391578            pos = self.panel.notebook.GetSelection() 
     
    18861625                 details="", *args, **kwds): 
    18871626        """ 
    1888         Initialize dialog 
    1889  
    18901627        :param parent: Window instantiating this dialog 
    1891         :param result: result to display in a grid or export to an external\ 
     1628        :param result: result to display in a grid or export to an external 
    18921629                application. 
    18931630        """ 
    1894  
    18951631        #kwds['style'] = wx.CAPTION|wx.SYSTEM_MENU 
    18961632        wx.Frame.__init__(self, parent, *args, **kwds) 
     
    19151651        Draw the content of the current dialog window 
    19161652        """ 
    1917  
    19181653        vbox = wx.BoxSizer(wx.VERTICAL) 
    19191654        box_description = wx.StaticBox(self.panel, -1, str("Batch Outputs")) 
     
    19691704        Get the user selection and display output to the selected application 
    19701705        """ 
    1971  
    19721706        if self.flag == 1: 
    19731707            self.parent.open_with_localapp(data_inputs=self.data_inputs, 
     
    19811715        close the Window 
    19821716        """ 
    1983  
    19841717        self.Close() 
    19851718 
     
    19881721        Receive event and display data into third party application 
    19891722        or save data to file. 
     1723 
    19901724        """ 
    19911725        if self.save_to_file.GetValue(): 
Note: See TracChangeset for help on using the changeset viewer.