         }
     }
 
+    /**
+     * Flags a certain visual state (identified by a String) as needing
+     * validation, then triggers an invalidation if one is not already
+     * queued.
+     */
     protected function invalidate(token:String):void
     {
         invalidTokens[token] = true;

        invalidate(SIZE);
    }

    public function forceRedraw():void
    {
        invalidate(SIZE);
        draw();
    }

    protected function getDisplayWidth():Number
    {
        return super.width;
    }

    protected function getDisplayHeight():Number
    {
        return super.height;
    }

    protected function setSizeOn(object:DisplayObject, w:Number, h:Number):void
    {
        var asBaseDisplay:BaseDisplay = object as BaseDisplay;

import flash.utils.getQualifiedClassName;


/**
 * A minimal implementation of a sprite that responds to stage invalidation.
 * Similar to the invalidation routine of fl.core.UIComponent, without
 * styles, accessibility, or live preview.
 *
 * <p>The general usage pattern is as follows:</p>
 * <ul>
 *   <li>Some function (often a setter) that triggers a change in the
 *       appearance of the object calls the <code>invalidate()</code>
 *       method, passing in a string that will be used to identify which
 *       aspect of the apperance needs redrawing.  If the redraw routine
 *       can't be broken into independent parts, just pass
 *       <code>SIZE</code>.</li>
 *   <li><code>invalidate()</code> schedules an <code>Event.RENDER</code>,
 *       which ultimately results in a call to <code>draw()</code>.</li>
 *   <li><code>draw()</code> is overridden with a implementation that checks
 *       which identifiers have been invalidated, updates the display that
 *       corresponds to each one, then calls <code>validate()</code> for
 *       each one.</li>
 * </ui>
 */
public class BaseDisplay extends Sprite
{
    /**
     * Identifies that the width and/or height of this object is invalid and
     * needs updating.
     */
    public static const SIZE:String = "SIZE";

    /**
     * Identifies that the scroll offset of this object is invalid and
     * needs updating.
     */
    public static const SCROLL:String = "SCROLL";

    /**
     * Identifies that the state of this object (e.g. disabled, selected,
     * rolled over, etc) is invalid and needs updating.
     */
    public static const STATE:String = "STATE";

    /**
     * Identifies that the content of this object (e.g. labels, source data,
     * etc) is invalid and needs updating.
     */
    public static const CONTENT:String = "CONTENT";

    /**
     * The stored width as set by callers.
     */
    protected var _width:Number;

    /**
     * The stored height as set by callers.
     */
    protected var _height:Number;

    private var waitingForRender:Boolean;
