def setRecordEditor(self, editorClass, tableType=None):
        """
        Sets the record editor for this tree based on the given table type.
        If no tableType is supplied, then the assigned table type will be
        used.
        
        :param      editorClass | <subclass of XOrbRecordWidget>
                    tableType   | <subclass of orb.Table> || None
        """
        if tableType is None:
            tableType = editorClass.tableType()
        
        self._recordEditors[tableType] = editorClass