Rebuilds the interface for this widget based on the current model.
496577
def rebuild( self ):
        
        self.setUpdatesEnabled(False)
        self.blockSignals(True)
        
        # clear out all the subwidgets for this widget
        for child in self.findChildren(QObject):
            child.setParent(None)
            child.deleteLater()
        
        # load up all the interface for this widget
        schema = self.schema()
        if ( schema ):
            self.setEnabled(True)
            
            uifile = self.uiFile()
            
            # load a user defined file
            if ( uifile ):
                projexui.loadUi('', self, uifile)
                
                for widget in self.findChildren(XOrbColumnEdit):
                    columnName = widget.columnName()
                    column     = schema.column(columnName)
                    
                    if ( column ):
                        widget.setColumn(column)
                    else:
                        logger.debug('%s is not a valid column of %s' % \
                                     (columnName, schema.name()))
            
            # dynamically load files
            else:
                layout = QFormLayout()
                layout.setContentsMargins(0, 0, 0, 0)
                columns = schema.columns()
                columns.sort(key = lambda x: x.displayName())
                
                record = self.record()
                
                for column in columns:
                    # ignore protected columns
                    if ( column.name().startswith('_') ):
                        continue
                    
                    label   = column.displayName()
                    coltype = column.columnType()
                    name    = column.name()
                    
                    # create the column edit widget
                    widget  = XOrbColumnEdit(self)
                    widget.setObjectName('ui_' + name)
                    widget.setColumnName(name)
                    widget.setColumnType(coltype)
                    widget.setColumn(column)
                    
                    layout.addRow(QLabel(label, self), widget)
                
                self.setLayout(layout)
                self.adjustSize()
                
                self.setWindowTitle('Edit %s' % schema.name())
        else:
            self.setEnabled(False)
        
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
738119
public function rebuildIndex()
    {
        $this->rowsIndexByLabel = array();
        $this->rebuildIndexContinuously = true;

        foreach ($this->rows as $id => $row) {
            $label = $row->getColumn('label');
            if ($label !== false) {
                $this->rowsIndexByLabel[$label] = $id;
            }
        }

        if ($this->summaryRow) {
            $label = $this->summaryRow->getColumn('label');
            if ($label !== false) {
                $this->rowsIndexByLabel[$label] = DataTable::ID_SUMMARY_ROW;
            }
        }

        $this->indexNotUpToDate = false;
    }
319119
protected void rebuild() {
		// Checks if the number of nodes in the tree exceeds the maximum number
		while (this.rootCount > this.maxNumClusterFeatures) {
			// Doubles the global threshold
			this.T *= 2.0;
			this.root.setThreshold(calcRSquared(1));
			// Adds all nodes to the ClusteringFeature tree again
			Queue<ClusteringTreeNode> Q = new LinkedList<ClusteringTreeNode>();
			Q.addAll(this.root.getChildren());
			this.root.clearChildren();
			this.rootCount = 0;
			while (!Q.isEmpty()) {
				ClusteringTreeNode x = Q.element();
				Q.addAll(x.getChildren());
				x.clearChildren();
				bicoCFUpdate(x);
				Q.remove();
			}
		}
	}
351121
function() {
      return _.map(this.models, function(model) {
        // Pull out component models
        if (model.type === 'Widget' && model.model) {
          return model.model;
        } else {
          return model;
        }
      });
    }
1020557
def rebuildPath(self):
        
        # rebuild linear style
        if self.isStyle(XConnectionStyle.Linear):
            return self.rebuildLinear()

        # rebuild block style
        elif self.isStyle(XConnectionStyle.Block):
            return self.rebuildBlock()

        # rebuild smooth style
        elif self.isStyle(XConnectionStyle.Smooth):
            return self.rebuildSmooth()

        # otherwise, we have an invalid style, or a style
        # defined by a subclass
        else:
            return QPainterPath()
