0 Replies Latest reply on Jun 18, 2009 1:04 PM by GordonSmith

    [svn:fx-trunk] 7967: PARB changes to TextGraphicElement/SimpleText/ RichText and to text styles in general.

    GordonSmith Level 4

      Revision: 7967

      Author:   gosmith@adobe.com

      Date:     2009-06-18 12:44:16 -0700 (Thu, 18 Jun 2009)

       

      Log Message:

      ***********

      PARB changes to TextGraphicElement/SimpleText/RichText and to text styles in general.

       

      TextGraphicElement:

       

      The 'truncation' property has been renamed to 'maxDisplayedLines'.

       

      The isTruncated() method has become an 'isTruncated' read-only property.

       

      RichText:

       

      Since a TextFlow object is the fundamental representation for rich test in TLF, the RichText component now has a public textFlow:TextFlow property which you can get or set. To turn TLF markup -- in either String or XML form -- into a TextFlow, use the static importFromString() and importFromXML() methods in the TextFlowUtil class. These are bindable methods so that if the markup parameter changes they will re-evaluate. To turn the TextFlow back into markup, use TextFLowUtil.export(...) to produce XML.

       

      The 'content' property is now intended only for use by the MXML compiler. It is set-only and only supports being set to what MXML markup produces: a String (which will be treated as the text of an implicit span in an implicit paragraph), a FlowElement, or an Array of Strings and FlowElements.

       

      The 'text', 'textFlow', and 'content' properties are interacting properties. For example, you can set 'textFlow' and then get the 'text', and vice versa. In fact, you can now do this immediately, without waiting for the component to undergo a LayoutManager pass. Of these three properties, the last one set in ActionScript wins; if more than one is set in MXML the results are undefined since MXML does not guarantee the order in which properties are set. Setting any of them to null is equivalent to setting the 'text' to the empty String, which is the initial state of the component.

       

      Styles:

       

      The 'lineBreak' style is now non-inheriting, since in TLF it doesn't inherit from FlowElement to FlowElement.

       

      The text styles are now divided into five buckets:

       

      BasicInheritingTextStyles.as

      BasicNonInheritingTextStyles.as

      AdvancedInheritingTextStyles.as

      AdvancedNonInheritingTextStyles.as

      SelectionFormatTextStyles.as

       

      Skinnable components like TextInput and TextArea no longer declare any on the noninheriting text styles, because the RichTextElement in the skin doesn't inherit them. You must set them directly on the RichTextElement in the component's skin, either with ActionScript or by reskinning.

       

      The styleInitialized() method has been added to the IAdvancedStyleClient interface.

       

      QE Notes: None

      Doc Notes: None

      Bugs: None

      Reviewer: Carol

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowed ApplicationSkin.mxml

          flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplication Skin.mxml

          flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/MacTit leBarSkin.mxml

          flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/windowChrome/TitleB arSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.a s

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableTex tBase.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicE lement.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarFirstButtonSkin.m xml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarLastButtonSkin.mx ml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonBarMiddleButtonSkin. mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ButtonSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/CheckBoxSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/DefaultButtonSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/RadioButtonSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/ToggleButtonSkin.mxml

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/utils/TextFlowUtil.as

          flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as

          flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarFirstButt onSkin.mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarLastButto nSkin.mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonBarMiddleBut tonSkin.mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ButtonSkin.mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/CheckBoxSkin.mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/DefaultButtonSkin. mxml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/RadioButtonSkin.mx ml

          flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ToggleButtonSkin.m xml

       

      Added Paths:

      ***********

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedInheritingText Styles.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedNonInheritingT extStyles.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicInheritingTextSty les.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicNonInheritingText Styles.as

       

      Removed Paths:

      *************

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/AdvancedTextLayoutForm atStyles.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/BasicTextLayoutFormatS tyles.as

          flex/sdk/trunk/frameworks/projects/flex4/src/spark/styles/metadata/NonInheritingTextLayou tFormatStyles.as