def add_row ( self, object = None, index = None ):
        """ Adds a specified object as a new row after the specified index.
        """
        filtered_items = self.model.get_filtered_items

        if index is None:
            indices = self.selected_indices
            if len( indices ) == 0:
                indices = [ len( filtered_items() ) - 1 ]
            indices.reverse()
        else:
            indices = [ index ]

        if object is None:
            objects = []
            for index in indices:
                object = self.create_new_row()
                if object is None:
                    if self.in_row_mode:
                        self.set_selection()
                    return

                objects.append( object )
        else:
            objects = [ object ]

        items             = []
        insert_item_after = self.model.insert_filtered_item_after
        in_row_mode       = self.in_row_mode
        for i, index in enumerate( indices ):
            object = objects[i]
            index, extend = insert_item_after( index, object )

            if in_row_mode and (object in filtered_items()):
                items.append( object )

            self._add_undo( ListUndoItem( object = self.object,
                                          name   = self.name,
                                          index  = index,
                                          added  = [ object ] ), extend )

        if in_row_mode:
            self.set_selection( items )

    #---------------------------------------------------------------------------
    #  Moves a column from one place to another:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/table_editor.py/TableEditor.add_row/original