Updates the drawable bounds rect. This must be called every time the drawable
associated to this view changes.
960405
private void updateDrawableBounds() {
        if (mDrawableRect == null) {
            mDrawableRect = new RectF();
        }
        Drawable d = getDrawable();
        if (d != null && d.getIntrinsicHeight() > 0 && d.getIntrinsicWidth() > 0) {
            mDrawableRect.set(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
        }
    }
340361
public void onTransformChanged() {
        Log.v(Log.SUBSYSTEM.WIDGET, TAG, "onTransformChanged(): %s mPreventTransformChanged = %b",
                getName(), mPreventTransformChanged);

        // Even if the calling code that altered the transform doesn't request a
        // layout, we'll do a layout the next time a layout is requested on our
        // part of the scene graph.
        if (!mPreventTransformChanged) {
            mChanged = true;

            // Clear this to indicate that the bounding box has been invalidated and
            // needs to be constructed and transformed anew.
            mBoundingBox = null;
        }
    }
644833
@Override
  public void updatePosition(float verticalDragOffset) {
    int right = getViewRightPosition(verticalDragOffset);
    int left = right - layoutParams.width;
    int top = getView().getTop();
    int bottom = top + layoutParams.height;

    getView().layout(left, top, right, bottom);
  }
347328
private void updateMaxExtent() {
		if (targetMap.getMapModel().isInitialized() && getGraphics().isReady()) {
			// map view size may not have been set yet !
			getMapModel().getMapView().setSize(getWidth(), getHeight());
			Bbox targetMaxBounds = getOverviewMaxBounds();

			MapView mapView = getMapModel().getMapView();

			// Set the maxBounds on this map as well:
			mapView.setMaxBounds(targetMaxBounds.buffer(targetMaxBounds.getWidth()));

			// apply buffer
			if (maxExtentIncreasePercentage > 0) {
				targetMaxBounds = targetMaxBounds
						.buffer(targetMaxBounds.getWidth() * maxExtentIncreasePercentage / 100);
			}

			// Then apply the map extent:
			mapView.applyBounds(targetMaxBounds, MapView.ZoomOption.LEVEL_FIT);

			// Immediately draw or remove the max extent rectangle:
			setDrawTargetMaxExtent(drawTargetMaxExtent);
		}
	}
600351
def _update(self):
        
        self._colorbar.halfdim = self._halfdim
        self._border.halfdim = self._halfdim

        self._label.text = self._label_str
        self._ticks[0].text = str(self._clim[0])
        self._ticks[1].text = str(self._clim[1])

        self._update_positions()

        self._colorbar._update()
        self._border._update()
212566
private void updateIcon() {
		// Define the icon.
		int icon = R.drawable.document_gray;
		if(this.selectable) {
			icon = (this.file != null && file.isDirectory())? R.drawable.folder : R.drawable.document;
		}

		// Set the icon.
		this.icon.setImageDrawable(getResources().getDrawable( icon ));

		// Change the color of the text.
		if(icon != R.drawable.document_gray) {
			this.label.setTextColor(getResources().getColor(R.color.daidalos_active_file));
		} else {
			this.label.setTextColor(getResources().getColor(R.color.daidalos_inactive_file));
		}
	}
903773
private void updateBaseMatrix(Drawable d) {
        ImageView imageView = getImageView();
        if (null == imageView || null == d) {
            return;
        }

        final float viewWidth = getImageViewWidth(imageView);
        final float viewHeight = getImageViewHeight(imageView);
        final int drawableWidth = d.getIntrinsicWidth();
        final int drawableHeight = d.getIntrinsicHeight();

        mBaseMatrix.reset();

        final float widthScale = viewWidth / drawableWidth;
        final float heightScale = viewHeight / drawableHeight;

        if (mScaleType == ScaleType.CENTER) {
            mBaseMatrix.postTranslate((viewWidth - drawableWidth) / 2F, (viewHeight - drawableHeight) / 2F);

        } else if (mScaleType == ScaleType.CENTER_CROP) {
            float scale = Math.max(widthScale, heightScale);
            mBaseMatrix.postScale(scale, scale);
            mBaseMatrix.postTranslate((viewWidth - drawableWidth * scale) / 2F,
                (viewHeight - drawableHeight * scale) / 2F);

        } else if (mScaleType == ScaleType.CENTER_INSIDE) {
            float scale = Math.min(1.0f, Math.min(widthScale, heightScale));
            mBaseMatrix.postScale(scale, scale);
            mBaseMatrix.postTranslate((viewWidth - drawableWidth * scale) / 2F,
                (viewHeight - drawableHeight * scale) / 2F);

        } else {
            RectF mTempSrc = new RectF(0, 0, drawableWidth, drawableHeight);
            RectF mTempDst = new RectF(0, 0, viewWidth, viewHeight);

            if ((int)mBaseRotation % 180 != 0) {
                mTempSrc = new RectF(0, 0, drawableHeight, drawableWidth);
            }

            switch (mScaleType) {
                case FIT_CENTER:
                    mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.CENTER);
                    break;

                case FIT_START:
                    mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.START);
                    break;

                case FIT_END:
                    mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.END);
                    break;

                case FIT_XY:
                    mBaseMatrix.setRectToRect(mTempSrc, mTempDst, ScaleToFit.FILL);
                    break;

                default:
                    break;
            }
        }

        resetMatrix();
    }
