Called when a rendering task is over and
a PagePart has been freshly created.
@param part The created PagePart.
333951
public void onBitmapRendered(PagePart part) {
        if (part.isThumbnail()) {
            cacheManager.cacheThumbnail(part);
        } else {
            cacheManager.cachePart(part);
        }
        invalidate();
    }
101725
@Override
	protected void paintComponent(final RenderContext renderContext) {
		if (getState() == DISPLAY_STATE) {
			setState(ACTIVE_STATE);
			showWindow(renderContext);
		} else if (getState() == ACTIVE_STATE && isTargeted()) {
			getComponentModel().wrappedContent.paint(renderContext);
		}
	}
1096422
@Override
	public void render(final WComponent component, final RenderContext context) {
		PrintWriter out = ((WebXmlRenderContext) context).getWriter();

		// If we are debugging the layout, write markers so that the html
		// designer can see where templates start and end.
		boolean debugLayout = ConfigurationProperties.getDeveloperVelocityDebug();

		if (debugLayout) {
			String templateUrl = url;

			if (url == null && component instanceof AbstractWComponent) {
				templateUrl = ((AbstractWComponent) component).getTemplate();
			}

			out.println("<!-- Start " + templateUrl + " -->");
			paintXml(component, out);
			out.println("<!-- End   " + templateUrl + " -->");
		} else {
			paintXml(component, out);
		}
	}
1075376
function()
			{
				if ( cssIsLoaded && jsIsLoaded )
				{
					// Mark the part as loaded.
					part._isLoaded = 1;

					// Call all pending callbacks.
					for ( var i = 0 ; i < pending.length ; i++ )
					{
						if ( pending[ i ] )
							pending[ i ]();
					}
				}
			}
547236
@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page_objects_home);
    }
780038
@Override
	protected void afterPaint(final RenderContext renderContext) {
		super.afterPaint(renderContext);

		final int size = getChildCount();

		for (int i = 0; i < size; i++) {
			WComponent child = getChildAt(i);
			child.reset();
		}
	}
1217920
public void actionCleanupBodyElement() {

        try {
            // save eventually changed content of the editor to the temporary file
            Locale oldLocale = CmsLocaleManager.getLocale(getParamOldelementlanguage());
            performSaveContent(getParamOldelementname(), oldLocale);
        } catch (CmsException e) {
            // show error page
            try {
                showErrorPage(this, e);
            } catch (JspException exc) {
                // should usually never happen
                if (LOG.isInfoEnabled()) {
                    LOG.info(exc);
                }
            }
        }
    }
47092
protected void afterEndDocument() {
        if (stack[depth = 0] == WROTE_MARKUP) { // but not data
            try {
                writeNewLine(0);
            } catch (Exception ignored) {
                ignored.printStackTrace();
            }
        }
        stack[depth] = 0; // start fresh
    }
879597
void onRendererSelected() {
        if (view.getRendererSelected() != null) {
            rendererLibrary = rendererManager.getRendererByName(view.getRendererSelected());
            selectCommand.execute();
        }
    }
1186640
@Override
	protected void afterPaint(final RenderContext renderContext) {
		super.afterPaint(renderContext);

		if (profileBtn.isPressed()) {
			// UIC serialization stats
			UicStats stats = new UicStats(UIContextHolder.getCurrent());

			WComponent currentComp = this.getCurrentComponent();

			if (currentComp != null) {
				stats.analyseWC(currentComp);
			}

			if (renderContext instanceof WebXmlRenderContext) {
				PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter();

				writer.println("<hr />");
				writer.println("<h2>Serialization Profile of UIC</h2>");
				UicStatsAsHtml.write(writer, stats);

				if (currentComp != null) {
					writer.println("<hr />");
					writer.println("<h2>ObjectProfiler - " + currentComp + "</h2>");
					writer.println("<pre>");

					try {
						writer.println(ObjectGraphDump.dump(currentComp).toFlatSummary());
					} catch (Exception e) {
						LOG.error("Failed to dump component", e);
					}

					writer.println("</pre>");
				}
			}
		}
	}
1183033
@Override
    public void afterInitialized(BaseComponent comp) {
        super.afterInitialized(comp);
        window = (Window) comp;
        sessionId = (String) comp.getAttribute("id");
        lstParticipants.setRenderer(new ParticipantRenderer(chatService.getSelf(), null));
        model.add(chatService.getSelf());
        lstParticipants.setModel(model);
        clearMessage();
        
        if (comp.getAttribute("originator") != null) {
            invite((result) -> {
                if (!result) {
                    close();
                } else {
                    initSession();
                }
            });
        }
985524
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);
    recoverDraggablePanelState(savedInstanceState);
    loadLastPlaceClicked(savedInstanceState);
  }
