Updates the view rect to match the current tree value.
492808
def _updateViewRect( self ):
        
        if not self.updatesEnabled():
            return
        
        header_h    = self._cellHeight * 2
        rect        = self.uiGanttVIEW.scene().sceneRect()
        sbar_max    = self.uiGanttTREE.verticalScrollBar().maximum()
        sbar_max   += self.uiGanttTREE.viewport().height() + header_h
        widget_max  = self.uiGanttVIEW.height()
        widget_max -= (self.uiGanttVIEW.horizontalScrollBar().height() + 10)
        
        rect.setHeight(max(widget_max, sbar_max))
        self.uiGanttVIEW.scene().setSceneRect(rect)
1062842
@Override
    public void refreshView()
    {
        boxTree.setModel(new BoxTreeModel(proc.getPage().getRoot()));
        if (proc.getAreaTree() != null)
        {
            TreePath path = areaJTree.getSelectionPath();
            areaJTree.setModel(new AreaTreeModel(proc.getAreaTree().getRoot()));
            if (path != null)
                areaJTree.setSelectionPath(path);
        }
        if (proc.getLogicalAreaTree() != null)
        {
            TreePath path = logicalTree.getSelectionPath();
            logicalTree.setModel(new LogicalTreeModel(proc.getLogicalAreaTree().getRoot()));
            if (path != null)
                logicalTree.setSelectionPath(path);
        }
    }
208749
def update(self):
        """"""
        con = self.subpars.pars.control
        self(con.ypoints.shape[0])
918881
function updateView(id, viewID, viewObj) {
  return updateItem(id, item => {
    const pos = item.views.findIndex(e => e.viewID === viewID);
    if (_.isFunction(viewObj)) {
      viewObj(item.views[pos]);
    } else {
      item.views[pos] = viewObj;
    }
  });
}
249856
def update(self, other):
        
        if not isinstance(other, AttrTree):
            raise Exception('Can only update with another AttrTree type.')
        fixed_status = (self.fixed, other.fixed)
        (self.fixed, other.fixed) = (False, False)
        for identifier, element in other.items():
            if identifier not in self.data:
                self[identifier] = element
            else:
                self[identifier].update(element)
        (self.fixed, other.fixed) = fixed_status
1119512
public void updateContentTree() {

        m_scrollList.clearList();
        m_childrens.clear();
        m_categories.clear();
        if ((m_resultList != null) && !m_resultList.isEmpty()) {
            // add the first level and children
            for (CmsCategoryTreeEntry category : m_resultList) {
                // set the category tree item and add to list
                CmsTreeItem treeItem = buildTreeItem(category, m_selectedCategories);
                m_childrens.put(treeItem.getId(), new ArrayList<>(category.getChildren().size()));
                addChildren(treeItem, category.getChildren(), m_selectedCategories);
                if (!category.getPath().isEmpty() || (treeItem.getChildCount() > 0)) {
                    m_scrollList.add(treeItem);
                }
                treeItem.setOpen(!m_showCollapsed);
            }
        } else {
            showIsEmptyLabel();
        }
        scheduleResize();
    }
277508
def update_views(self):
        """"""
        # Call the father's method
        super(Plugin, self).update_views()

        # Add specifics informations
        # Alert only
        for key in ['cpu', 'mem', 'swap']:
            if key in self.stats:
                self.views[key]['decoration'] = self.get_alert(self.stats[key], header=key)
1181754
@Override
    public void valueChanged(TreeSelectionEvent e) {
        DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

        if (node != null && node.isLeaf()) {
            int pos = workspace.getDividerLocation();
            workspace.setTopComponent((JPanel) node.getUserObject());
            workspace.setDividerLocation(pos);
        }
    }
685082
private void updateAperture(int newValue, long now) {
    int previous = targetAperture;
    targetAperture = newValue;
    targetAperture = Math.max(minAperture, targetAperture);
    int maxAperture = Math.min(this.maxAperture, activeSockets.size() + pool.poolSize());
    targetAperture = Math.min(maxAperture, targetAperture);
    lastApertureRefresh = now;
    pendings.reset((minPendings + maxPendings) / 2);

    if (targetAperture != previous) {
      logger.debug(
          "Current pending={}, new target={}, previous target={}",
          pendings.value(),
          targetAperture,
          previous);
    }
  }
591334
def visualRect(self, index):
        
        rect = super(XTreeWidget, self).visualRect(index)
        item = self.itemFromIndex(index)
        if not rect.isNull() and item and item.isFirstColumnSpanned():
            vpos = self.viewport().mapFromParent(QtCore.QPoint(0, 0))
            rect.setX(vpos.x())
            rect.setWidth(self.width())
            return rect
        return rect
1191441
function onAddChild(e) {
        var self = this;
        if (e.target === self) {
            updateSubTreeStatus(self, e.component, self.get('depth'), e.index);
        }
    }
268228
def update(self):
        """"""
        if not self.canvas:
            return
        for visual in self.canvas.visuals:
            self.update_program(visual.program)
        self.canvas.update()
1373893
def updateAction( self ):
        
        item = self.uiActionTREE.currentItem()
        if ( item ):
            action = item.action()
        else:
            action = QAction()
            
        self.uiShortcutTXT.setText(action.shortcut().toString())
43515
def update(self):
        
        super(AttachmentsViewlet, self).update()
        self.attachments_view = self.get_attachments_view()
21340
def update_view_state(self, view, state):
        """"""
        if view.name not in self:
            self[view.name] = Bunch()
        self[view.name].update(state)
1053908
def update_heights(self, recursive=True):
        
        if self.node:
            if recursive:
                if self.node.left:
                    self.node.left.update_heights()
                if self.node.right:
                    self.node.right.update_heights()

            self.height = 1 + max(self.node.left.height, self.node.right.height)
        else:
            self.height = -1
168380
function(rect) {
        rect = rect || Crafty.viewport.rect();
        var q = Crafty.DebugCanvas.entities,
            i = 0,
            l = q.length,
            ctx = Crafty.DebugCanvas.context,
            current;

        var view = Crafty.viewport;
        ctx.setTransform(
            view._scale,
            0,
            0,
            view._scale,
            Math.round(view._x * view._scale),
            Math.round(view._y * view._scale)
        );

        ctx.clearRect(rect._x, rect._y, rect._w, rect._h);

        var lastLayer = null;
        for (; i < l; i++) {
            current = q[i];

            // If necessary, update the view transform to match the current entities layer
            // If the current entity has no layer, switch back to the viewport's transform
            if (lastLayer !== current._drawLayer) {
                if (current._drawLayer) {
                    view = current._drawLayer._viewportRect();
                    ctx.setTransform(
                        view._scale,
                        0,
                        0,
                        view._scale,
                        Math.round(-view._x * view._scale),
                        Math.round(-view._y * view._scale)
                    );
                } else {
                    view = Crafty.viewport;
                    ctx.setTransform(
                        view._scale,
                        0,
                        0,
                        view._scale,
                        Math.round(view._x * view._scale),
                        Math.round(view._y * view._scale)
                    );
                }
                lastLayer = current._drawLayer;
            }
            current.debugDraw(ctx);
        }
    }