1308100
def rebuild( self ):
        
        global XChartWidgetItem
        if ( XChartWidgetItem is None ):
            from projexui.widgets.xchartwidget.xchartwidgetitem \
            import XChartWidgetItem
        
        self._buildData = {}
        
        # build the grid location
        x      = 8
        y      = 8
        w      = self.sceneRect().width()
        h      = self.sceneRect().height()
        hpad   = self.horizontalPadding()
        vpad   = self.verticalPadding()
        hmax   = self.horizontalRuler().maxNotchSize(Qt.Horizontal)
        
        left_offset   = hpad + self.verticalRuler().maxNotchSize(Qt.Vertical)
        right_offset  = left_offset + hpad
        top_offset    = vpad
        bottom_offset = top_offset + vpad + hmax
        
        left    = x + left_offset
        right   = w - right_offset
        top     = y + top_offset
        bottom  = h - bottom_offset
        
        rect = QRectF()
        rect.setLeft(left)
        rect.setRight(right)
        rect.setBottom(bottom)
        rect.setTop(top)
        
        self._buildData['grid_rect'] = rect
        
        # rebuild the ruler data
        self.rebuildGrid()
        self._dirty = False
        
        # rebuild all the items
        padding  = self.horizontalPadding() + self.verticalPadding()
        grid     = self.sceneRect()
        filt     = lambda x: isinstance(x, XChartWidgetItem)
        items    = filter(filt, self.items())
        height   = float(grid.height())
        if height == 0:
            ratio = 1
        else:
            ratio = grid.width() / height
        count    = len(items)
        
        if ( not count ):
            return
        
        if ( ratio >= 1 ):
            radius   = (grid.height() - padding * 2) / 2.0
            x        = rect.center().x()
            y        = rect.center().y()
            dx       = radius * 2.5
            dy       = 0
        else:
            radius   = (grid.width() - padding * 2) / 2.0
            x        = rect.center().x()
            y        = rect.center().y()
            dx       = 0
            dy       = radius * 2.5
        
        for item in items:
            item.setPieCenter(QPointF(x, y))
            item.setRadius(radius)
            item.rebuild()
            
            x += dx
            y += dy
        
        if ( self._trackerItem and self._trackerItem() ):
            self._trackerItem().rebuild(self._buildData['grid_rect'])
1226631
def rebuild( self ):
        
        rect    = self.sceneRect()
        x       = rect.left()
        y       = rect.top()
        w       = rect.width()
        h       = rect.height()
        
        # calculate background gridlines
        cx      = x + (w / 2)
        cy      = y + (h / 2)
        
        self._centerLines = [QLine(cx, rect.top(), cx, rect.bottom()),
                             QLine(rect.left(), cy, rect.right(), cy) ]
        
        # create the horizontal grid lines
        delta           = self.cellHeight()
        minor_lines     = []
        major_lines     = []
        count           = 1
        while delta < (h / 2):
            pos_line = QLine(x, cy + delta, x + w, cy + delta)
            neg_line = QLine(x, cy - delta, x + w, cy - delta)
            
            # every 10th line will be a major line
            if count == 10:
                major_lines.append(pos_line)
                major_lines.append(neg_line)
                count = 1
            else:
                minor_lines.append(pos_line)
                minor_lines.append(neg_line)
            
            # update the current y location
            delta += self.cellHeight()
            count += 1
        
        # create the vertical grid lines
        delta = self.cellWidth()
        count = 1
        while delta < (w / 2):
            pos_line = QLine(cx + delta, y, cx + delta, y + h)
            neg_line = QLine(cx - delta, y, cx - delta, y + h)
            
            # every 10th line will be a major line
            if count == 10:
                major_lines.append(pos_line)
                major_lines.append(neg_line)
                count = 1
            else:
                minor_lines.append(pos_line)
                minor_lines.append(neg_line)
            
            # update the current y location
            delta += self.cellWidth()
            count += 1
        
        # set the line cache
        self._majorLines = major_lines
        self._minorLines = minor_lines
        
        # unmark the scene as being dirty
        self.setDirty(False)
619018
def rebuild( self, gridRect ):
        
        scene = self.scene()
        if ( not scene ):
            return
        
        self.setVisible(gridRect.contains(self.pos()))
        self.setZValue(100)
        
        path = QPainterPath()
        path.moveTo(0, 0)
        path.lineTo(0, gridRect.height())
        
        tip             = ''
        tip_point       = None
        self._ellipses  = []
        items           = scene.collidingItems(self)
        self._basePath  = QPainterPath(path)
        
        for item in items:
            item_path = item.path()
            found = None
            for y in range(int(gridRect.top()), int(gridRect.bottom())):
                point = QPointF(self.pos().x(), y)
                if ( item_path.contains(point) ):
                    found = QPointF(0, y - self.pos().y())
                    break
            
            if ( found ):
                path.addEllipse(found, 6, 6)
                self._ellipses.append(found)
                
                # update the value information
                value     = scene.valueAt(self.mapToScene(found))
                tip_point = self.mapToScene(found)
                hruler    = scene.horizontalRuler()
                vruler    = scene.verticalRuler()
                
                x_value = hruler.formatValue(value[0])
                y_value = vruler.formatValue(value[1])
                
                tip = '<b>x:</b> %s<br/><b>y:</b> %s' % (x_value, y_value)
        
        self.setPath(path)
        self.setVisible(True)
        
        # show the popup widget
        if ( tip ):
            anchor    = XPopupWidget.Anchor.RightCenter
            widget    = self.scene().chartWidget()
            tip_point = widget.mapToGlobal(widget.mapFromScene(tip_point))
            
            XPopupWidget.showToolTip(tip, 
                                     anchor = anchor,
                                     parent = widget,
                                     point  = tip_point,
                                     foreground = QColor('blue'),
                                     background = QColor(148, 148, 255))