250037
private void refresh() {
        if (this.previewedThread != null) {
            if (this.previewedThread.isComplete()) {
                setLatestPreview();
                disableRefresh();
            } else {
                this.previewedThread.getPreview(ALPreviewPanel.this);
            }
        }
    }
1289731
@Override
  public void part(int start, int end) {
    blockNumbers[count][0] = start;
    blockNumbers[count][1] = end - 1;
    count++;
  }
1073024
@Override
	protected void renderContent(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {
		log.trace("renderContent");

		Map<String, String> pageProps = new HashMap<String, String>();
		pageProps.put("message", "");
		pageProps.put("searchAllChecked", "");
		pageProps.put("resourceType", "");

		ComponentBindingsProviderFactoryImpl factoryImpl = (ComponentBindingsProviderFactoryImpl) factory;

		if ("true".equals(req.getParameter("reloadCache"))) {
			factoryImpl.reloadCache();
			pageProps.put("message", "Cache Reloaded");
		}
		List<ServiceReference> bindingProviders = new ArrayList<ServiceReference>();
		String resourceType = req.getParameter("resourceType");
		if (!StringUtils.isEmpty(resourceType)) {
			log.debug("Searching for resource type: {}", resourceType);
			pageProps.put("resourceType", resourceType);
			bindingProviders = factoryImpl.getReferences(req
					.getParameter("resourceType"));
		} else if ("true".equals(req.getParameter("searchAll"))) {
			pageProps.put("searchAllChecked", "checked");
			log.debug("Searching for all binding providers");
			for (String rt : factoryImpl.getLoadedResourceTypes()) {
				log.debug("Searching for resource type: {}", rt);
				for (ServiceReference reference : factoryImpl.getReferences(rt)) {
					if (!bindingProviders.contains(reference)) {
						bindingProviders.add(reference);
					}
				}
			}
		}

		renderBlock(res, "header.html", pageProps);
		renderBlock(res, "search.html", pageProps);

		for (int i = 0; i < bindingProviders.size(); i++) {
			Map<String, String> properties = loadProperties(bindingProviders
					.get(i));
			properties.put("state", (i + 1) % 2 == 0 ? "even" : "odd");
			renderBlock(res, "result.html", properties);
		}
		res.getWriter().write("</tbody></table>");

		res.getWriter()
				.write("<table><tr><th class=\"content ui-state-default\">Recent Exceptions</th></tr>");

		for (final Object obj : componentBindingsValuesProvider
				.getRecentExceptions()) {
			renderBlock(res, "exception.html", new HashMap<String, String>() {
				private static final long serialVersionUID = 1L;
				{
					put("ex", obj.toString());
				}
			});
		}
		res.getWriter().write("</table>");
	}
391114
@Override
  @InService(PageServiceSync.class)
  public void afterDataFlush(PageServiceImpl tableService,
                             int sequenceFlush)
  {
    super.afterDataFlush(tableService, sequenceFlush);
    
    sweepStub(tableService);
  }
923080
function (next) {

    // If this is the first part, and we're just starting,
    // but we have a multipartUploadID, then we're beginning
    // a resume and can fire the 'ready' event externally.
    if (multipartUploadID && !started)
      ws.emit('ready', multipartUploadID);

    started = true;

    if (pendingParts < concurrentPartThreshold) {
      // Has the MPU been created yet?
      if (multipartUploadID)
        upload(); // Upload the part immediately.
      else {
        e.once('ready', upload); // Wait until multipart upload is initialized.
        createMultipartUpload();
      }
    }
    else {
      // Block uploading (and receiving of more data) until we upload
      // some of the pending parts
      e.once('part', upload);
    }

    function upload() {

      // Pause/resume check #2 out of 2:
      //   Block queued up parts until resumption.
      if (paused)
        e.once('resume', uploadNow);
      else
        uploadNow();

      function uploadNow() {
        pendingParts++;
        flushPart(function (partDetails) {
          --pendingParts;
          e.emit('part'); // Internal event
          ws.emit('part', partDetails); // External event

          // if we're paused and this was the last outstanding part,
          // we can notify the caller that we're really paused now.
          if (paused && pendingParts === 0)
            notifyPaused();
        });
        next();
      }
    }
  }