 import flash.events.TimerEvent;
 import flash.net.URLRequest;
 import flash.text.TextFieldType;
+import flash.text.TextLineMetrics;
 import flash.utils.Timer;
 
 import mx.controls.listClasses.*;
+import mx.core.DPIClassification;
 import mx.core.IFlexDisplayObject;
 import mx.core.IVisualElement;
 import mx.core.UIComponentGlobals;

        var labelHeight:Number = 0;
        var messageWidth:Number = 0;
        var messageHeight:Number = 0;
        
        if (labelDisplay)
        {
            // reset text if it was truncated before.
            if (labelDisplay.isTruncated)
                labelDisplay.text = labelText;
            
            labelWidth = getElementPreferredWidth(labelDisplay);
            labelHeight = getElementPreferredHeight(labelDisplay);
        }
        
        if (messageDisplay)
        {
            // now we need to measure messageDisplay's height.  Unfortunately, this is tricky and 
            // is dependent on messageDisplay's width

            // height only takes up what it needs so we can properly place the message
            // and make sure verticalAlign is operating on a correct value.
            labelWidth = Math.max(labelComponentsViewWidth, 0);
			labelHeight = labelTextHeight;

            setElementSize(labelDisplay, labelWidth, labelHeight);
            
            // attempt to truncate text
            labelDisplay.truncateToFit();
        }

        if (hasMessage)
        {
            // handle message
            messageWidth = Math.max(labelComponentsViewWidth, 0);

			messageHeight = messageDisplay.measuredTextSize.y;
            setElementSize(messageDisplay, messageWidth, messageHeight);
            messageHeight = Math.max(0, Math.min(messageHeight, getElementPreferredHeight(messageDisplay)));
            
