      *  Determines the alignment of the title in the title bar.
      *
      *  @param titleAlign how to align the title.
-	 *
+     *
      *  @param leftOffset how much space to allow on left for corners, etc.
-	 *
+     *
      *  @param rightOffset how much space to allow on right for corners, etc.
-	 *
+     *
      *  @param buttonAlign the way the buttons are aligned
      */
     protected function placeTitle(titleAlign:String,

                addChild(DisplayObject(titleIconObject));
            }
            titleIconChanged = false;
    	}
    }

    /**
     *  @private
     */      		
    override protected function measure():void
    {
    	super.measure();

		titleTextField.validateNow();
		if (titleTextField.textHeight == 0)
		{
			titleTextField.text = " ";
			titleTextField.validateNow();
		}

		measuredHeight = Math.max((titleTextField.textHeight +
						 UITextField.TEXT_HEIGHT_PADDING),
						 Math.max(maximizeButton.measuredHeight,
						 minimizeButton.measuredHeight,
						 closeButton.measuredHeight) + 12);
		measuredWidth = titleTextField.width +
						maximizeButton.measuredWidth +
						minimizeButton.measuredWidth +
						closeButton.measuredWidth;
	 	
		if (titleIconObject)
	 	{
	 		measuredHeight = Math.max(measuredHeight,
									  titleIconObject.height + 1);
	 		measuredWidth += titleIconObject.width;
	 	}
    }

    /**
     *  @private
     */
    override protected function updateDisplayList(unscaledWidth:Number,
												  unscaledHeight:Number):void
    {
    	super.updateDisplayList(unscaledWidth, unscaledHeight);
    	
    	// If window is closed, we need to exit.
        if (window.nativeWindow.closed)
        	return;
			
        var leftOffset:Number = 0;
        var rightOffset:Number = 5;

		// Account for rounded corners.
        var cornerOffset:int = getStyle("cornerRadius") / 2;
    	
		// Position the titleBarBackground within the titleBar.
        if (titleBarBackground)
        {
            titleBarBackground.move(0, 0);
            IFlexDisplayObject(titleBarBackground).setActualSize(
				unscaledWidth, unscaledHeight);
        }

        // Position the titleIconObject

     */
    override protected function commitProperties():void
    {
        super.commitProperties();

        if (titleChanged)
        {
            titleTextField.text = _title;
            titleChanged = false;   
        }

        if (titleIconChanged)
        {
            if (titleIconObject)
            {
                removeChild(DisplayObject(titleIconObject));
                titleIconObject = null;
