Transferred from the Adobe Open Source Subversion Repository

Revision: 4420
Author:   cframpto@adobe.com
Date:     2009-01-07T12:17:17.932609Z

Log Message:
-----------
18072 – tell the TextView when it loses focus so selections are handled properly (add focusInHandler and modified focusOutHandler)
17926 – if text changed to displayAsPassword, the scroll position should be maintained (don’t create new controller unless text/content changed)
16010 – change event generated when text hasn’t changed (backspace at beginning of container generates 0-length selection probably so it can go to the previous container if there are multiple ones)
16364 – appendText (make sure pending changes to text/content are commited in both FxTextBase and TextView before appending text directly into the text flow).  Also do the same fix for insertText.

QE Notes:
Doc Notes: None
Bugs: SDK-18072, SDK-17926, SDK-16010, SDK-16364
Reviewer: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280048 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -205,6 +205,7 @@

         mx_internal::undoManager.undoAndRedoItemLimit = int.MAX_VALUE;

+        addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
         addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
     }

@@ -1164,36 +1165,49 @@

         var flowComposer:IFlowComposer;

+        // Since the edit manager is cached, make sure to apply any
+        // selection format changes.
+        if (selectionFormatsChanged)
+        {
+            setSelectionFormats(_editManager);
+            selectionFormatsChanged = false;
+        }
+
         // Regenerate TextLines if necessary.
         if (textChanged || contentChanged ||
             stylesChanged || displayAsPasswordChanged)
         {
-            // Eliminate detritus from the previous TextFlow.
-            if (textFlow && textFlow.flowComposer &&
-                textFlow.flowComposer.numControllers)
-            {
-                textFlow.flowComposer.removeControllerAt(0);
-            }
-
-            // If the text was changed, clear the selection.
             if (textChanged || contentChanged)
+            {
+                // Eliminate detritus from the previous TextFlow only if
+                // the text/content has changed. Want to preserve scrolling
+                // position if text changes to displayAsPassword or back to
+                // plaintext.
+                if (textFlow.flowComposer)
+                    textFlow.flowComposer.removeAllControllers();
+
+                // Clear the selection.
                 if (textFlow.interactionManager)
                     textFlow.interactionManager.setSelection(-1, -1);
-
-            // Create a new TextFlow for the current text.
+            }
+
+            // Create/modify TextFlow for the current text.
             _content = textFlow = createTextFlow();

             // Tell it where to create its TextLines.
-            flowComposer = new StandardFlowComposer();
-            flowComposer.addController(
-                new DisplayObjectContainerController(this));
-            textFlow.flowComposer = flowComposer;
-
+            if (textChanged || contentChanged)
+            {
+                flowComposer = new StandardFlowComposer();
+                flowComposer.addControllerAt(
+                    new DisplayObjectContainerController(this), 0);
+                textFlow.flowComposer = flowComposer;
+            }
+
             setInteractionManager(textFlow);

-            // Listen to events from the TextFlow and its EditManager.
+            // Listen to events from the TextFlow and its SelectionManager.
             addListeners(textFlow);
-
+
             textChanged = false;
             contentChanged = false;
             stylesChanged = false;
@@ -1203,8 +1217,7 @@
             editableChanged = false;
             selectableChanged = false;
         }
-        else if (enabledChanged || editableChanged || selectableChanged ||
-                    selectionFormatsChanged)
+        else if (enabledChanged || editableChanged || selectableChanged)
         {
             setInteractionManager(textFlow);

@@ -1495,8 +1508,11 @@
      *  Initialize the ISelectionManager with the selection style vlaues.
      *  This should be kept in sync with isSelectionFormat().
      */
-    private function setSelectionFormats(instanceManager:ISelectionManager):void
+    private function setSelectionFormats(interactionManager:ISelectionManager):void
     {
+        if (!interactionManager)
+            return;
+
         var selectionColor:* = getStyle("selectionColor");
         var unfocusedAlpha:Number =
             selectionVisibility != TextSelectionVisibility.WHEN_FOCUSED ?
@@ -1504,78 +1520,63 @@
         var inactiveAlpha:Number =
             selectionVisibility == TextSelectionVisibility.ALWAYS ?
             1.0 : 0.0;
-        instanceManager.focusSelectionFormat = new SelectionFormat(
+        interactionManager.focusSelectionFormat = new SelectionFormat(
             selectionColor, 1.0, BlendMode.NORMAL);
-        instanceManager.noFocusSelectionFormat = new SelectionFormat(
+        interactionManager.noFocusSelectionFormat = new SelectionFormat(
             getStyle("unfocusedSelectionColor"), unfocusedAlpha,
             BlendMode.NORMAL);
-        instanceManager.inactiveSelectionFormat = new SelectionFormat(
+        interactionManager.inactiveSelectionFormat = new SelectionFormat(
             getStyle("inactiveSelectionColor"), inactiveAlpha,
-            BlendMode.NORMAL);
-    }
-
-    /**
-     *  @private
-     *  Persist the edit manager.
+            BlendMode.NORMAL);
+    }
+
+    /**
+     *  @private
+     *  Persist the edit manager so selection formatting can be maintained.
      */
     private var _editManager:TextViewEditManager = null;

     /**
      *  @private
+     *  Cache the edit manager.  Any formats set on the selection need to
+     *  be maintained if/when the interaction manager is swapped out and
+     *  back in again.
      */
     private function get editManager():TextViewEditManager
     {
-        // Since this is cached, have to be careful to update the
-        // selection formats if they change.
         if (_editManager == null)
         {
             _editManager = new TextViewEditManager(mx_internal::undoManager);
-            selectionFormatsChanged = true;
-        }
-
-        if (selectionFormatsChanged)
-        {
             setSelectionFormats(_editManager);
-            selectionFormatsChanged = false;
-        }
-
+        }
+
         return _editManager;
     }

     /**
      *  @private
-     *  Create a new selection manager.  The initial selection is -1, -1.
-     */
-    private function get selectionManager():ISelectionManager
-    {
-        var selectionManager:ISelectionManager = new SelectionManager();
-        setSelectionFormats(selectionManager);
-        return selectionManager;
-    }
-
-    /**
-     *  @private
-     */
-    private function setInteractionManager(textFlow:TextFlow):void
+     */
+    private function setInteractionManager(textFlow:TextFlow,
+                                           updateDisplay:Boolean=false):void
     {
         if (enabled)
         {
             if (_editable)
             {
                 // Give it an EditManager to make it editable. Editable implies selectable.
-                switchInteractionManager(textFlow, editManager);
+                switchToEditingMode(textFlow, EditingMode.READ_WRITE, updateDisplay);
                 return;
             }
             else if (_selectable)
             {
                 // Give it a SelectionManager to enable selection for cut/paste.
-                switchInteractionManager(textFlow, selectionManager);
+                switchToEditingMode(textFlow, EditingMode.READ_SELECT, updateDisplay);
                 return;
             }
         }

         // Not enabled or enabled and neither editable nor selectable.
-        switchInteractionManager(textFlow, null);
+        switchToEditingMode(textFlow, EditingMode.READ_ONLY, updateDisplay);
     }

     /**
@@ -1609,16 +1610,16 @@
      *  is changed, it will cause a selection change event and the selection
      *  will be cleared.  The selection then needs to be reset to maintain it
      *  across interaction managers.
-     */
-    private function switchInteractionManager(
+     */
+    private function switchToEditingMode(
                                 textFlow:TextFlow,
-                                selectionManager:ISelectionManager):void
+                                editingMode:String,
+                                updateContainers:Boolean=true):void
     {
         // Nothing to switch.  The current manager will work.
-        if (getEditingMode(textFlow.interactionManager) ==
-                getEditingMode(selectionManager))
+        if (getEditingMode(textFlow.interactionManager) == editingMode)
             return;
-
+
         // Save the current selection since switching the interaction
         // manager will clear the selection.
         if (textFlow.interactionManager != null)
@@ -1627,8 +1628,23 @@
             _priorSelectionActivePosition = textFlow.interactionManager.activePosition;
         }

+        var interactionManager:ISelectionManager;
+        if (editingMode == EditingMode.READ_WRITE)
+        {
+            interactionManager = editManager;
+        }
+        else if (editingMode == EditingMode.READ_SELECT)
+        {
+            interactionManager = new SelectionManager();
+            setSelectionFormats(interactionManager);
+        }
+        else // EditingMode.READ_ONLY
+        {
+            interactionManager = null;
+        }
+
         // Swap in a new manager.
-        textFlow.interactionManager = selectionManager;
+        textFlow.interactionManager = interactionManager;

         // Restore the prior selection in the new selection manager.
         if (textFlow.interactionManager != null)
@@ -1637,12 +1653,11 @@
                         _priorSelectionAnchorPosition,
                         _priorSelectionActivePosition);
         }
-
-        // ToDo: don't think this is really needed
-        textFlow.flowComposer.updateAllContainers();
-
-    }
-
+
+        if (updateContainers)
+            textFlow.flowComposer.updateAllContainers();
+    }
+
     /**
      *  @private
      */
