Set our model object (root of the tree)
551143
def SetModel( self, model, adapter=None ):
        """"""
        self.model = model
        if adapter is not None:
            self.adapter = adapter
        self.UpdateDrawing()
969753
def inheritanceTree(self):
        
        inherits = self.inherits()
        while inherits:
            ischema = orb.system.schema(inherits)
            if not ischema:
                raise orb.errors.ModelNotFound(schema=inherits)

            yield ischema
            inherits = ischema.inherits()
927582
def fill(self, **kwargs):
        '''  '''
        setattr(self.obj, self.name, self.get(**kwargs))
20588
static void setModelValue(final ModelNode model, final String value) {
        if (value != null) {
            model.set(value);
        }
    }
1304342
def set_model(self, model):
        
        # do the set model in reverse!
        # set model might trigger an update for the lower levels
        # but the lower ones have a different model, so it will fail anyways
        # this way the initial state after set_model is correct.
        self.model = model
        self._levels[0].set_model(model)
286795
private void setTree(ComponentTree tree) {
        synchronized (this) {
            this.tree = tree;
            for (ComponentVertex child : children) {
                child.setTree(tree);
            }
        }
    }
342993
def __initialize_model(self):
        

        LOGGER.debug("> Initializing model.")

        self.beginResetModel()
        self.root_node = umbra.ui.nodes.DefaultNode(name="InvisibleRootNode")
        self.__default_project_node = ProjectNode(name=self.__default_project,
                                                  parent=self.root_node,
                                                  node_flags=int(Qt.ItemIsEnabled),
                                                  attributes_flags=int(Qt.ItemIsEnabled))
        self.enable_model_triggers(True)
        self.endResetModel()
85392
private TreeObject createDummyModel() {
        TreeObject to1 = new TreeObject("Inbox");
        TreeObject to2 = new TreeObject("Drafts");
        TreeObject to3 = new TreeObject("Sent");
        TreeParent p1 = new TreeParent("me@this.com");
        p1.addChild(to1);
        p1.addChild(to2);
        p1.addChild(to3);

        TreeObject to4 = new TreeObject("Inbox");
        TreeParent p2 = new TreeParent("other@aol.com");
        p2.addChild(to4);

        TreeParent root = new TreeParent("");
        root.addChild(p1);
        root.addChild(p2);
        return root;
    }
50375
def setTreeDoc(self, tree):
        
        if tree is None: tree__o = None
        else: tree__o = tree._o
        libxml2mod.xmlSetTreeDoc(tree__o, self._o)
779150
def setModel(self, model):
        

        LOGGER.debug("> Setting '{0}' model.".format(model))

        if not model:
            return

        umbra.ui.views.Abstract_QTreeView.setModel(self, model)
1112044
public void setRoot(int root)
  {
    super.setRoot(root);
    m_iterator = getDTM(root).getAxisIterator(m_axis);
    m_iterator.setStartNode(root);
  }
939661
def initialize_model(self, root_node):
        

        LOGGER.debug("> Initializing model with '{0}' root node.".format(root_node))

        self.beginResetModel()
        self.root_node = root_node
        self.enable_model_triggers(True)
        self.endResetModel()
        return True
789095
static void setModelValue(final ModelNode model, final Boolean value) {
        if (value != null) {
            model.set(value);
        }
    }
516527
def root_serializer(self):
        """"""
        if not self.parent:
            # Don't cache, so that we'd recompute if parent is set.
            return None

        node = self
        seen = set()
        while True:
            seen.add(node)
            if getattr(node, 'parent', None):
                node = node.parent
                if node in seen:
                    return None
            else:
                return node
1186742
def OnRootView(self, event):
        """"""
        self.adapter, tree, rows = self.RootNode()
        self.squareMap.SetModel(tree, self.adapter)
        self.RecordHistory()
        self.ConfigureViewTypeChoices()
516849
def set_tree(self, tree):
        
        self.tree = tree
        self.__record_progress(Status.DOWNLOAD_FILES)
1248784
def setModel(self, model, relayout=True):
        """"""
        self._model = model
        sel_model = self.dataTable.selectionModel()
        sel_model.currentColumnChanged.connect(
                self._resizeCurrentColumnToContents)

        # Asociate the models (level, vertical index and horizontal header)
        # with its corresponding view.
        self._reset_model(self.table_level, DataFrameLevelModel(model,
                                                                self.palette(),
                                                                self.font()))
        self._reset_model(self.table_header, DataFrameHeaderModel(
                                                            model,
                                                            0,
                                                            self.palette()))
        self._reset_model(self.table_index, DataFrameHeaderModel(
                                                            model,
                                                            1,
                                                            self.palette()))

        # Needs to be called after setting all table models
        if relayout:
            self._update_layout()