      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function get subTextFunction():Function
-    {
-        return _subTextFunction;
-    }
-    
-    /**
-     *  @private
-     */
-    public function set subTextFunction(value:Function):void
-    {
-        if (value == _subTextFunction)
+    public function get messageFunction():Function
+    {
+        return _messageFunction;
+    }
+    
+    /**
+     *  @private
+     */
+    public function set messageFunction(value:Function):void
+    {
+        if (value == _messageFunction)
             return;
         
-        _subTextFunction = value;
-        subTextFieldOrFunctionChanged = true;
+        _messageFunction = value;
+        messageFieldOrFunctionChanged = true;
+        dataChanged = true;
+        
         invalidateProperties(); 
     }
     

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

                
                IFlexDisplayObject(decoratorDisplay).setActualSize(decoratorWidth, decoratorHeight);
                
                // paddingRight from right and center vertically
                IFlexDisplayObject(decoratorDisplay).move(unscaledWidth - paddingRight - decoratorWidth, (viewHeight - decoratorHeight)/2 + paddingTop);
            }
        }

        // Figure out how much space we have for header and message as well as the 
        // starting left position
        var labelComponentsViewWidth:Number = viewWidth - iconWidth - decoratorWidth;
        
        // don't forget the extra gap padding if these elements exist
        if (iconDisplay)
            labelComponentsViewWidth -= getStyle("horizontalGap");
        if (decoratorDisplay)
            labelComponentsViewWidth -= getStyle("horizontalGap");
        
        var labelComponentsX:Number = getStyle("paddingLeft");
        if (iconDisplay)
            labelComponentsX += iconWidth + getStyle("horizontalGap");
        
        // calculte the natural sizes for header and message (if present)
        var headerTextWidth:Number = 0;
        var headerTextHeight:Number = 0;
        var headerLineMetrics:TextLineMetrics;
        
        if (labelDisplay && labelDisplay.text != "")
        {
            labelDisplay.commitStyles();
            headerLineMetrics = measureHeaderText(headerText);
            headerTextWidth = headerLineMetrics.width + UITextField.TEXT_WIDTH_PADDING;
            headerTextHeight = headerLineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;
        }
        
        if (messageDisplay && messageDisplay.text != "")
        {
            messageDisplay.commitStyles();
            // no need to measure the text width and height since the measure function only 
            // take in to account the first line.
        }
        
        // now size and position the elements, 3 different configurations we care about:
        // 1) header and message
        // 2) header only
        // 3) message only
        
        // label display goes on top
        // subtext display goes below
        
        var headerWidth:Number = 0;
        var headerHeight:Number = 0;
        var messageWidth:Number = 0;
        var messageHeight:Number = 0;
        var verticalGap:Number = 0;
        
        if (labelDisplay)
        {
            verticalGap = 0;
            
            // handle labelDisplay.  it can only be 1 line
            
            headerWidth = Math.max(Math.min(labelComponentsViewWidth, headerTextWidth), 0);
            headerHeight = Math.max(Math.min(viewHeight, headerTextHeight), 0);
            
            labelDisplay.width = headerWidth;
            labelDisplay.height = headerHeight;
            
            labelDisplay.x = Math.round(labelComponentsX);
            labelDisplay.y = Math.round(paddingTop);
            
            // reset text if it was truncated before.  then attempt to truncate it
            if (labelDisplay.isTruncated)
                labelDisplay.text = headerText;
            labelDisplay.truncateToFit();
        }
        
        if (messageDisplay)
        {
            // handle message
            // don't use the measured text width or height because that only takes the first line in to account
            messageWidth = Math.max(labelComponentsViewWidth, 0);
            messageHeight = Math.max(viewHeight - headerHeight - verticalGap, 0);
            
            messageDisplay.width = messageWidth;
            messageDisplay.height = messageHeight;
            
            messageDisplay.x = Math.round(labelComponentsX);
            messageDisplay.y = Math.round(paddingTop + headerHeight + verticalGap);
            
            // since it's multi-line, no need to truncate
            //if (messageDisplay.isTruncated)
            //    messageDisplay.text = messageText;
            //messageDisplay.truncateToFit();
        }
    }
    
    //--------------------------------------------------------------------------
    //
    //  Methods: Helper functions for determining styles for header and message
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @private 
     *  Function we pass in to header for it to grab the styles and push 
     *  them in to the TextFormat object used by that MobileTextField.
     */
    private function headerGetStyleFunction(styleProp:String):*
    {
        // grab the header specific styles
        if (!headerStyles)
            headerStyles = styleManager.getStyleDeclaration("." + getStyle("headerStyleName"));
        
        // see if they are in the header styles
        var styleValue:*;
        if (headerStyles)
            styleValue = headerStyles.getStyle(styleProp);
        
        // if they are not there, try grabbing it from this component directly
        if (styleValue === undefined)
            styleValue = getStyle(styleProp);
        
        return styleValue;
    }
    
    /**
     *  @private 
     *  Function we pass in to message for it to grab the styles and push 
     *  them in to the TextFormat object used by that MobileTextField.
     */
    private function messageGetStyleFunction(styleProp:String):*
    {
        // grab the message specific styles
        if (!messageStyles)
            messageStyles = styleManager.getStyleDeclaration("." + getStyle("messageStyleName"));
        
        // see if they are in the message styles
        var styleValue:*;
        if (messageStyles)
            styleValue = messageStyles.getStyle(styleProp);
        
        // if they are not there, try grabbing it from this component directly
        if (styleValue === undefined)
            styleValue = getStyle(styleProp);
        
        return styleValue;
    }
    
    /**
     *  @private 
     *  Function to help figure out the sizes of the header and message.  We cannot use 
     *  UIComponent.measureText() because we are adding a few additional styles 
     *  to it based on headerStyleName and messageStyleName.
     */
    private function measureHeaderText(text:String):TextLineMetrics
    {
        // Copied from UIComponent.measureText()
        cachedHeaderFormat = determineTextFormatWithGetStyleFunction(headerGetStyleFunction, cachedHeaderFormat);
        return cachedHeaderFormat.measureText(text);
    }
    
    /**
     *  @private 
     *  Function to help figure out the sizes of the header and message.  We cannot use 
     *  UIComponent.measureText() because we are adding a few additional styles 
     *  to it based on headerStyleName and messageStyleName.
     */
    private function measureSubTextText(text:String):TextLineMetrics
    {
        // Copied from UIComponent.measureText()
        cachedSubTextFormat = determineTextFormatWithGetStyleFunction(messageGetStyleFunction, cachedSubTextFormat);
        return cachedSubTextFormat.measureText(text);
    }
    
    /**
     *  @private 
     *  Function to help figure out the sizes of the header and message.  We cannot use 
     *  UIComponent.measureText() because we are adding a few additional styles 
     *  to it based on headerStyleName and messageStyleName.
     */
    private function determineTextFormatWithGetStyleFunction(getStyleFunction:Function, cachedTextFormat:UITextFormat):UITextFormat
    {
        // copied and adapted from UIComponent.determineTextFormatFromStyles
        var textFormat:UITextFormat = cachedTextFormat;
        
        if (!textFormat)
        {
            var font:String =
                StringUtil.trimArrayElements(getStyleFunction("fontFamily"), ",");
            textFormat = new UITextFormat(getNonNullSystemManager(), font);
            textFormat.moduleFactory = moduleFactory;
            
            // Not all flex4 textAlign values are valid so convert to a valid one.
            var align:String = getStyleFunction("textAlign");
            if (align == "start") 
                align = TextFormatAlign.LEFT;
            else if (align == "end")
                align = TextFormatAlign.RIGHT;
            textFormat.align = align; 
            textFormat.bold = getStyleFunction("fontWeight") == "bold";
            textFormat.color = enabled ?
                getStyleFunction("color") :
                getStyleFunction("disabledColor");
            textFormat.font = font;
            textFormat.indent = getStyleFunction("textIndex");
            textFormat.italic = getStyleFunction("fontStyle") == "italic";
            textFormat.kerning = getStyleFunction("kerning");
            textFormat.leading = getStyleFunction("leading");
            textFormat.leftMargin = getStyleFunction("paddingLeft"); // FIXME (rfrishbe): should these be in here...?
            textFormat.letterSpacing = getStyleFunction("letterSpacing")
            textFormat.rightMargin = getStyleFunction("paddingRight");
            textFormat.size = getStyleFunction("fontSize");
            textFormat.underline =
                getStyleFunction("textDecoration") == "underline";
            
            textFormat.antiAliasType = getStyleFunction("fontAntiAliasType");
            textFormat.gridFitType = getStyleFunction("fontGridFitType");
            textFormat.sharpness = getStyleFunction("fontSharpness");
            textFormat.thickness = getStyleFunction("fontThickness");
            
            //textFormat.useFTE =
            //    getTextFieldClassName() == "mx.core::UIFTETextField" ||
            //    getTextInputClassName() == "mx.controls::MXFTETextInput";
            
            //if (textFormat.useFTE)
            //{
            //    textFormat.direction = getStyleFunction("direction");
            //    textFormat.locale = getStyleFunction("locale");
            //}
            
            cachedTextFormat = textFormat;
        }
        
        return textFormat;
    }
    
}