@@ -1676,7 +1691,7 @@
     {
         if (getEditingMode(textFlow.interactionManager) == EditingMode.READ_ONLY)
         {
-            switchInteractionManager(textFlow, selectionManager);
+            switchToEditingMode(textFlow, EditingMode.READ_SELECT, false);
             _selectable = true;
         }

@@ -1692,18 +1707,23 @@
      */
     public function insertText(text:String):void
     {
+        // Make sure all properties are committed before doing the insert.
+        validateNow();
+
         // Always use the EditManager regardless of the values of
         // selectable, editable and enabled.
-        var priorManager:ISelectionManager = textFlow.interactionManager;
-        switchInteractionManager(textFlow, editManager);
+        var priorEditingMode:String = getEditingMode(textFlow.interactionManager);
+        switchToEditingMode(textFlow, EditingMode.READ_WRITE);

         // This does nothing if there is not an insertion point, ie
         // there is no selection.
         EditManager(textFlow.interactionManager).insertText(text);
+
+        // Update TLF display.  This initiates the InsertTextOperation.
         textFlow.flowComposer.updateAllContainers();

-        // Restore the prior manager if it wasn't an EditManager.
-        switchInteractionManager(textFlow, priorManager);
+        // Restore the prior editing mode.
+        switchToEditingMode(textFlow, priorEditingMode);
     }

     /**
@@ -1715,17 +1735,20 @@
      */
     public function appendText(text:String):void
     {
+        // Make sure all properties are committed before doing the append.
+        validateNow();
+
         // Always use the EditManager regardless of the values of
         // selectable, editable and enabled.
-        var priorManager:ISelectionManager = textFlow.interactionManager;
-        switchInteractionManager(textFlow, editManager);
-
+        var priorEditingMode:String = getEditingMode(textFlow.interactionManager);
+        switchToEditingMode(textFlow, EditingMode.READ_WRITE);
+
+        // An append is an insert with the selection set to the end.
         textFlow.interactionManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
-        EditManager(textFlow.interactionManager).insertText(text);
-        textFlow.flowComposer.updateAllContainers();
-
-        // Restore the prior manager if it wasn't an EditManager.
-        switchInteractionManager(textFlow, priorManager);
+        insertText(text);
+
+        // Restore the prior editing mode.
+        switchToEditingMode(textFlow, priorEditingMode);
     }

     /**
@@ -1758,8 +1781,8 @@
     public function getSelectionFormat(names:Array = null):Object
     {
         // Switch to the EditManager.
-        var priorManager:ISelectionManager = textFlow.interactionManager;
-        switchInteractionManager(textFlow, editManager);
+        var priorEditingMode:String = getEditingMode(textFlow.interactionManager);
+        switchToEditingMode(textFlow, EditingMode.READ_WRITE);
         var selectionManager:ISelectionManager = textFlow.interactionManager;

         var p:String;
@@ -1828,8 +1851,8 @@
                 format[p] = characterFormat[p];
         }

-        // Restore the prior manager.
-        switchInteractionManager(textFlow, priorManager);
+        // Restore the prior editing mode.
+        switchToEditingMode(textFlow, priorEditingMode);

         return format;
     }
@@ -1875,15 +1898,15 @@
             }
         }

-        var priorManager:ISelectionManager = textFlow.interactionManager;
-        switchInteractionManager(textFlow, editManager);
+        var priorEditingMode:String = getEditingMode(textFlow.interactionManager);
+        switchToEditingMode(textFlow, EditingMode.READ_WRITE);

         // Apply the format to the current selection.
         EditManager(textFlow.interactionManager).applyFormat(
                         characterFormat, paragraphFormat, containerFormat);

-        // Restore the prior manager if it wasn't an EditManager.
-        switchInteractionManager(textFlow, priorManager);
+        // Restore the prior editing mode.
+        switchToEditingMode(textFlow, priorEditingMode);
     }

     //--------------------------------------------------------------------------
@@ -1895,11 +1918,25 @@
     /**
      *  @private
      */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        // When gaining focus, show the selection.  Uses the SelectionFormat
+        // values defined by the SelectionManager.
+        textFlow.flowComposer.showSelection();
+    }
+
+    /**
+     *  @private
+     */
     override protected function focusOutHandler(event:FocusEvent):void
     {
         // By default, we clear the undo history when a TextView loses focus.
         if (mx_internal::clearUndoOnFocusOut)
             mx_internal::undoManager.clear();
+
+        // When losing focus, hide the selection.  Uses the SelectionFormat
+        // values defined by the SelectionManager.
+        textFlow.flowComposer.hideSelection();
     }

     //--------------------------------------------------------------------------
