Callback used to notify about top-level-drawable being drawn.
14983
@Override
  public void onDraw() {
    // draw is only expected if the controller is attached
    if (mIsControllerAttached) {
      return;
    }

    // something went wrong here; controller is not attached, yet the hierarchy has to be drawn
    // log error and attach the controller
    FLog.w(
        DraweeEventTracker.class,
        "%x: Draw requested for a non-attached controller %x. %s",
        System.identityHashCode(this),
        System.identityHashCode(mController),
        toString());

    mIsHolderAttached = true;
    mIsVisible = true;
    attachOrDetachController();
  }
1256097
def _connect_callbacks(self):
        """"""
        figure = self.get_figure()
        callback = partial(mpl_redraw_callback, tax=self)
        event_names = ('resize_event', 'draw_event')
        for event_name in event_names:
            figure.canvas.mpl_connect(event_name, callback)
648601
function show(options) {
    if (!options.message) {
      return;
    }

    prepare_();

    let notify = null;

    const time = options.time || 8000;

    switch (options.type) {
      case 'confirm':
        notify = draw.confirm(options);
        break;

      case 'prompt':
        notify = draw.prompt(options);
        break;

      default:
        notify = draw.alert(options);

        window.setTimeout(function () {
          notify.remove();
        }, time);
    }

    wrapper_.appendChild(notify);
    notify.classList.add(bounceInClass);
  }
208377
@Override
    protected void dispatchDraw(Canvas canvas) {
        super.dispatchDraw(canvas);
        if (onClickedDrawable != null) {
            onClickedDrawable.draw(canvas);
        }
    }
87191
def NotifyAboutEnd(self):
    """"""
    flow_ref = None
    if self.runner_args.client_id:
      flow_ref = rdf_objects.FlowReference(
          client_id=self.client_id, flow_id=self.urn.Basename())

    num_results = len(self.ResultCollection())
    notification_lib.Notify(
        self.creator, rdf_objects.UserNotification.Type.TYPE_FLOW_RUN_COMPLETED,
        "Flow %s completed with %d %s" %
        (self.__class__.__name__, num_results, num_results == 1 and "result" or
         "results"),
        rdf_objects.ObjectReference(
            reference_type=rdf_objects.ObjectReference.Type.FLOW,
            flow=flow_ref))
298810
def __callback (self, img):
        '''
        

        '''
        image = imageMsg2Image(img, self.bridge)

        self.lock.acquire()
        self.data = image
        self.lock.release()
1304737
def draw_idle(self):
        
        DEBUG_MSG("draw_idle()", 1, self)
        self._isDrawn = False  # Force redraw
        # Create a timer for handling draw_idle requests
        # If there are events pending when the timer is
        # complete, reset the timer and continue.  The
        # alternative approach, binding to wx.EVT_IDLE,
        # doesn't behave as nicely.
        if hasattr(self,'_idletimer'):
            self._idletimer.Restart(IDLE_DELAY)
        else:
            self._idletimer = wx.FutureCall(IDLE_DELAY,self._onDrawIdle)
1199612
function(oThis, sProp, oValue, bNotifyLayout) {
		var bSuppressRerendering = !!oThis.getDomRef();
		oThis.setProperty(sProp, oValue, bSuppressRerendering);
		if (bSuppressRerendering && bNotifyLayout) {
			notifyLayoutOnChange(oThis, "CTRL_POS");
		}
		return bSuppressRerendering;
	}
330278
protected void onDrawHorizontalScrollBar(Canvas canvas, Drawable scrollBar, int l, int t, int r, int b) {
        scrollBar.setColorFilter(tint != null ? tint.getColorForState(getDrawableState(), tint.getDefaultColor()) : Color.WHITE, tintMode);
        scrollBar.setBounds(l, t, r, b);
        scrollBar.draw(canvas);
    }
289075
public void showEdgeShadow(boolean left, boolean top, boolean right, boolean bottom) {
        if (SDK_LOLLIPOP) {
            //((OptRoundRectDrawable) getBackground()).showCorner(leftTop, rightTop, leftBottom, rightBottom);
        } else {
            ((OptRoundRectDrawableWithShadow) getBackground()).showEdgeShadow(left, top, right, bottom);
        }
    }
281053
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);
        _Canvas.translate(-mCurrentViewport.left, -mCurrentViewport.top);
        drawBars(_Canvas);
    }