597451
@SuppressWarnings("deprecation")
    private void drawBackgroundProgress() {
        GradientDrawable backgroundDrawable = createGradientDrawable(colorBackground);
        int newRadius = radius - (padding / 2);
        backgroundDrawable.setCornerRadii(new float[]{newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius, newRadius});
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
            layoutBackground.setBackground(backgroundDrawable);
        } else {
            layoutBackground.setBackgroundDrawable(backgroundDrawable);
        }
    }
81743
@Override
    public void update (Graphics g)
    {
        Shape clip = g.getClip();
        Rectangle dirty;
        if (clip != null) {
            dirty = clip.getBounds();
        } else {
            dirty = getRootPane().getBounds();
            // account for our frame insets
            Insets insets = getInsets();
            dirty.x += insets.left;
            dirty.y += insets.top;
        }

        if (_fmgr != null) {
            _fmgr.restoreFromBack(dirty);
        }
    }
1006618
public void updateScale() {
        scaleX = targetPpiX / Gdx.graphics.getPpiX();
        scaleY = targetPpiY / Gdx.graphics.getPpiY();
    }
616365
private void configureBounds() {
    Drawable underlyingDrawable = getCurrent();
    Rect bounds = getBounds();
    int underlyingWidth = mUnderlyingWidth = underlyingDrawable.getIntrinsicWidth();
    int underlyingHeight = mUnderlyingHeight = underlyingDrawable.getIntrinsicHeight();

    // In case underlying drawable doesn't have intrinsic dimensions, we cannot set its bounds to
    // -1 so we use our bounds and discard specified matrix. In normal case we use drawable's
    // intrinsic dimensions for its bounds and apply specified matrix to it.
    if (underlyingWidth <= 0 || underlyingHeight <= 0) {
      underlyingDrawable.setBounds(bounds);
      mDrawMatrix = null;
    } else {
      underlyingDrawable.setBounds(0, 0, underlyingWidth, underlyingHeight);
      mDrawMatrix = mMatrix;
    }
  }
950369
public void setImageDrawable(Drawable drawable, boolean animate) {
        if (view != null) {
            ((ImageView) view).setImageDrawable(drawable);
        }
    }
708811
public void setButtonDrawable(Drawable d) {
        if (drawable != d) {
            if (drawable != null) {
                drawable.setCallback(null);
                unscheduleDrawable(drawable);
            }

            drawable = d;

            if (d != null) {
                d.setCallback(this);
                //d.setLayoutDirection(getLayoutDirection());
                if (d.isStateful()) {
                    d.setState(getDrawableState());
                }
                d.setVisible(getVisibility() == VISIBLE, false);
                setMinHeight(d.getIntrinsicHeight());
                updateButtonTint();
            }
        }
    }
1237311
function updateBounds() {
         if (this.shapes.length > 0) {
           // reset the rect with default values
           var _bounds = this.shapes[0].getBounds();

           this.pos.setV(_bounds.pos);
           this.resize(_bounds.width, _bounds.height);

           for (var i = 1; i < this.shapes.length; i++) {
             this.union(this.shapes[i].getBounds());
           }
         } // trigger the onBodyChange


         if (typeof this.onBodyUpdate === "function") {
           this.onBodyUpdate(this);
         }

         return this;
       }
1339517
private void updatePaintables() {
		distance.setContent(formatUnits(widthInUnits));
		backGround.getBounds().setWidth(widthInPixels + 2 * HORIZONTAL_PADDING);
		rightMarker.getBounds().setX(leftMarker.getBounds().getX() + widthInPixels - 1);
		bottomLine.getBounds().setWidth(widthInPixels);
	}
1107965
private void updateScaleList() {
		refreshPixelLength(); /* retrieve pixelLength from mapWidget. Needed in case mapWidget wasn't fully initialized
					the previous time the pixelLength was requested */

		// Update lookup map (stores user friendly representation):
		valueToScale.clear();
		if (!Double.isNaN(pixelLength) && (0.0 != pixelLength)) {
			for (Double scale : scaleList) {
				// Eliminate duplicates and null:
				if (scale != null) {
					String value = ScaleConverter.scaleToString(scale, precision, significantDigits);
					valueToScale.put(value, scale);
				}
			}

			List<String> availableScales = new ArrayList<String>();

			for (Double scale : scaleList) {
				if (mapView.isResolutionAvailable(pixelLength / scale)) {
					availableScales.add(ScaleConverter.scaleToString(scale, precision, significantDigits));
				}
			}

			scaleItem.setValueMap(availableScales.toArray(new String[availableScales.size()]));

			isScaleItemInitialized = true;
		}
	}
1064325
public void update() {

        switch (shapeType) {

            case POLYLINE_MARKERS:
                ((PolylineMarkers) shape).update();
                break;
            case POLYGON_MARKERS:
                ((PolygonMarkers) shape).update();
                break;
            case MULTI_POLYLINE_MARKERS:
                ((MultiPolylineMarkers) shape).update();
                break;
            case MULTI_POLYGON_MARKERS:
                ((MultiPolygonMarkers) shape).update();
                break;
            case COLLECTION:
                @SuppressWarnings("unchecked")
                List<GoogleMapShape> shapeList = (List<GoogleMapShape>) shape;
                for (GoogleMapShape shapeListItem : shapeList) {
                    shapeListItem.update();
                }
                break;
            default:
        }

    }