      */
     private var hostContainerFormat:ContainerFormat = new ContainerFormat();
 
-	/**
-	 *  @private
+    /**
+     *  @private
      *  This flag indicates whether hostCharacterFormat, hostParagraphFormat,
      *  and hostContainerFormat need to be recalculated from the CSS styles
      *  of the TextGraphic. It is set true by stylesInitialized() and also
      *  when styleChanged() is called with a null argument, indicating that
      *  multiple styles have changed.
-	 */
+     */
     private var hostFormatsInvalid:Boolean = false;
 
-	/**
-	 *  @private
-	 */
-	private var textFlowComposer:TextFlowComposer = new TextFlowComposer();
-		
-	/**
-	 *  @private
-	 */
-	private var textChanged:Boolean = false;
-
-	/**
-	 *  @private
-	 */
-	private var contentChanged:Boolean = false;
+    /**
+     *  @private
+     */
+    private var textFlowComposer:TextFlowComposer = new TextFlowComposer();
+        
+    /**
+     *  @private
+     */
+    private var textChanged:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var contentChanged:Boolean = false;
 
     /**
      *  @private

                textFlow = new TextFlow();
                textFlow.mxmlChildren = [ _content ];
            }
			else if (_content is String)
			{
				textFlow = importMarkup(String(_content));
			}
			else if (_content == null)
			{
				textFlow = createEmptyTextFlow();
			}
            else
            {
                throw new Error("invalid content");
            }
            textInvalid = true;
		}
		else if (textChanged)
		{
            var t:String = mx_internal::_text;
            if (t != null && t != "")
			{
				textFlow = TextFilter.importToFlow(t, TextFilter.PLAIN_TEXT_FORMAT);
			}
			else
			{
				textFlow = createEmptyTextFlow();
			}
        }

 		contentChanged = false;
		textChanged = false;

        if (hostFormatsInvalid)
        {

        super.text = value;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  content
    //----------------------------------

    /**
     *  @private
     */
    protected var _content:Object;
        
    /**
     *  The text contained in the TextGraphic element.
     *  
     *  <p>The contents of this property can be a sequence of characters, &lt;p&gt;, &lt;br/&gt; or &lt;span&gt; elements. 
     *  The &lt;p&gt; and &lt;span&gt; elements can be implied, depending on how you use the style properties.</p>
     *  
     *  <p>If this property has text content and no explicit paragraph tag, a paragraph tag is automatically generated for the text.</p>
     *  
     *  <p>The following table describes the tags that can be used in the <code>content</code> property:
     *  
     *  <table>
     *    <tr>
     *      <td>&lt;p&gt;</td>
     *      <td>Starts a new paragraph. A &lt;p&gt; can be a child of a TextGraphic. Children are character sequences, 
     *          &lt;br/&gt; elements, or &lt;span&gt; elements. Every &lt;p&gt; has at least one &lt;span&gt; that can be implied. 
     *          Character sequences that are direct children of &lt;p&gt; are in an implied &lt;span&gt;.</td>
     *    </tr>
     *    <tr>
     *      <td>&lt;span&gt;</td>
     *      <td>All character sequences are contained in one or more &lt;span&gt; elements. 
     *          Explicit &lt;span&gt; elements can be used for formatting runs of characters within a paragraph. 
     *          Every &lt;span&gt; element is a child of a &lt;p&gt; element. A &lt;span&gt; can contain character 
     *          sequences and/or &lt;br/&gt; elements. A &lt;span&gt; element can be empty. Unlike in XHTML, &lt;span&gt; elements
     *          must not be nested. The reason for this is the increased cost in number of objects required to represent the text.</td>
     *    </tr>
     *    <tr>
     *      <td>&lt;br/&gt;</td>
     *      <td>Behaves as a Unicode line separator character. It does not end the paragraph, it merely forces a line break at the 
     *          position where it appears. Always a child of &lt;span&gt; elements, though the 
     *          &lt;span&gt; element can be implied. The &lt;br/&gt; element must have no children (it must be an empty tag).</td>
     *    </tr>
     *  </table>
     */
    public function get content():Object 
    {
        return _content;
    }
    
    /**
     *  @private
     */
    public function set content(value:Object):void
    {
        if (value != _content)
        {
            // Setting 'content' temporarily causes 'text' to become null.
            // Later, after the 'content' has been committed into the TextFlow,
            // getting 'text' will extract the text from the TextFlow.
            mx_internal::_text = null;
            textChanged = false;

            var oldValue:Object = _content;
            _content = value;
            dispatchPropertyChangeEvent("content", oldValue, value);

            invalidateTextLines("content");
            invalidateSize();
            invalidateDisplayList();
        }
    }
    
    //--------------------------------------------------------------------------
    //
    //  Overridden methods: GraphicElement
    //
    //--------------------------------------------------------------------------

    /**
     *  @inheritDoc
     */
    override protected function measure():void
    {
        compose(explicitWidth, explicitHeight);

        var bounds:Rectangle = textFlowComposer.bounds;
        measuredWidth = Math.ceil(bounds.width);
        measuredHeight = Math.ceil(bounds.height);
    }
    
    /**
     *  @inheritDoc
     */
    override protected function updateDisplayList(unscaledWidth:Number, 
                                                  unscaledHeight:Number):void
    {
        super.updateDisplayList(unscaledWidth, unscaledHeight);
        
        compose(unscaledWidth, unscaledHeight);
    }

    /**
     *  @inheritDoc
     */
    override public function stylesInitialized():void
    {
        super.stylesInitialized();