586255
def paintEvent(self, event):
        

        super(type(self), self).paintEvent(event)

        show_message = True
        model = self.model()
        if issubclass(type(model), GraphModel):
            if model.has_nodes():
                show_message = False
        elif issubclass(type(model), QAbstractItemModel) or \
                issubclass(type(model), QAbstractListModel) or \
                issubclass(type(model), QAbstractTableModel):
            if model.rowCount():
                show_message = False

        if show_message:
            self.__notifier.show_message(self.__message, 0)
        else:
            self.__notifier.hide_message()
474790
@Override protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    if (noxItemCatalog == null) {
      wasInvalidatedBefore = false;
      return;
    }
    updateShapeOffset();
    for (int i = 0; i < noxItemCatalog.size(); i++) {
      if (shape.isItemInsideView(i)) {
        loadNoxItem(i);
        float left = shape.getXForItemAtPosition(i);
        float top = shape.getYForItemAtPosition(i);
        drawNoxItem(canvas, i, left, top);
      }
    }
    canvas.restore();
    wasInvalidatedBefore = false;
  }
519356
def __callback (self, rgb, d):
        '''
        

        '''
        data = Images2Rgbd(rgb, d)

        self.lock.acquire()
        self.data = data
        self.lock.release()
49118
public void viewUpdated() {
		BufferedImage active = null;
		if( controls.selectedView == 0 ) {
			active = original;
		} else if( controls.selectedView == 1 ) {
			synchronized (lockProcessing) {
				VisualizeBinaryData.renderBinary(detector.getBinary(), false, work);
			}
			active = work;
			work.setRGB(0, 0, work.getRGB(0, 0)); // hack so that Swing knows it's been modified
		} else {
			Graphics2D g2 = work.createGraphics();
			g2.setColor(Color.BLACK);
			g2.fillRect(0,0,work.getWidth(),work.getHeight());
			active = work;
		}

		guiImage.setBufferedImage(active);
		guiImage.setScale(controls.zoom);

		guiImage.repaint();
	}
451219
@Override
    protected void onGraphDraw(Canvas _Canvas) {
        super.onGraphDraw(_Canvas);

        if (!mPieData.isEmpty()) {

            float innerStartAngle = 0;
            float innerSweepAngle = 0;
            int   amountOfPieSlices = mPieData.size();

            for (int pieIndex = 0; pieIndex < amountOfPieSlices; pieIndex++) {
                PieModel model = mPieData.get(pieIndex);

                mGraphPaint.setColor(model.getColor());

                // TODO: put calculation in the animation onUpdate method and provide an animated value
                float startAngle;
                float sweepAngle = (model.getEndAngle() - model.getStartAngle()) * mRevealValue;

                if (mOpenClockwise) {
                    startAngle = model.getStartAngle() * mRevealValue;
                }
                else {
                    startAngle = 360 - model.getEndAngle() * mRevealValue;
                }

                if(pieIndex == 0) {
                    innerStartAngle = startAngle +  (mOpenClockwise ? 0 : (float) Math.ceil(sweepAngle));
                }

                if (mOpenClockwise)
                    innerSweepAngle += sweepAngle;
                else
                    innerSweepAngle -= (float) Math.ceil(sweepAngle);

                _Canvas.drawArc(mGraphBounds,
                        startAngle,
                        sweepAngle,
                        true, mGraphPaint);

                // Draw the highlighted inner edges if an InnerPadding is selected
                if (mUseInnerPadding) {
                    mGraphPaint.setColor(model.getHighlightedColor());

                    _Canvas.drawArc(mInnerBounds,
                            startAngle,
                            sweepAngle,
                            true, mGraphPaint);
                }
            }

            // Draw inner white circle
            if (mUseInnerPadding) {
                mGraphPaint.setColor(mInnerPaddingColor);

                _Canvas.drawArc(mInnerOutlineBounds,
                        innerStartAngle,
                        innerSweepAngle,
                        true,
                        mGraphPaint);
            }
        }
        else {
            // No Data available
            mGraphPaint.setColor(0xFFB6B6B6);
            _Canvas.drawArc(mGraphBounds,
                    0,
                    360,
                    true, mGraphPaint);

            // Draw inner white circle
            if (mUseInnerPadding) {
                mGraphPaint.setColor(0xFFC6C6C6);

                _Canvas.drawArc(mInnerBounds,
                        0,
                        360,
                        true, mGraphPaint);

                mGraphPaint.setColor(mInnerPaddingColor);

                _Canvas.drawArc(mInnerOutlineBounds,
                        0,
                        360,
                        true,
                        mGraphPaint);
            }
        }
    }
1054068
public void draw(Canvas canvas) {
    for (int i = 0; i < mHolders.size(); ++i) {
      Drawable drawable = get(i).getTopLevelDrawable();
      if (drawable != null) {
        drawable.draw(canvas);
      }
    }
  }