@@ -1916,6 +1953,8 @@
     private function textFlow_compositionCompleteHandler(
                                     event:CompositionCompletionEvent):void
     {
+        //trace("compositionComplete");
+
         var containerController:IContainerController =
             textFlow.flowComposer.getControllerAt(0);

@@ -2056,6 +2095,15 @@
         {
             var flowTextOperation:FlowTextOperation =
                 FlowTextOperation(op);
+
+            // Eat 0-length selection.  This can happen when insertion point is
+            // at start of container and a backspace generates a
+            // DeleteTextOperation.
+            if (flowTextOperation.absoluteStart == 0 && flowTextOperation.absoluteEnd == 0)
+            {
+                event.preventDefault();
+                return;
+            }

             if (displayAsPassword)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1253024 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/chartClasses/DateRangeUtilities.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/DateRangeUtilities.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.charts.chartClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273857 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/management/MBeanConstructorInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/management/MBeanConstructorInfo.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.messaging.management
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20149
Author:   klin@adobe.com
Date:     2011-02-04T21:39:31.000080Z

Log Message:
-----------
Add and update [Inspectable] metadata across spark components.

QE notes: No
Doc notes: No
Bugs: SDK-28942
Reviewer: Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/TileGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/DropDownListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBarBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ToggleButtonBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282961 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SliderBase.as
@@ -296,7 +296,9 @@
     //---------------------------------
     //  maximum
     //---------------------------------
-
+
+    [Inspectable(category="General", defaultValue="10.0")]
+
     /**
      *  Number which represents the maximum value possible for
      *  value. If the values for either
@@ -377,7 +379,7 @@
     //  dataTipPrecision
     //---------------------------------

-    [Inspectable(minValue="0")]
+    [Inspectable(defaultValue="2", minValue="0")]

     /**
      *  Number of decimal places to use for the data tip text.


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290354 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.as
@@ -0,0 +1,1958 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.advancedDataGridClasses
+{
+
+import flash.display.DisplayObject;
+import flash.events.Event;
+
+import mx.controls.AdvancedDataGridBaseEx;
+import mx.controls.TextInput;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.core.ClassFactory;
+import mx.core.ContextualClassFactory;
+import mx.core.IEmbeddedFontRegistry;
+import mx.core.IFactory;
+import mx.core.IFlexModuleFactory;
+import mx.core.IIMESupport;
+import mx.core.Singleton;
+import mx.core.mx_internal;
+import mx.formatters.Formatter;
+import mx.styles.CSSStyleDeclaration;
+import mx.utils.StringUtil;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../../styles/metadata/TextStyles.as";
+
+/**
+ *  The background color of the column.
+ *  The default value is undefined, which means it uses the value of the
+ *  backgroundColor style of the associated AdvancedDataGrid control.
+ *  The default value for the AdvancedDataGrid control is 0xFFFFFF.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="backgroundColor", type="uint", format="Color", inherit="no")]
+
+/**
+ *  The name of a CSS style declaration for controlling other aspects of
+ *  the appearance of the column headers.
+ *  The default value is undefined, which means it uses the value of the
+ *  headerStyleName style of the associated AdvancedDataGrid control.
+ *  The default value for the AdvancedDataGrid control is
+ *  ".advancedDataGridStyles".
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="headerStyleName", type="String", inherit="no")]
+
+/**
+ *  The number of pixels between the container's left border and its content
+ *  area.
+ *  There is no default value for this style.
+ *  An item renderer's setting of the paddingLeft property
+ *  is used to determine the default.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="paddingLeft", type="Number", format="Length", inherit="no")]
+
+/**
+ *  The number of pixels between the container's right border and its content
+ *  area.
+ *  There is no default value for this style.
+ *  An item renderer's setting of the paddingRight property
+ *  is used to determine the default.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="paddingRight", type="Number", format="Length", inherit="no")]
+
+/**
+ *  The AdvancedDataGridColumn class describes a column in an AdvancedDataGrid control.
+ *  There is one AdvancedDataGridColumn per displayable column, even if a column
+ *  is hidden or off-screen.
+ *  The data provider items of an AdvancedDataGrid control
+ *  can contain properties that are not displayed,
+ *  and therefore, do not need an AdvancedDataGridColumn.
+ *  An AdvancedDataGridColumn allows specification of the color and font of the text
+ *  in a column; specification of what kind of component displays the data for the column;
+ *  specification of whether the column is editable, sortable, or resizeable;
+ *  and specification of the text for the column header.
+ *
+ *
Notes:

+ *
An AdvancedDataGridColumn only holds information about a column;
+ *  it is not the parent of the item renderers in the column.

+ *
If you specify an AdvancedDataGridColumn class without a dataField
+ *  property, you must specify a sortCompareFunction
+ *  property. Otherwise, sort operations may cause run-time errors.

+ *

+ *
+ *  @mxml
+ *
+ *
You use the <mx.AdvancedDataGridcolumn> tag to configure a column
+ *  of a AdvancedDataGrid control.
+ *  You specify the <mx.AdvancedDataGridcolumn> tag as a child
+ *  of the columns property in MXML.
+ *  The <mx.AdvancedDataGridcolumn> tag inherits all of the
+ *  tag attributes of its superclass, and adds the following tag attributes:

+ *
+ *

+ *  <mx:AdvancedDataGridColumn
+ *  Properties
+ *    dataField="No default"
+ *    dataTipField="No default"
+ *    dataTipFunction="No default"
+ *    editable="true|false"
+ *    editorDataField="text"
+ *    editorHeightOffset="0"
+ *    editorUsesEnterKey="false|true"
+ *    editorWidthOffset="0"
+ *    editorXOffset="0"
+ *    editorYOffset="0"
+ *    formatter="null"
+ *    headerRenderer="AdvancedDataGridHeaderRenderer"
+ *    headerText="No default"
+ *    headerWordWrap="undefined"
+ *    imeMode="null"
+ *    itemEditor="TextInput"
+ *    itemRenderer="AdvancedDataGridItemRenderer"
+ *    labelFunction="No default"
+ *    minWidth="20"
+ *    rendererIsEditor="false|true"
+ *    resizable="true|false"
+ *    showDataTips="false|true"
+ *    sortable="true|false"
+ *    sortCompareFunction="No default"
+ *    sortDescending="false|true"
+ *    styleFunction="No default"
+ *    visible="true|false"
+ *    width="100"
+ *    wordWrap="false|true"
+ *
+ *  Styles
+ *    backgroundColor="0xFFFFFF"
+ *    color="No default."
+ *    disabledColor="0xAAB3B3"
+ *    fontAntiAliasType="advanced"
+ *    fontFamily="No default"
+ *    fontGridFitType="pixel"
+ *    fontSharpness="0"
+ *    fontSize="No default"
+ *    fontStyle="normal|italic"
+ *    fontThickness="0"
+ *    fontWeight="normal|bold"
+ *    headerStyleName="No default"
+ *    kerning="false|true"
+ *    letterSpacing="0"
+ *    paddingLeft="0"
+ *    paddingRight="0"
+ *    textAlign="right|center|left"
+ *    textDecoration="none|underline"
+ *    textIndent="0"
+ *  />
+ *

+ *
+ *  @see mx.controls.AdvancedDataGrid
+ *
+ *  @see mx.styles.CSSStyleDeclaration
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class AdvancedDataGridColumn extends CSSStyleDeclaration implements IIMESupport
+{
+    include "../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+    //----------------------------------
+    //  embeddedFontRegistry
+    //----------------------------------
+
+    private static var noEmbeddedFonts:Boolean;
+
+    /**
+     *  @private
+     *  Storage for the embeddedFontRegistry property.
+     *  This gets initialized on first access,
+     *  not at static initialization time, in order to ensure
+     *  that the Singleton registry has already been initialized.
+     */
+    private static var _embeddedFontRegistry:IEmbeddedFontRegistry;
+
+    /**
+     *  @private
+     *  A reference to the embedded font registry.
+     *  Single registry in the system.
+     *  Used to look up the moduleFactory of a font.
+    */
+    private static function get embeddedFontRegistry():IEmbeddedFontRegistry
+    {
+        if (!_embeddedFontRegistry && !noEmbeddedFonts)
+        {
+            try
+            {
+                _embeddedFontRegistry = IEmbeddedFontRegistry(
+                    Singleton.getInstance("mx.core::IEmbeddedFontRegistry"));
+            }
+            catch (e:Error)
+            {
+                noEmbeddedFonts = true;
+            }
+        }
+
+        return _embeddedFontRegistry;
+    }
+
+    private static var _defaultItemEditorFactory:IFactory;
+
+    mx_internal static function get defaultItemEditorFactory():IFactory
+    {
+        if (!_defaultItemEditorFactory)
+            _defaultItemEditorFactory = new ClassFactory(TextInput);
+        return _defaultItemEditorFactory;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param columnName The name of the field in the data provider
+     *  associated with the column, and the text for the header cell of this
+     *  column.  This is equivalent to setting the dataField
+     *  and headerText properties.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function AdvancedDataGridColumn(columnName:String = null)
+    {
+        super();
+
+        if (columnName)
+        {
+            dataField = columnName;
+            headerText = columnName;
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The AdvancedDataGrid that owns this column.
+     */
+    mx_internal var owner:AdvancedDataGridBaseEx;
+
+    /**
+     *  @private
+     */
+    mx_internal var explicitWidth:Number;
+
+    /**
+     *  @private
+     * Holds the last recorded value of the module factory used to create the font.
+     */
+    private var oldEmbeddedFontContext:IFlexModuleFactory = null;
+
+    /**
+     *  @private
+     *
+     *  true if font properties do not need to be set.
+     */
+    private var fontPropertiesSet:Boolean = false;
+
+    /**
+     *  @private
+     * True if createInFontContext has been called.
+     */
+    private var hasFontContextBeenSaved:Boolean = false;
+
+    /**
+     *  @private
+     *  The zero-based index of this column as it is displayed in the grid.
+     *  It is not related to the structure of the data being displayed.
+     *  In MXML, the default order of the columns is the order of the
+     *  mx:AdvancedDataGridColumn tags.
+     */
+    mx_internal var colNum:Number;
+
+    // preferred width is the number we should use when measuring
+    // regular width will be changed if we shrink columns to fit.
+    mx_internal var preferredWidth:Number = 100;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  sortDescending
+    //----------------------------------
+
+    /**
+     *  Indicates whether the column sort is
+     *  in ascending order, false,
+     *  or descending order, true.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var sortDescending:Boolean = false;
+
+    //----------------------------------
+    //  itemRenderer
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the itemRenderer property.
+     */
+    private var _itemRenderer:IFactory;
+
+    [Bindable("itemRendererChanged")]
+    [Inspectable(category="Other")]
+
+    /**
+     *  The class factory for item renderer instances that display the
+     *  data for each item in the column.
+     *  You can specify a drop-in item renderer,
+     *  an inline item renderer, or a custom item renderer component as the
+     *  value of this property.
+     *
+     *
The default item renderer is the AdvancedDataGridItemRenderer class,
+     *  which displays the item data as text.

+     *
+     *  @see mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get itemRenderer():IFactory
+    {
+        return _itemRenderer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set itemRenderer(value:IFactory):void
+    {
+        _itemRenderer = value;
+
+        // this is expensive... but unless set after init (not recommended), ok.
+        if (owner)
+        {
+            owner.invalidateList();
+            owner.columnRendererChanged(this);
+        }
+
+        dispatchEvent(new Event("itemRendererChanged"));
+    }
+
+    //----------------------------------
+    //  dataField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataField property.
+     */
+    private var _dataField:String;
+
+    [Bindable("dataFieldChanged")]
+    [Inspectable(category="General", defaultValue="")]
+
+    /**
+     *  The name of the field or property in the data provider item associated
+     *  with the column.
+     *  Each AdvancedDataGridColumn control
+     *  requires this property and/or the labelFunction property
+     *  to be set in order to calculate the displayable text for the item
+     *  renderer.
+     *  If the dataField
+     *  and labelFunction properties are set,
+     *  the data is displayed using the labelFunction and sorted
+     *  using the dataField.  If the property named in the
+     *  dataField does not exist, the
+     *  sortCompareFunction must be set for the sort to work
+     *  correctly.
+     *
+     *
This value of this property is not necessarily the String that
+     *  is displayed in the column header.  This property is
+     *  used only to access the data in the data provider.
+     *  For more information, see the headerText property.

+     *
+     *  @see #headerText
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataField():String
+    {
+        return _dataField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataField(value:String):void
+    {
+        _dataField = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+
+        dispatchEvent(new Event("dataFieldChanged"));
+    }
+
+    //----------------------------------
+    //  dataTipField
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataTipField property.
+     */
+    private var _dataTipField:String;
+
+    [Bindable("dataTipFieldChanged")]
+    [Inspectable(category="Advanced", defaultValue="label")]
+
+    /**
+     *  The name of the field in the data provider to display as the data tip.
+     *  By default, the AdvancedDataGrid control looks for a property named
+     *  label on each data provider item and displays it.
+     *  However, if the data provider does not contain a label
+     *  property, you can set the dataTipField property to
+     *  specify a different property.
+     *  For example, you could set the value to "FullName" when a user views a
+     *  set of people's names included from a database.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataTipField():String
+    {
+        return _dataTipField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataTipField(value:String):void
+    {
+        _dataTipField = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+
+        dispatchEvent(new Event("dataTipChanged"));
+    }
+
+    //----------------------------------
+    //  dataTipFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the dataTipFunction property.
+     */
+    private var _dataTipFunction:Function;
+
+    [Bindable("dataTipFunctionChanged")]
+    [Inspectable(category="Advanced")]
+
+    /**
+     *  Specifies a callback function to run on each item of the data provider
+     *  to determine its data tip.
+     *  This property is used by the itemToDataTip() method.
+     *
+     *
By default, the control looks for a property named label
+     *  on each data provider item and displays it as its dataTip.
+     *  However, some data providers do not have a label property
+     *  or another property that you can use for displaying data
+     *  in the rows.
+     *  For example, you might have a data provider that contains a lastName
+     *  and firstName fields, but you want to display full names as the dataTip.
+     *  You can specify a function to the dataTipFunction property
+     *  that returns a single String containing the value of both fields. You
+     *  can also use the dataTipFunction property for handling
+     *  formatting and localization.

+     *
+     *
The function must take a single Object parameter, and return a String.
+     *  For the header cell of a column, the Object parameter is of type AdvancedDataGridColumn.
+     *  For table cells, the Object parameter contains the data provider element for the cell.

+     *
+     *
Shown below is an example implementation of the function.
+     *  For the header cell, return "Column Name".
+     *  For the table cells, return the name property of the Object:

+     *

+     *  private function tipFunc(value:Object):String
+     *  {
+     *      if (value is AdvancedDataGridColumn)
+     *          return "Column Name";
+     *
+     *      // Use the 'name' property of the data provider element.
+     *      return "Name: " + value["name"];
+     *  }

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get dataTipFunction():Function
+    {
+        return _dataTipFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set dataTipFunction(value:Function):void
+    {
+        _dataTipFunction = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+
+        dispatchEvent(new Event("labelFunctionChanged"));
+    }
+
+    //----------------------------------
+    //  draggable
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  A flag that indicates whether the user is allowed to drag
+     *  the column to a new position
+     *  If true, the user can drag the
+     *  the column headers to a new position
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var draggable:Boolean = true;
+
+    //----------------------------------
+    //  editable
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  A flag that indicates whether the items in the column are editable.
+     *  If true, and the AdvancedDataGrid's editable
+     *  property is also true, the items in a column are
+     *  editable and can be individually edited
+     *  by clicking an item or by navigating to the item with the
+     *  Tab and Arrow keys.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editable:Boolean = true;
+
+    //----------------------------------
+    //  itemEditor
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  A class factory for the instances of the item editor to use for the
+     *  column, when it is editable.
+     *
+     *
The default value is the mx.controls.TextInput control.

+     *
+     *  @see mx.controls.TextInput
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var itemEditor:IFactory = defaultItemEditorFactory;
+
+    //----------------------------------
+    //  editorDataField
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The name of the property of the item editor that contains the new
+     *  data for the list item.
+     *  For example, the default itemEditor is
+     *  TextInput, so the default value of the editorDataField
+     *  property is "text", which specifies the
+     *  text property of the TextInput control.
+     *
+     *  @default "text"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorDataField:String = "text";
+
+    //----------------------------------
+    //  editorHeightOffset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  The height of the item editor, in pixels, relative to the size of the
+     *  item renderer.  This property can be used to make the editor overlap
+     *  the item renderer by a few pixels to compensate for a border around the
+     *  editor.
+     *  Note that changing these values while the editor is displayed
+     *  will have no effect on the current editor, but will affect the next
+     *  item renderer that opens an editor.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorHeightOffset:Number = 0;
+
+    //----------------------------------
+    //  editorWidthOffset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  The width of the item editor, in pixels, relative to the size of the
+     *  item renderer.  This property can be used to make the editor overlap
+     *  the item renderer by a few pixels to compensate for a border around the
+     *  editor.
+     *  Note that changing these values while the editor is displayed
+     *  will have no effect on the current editor, but will affect the next
+     *  item renderer that opens an editor.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorWidthOffset:Number = 0;
+
+    //----------------------------------
+    //  editorXOffset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  The x location of the upper-left corner of the item editor,
+     *  in pixels, relative to the upper-left corner of the item.
+     *  This property can be used to make the editor overlap
+     *  the item renderer by a few pixels to compensate for a border around the
+     *  editor.
+     *  Note that changing these values while the editor is displayed
+     *  will have no effect on the current editor, but will affect the next
+     *  item renderer that opens an editor.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorXOffset:Number = 0;
+
+    //----------------------------------
+    //  editorYOffset
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="0")]
+
+    /**
+     *  The y location of the upper-left corner of the item editor,
+     *  in pixels, relative to the upper-left corner of the item.
+     *  This property can be used to make the editor overlap
+     *  the item renderer by a few pixels to compensate for a border around the
+     *  editor.
+     *  Note that changing these values while the editor is displayed
+     *  will have no effect on the current editor, but will affect the next
+     *  item renderer that opens an editor.
+     *
+     *  @default 0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorYOffset:Number = 0;
+
+    //----------------------------------
+    //  editorUsesEnterKey
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  A flag that indicates whether the item editor uses Enter key.
+     *  If true the item editor uses the Enter key and the
+     *  AdvancedDataGrid will not look for the Enter key and move the editor in
+     *  response.
+     *  Note that changing this value while the editor is displayed
+     *  will have no effect on the current editor, but will affect the next
+     *  item renderer that opens an editor.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var editorUsesEnterKey:Boolean = false;
+
+    //----------------------------------
+    //  headerRenderer
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the headerRenderer property.
+     */
+    private var _headerRenderer:IFactory;
+
+    [Bindable("headerRendererChanged")]
+    [Inspectable(category="Other")]
+
+    /**
+     *  The class factory for item renderer instances that display the
+     *  column header for the column.
+     *  You can specify a drop-in item renderer,
+     *  an inline item renderer, or a custom item renderer component as the
+     *  value of this property.
+     *
+     *
The default item renderer is the AdvancedDataGridItemRenderer class,
+     *  which displays the item data as text.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get headerRenderer():IFactory
+    {
+        return _headerRenderer;
+    }
+
+    /**
+     *  @private
+     */
+    public function set headerRenderer(value:IFactory):void
+    {
+        _headerRenderer = value;
+
+        // rebuild the headers
+        if (owner)
+        {
+            owner.invalidateList();
+            owner.columnRendererChanged(this);
+        }
+
+        dispatchEvent(new Event("headerRendererChanged"));
+    }
+
+    //----------------------------------
+    //  headerText
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the headerText property.
+     */
+    private var _headerText:String;
+
+    [Bindable("headerTextChanged")]
+    [Inspectable(category="General")]
+
+    /**
+     *  Text for the header of this column. By default, the AdvancedDataGrid
+     *  control uses the value of the dataField property
+     *  as the header text.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get headerText():String
+    {
+        return (_headerText != null) ? _headerText : dataField;
+    }
+
+    /**
+     *  @private
+     */
+    public function set headerText(value:String):void
+    {
+        _headerText = value;
+
+        if (owner)
+            owner.invalidateList();
+
+        dispatchEvent(new Event("headerTextChanged"));
+    }
+
+    //----------------------------------
+    //  headerWordWrap
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the headerWordWrap property.
+     */
+    private var _headerWordWrap:*;
+
+    [Inspectable(category="Advanced")]
+
+    /**
+     *  Set to true to wrap the text in the column header
+     *  if it does not fit on one line.
+     *  If undefined, the AdvancedDataGrid control's wordWrap property
+     *  is used.
+     *  This property overrides the headerWordWrap property of
+     *  the AdvancedDataGrid control.
+     *
+     *  @default undefined
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get headerWordWrap():*
+    {
+        return _headerWordWrap;
+    }
+
+    /**
+     *  @private
+     */
+    public function set headerWordWrap(value:*):void
+    {
+        _headerWordWrap = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+    }
+
+    //----------------------------------
+    //  enableIME
+    //----------------------------------
+
+    /**
+     *  A flag that indicates whether the IME should
+     *  be enabled when the component receives focus.
+     *
+     *  If an editor is up, it will set enableIME
+     *  accordingly.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get enableIME():Boolean
+    {
+        return false;
+    }
+
+    //----------------------------------
+    //  imeMode
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the imeMode property.
+     */
+    private var _imeMode:String;
+
+    [Inspectable(category="Other")]
+
+    /**
+     *  Specifies the IME (input method editor) mode.
+     *  The IME mode enables users to enter text in Chinese, Japanese, and Korean.
+     *  Flex sets the IME mode when the itemFocusIn event occurs,
+     *  and sets it back
+     *  to the previous value when the itemFocusOut event occurs.
+     *  The flash.system.IMEConversionMode class defines constants for
+     *  the valid values for this property.
+     *
+     *
The default value is null, in which case it uses the value of the
+     *  AdvancedDataGrid control's imeMode property.

+     *
+     *  @see flash.system.IMEConversionMode
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get imeMode():String
+    {
+        return _imeMode;
+    }
+
+    /**
+     *  @private
+     */
+    public function set imeMode(value:String):void
+    {
+        _imeMode = value;
+    }
+
+    //----------------------------------
+    //  rendererIsEditor
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="false")]
+
+    /**
+     *  A flag that indicates that the item renderer is also an item editor.
+     *  If this property is true, Flex
+     *  ignores the itemEditor property and uses the item
+     *  renderer for that item as the editor.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var rendererIsEditor:Boolean = false;
+
+    //----------------------------------
+    //  labelFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the labelFunction property.
+     */
+    private var _labelFunction:Function;
+
+    [Bindable("labelFunctionChanged")]
+    [Inspectable(category="Other")]
+
+    /**
+     *  A function that determines the text to display in this column.  By default,
+     *  the column displays the text for the field in the data that matches the
+     *  column name.  However, sometimes you want to display text based on
+     *  more than one field in the data, or display something that does not
+     *  have the format that you want.
+     *  In such a case, you specify a callback function using labelFunction.
+     *
+     *
For the AdvancedDataGrid control, the method signature has the following form:

+     *
+     *
labelFunction(item:Object, column:AdvancedDataGridColumn):String

+     *
+     *
where item contains the AdvancedDataGrid item object, and
+     *  column specifies the AdvancedDataGrid column.

+     *
+     *
A callback function might concatenate the firstName and
+     *  lastName fields in the data, or do some custom formatting on a Date,
+     *  or convert a number for the month into the string for the month.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get labelFunction():Function
+    {
+        return _labelFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set labelFunction(value:Function):void
+    {
+        _labelFunction = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+
+        dispatchEvent(new Event("labelFunctionChanged"));
+    }
+
+    //----------------------------------
+    //  minWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the minWidth property.
+     */
+    private var _minWidth:Number = 20;
+
+    [Bindable("minWidthChanged")]
+    [Inspectable(category="General", defaultValue="100")]
+
+    /**
+     *  The minimum width of the column, in pixels.
+     *  @default 20
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get minWidth():Number
+    {
+        return _minWidth;
+    }
+
+    /**
+     *  @private
+     */
+    public function set minWidth(value:Number):void
+    {
+        _minWidth = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+
+        if (_width < value)
+            _width = value;
+
+        dispatchEvent(new Event("minWidthChanged"));
+    }
+
+    //----------------------------------
+    //  resizable
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Set to true if the user is allowed to resize
+     *  the width of the column.
+     *  If true, the user can drag the grid lines between
+     *  the column headers to resize the column.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var resizable:Boolean = true;
+
+    //----------------------------------
+    //  showDataTips
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the showDataTips property.
+     */
+    private var _showDataTips:*;
+
+    [Inspectable(category="Advanced")]
+
+    /**
+     *  Set to true to show data tips in the column.
+     *  If true, datatips are displayed for text in the rows. Datatips
+     *  are tooltips designed to show the text that is too long for the row.
+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get showDataTips():*
+    {
+        return _showDataTips;
+    }
+
+    /**
+     *  @private
+     */
+    public function set showDataTips(value:*):void
+    {
+        _showDataTips = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+    }
+
+    //----------------------------------
+    //  sortable
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Set to true to indicate that the user can click on the
+     *  header of this column to sort the data provider.
+     *  If this property and the AdvancedDataGrid sortableColumns property
+     *  are both true, the AdvancedDataGrid control dispatches a
+     *  headerRelease event when a user releases the mouse button
+     *  on this column's header.
+     *  If no other handler calls the preventDefault() method on
+     *  the headerRelease event, the dataField
+     *  property or sortCompareFunction in the column is used
+     *  to reorder the items in the data provider.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var sortable:Boolean = true;
+
+    //----------------------------------
+    //  sortCompareFunction
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the sortCompareFunction property.
+     */
+    private var _sortCompareFunction:Function;
+
+    [Bindable("sortCompareFunctionChanged")]
+    [Inspectable(category="Advanced")]
+
+    /**
+     *
+     *  A callback function that gets called when sorting the data in
+     *  the column.  If this property is not specified, the sort tries
+     *  to use a basic string or number sort on the data.
+     *  If the data is not a string or number or if the dataField
+     *  property is not a valid property of the data provider, the sort does
+     *  not work or will generate an exception.
+     *  If you specify a value of the labelFunction property,
+     *  you must also provide a function to the sortCompareFunction property,
+     *  unless sorting is not allowed on this column.
+     *
+     *
The AdvancedDataGrid control uses this function to sort the elements of the data
+     *  provider collection. The function signature of
+     *  the callback function takes two parameters and has the following form:

+     *
+     *
mySortCompareFunction(obj1:Object, obj2:Object):int

+     *
+     *
obj1 — A data element to compare.

+     *
+     *
obj2 — Another data element to compare with obj1.

+     *
+     *
The function should return a value based on the comparison
+     *  of the objects:

+     *

+     *
-1 if obj1 should appear before obj2 in ascending order.

+     *
0 if obj1 = obj2.

+     *
1 if obj1 should appear after obj2 in ascending order.

+     *

+     *
+     *
Note: The obj1 and
+     *  obj2 parameters are entire data provider elements and not
+     *  just the data for the item.

+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get sortCompareFunction():Function
+    {
+        return _sortCompareFunction;
+    }
+
+    /**
+     *  @private
+     */
+    public function set sortCompareFunction(value:Function):void
+    {
+        _sortCompareFunction = value;
+
+        dispatchEvent(new Event("sortCompareFunctionChanged"));
+    }
+
+    //----------------------------------
+    //  visible
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the visible property.
+     */
+    private var _visible:Boolean = true;
+
+    [Inspectable(category="General", defaultValue="true")]
+
+    /**
+     *  If true, the column is visible.
+     *  Set to false to hide the column.
+     *
+     *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get visible():Boolean
+    {
+        return _visible;
+    }
+
+    /**
+     *  @private
+     */
+    public function set visible(value:Boolean):void
+    {
+        if (_visible != value)
+        {
+            _visible = value;
+
+            if (owner)
+            {
+                owner.columnsInvalid = true;
+
+                owner.invalidateProperties();
+                owner.invalidateSize();
+                owner.invalidateList();
+            }
+        }
+    }
+
+    //----------------------------------
+    //  width
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the width property.
+     */
+    private var _width:Number = 100;
+
+    [Bindable("widthChanged")]
+    [Inspectable(category="General", defaultValue="100")]
+
+    /**
+     *  The width of the column, in pixels.
+     *  If the AdvancedDataGrid's horizontalScrollPolicy property
+     *  is false, all visible columns must fit in the displayable
+     *  area, and the AdvancedDataGrid will not always honor the width of
+     *  the columns if the total width of the columns is too
+     *  small or too large for the displayable area.
+     *
+     *  @default 100
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get width():Number
+    {
+        return _width;
+    }
+
+    /**
+     *  @private
+     */
+    public function set width(value:Number):void
+    {
+        // remove any queued equal spacing commands
+        explicitWidth = value;
+        // use this value for future measurements
+        preferredWidth = value;
+        if (owner != null)
+        {
+            // if we aren't resizing as part of grid layout, resize it's column
+            var oldVal:Boolean = resizable;
+            // anchor this column to not accept any overflow width for accurate sizing
+            resizable = false;
+            owner.resizeColumn(colNum, value);
+            resizable = oldVal;
+        }
+        else
+        {
+            // otherwise, just store the size
+            _width = value;
+        }
+        dispatchEvent(new Event("widthChanged"));
+    }
+
+    //----------------------------------
+    //  wordWrap
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the wordWrap property.
+     */
+    private var _wordWrap:*;
+
+    [Inspectable(category="Advanced")]
+
+    /**
+     *  Set to false to wrap the text in a row of this column
+     *  because it does not fit on one line
+     *  If undefined, the AdvancedDataGrid control's wordWrap property
+     *  is used.
+     *
+     *  @default undefined
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get wordWrap():*
+    {
+        return _wordWrap;
+    }
+
+    /**
+     *  @private
+     */
+    public function set wordWrap(value:*):void
+    {
+        _wordWrap = value;
+
+        if (owner)
+        {
+            owner.invalidateList();
+        }
+    }
+
+    //----------------------------------
+    //  styleFunction
+    //----------------------------------
+
+    /**
+     * @private
+     */
+     private var _styleFunction:Function;
+
+    /**
+     *  A callback function that is called when rendering each cell.
+     *  The signature of the function should be:
+     *
+     *
function myStyleFunction(data:Object, column:AdvancedDataGridColumn):Object

+     *
+     *
data - data object associated with the item being rendered.

+     *
column - AdvancedDataGridColumn instance with
+     *  which the item renderer is associated.

+     *
+     *
The return value should be a object with styles as properties
+     *   having the required values.
+     *   For example:

+     *
+     *
{ color:0xFF0000, fontWeight:"bold" }

+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public function get styleFunction():Function
+     {
+            return _styleFunction;
+     }
+
+    /**
+     * @private
+     */
+     public function set styleFunction(value:Function):void
+     {
+            _styleFunction = value;
+
+            if (owner)
+                owner.invalidateDisplayList();
+     }
+
+
+    //----------------------------------
+    //  formatter
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _formatter:Formatter;
+
+    /**
+     *  An instance of a subclasses of mx.formatters.Formatter.
+     *  The control use this class to format the column text.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get formatter():Formatter
+    {
+        return _formatter;
+    }
+
+    /**
+     *  @private
+     */
+    public function set formatter(value:Formatter):void
+    {
+        _formatter = value;
+
+        if (owner)
+            owner.invalidateDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override mx_internal function addStyleToProtoChain(
+                                chain:Object, target:DisplayObject, filterMap:Object = null):Object
+    {
+        var parentGrid:AdvancedDataGridBaseEx = owner;
+        var item:IListItemRenderer = IListItemRenderer(target);
+
+        chain = super.addStyleToProtoChain(chain, target);
+
+        // If the target data is a AdvancedDataGridColumn and has a data
+        // field in its data, then it is a header so add the
+        // AdvancedDataGrid.headerStyleName object to the head of the proto chain.
+        if (item.data && (item.data is AdvancedDataGridColumn))
+        {
+            var s:Object;
+
+            var headerStyleName:Object =
+                parentGrid.getStyle("headerStyleName");
+            if (headerStyleName)
+            {
+                if (headerStyleName is String)
+                {
+                    headerStyleName =
+                        owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
+                }
+
+                if (headerStyleName is CSSStyleDeclaration)
+                    chain = headerStyleName.addStyleToProtoChain(chain, target);
+            }
+
+            headerStyleName = getStyle("headerStyleName");
+            if (headerStyleName)
+            {
+                if (headerStyleName is String)
+                {
+                    headerStyleName =
+                        owner.styleManager.getMergedStyleDeclaration(String(headerStyleName));
+                }
+
+                if (headerStyleName is CSSStyleDeclaration)
+                    chain = headerStyleName.addStyleToProtoChain(chain, target);
+            }
+        }
+
+        // save the current font context
+        if (!fontPropertiesSet)
+        {
+            fontPropertiesSet = true;
+            saveFontContext(owner ? owner.moduleFactory : null);
+        }
+
+        return chain;
+    }
+
+    /**
+     *  @private
+     */
+    override public function setStyle(styleProp:String, value:*):void
+    {
+        fontPropertiesSet = false;
+
+        var oldValue:Object = getStyle(styleProp);
+        var regenerate:Boolean = false;
+
+        // If this AdvancedDataGridColumn didn't previously have a factory, defaultFactory, or
+        // overrides object, then this AdvancedDataGridColumn hasn't been added to the item
+        // renderers proto chains.  In that case, we need to regenerate all the item
+        // renderers proto chains.
+        if (factory == null &&
+            defaultFactory == null &&
+            !overrides &&
+            (oldValue !== value)) // must be !==
+        {
+            regenerate = true;
+        }
+
+        super.setLocalStyle(styleProp, value);
+
+        // The default implementation of setStyle won't always regenerate
+        // the proto chain when headerStyleName is set, and we need to make sure
+        // that they are regenerated
+        if (styleProp == "headerStyleName")
+        {
+            if (owner)
+            {
+                owner.regenerateStyleCache(true);
+                owner.notifyStyleChangeInChildren("headerStyleName", true);
+            }
+            return;
+        }
+
+        if (owner)
+        {
+            if (regenerate)
+            {
+                owner.regenerateStyleCache(true);
+            }
+
+            if (hasFontContextChanged(owner.moduleFactory))
+            {
+                owner.columnRendererChanged(this);
+            }
+
+            owner.invalidateList();
+        }
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Internal function to allow the AdvancedDataGrid to set the width of the
+     *  column without locking it as an explicitWidth
+     */
+    mx_internal function setWidth(value:Number):void
+    {
+        _width = value;
+    }
+
+    /**
+     * @private
+     *
+     * Apply column's Formatter if present.
+     *
+     */
+    private function applyFormatting(data:String):String
+    {
+        if (formatter != null && data != null)
+        {
+            var label:String = formatter.format(data);
+
+            // Silently ignore formatter errors. For example, errors occur when
+            // the property corresponding to the dataField is not present in the
+            // row object i.e. it'll be empty and it's not anybody's fault that
+            // it's an error.
+            if (formatter.error)
+                return null;
+
+            return label;
+        }
+        else
+        {
+            return data;
+        }
+    }
+
+    /**
+     *  Returns the String that the item renderer displays for the given data object.
+     *  If the AdvancedDataGridColumn or its AdvancedDataGrid control
+     *  has a non-null labelFunction
+     *  property, it applies the function to the data object.
+     *  Otherwise, the method extracts the contents of the field specified by the
+     *  dataField property, or gets the string value of the data object.
+     *  If the method cannot convert the parameter to a String, it returns a
+     *  single space.
+     *
+     *  @param data Object to be rendered.
+     *
+     *  @param withFormatting It true specifies to return
+     *  the String with any formatting applied to it.
+     *
+     *  @return Displayable String based on the data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function itemToLabel(data:Object, withFormatting:Boolean=true):String
+    {
+        var label:String = itemToLabelWithoutFormatting(data);
+        if (withFormatting)
+            return applyFormatting(label);
+        return label;
+    }
+
+    /**
+     *  @private
+     *
+     *  This is the original AdvancedDataGrid.itemToLabel() that has been wrapped with applyFormatting()
+     *
+     */
+    private function itemToLabelWithoutFormatting(data:Object):String
+    {
+        var headerInfo:AdvancedDataGridHeaderInfo  = owner.mx_internal::getHeaderInfo(this);
+        //In case of Column grouping, when a column has a parent with dataField/labelFunction set, this column is
+        //supposed to take value from what its parent supplies it
+        if(headerInfo.internalLabelFunction!=null)
+            data = headerInfo.internalLabelFunction(data, this);
+
+        if (!data)
+            return " ";
+
+        if (labelFunction != null)
+            return labelFunction(data, this);
+
+        if (owner.labelFunction != null)
+            return owner.labelFunction(data, this);
+
+        if (typeof(data) == "object" || typeof(data) == "xml")
+        {
+            try
+            {
+                data = data[dataField];
+            }
+            catch(e:Error)
+            {
+                data = null;
+            }
+        }
+
+        if (data is String)
+            return String(data);
+
+        try
+        {
+            return data.toString();
+        }
+        catch(e:Error)
+        {
+        }
+
+        return " ";
+    }
+
+    /**
+     *  Returns a String that the item renderer displays as the data tip for the given data object,
+     *  based on the dataTipField and dataTipFunction properties.
+     *  If the method cannot convert the parameter to a String, it returns a
+     *  single space.
+     *
+     *
This method is for use by developers who are creating subclasses
+     *  of the AdvancedDataGridColumn class.
+     *  It is not for use by application developers.

+     *
+     *  @param data Object to be rendered.
+     *
+     *  @return Displayable String based on the data.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function itemToDataTip(data:Object):String
+    {
+        if (dataTipFunction != null)
+            return dataTipFunction(data);
+
+        if (owner.dataTipFunction != null)
+            return owner.dataTipFunction(data);
+
+        // for header items, return the header text
+        if (data is AdvancedDataGridColumn)
+            return AdvancedDataGridColumn(data).headerText;
+
+        if (typeof(data) == "object" || typeof(data) == "xml")
+        {
+            var field:String = dataTipField;
+            if (!field)
+                field = owner.dataTipField;
+            try
+            {
+                if (data[field] != null)
+                    data = data[field];
+                else if (data[dataField] != null)
+                    data = data[dataField];
+            }
+            catch(e:Error)
+            {
+                data = null;
+            }
+        }
+
+        if (data is String)
+            return String(data);
+
+        try
+        {
+            return data.toString();
+        }
+        catch(e:Error)
+        {
+        }
+
+        return " ";
+    }
+
+    /**
+     * @private
+     *
+     * Save the current font context to member fields.
+     */
+    private function saveFontContext(flexModuleFactory:IFlexModuleFactory):void
+    {
+        // Save for hasFontContextChanged()
+        hasFontContextBeenSaved = true;
+        var fontName:String = StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
+        var fontWeight:String = getStyle("fontWeight");
+        var fontStyle:String = getStyle("fontStyle");
+        var bold:Boolean = fontWeight == "bold";
+        var italic:Boolean = fontStyle == "italic";
+        oldEmbeddedFontContext = (noEmbeddedFonts || !embeddedFontRegistry) ?
+            null :
+            embeddedFontRegistry.getAssociatedModuleFactory(
+                fontName, bold, italic, this, flexModuleFactory,
+				owner.systemManager);
+    }
+
+    /**
+     *  @private
+     *  Test if the current font context has changed
+     *  since that last time saveFontContext() was called.
+     */
+    mx_internal function hasFontContextChanged(
+                            flexModuleFactory:IFlexModuleFactory):Boolean
+    {
+
+        // If the font has not been saved yet, then return false,
+        // the font context has not changed.
+        if (!hasFontContextBeenSaved)
+            return false;
+
+        var fontName:String =
+            StringUtil.trimArrayElements(getStyle("fontFamily"), ",");
+        var fontWeight:String = getStyle("fontWeight");
+        var fontStyle:String = getStyle("fontStyle");
+
+        // Check if the module factory has changed.
+        var bold:Boolean = fontWeight == "bold";
+        var italic:Boolean = fontStyle == "italic";
+        var fontContext:IFlexModuleFactory = (noEmbeddedFonts || !embeddedFontRegistry) ?
+            null :
+            embeddedFontRegistry.getAssociatedModuleFactory(
+                fontName, bold, italic, this, flexModuleFactory,
+				owner.systemManager);
+        return fontContext != oldEmbeddedFontContext;
+    }
+
+    /**
+     *  @private
+     *
+     *  Sets the properties of this Object to the given column.
+     *
+     *  It sets only the required properties.
+     *
+     *  @param col AdvancedDataGridColumn in which the properties are to be set.
+     *
+     */
+    protected function copyProperties(col:AdvancedDataGridColumn):void
+    {
+        // copy properties
+        col.defaultFactory = this.defaultFactory;
+        col.editable = this.editable;
+        col.editorDataField = this.editorDataField;
+        col.editorHeightOffset = this.editorHeightOffset;
+        col.editorUsesEnterKey = this.editorUsesEnterKey;
+        col.editorWidthOffset = this.editorWidthOffset;
+        col.editorXOffset =  this.editorXOffset;
+        col.editorYOffset = this.editorYOffset;
+        col.factory = this.factory;
+        col.itemEditor =  this.itemEditor;
+        col.rendererIsEditor = this.rendererIsEditor;
+        col.resizable = this.resizable;
+        col.sortable = this.sortable;
+        col.sortDescending = this.sortDescending;
+        col.dataField = this.dataField;
+        col.dataTipField = this.dataTipField;
+        col.dataTipFunction = this.dataTipFunction;
+        col.formatter = this.formatter;
+        col.headerRenderer = this.headerRenderer;
+        col.headerText = this.headerText;
+        col.headerWordWrap = this.headerWordWrap;
+        col.imeMode = this.imeMode;
+        col.itemRenderer = this.itemRenderer;
+        col.labelFunction = this.labelFunction;
+        col.minWidth = this.minWidth;
+        col.showDataTips = this.showDataTips;
+        col.sortCompareFunction = this.sortCompareFunction;
+        col.styleFunction = this.styleFunction;
+        col.visible = this.visible;
+        col.width = this.width;
+        col.wordWrap = this.wordWrap;
+
+        // copy styles
+        col.public::setStyle("backgroundColor",this.getStyle("backgroundColor"));
+        col.public::setStyle("headerStyleName",this.getStyle("headerStyleName"));
+        col.public::setStyle("paddingLeft",this.getStyle("paddingLeft"));
+        col.public::setStyle("paddingRight",this.getStyle("paddingRight"));
+
+        // copy text styles
+        col.public::setStyle("color",this.getStyle("color"));
+        col.public::setStyle("disabledColor",this.getStyle("disabledColor"));
+        col.public::setStyle("fontAntiAliasType",this.getStyle("fontAntiAliasType"));
+        col.public::setStyle("fontFamily",this.getStyle("fontFamily"));
+        col.public::setStyle("fontGridFitType",this.getStyle("fontGridFitType"));
+        col.public::setStyle("fontSharpness",this.getStyle("fontSharpness"));
+        col.public::setStyle("fontSize",this.getStyle("fontSize"));
+        col.public::setStyle("fontStyle",this.getStyle("fontStyle"));
+        col.public::setStyle("fontThickness",this.getStyle("fontThickness"));
+        col.public::setStyle("fontWeight",this.getStyle("fontWeight"));
+        col.public::setStyle("kerning",this.getStyle("kerning"));
+        col.public::setStyle("letterSpacing",this.getStyle("letterSpacing"));
+        col.public::setStyle("textAlign",this.getStyle("textAlign"));
+        col.public::setStyle("textDecoration",this.getStyle("textDecoration"));
+        col.public::setStyle("textIndent",this.getStyle("textIndent"));
+    }
+
+    /**
+     *
+     *  Clone this column and return a new Column with the
+     *  same properties and styles as this one.
+     *
+     *  It does not set all the available properties
+     *
+     *  @return col AdvancedDataGridColumn.
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function clone():AdvancedDataGridColumn
+    {
+        // make a new column
+        var col:AdvancedDataGridColumn = new AdvancedDataGridColumn();
+
+        // copy the properties
+        copyProperties(col);
+
+        return col;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1251867 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/BubbleSeriesAutomationImpl.as
+++ frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/BubbleSeriesAutomationImpl.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.automation.delegates.charts
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1258855 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/controls/ProgressBarMode.as
+++ frameworks/projects/framework/src/mx/controls/ProgressBarMode.as
@@ -17,6 +17,11 @@
  *  of the ProgressBar class.
  *
  *  @see mx.controls.ProgressBar
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public final class ProgressBarMode
 {
@@ -32,6 +37,11 @@
 	 *  The control specified by the source property must
 	 *  dispatch progress and completed events.
 	 *  The ProgressBar uses these events to update its status.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const EVENT:String = "event";

@@ -41,6 +51,11 @@
 	 *  properties and use the setProgress() method
 	 *  to specify the status. This mode is often used when the
 	 *  indeterminate property is true.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const MANUAL:String = "manual";

@@ -49,6 +64,11 @@
 	 *  exposes the getBytesLoaded() and
 	 *  getBytesTotal() methods.  The ProgressBar control
 	 *  calls these methods to update its status.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public static const POLLED:String = "polled";
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3509
Author:   jimurphy@adobe.com
Date:     2008-10-07T18:19:17.646255Z

Log Message:
-----------
Rename of flex -> mx.

For compatibility reasons it was decided that the new functionality remain integrated with the old framework, although we will continue to build two separate SWCs, one with primarily existing framework classes, and one with new Flex 4 classes. This change removes duplicate names from the Flex 4 framework to avoid class name overlapping with the old framework code.  The naming overlap consists of two major areas:  New Components, and New Effects

Modified Paths:
--------------
386 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284602 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/events/TextOperationEvent.as
+++ frameworks/projects/spark/src/spark/events/TextOperationEvent.as
@@ -9,7 +9,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package flex.events
+package mx.events
 {

 import flash.events.Event;


def: 6885 start playback immediately after flavor switch with http

--- kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
+++ kdp3Lib/src/com/kaltura/kdpfl/view/media/KMediaPlayerMediator.as
@@ -468,7 +468,8 @@
 					break;
 				case NotificationType.DO_PAUSE: //when the player asked to pause
 					_prevState = PAUSED;
-					_mediaProxy.vo.singleAutoPlay = false;
+					if (!_mediaProxy.vo.isFlavorSwitching)
+						_mediaProxy.vo.singleAutoPlay = false;
 					if(player && player.media && player.media.hasTrait(MediaTraitType.PLAY) )
 					{
 						if (player.canPause)


Removed whitespace

Removed whitespace

--- src/laml/display/Component.as
+++ src/laml/display/Component.as
@@ -266,6 +266,14 @@
 			return model.name || id;
 		}

+		public function set data(data:*):void {
+			model.data = data;
+		}
+
+		public function get data():* {
+			return model.data;
+		}
+
 		public function set css(css:String):void {
 			model.css = css;
 		}


asdoc

asdoc

--- src/com/kemsky/Stream.as
+++ src/com/kemsky/Stream.as
@@ -525,10 +525,10 @@
         }

         /**
-         * Creates new Dictionary from current Stream using specified property as keys
-         * @param property The name of the property to be used as key
-         * @param weak Create a Dictionary with weak keys
-         * @return A new Dictionary from current Stream using specified property as keys
+         * Creates a new Dictionary from the current stream using specified property values as keys
+         * @param property The name of the property to be used as key.
+         * @param weak Create a new Dictionary with weak keys.
+         * @return A new Dictionary from the current stream using specified property values as keys.
          */
         public function dictionary(property:String, weak:Boolean = false):Dictionary
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1267821 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/containers/utilityClasses/ApplicationLayout.as
+++ frameworks/projects/mx/src/mx/containers/utilityClasses/ApplicationLayout.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2006 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.containers.utilityClasses
 {