code: @Override
  	public final void preparePaint(final Request request) {
  		// Don't prepare if it's invisible.
  		if (!isVisible()) {
  			return;
  		}
  
  		// Prepare this component.
  		preparePaintComponent(request);
  
  		// Prepare its children.
  		final ArrayList<WComponent> children = (ArrayList<WComponent>) getComponentModel().
  				getChildren();
  
  		if (children != null) {
  			final int size = children.size();
  
  			for (int i = 0; i < size; i++) {
  				children.get(i).preparePaint(request);
  			}
  
  			// Chances are that the WComponent tree is fairly stable now, so take
  			// the opportunity to trim the child list to size if we have one.
  			// This is just a memory optimization - it won't prevent adding more
  			// children later, of course.
  			children.trimToSize();
  		}
  	}
docs: Prepares this component and all child componenents for painting (e.g. rendering to XML). This implementation
  calls {@link #preparePaintComponent(Request)}, then calls {@link #preparePaint(Request)} on all its children.
  Note that the this component's {@link #preparePaintComponent(Request)} is called before the childrens'
  {@link #preparePaintComponent(Request)} is called.
  
  @param request the request being responded to.