1318514
def rebuild(self):
        
        # create the path
        path = self.rebuildPath()
        self._polygons = self.rebuildPolygons(path)

        if self._textItem:
            point = path.pointAtPercent(0.5)
            metrics = QFontMetrics(self._textItem.font())

            point.setY(point.y() - metrics.height() / 2.0)

            self._textItem.setPos(point)

        # create the path for the item
        for poly in self._polygons:
            path.addPolygon(poly)

        # unmark as dirty
        self.setDirty(False)

        return path
1288473
public void refresh() {
        QueryCache.instance().purgeTableCache(metaModelLocal);
        Model fresh = ModelDelegate.findById(this.getClass(), getId());
        if (fresh == null) {
            throw new StaleModelException("Failed to refresh self because probably record with " +
                    "this ID does not exist anymore. Stale model: " + this);
        }
        fresh.copyTo(this);
        dirtyAttributeNames.clear();
    }
1086197
public function rebuild()
    {
        $this->apply(function($config) {
            $this->rebuildCacheRecord($config, $this->model, 'SUM', $config['columnToSum']);
        });
    }
786780
protected function rebuildConnectionString()
    {
        foreach ($this->availableDrivers as $driverName) {
            if (array_key_exists($driverName, $this->connectionStrings)) {
                continue;
            }
            $ConnStringInterface = __NAMESPACE__.'\\ConnectionString\\'.ucfirst($driverName).'ConnectionString';
            if (class_exists($ConnStringInterface)) {
                $ConnString = new $ConnStringInterface();
                $this->registerConnectionString($ConnString, $driverName);
            }
        }
    }
1062945
def reset(self):
        
        self.connection.rebuild_index(
            self.index, coll_name=self.target_coll_name)
955867
protected void redraw() {

        if (isAttached()) {
            int outerHeight = getElement().getOffsetHeight();
            int innerHeight = m_containerElement.getOffsetHeight();
            if (outerHeight >= innerHeight) {
                setScrollbarVisible(false);
            } else {
                setScrollbarVisible(true);
                adjustKnobHeight(outerHeight, innerHeight);
                setKnobPosition(m_currentValue);
            }
        }
        if (m_slidingMouse) {
            m_mouseSlidingStartY = m_lastMouseY;
            m_mouseSlidingStartValue = m_currentValue;
        }
    }
721072
public void rebuild(StaplerRequest req, JSONObject json, List<? extends Descriptor<T>> descriptors) throws FormException, IOException {
        List<T> newList = new ArrayList<>();

        for (Descriptor<T> d : descriptors) {
            T existing = get((D)d);
            String name = d.getJsonSafeClassName();
            JSONObject o = json.optJSONObject(name);

            T instance = null;
            if (o!=null) {
                if (existing instanceof ReconfigurableDescribable)
                    instance = (T)((ReconfigurableDescribable)existing).reconfigure(req,o);
                else
                    instance = d.newInstance(req, o);
            } else {
                if (existing instanceof ReconfigurableDescribable)
                    instance = (T)((ReconfigurableDescribable)existing).reconfigure(req,null);
            }

            if (instance!=null)
                newList.add(instance);
        }

        replaceBy(newList);
    }
672507
private void buildUI() {
		add(new WSkipLinks());

		// the application header
		add(headerPanel);
		headerPanel.add(new UtilityBar());
		headerPanel.add(new WHeading(HeadingLevel.H1, "WComponents"));

		// mainPanel holds the menu and the actual example.
		add(mainPanel);
		mainPanel.add(menuPanel);
		mainPanel.add(exampleSection);

		// An application footer?
		WPanel footer = new WPanel(WPanel.Type.FOOTER);
		footer.add(lastLoaded);
		add(footer);
		add(new WAjaxControl(menuPanel.getTree(), new AjaxTarget[]{menuPanel.getMenu(), exampleSection}));
	}
868766
def rebuild( self ):
        
        self.markForRebuild(False)
        
        self._textData = []
        
        if ( self.rebuildBlocked() ):
            return
        
        scene = self.scene()
        if ( not scene ):
            return
        
        # rebuild a month look
        if ( scene.currentMode() == scene.Mode.Month ):
            self.rebuildMonth()
        elif ( scene.currentMode() in (scene.Mode.Day, scene.Mode.Week) ):
            self.rebuildDay()