home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / filler.swf / scripts / mx / core / Container.as < prev    next >
Text File  |  2008-09-02  |  88KB  |  2,537 lines

  1. package mx.core
  2. {
  3.    import flash.display.DisplayObject;
  4.    import flash.display.Graphics;
  5.    import flash.display.InteractiveObject;
  6.    import flash.display.Shape;
  7.    import flash.display.Sprite;
  8.    import flash.events.Event;
  9.    import flash.events.KeyboardEvent;
  10.    import flash.events.MouseEvent;
  11.    import flash.geom.Point;
  12.    import flash.geom.Rectangle;
  13.    import flash.system.ApplicationDomain;
  14.    import flash.text.TextField;
  15.    import flash.ui.Keyboard;
  16.    import mx.binding.BindingManager;
  17.    import mx.controls.Button;
  18.    import mx.controls.HScrollBar;
  19.    import mx.controls.VScrollBar;
  20.    import mx.controls.listClasses.IListItemRenderer;
  21.    import mx.controls.scrollClasses.ScrollBar;
  22.    import mx.events.ChildExistenceChangedEvent;
  23.    import mx.events.FlexEvent;
  24.    import mx.events.IndexChangedEvent;
  25.    import mx.events.ScrollEvent;
  26.    import mx.events.ScrollEventDetail;
  27.    import mx.events.ScrollEventDirection;
  28.    import mx.graphics.RoundedRectangle;
  29.    import mx.managers.IFocusManager;
  30.    import mx.managers.IFocusManagerContainer;
  31.    import mx.managers.ILayoutManagerClient;
  32.    import mx.managers.ISystemManager;
  33.    import mx.resources.ResourceBundle;
  34.    import mx.skins.RectangularBorder;
  35.    import mx.styles.CSSStyleDeclaration;
  36.    import mx.styles.ISimpleStyleClient;
  37.    import mx.styles.IStyleClient;
  38.    import mx.styles.StyleManager;
  39.    import mx.styles.StyleProtoChain;
  40.    
  41.    use namespace mx_internal;
  42.    
  43.    public class Container extends UIComponent implements IContainer, IDataRenderer, IFocusManagerContainer, IListItemRenderer, IRawChildrenContainer
  44.    {
  45.       
  46.       private static const MULTIPLE_PROPERTIES:String = "<MULTIPLE>";
  47.       
  48.       private static var resourceMultipleChildSets_ClassAndInstance:String;
  49.       
  50.       private static var resourceMultipleChildSets_ClassAndSubclass:String;
  51.       
  52.       private static var resourceScrollDirection:String;
  53.       
  54.       mx_internal static const VERSION:String = "2.0.1.0";
  55.       
  56.       private static var packageResources:ResourceBundle = ResourceBundle.getResourceBundle("core",ApplicationDomain.currentDomain);
  57.       
  58.       {
  59.          loadResources();
  60.       }
  61.       
  62.       private var _horizontalLineScrollSize:Number = 5;
  63.       
  64.       mx_internal var border:IFlexDisplayObject;
  65.       
  66.       private var _viewMetricsAndPadding:EdgeMetrics;
  67.       
  68.       private var scrollableWidth:Number = 0;
  69.       
  70.       private var _data:Object;
  71.       
  72.       private var _rawChildren:ContainerRawChildrenList;
  73.       
  74.       private var _viewMetrics:EdgeMetrics;
  75.       
  76.       private var changedStyles:String = null;
  77.       
  78.       private var _verticalPageScrollSize:Number = 0;
  79.       
  80.       private var mouseEventReferenceCount:int = 0;
  81.       
  82.       protected var whiteBox:Shape;
  83.       
  84.       private var _verticalScrollBar:ScrollBar;
  85.       
  86.       private var _horizontalPageScrollSize:Number = 0;
  87.       
  88.       private var _clipContent:Boolean = true;
  89.       
  90.       private var _icon:Class = null;
  91.       
  92.       mx_internal var doingLayout:Boolean = false;
  93.       
  94.       private var _createdComponents:Array;
  95.       
  96.       private var _firstChildIndex:int = 0;
  97.       
  98.       private var scrollableHeight:Number = 0;
  99.       
  100.       mx_internal var _numChildren:int = 0;
  101.       
  102.       private var recursionFlag:Boolean = true;
  103.       
  104.       private var forceLayout:Boolean = false;
  105.       
  106.       mx_internal var blocker:Sprite;
  107.       
  108.       private var _label:String = "";
  109.       
  110.       private var _numChildrenCreated:int = -1;
  111.       
  112.       protected var actualCreationPolicy:String;
  113.       
  114.       private var _childRepeaters:Array;
  115.       
  116.       private var _childDescriptors:Array;
  117.       
  118.       private var scrollPropertiesChanged:Boolean = false;
  119.       
  120.       private var scrollPositionChanged:Boolean = true;
  121.       
  122.       private var _focusPane:Sprite;
  123.       
  124.       private var _defaultButton:IFlexDisplayObject;
  125.       
  126.       private var _forceClippingCount:int;
  127.       
  128.       mx_internal var creatingContentPane:Boolean = false;
  129.       
  130.       private var _creationPolicy:String;
  131.       
  132.       private var _creationIndex:int = -1;
  133.       
  134.       private var _verticalScrollPosition:Number = 0;
  135.       
  136.       private var _autoLayout:Boolean = true;
  137.       
  138.       private var _horizontalScrollBar:ScrollBar;
  139.       
  140.       private var viewableHeight:Number = 0;
  141.       
  142.       private var viewableWidth:Number = 0;
  143.       
  144.       mx_internal var contentPane:Sprite = null;
  145.       
  146.       private var numChildrenBefore:int;
  147.       
  148.       private var _verticalLineScrollSize:Number = 5;
  149.       
  150.       private var _horizontalScrollPosition:Number = 0;
  151.       
  152.       mx_internal var _horizontalScrollPolicy:String = "auto";
  153.       
  154.       private var verticalScrollPositionPending:Number;
  155.       
  156.       mx_internal var _verticalScrollPolicy:String = "auto";
  157.       
  158.       private var horizontalScrollPositionPending:Number;
  159.       
  160.       public function Container()
  161.       {
  162.          recursionFlag = true;
  163.          forceLayout = false;
  164.          doingLayout = false;
  165.          changedStyles = null;
  166.          creatingContentPane = false;
  167.          contentPane = null;
  168.          scrollPropertiesChanged = false;
  169.          scrollPositionChanged = true;
  170.          scrollableWidth = 0;
  171.          scrollableHeight = 0;
  172.          viewableWidth = 0;
  173.          viewableHeight = 0;
  174.          mouseEventReferenceCount = 0;
  175.          _numChildren = 0;
  176.          _autoLayout = true;
  177.          _clipContent = true;
  178.          _creationIndex = -1;
  179.          _firstChildIndex = 0;
  180.          _horizontalLineScrollSize = 5;
  181.          _horizontalPageScrollSize = 0;
  182.          _horizontalScrollPosition = 0;
  183.          _horizontalScrollPolicy = ScrollPolicy.AUTO;
  184.          _icon = null;
  185.          _label = "";
  186.          _numChildrenCreated = -1;
  187.          _verticalLineScrollSize = 5;
  188.          _verticalPageScrollSize = 0;
  189.          _verticalScrollPosition = 0;
  190.          _verticalScrollPolicy = ScrollPolicy.AUTO;
  191.          super();
  192.          tabChildren = true;
  193.          tabEnabled = false;
  194.          showInAutomationHierarchy = false;
  195.       }
  196.       
  197.       private static function loadResources() : void
  198.       {
  199.          resourceScrollDirection = packageResources.getString("scrollDirection");
  200.          resourceMultipleChildSets_ClassAndInstance = packageResources.getString("multipleChildSets_ClassAndInstance");
  201.          resourceMultipleChildSets_ClassAndSubclass = packageResources.getString("multipleChildSets_ClassAndSubclass");
  202.       }
  203.       
  204.       mx_internal static function checkFocus(param1:InteractiveObject, param2:InteractiveObject) : void
  205.       {
  206.          var _loc3_:InteractiveObject = null;
  207.          var _loc4_:InteractiveObject = null;
  208.          var _loc5_:IUIComponent = null;
  209.          var _loc6_:IFocusManager = null;
  210.          var _loc7_:Button = null;
  211.          _loc3_ = param2;
  212.          _loc4_ = param2;
  213.          _loc5_ = null;
  214.          if(param2 != null && param1 == param2)
  215.          {
  216.             return;
  217.          }
  218.          while(_loc4_)
  219.          {
  220.             if(_loc4_.parent)
  221.             {
  222.                _loc3_ = _loc4_.parent;
  223.             }
  224.             else
  225.             {
  226.                _loc3_ = null;
  227.             }
  228.             if(_loc4_ is IUIComponent)
  229.             {
  230.                _loc5_ = IUIComponent(_loc4_);
  231.             }
  232.             if((_loc4_ = _loc3_) && _loc4_ is Container && Container(_loc4_).defaultButton)
  233.             {
  234.                break;
  235.             }
  236.          }
  237.          if(ContainerGlobals.focusedContainer != _loc4_)
  238.          {
  239.             if(!_loc4_)
  240.             {
  241.                _loc4_ = InteractiveObject(_loc5_);
  242.             }
  243.             if(_loc4_ && _loc4_ is Container)
  244.             {
  245.                _loc6_ = UIComponent(_loc4_).focusManager;
  246.                if(_loc7_ = Container(_loc4_).defaultButton as Button)
  247.                {
  248.                   ContainerGlobals.focusedContainer = Container(_loc4_);
  249.                   _loc6_.defaultButton = _loc7_;
  250.                }
  251.                else
  252.                {
  253.                   ContainerGlobals.focusedContainer = Container(_loc4_);
  254.                   _loc6_.defaultButton = null;
  255.                }
  256.             }
  257.          }
  258.       }
  259.       
  260.       mx_internal function get firstChildIndex() : int
  261.       {
  262.          return _firstChildIndex;
  263.       }
  264.       
  265.       mx_internal function rawChildren_getObjectsUnderPoint(param1:Point) : Array
  266.       {
  267.          return super.getObjectsUnderPoint(param1);
  268.       }
  269.       
  270.       protected function scrollChildren() : void
  271.       {
  272.          var _loc1_:EdgeMetrics = null;
  273.          var _loc2_:Number = NaN;
  274.          var _loc3_:Number = NaN;
  275.          var _loc4_:Number = NaN;
  276.          var _loc5_:Number = NaN;
  277.          var _loc6_:Rectangle = null;
  278.          if(!mx_internal::contentPane)
  279.          {
  280.             return;
  281.          }
  282.          _loc1_ = viewMetrics;
  283.          _loc2_ = 0;
  284.          _loc3_ = 0;
  285.          _loc4_ = unscaledWidth - _loc1_.left - _loc1_.right;
  286.          _loc5_ = unscaledHeight - _loc1_.top - _loc1_.bottom;
  287.          if(_clipContent)
  288.          {
  289.             _loc2_ += _horizontalScrollPosition;
  290.             if(horizontalScrollBar)
  291.             {
  292.                _loc4_ = viewableWidth;
  293.             }
  294.             _loc3_ += _verticalScrollPosition;
  295.             if(verticalScrollBar)
  296.             {
  297.                _loc5_ = viewableHeight;
  298.             }
  299.          }
  300.          else
  301.          {
  302.             _loc4_ = scrollableWidth;
  303.             _loc5_ = scrollableHeight;
  304.          }
  305.          _loc6_ = getScrollableRect();
  306.          if(_loc2_ == 0 && _loc3_ == 0 && _loc4_ >= _loc6_.right && _loc5_ >= _loc6_.bottom && _loc6_.left >= 0 && _loc6_.top >= 0 && _forceClippingCount <= 0)
  307.          {
  308.             mx_internal::contentPane.scrollRect = null;
  309.             mx_internal::contentPane.opaqueBackground = null;
  310.             mx_internal::contentPane.cacheAsBitmap = false;
  311.          }
  312.          else
  313.          {
  314.             mx_internal::contentPane.scrollRect = new Rectangle(_loc2_,_loc3_,_loc4_,_loc5_);
  315.          }
  316.          if(focusPane)
  317.          {
  318.             focusPane.scrollRect = mx_internal::contentPane.scrollRect;
  319.          }
  320.          if(mx_internal::border && mx_internal::border is RectangularBorder && RectangularBorder(mx_internal::border).hasBackgroundImage)
  321.          {
  322.             RectangularBorder(mx_internal::border).adjustBackgroundImage();
  323.          }
  324.       }
  325.       
  326.       mx_internal function get createdComponents() : Array
  327.       {
  328.          return _createdComponents;
  329.       }
  330.       
  331.       public function get childDescriptors() : Array
  332.       {
  333.          return _childDescriptors;
  334.       }
  335.       
  336.       [Bindable("viewChanged")]
  337.       [Bindable("scroll")]
  338.       public function get verticalScrollPosition() : Number
  339.       {
  340.          if(!isNaN(verticalScrollPositionPending))
  341.          {
  342.             return verticalScrollPositionPending;
  343.          }
  344.          return _verticalScrollPosition;
  345.       }
  346.       
  347.       mx_internal function set createdComponents(param1:Array) : void
  348.       {
  349.          _createdComponents = param1;
  350.       }
  351.       
  352.       mx_internal function get childRepeaters() : Array
  353.       {
  354.          return _childRepeaters;
  355.       }
  356.       
  357.       [Bindable("viewChanged")]
  358.       [Bindable("scroll")]
  359.       public function get horizontalScrollPosition() : Number
  360.       {
  361.          if(!isNaN(horizontalScrollPositionPending))
  362.          {
  363.             return horizontalScrollPositionPending;
  364.          }
  365.          return _horizontalScrollPosition;
  366.       }
  367.       
  368.       override public function get focusPane() : Sprite
  369.       {
  370.          return _focusPane;
  371.       }
  372.       
  373.       private function createOrDestroyScrollbars(param1:Boolean, param2:Boolean, param3:Boolean) : Boolean
  374.       {
  375.          var _loc4_:Boolean = false;
  376.          var _loc5_:IFocusManager = null;
  377.          var _loc6_:String = null;
  378.          var _loc7_:String = null;
  379.          var _loc8_:Graphics = null;
  380.          _loc4_ = false;
  381.          if(param1 || param2 || param3)
  382.          {
  383.             createContentPane();
  384.          }
  385.          if(param1)
  386.          {
  387.             if(!horizontalScrollBar)
  388.             {
  389.                horizontalScrollBar = new HScrollBar();
  390.                horizontalScrollBar.name = "horizontalScrollBar";
  391.                if((_loc6_ = getStyle("horizontalScrollBarStyleName")) && horizontalScrollBar is ISimpleStyleClient)
  392.                {
  393.                   ISimpleStyleClient(horizontalScrollBar).styleName = _loc6_;
  394.                }
  395.                rawChildren.addChild(DisplayObject(horizontalScrollBar));
  396.                horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
  397.                horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
  398.                horizontalScrollBar.addEventListener(ScrollEvent.SCROLL,horizontalScrollBar_scrollHandler);
  399.                horizontalScrollBar.enabled = enabled;
  400.                if(horizontalScrollBar is IInvalidating)
  401.                {
  402.                   IInvalidating(horizontalScrollBar).validateNow();
  403.                }
  404.                invalidateDisplayList();
  405.                invalidateViewMetricsAndPadding();
  406.                _loc4_ = true;
  407.                if(!verticalScrollBar)
  408.                {
  409.                   addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
  410.                }
  411.             }
  412.          }
  413.          else if(horizontalScrollBar)
  414.          {
  415.             horizontalScrollBar.removeEventListener(ScrollEvent.SCROLL,horizontalScrollBar_scrollHandler);
  416.             rawChildren.removeChild(DisplayObject(horizontalScrollBar));
  417.             horizontalScrollBar = null;
  418.             viewableWidth = scrollableWidth = 0;
  419.             if(_horizontalScrollPosition != 0)
  420.             {
  421.                _horizontalScrollPosition = 0;
  422.                scrollPositionChanged = true;
  423.             }
  424.             invalidateDisplayList();
  425.             invalidateViewMetricsAndPadding();
  426.             _loc4_ = true;
  427.             _loc5_ = focusManager;
  428.             if(!verticalScrollBar && (!_loc5_ || _loc5_.getFocus() != this))
  429.             {
  430.                removeEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
  431.             }
  432.          }
  433.          if(param2)
  434.          {
  435.             if(!verticalScrollBar)
  436.             {
  437.                verticalScrollBar = new VScrollBar();
  438.                verticalScrollBar.name = "verticalScrollBar";
  439.                if((_loc7_ = getStyle("verticalScrollBarStyleName")) && verticalScrollBar is ISimpleStyleClient)
  440.                {
  441.                   ISimpleStyleClient(verticalScrollBar).styleName = _loc7_;
  442.                }
  443.                rawChildren.addChild(DisplayObject(verticalScrollBar));
  444.                verticalScrollBar.lineScrollSize = verticalLineScrollSize;
  445.                verticalScrollBar.pageScrollSize = verticalPageScrollSize;
  446.                verticalScrollBar.addEventListener(ScrollEvent.SCROLL,verticalScrollBar_scrollHandler);
  447.                verticalScrollBar.enabled = enabled;
  448.                if(verticalScrollBar is IInvalidating)
  449.                {
  450.                   IInvalidating(verticalScrollBar).validateNow();
  451.                }
  452.                invalidateDisplayList();
  453.                invalidateViewMetricsAndPadding();
  454.                _loc4_ = true;
  455.                if(!horizontalScrollBar)
  456.                {
  457.                   addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
  458.                }
  459.                addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);
  460.             }
  461.          }
  462.          else if(verticalScrollBar)
  463.          {
  464.             verticalScrollBar.removeEventListener(ScrollEvent.SCROLL,verticalScrollBar_scrollHandler);
  465.             rawChildren.removeChild(DisplayObject(verticalScrollBar));
  466.             verticalScrollBar = null;
  467.             viewableHeight = scrollableHeight = 0;
  468.             if(_verticalScrollPosition != 0)
  469.             {
  470.                _verticalScrollPosition = 0;
  471.                scrollPositionChanged = true;
  472.             }
  473.             invalidateDisplayList();
  474.             invalidateViewMetricsAndPadding();
  475.             _loc4_ = true;
  476.             _loc5_ = focusManager;
  477.             if(!horizontalScrollBar && (!_loc5_ || _loc5_.getFocus() != this))
  478.             {
  479.                removeEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
  480.             }
  481.             removeEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);
  482.          }
  483.          if(horizontalScrollBar && verticalScrollBar)
  484.          {
  485.             if(!whiteBox)
  486.             {
  487.                whiteBox = new FlexShape();
  488.                whiteBox.name = "whiteBox";
  489.                (_loc8_ = whiteBox.graphics).beginFill(16777215);
  490.                _loc8_.drawRect(0,0,verticalScrollBar.minWidth,horizontalScrollBar.minHeight);
  491.                _loc8_.endFill();
  492.                rawChildren.addChild(whiteBox);
  493.             }
  494.          }
  495.          else if(whiteBox)
  496.          {
  497.             rawChildren.removeChild(whiteBox);
  498.             whiteBox = null;
  499.          }
  500.          return _loc4_;
  501.       }
  502.       
  503.       override protected function keyDownHandler(param1:KeyboardEvent) : void
  504.       {
  505.          var _loc2_:Object = null;
  506.          var _loc3_:String = null;
  507.          var _loc4_:Number = NaN;
  508.          _loc2_ = getFocus();
  509.          if(_loc2_ is TextField)
  510.          {
  511.             return;
  512.          }
  513.          if(verticalScrollBar)
  514.          {
  515.             _loc3_ = ScrollEventDirection.VERTICAL;
  516.             _loc4_ = verticalScrollPosition;
  517.             switch(param1.keyCode)
  518.             {
  519.                case Keyboard.DOWN:
  520.                   verticalScrollPosition += verticalLineScrollSize;
  521.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.LINE_DOWN);
  522.                   param1.stopPropagation();
  523.                   break;
  524.                case Keyboard.UP:
  525.                   verticalScrollPosition -= verticalLineScrollSize;
  526.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.LINE_UP);
  527.                   param1.stopPropagation();
  528.                   break;
  529.                case Keyboard.PAGE_UP:
  530.                   verticalScrollPosition -= verticalPageScrollSize;
  531.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.PAGE_UP);
  532.                   param1.stopPropagation();
  533.                   break;
  534.                case Keyboard.PAGE_DOWN:
  535.                   verticalScrollPosition += verticalPageScrollSize;
  536.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.PAGE_DOWN);
  537.                   param1.stopPropagation();
  538.                   break;
  539.                case Keyboard.HOME:
  540.                   verticalScrollPosition = verticalScrollBar.minScrollPosition;
  541.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.AT_TOP);
  542.                   param1.stopPropagation();
  543.                   break;
  544.                case Keyboard.END:
  545.                   verticalScrollPosition = verticalScrollBar.maxScrollPosition;
  546.                   dispatchScrollEvent(_loc3_,_loc4_,verticalScrollPosition,ScrollEventDetail.AT_BOTTOM);
  547.                   param1.stopPropagation();
  548.             }
  549.          }
  550.          if(horizontalScrollBar)
  551.          {
  552.             _loc3_ = ScrollEventDirection.HORIZONTAL;
  553.             _loc4_ = horizontalScrollPosition;
  554.             switch(param1.keyCode)
  555.             {
  556.                case Keyboard.LEFT:
  557.                   horizontalScrollPosition -= horizontalLineScrollSize;
  558.                   dispatchScrollEvent(_loc3_,_loc4_,horizontalScrollPosition,ScrollEventDetail.LINE_LEFT);
  559.                   param1.stopPropagation();
  560.                   break;
  561.                case Keyboard.RIGHT:
  562.                   horizontalScrollPosition += horizontalLineScrollSize;
  563.                   dispatchScrollEvent(_loc3_,_loc4_,horizontalScrollPosition,ScrollEventDetail.LINE_RIGHT);
  564.                   param1.stopPropagation();
  565.             }
  566.          }
  567.       }
  568.       
  569.       protected function createBorder() : void
  570.       {
  571.          var _loc1_:Class = null;
  572.          if(!mx_internal::border && isBorderNeeded())
  573.          {
  574.             _loc1_ = getStyle("borderSkin");
  575.             border = new _loc1_();
  576.             mx_internal::border.name = "border";
  577.             if(mx_internal::border is IUIComponent)
  578.             {
  579.                IUIComponent(mx_internal::border).enabled = enabled;
  580.             }
  581.             if(mx_internal::border is ISimpleStyleClient)
  582.             {
  583.                ISimpleStyleClient(mx_internal::border).styleName = this;
  584.             }
  585.             rawChildren.addChildAt(DisplayObject(mx_internal::border),0);
  586.             invalidateDisplayList();
  587.          }
  588.       }
  589.       
  590.       public function set verticalScrollPosition(param1:Number) : void
  591.       {
  592.          if(_verticalScrollPosition == param1)
  593.          {
  594.             return;
  595.          }
  596.          _verticalScrollPosition = param1;
  597.          scrollPositionChanged = true;
  598.          if(!initialized)
  599.          {
  600.             verticalScrollPositionPending = param1;
  601.          }
  602.          invalidateDisplayList();
  603.          dispatchEvent(new Event("viewChanged"));
  604.       }
  605.       
  606.       private function horizontalScrollBar_scrollHandler(param1:Event) : void
  607.       {
  608.          var _loc2_:Number = NaN;
  609.          if(param1 is ScrollEvent)
  610.          {
  611.             _loc2_ = horizontalScrollPosition;
  612.             horizontalScrollPosition = horizontalScrollBar.scrollPosition;
  613.             dispatchScrollEvent(ScrollEventDirection.HORIZONTAL,_loc2_,horizontalScrollPosition,ScrollEvent(param1).detail);
  614.          }
  615.       }
  616.       
  617.       [Bindable("iconChanged")]
  618.       public function get icon() : Class
  619.       {
  620.          return _icon;
  621.       }
  622.       
  623.       public function set horizontalScrollBar(param1:ScrollBar) : void
  624.       {
  625.          _horizontalScrollBar = param1;
  626.       }
  627.       
  628.       [Bindable("verticalLineScrollSizeChanged")]
  629.       public function get verticalLineScrollSize() : Number
  630.       {
  631.          return _verticalLineScrollSize;
  632.       }
  633.       
  634.       mx_internal function get usePadding() : Boolean
  635.       {
  636.          return true;
  637.       }
  638.       
  639.       mx_internal function set childRepeaters(param1:Array) : void
  640.       {
  641.          _childRepeaters = param1;
  642.       }
  643.       
  644.       public function createComponentFromDescriptor(param1:ComponentDescriptor, param2:Boolean) : IFlexDisplayObject
  645.       {
  646.          var _loc3_:UIComponentDescriptor = null;
  647.          var _loc4_:Object = null;
  648.          var _loc5_:Class = null;
  649.          var _loc6_:IDeferredInstantiationUIComponent = null;
  650.          var _loc7_:* = null;
  651.          var _loc8_:Object = null;
  652.          var _loc9_:Array = null;
  653.          var _loc10_:IRepeaterClient = null;
  654.          var _loc11_:IStyleClient = null;
  655.          var _loc12_:* = null;
  656.          var _loc13_:String = null;
  657.          _loc3_ = UIComponentDescriptor(param1);
  658.          _loc4_ = _loc3_.properties;
  659.          if((numChildrenBefore != 0 || mx_internal::numChildrenCreated != -1) && _loc3_.instanceIndices == null && hasChildMatchingDescriptor(_loc3_))
  660.          {
  661.             return null;
  662.          }
  663.          UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
  664.          (_loc6_ = new (_loc5_ = _loc3_.type)()).id = _loc3_.id;
  665.          if(_loc6_.id && _loc6_.id != "")
  666.          {
  667.             _loc6_.name = _loc6_.id;
  668.          }
  669.          _loc6_.descriptor = _loc3_;
  670.          if(_loc4_.childDescriptors && _loc6_ is Container)
  671.          {
  672.             Container(_loc6_)._childDescriptors = _loc4_.childDescriptors;
  673.             delete _loc4_.childDescriptors;
  674.          }
  675.          for(_loc7_ in _loc4_)
  676.          {
  677.             _loc6_[_loc7_] = _loc4_[_loc7_];
  678.          }
  679.          if(_loc6_ is Container)
  680.          {
  681.             Container(_loc6_).recursionFlag = param2;
  682.          }
  683.          if(_loc3_.instanceIndices)
  684.          {
  685.             if(_loc6_ is IRepeaterClient)
  686.             {
  687.                (_loc10_ = IRepeaterClient(_loc6_)).instanceIndices = _loc3_.instanceIndices;
  688.                _loc10_.repeaters = _loc3_.repeaters;
  689.                _loc10_.repeaterIndices = _loc3_.repeaterIndices;
  690.             }
  691.          }
  692.          if(_loc6_ is IStyleClient)
  693.          {
  694.             _loc11_ = IStyleClient(_loc6_);
  695.             if(_loc3_.stylesFactory != null)
  696.             {
  697.                if(!_loc11_.styleDeclaration)
  698.                {
  699.                   _loc11_.styleDeclaration = new CSSStyleDeclaration();
  700.                }
  701.                _loc11_.styleDeclaration.factory = _loc3_.stylesFactory;
  702.             }
  703.          }
  704.          if(_loc8_ = _loc3_.events)
  705.          {
  706.             for(_loc12_ in _loc8_)
  707.             {
  708.                _loc13_ = _loc8_[_loc12_];
  709.                _loc6_.addEventListener(_loc12_,_loc3_.document[_loc13_]);
  710.             }
  711.          }
  712.          if(_loc9_ = _loc3_.effects)
  713.          {
  714.             _loc6_.registerEffects(_loc9_);
  715.          }
  716.          if(_loc6_ is IRepeaterClient)
  717.          {
  718.             IRepeaterClient(_loc6_).initializeRepeaterArrays(this);
  719.          }
  720.          _loc6_.createReferenceOnParentDocument(IFlexDisplayObject(_loc3_.document));
  721.          if(!_loc6_.document)
  722.          {
  723.             _loc6_.document = _loc3_.document;
  724.          }
  725.          if(_loc6_ is IRepeater)
  726.          {
  727.             if(!mx_internal::childRepeaters)
  728.             {
  729.                childRepeaters = [];
  730.             }
  731.             mx_internal::childRepeaters.push(_loc6_);
  732.             _loc6_.executeBindings();
  733.             IRepeater(_loc6_).initializeRepeater(this,param2);
  734.          }
  735.          else
  736.          {
  737.             addChild(DisplayObject(_loc6_));
  738.             _loc6_.executeBindings();
  739.             if(creationPolicy == ContainerCreationPolicy.QUEUED || creationPolicy == ContainerCreationPolicy.NONE)
  740.             {
  741.                _loc6_.addEventListener(FlexEvent.CREATION_COMPLETE,creationCompleteHandler);
  742.             }
  743.          }
  744.          return _loc6_;
  745.       }
  746.       
  747.       public function set horizontalScrollPosition(param1:Number) : void
  748.       {
  749.          if(_horizontalScrollPosition == param1)
  750.          {
  751.             return;
  752.          }
  753.          _horizontalScrollPosition = param1;
  754.          scrollPositionChanged = true;
  755.          if(!initialized)
  756.          {
  757.             horizontalScrollPositionPending = param1;
  758.          }
  759.          invalidateDisplayList();
  760.          dispatchEvent(new Event("viewChanged"));
  761.       }
  762.       
  763.       override public function set focusPane(param1:Sprite) : void
  764.       {
  765.          var _loc2_:Boolean = false;
  766.          var _loc3_:Boolean = false;
  767.          _loc2_ = mx_internal::invalidateSizeFlag;
  768.          _loc3_ = mx_internal::invalidateDisplayListFlag;
  769.          invalidateSizeFlag = true;
  770.          invalidateDisplayListFlag = true;
  771.          if(param1)
  772.          {
  773.             rawChildren.addChild(param1);
  774.             param1.x = 0;
  775.             param1.y = 0;
  776.             param1.scrollRect = null;
  777.             _focusPane = param1;
  778.          }
  779.          else
  780.          {
  781.             rawChildren.removeChild(_focusPane);
  782.             _focusPane = null;
  783.          }
  784.          if(param1 && mx_internal::contentPane)
  785.          {
  786.             param1.x = mx_internal::contentPane.x;
  787.             param1.y = mx_internal::contentPane.y;
  788.             param1.scrollRect = mx_internal::contentPane.scrollRect;
  789.          }
  790.          invalidateSizeFlag = _loc2_;
  791.          invalidateDisplayListFlag = _loc3_;
  792.       }
  793.       
  794.       [Bindable("horizontalScrollPolicyChanged")]
  795.       public function get horizontalScrollPolicy() : String
  796.       {
  797.          return mx_internal::_horizontalScrollPolicy;
  798.       }
  799.       
  800.       [Bindable("horizontalLineScrollSizeChanged")]
  801.       public function get horizontalLineScrollSize() : Number
  802.       {
  803.          return _horizontalLineScrollSize;
  804.       }
  805.       
  806.       private function updateBackgroundImageRect() : void
  807.       {
  808.          var _loc1_:RectangularBorder = null;
  809.          var _loc2_:EdgeMetrics = null;
  810.          var _loc3_:Number = NaN;
  811.          var _loc4_:Number = NaN;
  812.          _loc1_ = mx_internal::border as RectangularBorder;
  813.          if(!_loc1_)
  814.          {
  815.             return;
  816.          }
  817.          if(viewableWidth == 0 && viewableHeight == 0)
  818.          {
  819.             _loc1_.backgroundImageRect = null;
  820.             return;
  821.          }
  822.          _loc2_ = viewMetrics;
  823.          _loc3_ = !!viewableWidth ? Number(viewableWidth) : Number(unscaledWidth - _loc2_.left - _loc2_.right);
  824.          _loc4_ = !!viewableHeight ? Number(viewableHeight) : Number(unscaledHeight - _loc2_.top - _loc2_.bottom);
  825.          if(getStyle("backgroundAttachment") == "fixed")
  826.          {
  827.             _loc1_.backgroundImageRect = new Rectangle(_loc2_.left,_loc2_.top,_loc3_,_loc4_);
  828.          }
  829.          else
  830.          {
  831.             _loc1_.backgroundImageRect = new Rectangle(_loc2_.left,_loc2_.top,Math.max(scrollableWidth,_loc3_),Math.max(scrollableHeight,_loc4_));
  832.          }
  833.       }
  834.       
  835.       mx_internal function invalidateViewMetricsAndPadding() : void
  836.       {
  837.          _viewMetricsAndPadding = null;
  838.       }
  839.       
  840.       private function mouseWheelHandler(param1:MouseEvent) : void
  841.       {
  842.          var _loc2_:int = 0;
  843.          var _loc3_:int = 0;
  844.          var _loc4_:Number = NaN;
  845.          var _loc5_:Number = NaN;
  846.          if(verticalScrollBar)
  847.          {
  848.             param1.stopPropagation();
  849.             _loc2_ = param1.delta <= 0 ? 1 : -1;
  850.             _loc3_ = !!verticalScrollBar ? int(verticalScrollBar.lineScrollSize) : 1;
  851.             _loc4_ = Math.max(Math.abs(param1.delta),_loc3_);
  852.             _loc5_ = verticalScrollPosition;
  853.             verticalScrollPosition += 3 * _loc4_ * _loc2_;
  854.             dispatchScrollEvent(ScrollEventDirection.VERTICAL,_loc5_,verticalScrollPosition,param1.delta <= 0 ? ScrollEventDetail.LINE_UP : ScrollEventDetail.LINE_DOWN);
  855.          }
  856.       }
  857.       
  858.       mx_internal function createContentPane() : void
  859.       {
  860.          var _loc1_:int = 0;
  861.          var _loc2_:Sprite = null;
  862.          var _loc3_:int = 0;
  863.          var _loc4_:int = 0;
  864.          var _loc5_:IUIComponent = null;
  865.          if(mx_internal::contentPane)
  866.          {
  867.             return;
  868.          }
  869.          creatingContentPane = true;
  870.          _loc1_ = numChildren;
  871.          _loc2_ = new FlexSprite();
  872.          _loc2_.name = "contentPane";
  873.          _loc2_.tabChildren = true;
  874.          if(mx_internal::border)
  875.          {
  876.             _loc3_ = rawChildren.getChildIndex(DisplayObject(mx_internal::border)) + 1;
  877.             if(mx_internal::border is RectangularBorder && RectangularBorder(mx_internal::border).hasBackgroundImage)
  878.             {
  879.                _loc3_++;
  880.             }
  881.          }
  882.          else
  883.          {
  884.             _loc3_ = 0;
  885.          }
  886.          rawChildren.addChildAt(_loc2_,_loc3_);
  887.          _loc4_ = 0;
  888.          while(_loc4_ < _loc1_)
  889.          {
  890.             _loc5_ = IUIComponent(super.getChildAt(_firstChildIndex));
  891.             _loc2_.addChild(DisplayObject(_loc5_));
  892.             _loc5_.parentChanged(_loc2_);
  893.             --_numChildren;
  894.             _loc4_++;
  895.          }
  896.          contentPane = _loc2_;
  897.          creatingContentPane = false;
  898.          mx_internal::contentPane.visible = true;
  899.       }
  900.       
  901.       public function get creationPolicy() : String
  902.       {
  903.          return _creationPolicy;
  904.       }
  905.       
  906.       public function get defaultButton() : IFlexDisplayObject
  907.       {
  908.          return _defaultButton;
  909.       }
  910.       
  911.       [Bindable("verticalScrollPolicyChanged")]
  912.       public function get verticalScrollPolicy() : String
  913.       {
  914.          return mx_internal::_verticalScrollPolicy;
  915.       }
  916.       
  917.       private function verticalScrollBar_scrollHandler(param1:Event) : void
  918.       {
  919.          var _loc2_:Number = NaN;
  920.          if(param1 is ScrollEvent)
  921.          {
  922.             _loc2_ = verticalScrollPosition;
  923.             verticalScrollPosition = verticalScrollBar.scrollPosition;
  924.             dispatchScrollEvent(ScrollEventDirection.VERTICAL,_loc2_,verticalScrollPosition,ScrollEvent(param1).detail);
  925.          }
  926.       }
  927.       
  928.       mx_internal function rawChildren_removeChild(param1:DisplayObject) : DisplayObject
  929.       {
  930.          var _loc2_:int = 0;
  931.          _loc2_ = rawChildren_getChildIndex(param1);
  932.          return rawChildren_removeChildAt(_loc2_);
  933.       }
  934.       
  935.       mx_internal final function get $numChildren() : int
  936.       {
  937.          return super.numChildren;
  938.       }
  939.       
  940.       override public function addChild(param1:DisplayObject) : DisplayObject
  941.       {
  942.          return addChildAt(param1,numChildren);
  943.       }
  944.       
  945.       override public function getChildIndex(param1:DisplayObject) : int
  946.       {
  947.          var _loc2_:int = 0;
  948.          if(mx_internal::contentPane)
  949.          {
  950.             return mx_internal::contentPane.getChildIndex(param1);
  951.          }
  952.          return int(super.getChildIndex(param1) - _firstChildIndex);
  953.       }
  954.       
  955.       public function set icon(param1:Class) : void
  956.       {
  957.          _icon = param1;
  958.          dispatchEvent(new Event("iconChanged"));
  959.       }
  960.       
  961.       mx_internal function rawChildren_contains(param1:DisplayObject) : Boolean
  962.       {
  963.          return super.contains(param1);
  964.       }
  965.       
  966.       override public function executeBindings(param1:Boolean = false) : void
  967.       {
  968.          var _loc2_:Object = null;
  969.          _loc2_ = descriptor && descriptor.document ? descriptor.document : parentDocument;
  970.          BindingManager.executeBindings(_loc2_,id,this);
  971.          if(param1)
  972.          {
  973.             executeChildBindings(param1);
  974.          }
  975.       }
  976.       
  977.       mx_internal function rawChildren_getChildIndex(param1:DisplayObject) : int
  978.       {
  979.          return super.getChildIndex(param1);
  980.       }
  981.       
  982.       public function set verticalLineScrollSize(param1:Number) : void
  983.       {
  984.          scrollPropertiesChanged = true;
  985.          _verticalLineScrollSize = param1;
  986.          invalidateDisplayList();
  987.          dispatchEvent(new Event("verticalLineScrollSizeChanged"));
  988.       }
  989.       
  990.       mx_internal function getScrollableRect() : Rectangle
  991.       {
  992.          var _loc1_:Number = NaN;
  993.          var _loc2_:Number = NaN;
  994.          var _loc3_:Number = NaN;
  995.          var _loc4_:Number = NaN;
  996.          var _loc5_:int = 0;
  997.          var _loc6_:int = 0;
  998.          var _loc7_:EdgeMetrics = null;
  999.          var _loc8_:Rectangle = null;
  1000.          var _loc9_:DisplayObject = null;
  1001.          _loc1_ = 0;
  1002.          _loc2_ = 0;
  1003.          _loc3_ = 0;
  1004.          _loc4_ = 0;
  1005.          _loc5_ = numChildren;
  1006.          _loc6_ = 0;
  1007.          while(_loc6_ < _loc5_)
  1008.          {
  1009.             if(!((_loc9_ = getChildAt(_loc6_)) is IUIComponent && !IUIComponent(_loc9_).includeInLayout))
  1010.             {
  1011.                _loc1_ = Math.min(_loc1_,_loc9_.x);
  1012.                _loc2_ = Math.min(_loc2_,_loc9_.y);
  1013.                if(!isNaN(_loc9_.width))
  1014.                {
  1015.                   _loc3_ = Math.max(_loc3_,_loc9_.x + _loc9_.width);
  1016.                }
  1017.                if(!isNaN(_loc9_.height))
  1018.                {
  1019.                   _loc4_ = Math.max(_loc4_,_loc9_.y + _loc9_.height);
  1020.                }
  1021.             }
  1022.             _loc6_++;
  1023.          }
  1024.          _loc7_ = viewMetrics;
  1025.          (_loc8_ = new Rectangle()).left = _loc1_;
  1026.          _loc8_.top = _loc2_;
  1027.          _loc8_.right = _loc3_;
  1028.          _loc8_.bottom = _loc4_;
  1029.          if(mx_internal::usePadding)
  1030.          {
  1031.             _loc8_.right += getStyle("paddingRight");
  1032.             _loc8_.bottom += getStyle("paddingBottom");
  1033.          }
  1034.          return _loc8_;
  1035.       }
  1036.       
  1037.       mx_internal function get numRepeaters() : int
  1038.       {
  1039.          return !!mx_internal::childRepeaters ? int(mx_internal::childRepeaters.length) : 0;
  1040.       }
  1041.       
  1042.       public function get creationIndex() : int
  1043.       {
  1044.          return _creationIndex;
  1045.       }
  1046.       
  1047.       override mx_internal function childAdded(param1:DisplayObject) : void
  1048.       {
  1049.          var _loc2_:ChildExistenceChangedEvent = null;
  1050.          dispatchEvent(new Event("childrenChanged"));
  1051.          _loc2_ = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_ADD);
  1052.          _loc2_.relatedObject = param1;
  1053.          dispatchEvent(_loc2_);
  1054.          param1.dispatchEvent(new FlexEvent(FlexEvent.ADD));
  1055.          super.childAdded(param1);
  1056.       }
  1057.       
  1058.       public function set horizontalScrollPolicy(param1:String) : void
  1059.       {
  1060.          if(mx_internal::_horizontalScrollPolicy != param1)
  1061.          {
  1062.             _horizontalScrollPolicy = param1;
  1063.             invalidateDisplayList();
  1064.             dispatchEvent(new Event("horizontalScrollPolicyChanged"));
  1065.          }
  1066.       }
  1067.       
  1068.       override public function globalToContent(param1:Point) : Point
  1069.       {
  1070.          if(mx_internal::contentPane)
  1071.          {
  1072.             return mx_internal::contentPane.globalToLocal(param1);
  1073.          }
  1074.          return globalToLocal(param1);
  1075.       }
  1076.       
  1077.       override public function removeChildAt(param1:int) : DisplayObject
  1078.       {
  1079.          return removeChild(getChildAt(param1));
  1080.       }
  1081.       
  1082.       override mx_internal function fillOverlay(param1:UIComponent, param2:uint, param3:RoundedRectangle = null) : void
  1083.       {
  1084.          var _loc4_:EdgeMetrics = null;
  1085.          var _loc5_:Number = NaN;
  1086.          var _loc6_:Graphics = null;
  1087.          _loc4_ = viewMetrics;
  1088.          _loc5_ = 0;
  1089.          if(!param3)
  1090.          {
  1091.             param3 = new RoundedRectangle(_loc4_.left,_loc4_.top,unscaledWidth - _loc4_.right - _loc4_.left,unscaledHeight - _loc4_.bottom - _loc4_.top,_loc5_);
  1092.          }
  1093.          if(isNaN(param3.x) || isNaN(param3.y) || isNaN(param3.width) || isNaN(param3.height) || isNaN(param3.cornerRadius))
  1094.          {
  1095.             return;
  1096.          }
  1097.          (_loc6_ = param1.graphics).clear();
  1098.          _loc6_.beginFill(param2);
  1099.          _loc6_.drawRoundRect(param3.x,param3.y,param3.width,param3.height,param3.cornerRadius * 2,param3.cornerRadius * 2);
  1100.          _loc6_.endFill();
  1101.       }
  1102.       
  1103.       public function createComponentsFromDescriptors(param1:Boolean = true) : void
  1104.       {
  1105.          var _loc2_:int = 0;
  1106.          var _loc3_:int = 0;
  1107.          var _loc4_:IFlexDisplayObject = null;
  1108.          numChildrenBefore = numChildren;
  1109.          createdComponents = [];
  1110.          _loc2_ = !!childDescriptors ? int(childDescriptors.length) : 0;
  1111.          _loc3_ = 0;
  1112.          while(_loc3_ < _loc2_)
  1113.          {
  1114.             _loc4_ = createComponentFromDescriptor(childDescriptors[_loc3_],param1);
  1115.             mx_internal::createdComponents.push(_loc4_);
  1116.             _loc3_++;
  1117.          }
  1118.          if(creationPolicy == ContainerCreationPolicy.QUEUED || creationPolicy == ContainerCreationPolicy.NONE)
  1119.          {
  1120.             UIComponentGlobals.layoutManager.usePhasedInstantiation = false;
  1121.          }
  1122.          numChildrenCreated = numChildren - numChildrenBefore;
  1123.          processedDescriptors = true;
  1124.       }
  1125.       
  1126.       override mx_internal function removingChild(param1:DisplayObject) : void
  1127.       {
  1128.          var _loc2_:ChildExistenceChangedEvent = null;
  1129.          super.removingChild(param1);
  1130.          param1.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
  1131.          _loc2_ = new ChildExistenceChangedEvent(ChildExistenceChangedEvent.CHILD_REMOVE);
  1132.          _loc2_.relatedObject = param1;
  1133.          dispatchEvent(_loc2_);
  1134.       }
  1135.       
  1136.       private function isBorderNeeded() : Boolean
  1137.       {
  1138.          var _loc1_:Object = null;
  1139.          _loc1_ = getStyle("borderStyle");
  1140.          if(_loc1_)
  1141.          {
  1142.             if(_loc1_ != "none" || _loc1_ == "none" && getStyle("mouseShield"))
  1143.             {
  1144.                return true;
  1145.             }
  1146.          }
  1147.          _loc1_ = getStyle("backgroundColor");
  1148.          if(_loc1_ !== null && _loc1_ !== "")
  1149.          {
  1150.             return true;
  1151.          }
  1152.          _loc1_ = getStyle("backgroundImage");
  1153.          return _loc1_ != null && _loc1_ != "";
  1154.       }
  1155.       
  1156.       mx_internal function rawChildren_removeChildAt(param1:int) : DisplayObject
  1157.       {
  1158.          var _loc2_:DisplayObject = null;
  1159.          _loc2_ = super.getChildAt(param1);
  1160.          super.removingChild(_loc2_);
  1161.          $removeChildAt(param1);
  1162.          super.childRemoved(_loc2_);
  1163.          if(_firstChildIndex < param1 && param1 < _firstChildIndex + mx_internal::_numChildren)
  1164.          {
  1165.             --_numChildren;
  1166.          }
  1167.          else if(mx_internal::_numChildren == 0 || param1 < _firstChildIndex)
  1168.          {
  1169.             --_firstChildIndex;
  1170.          }
  1171.          invalidateSize();
  1172.          invalidateDisplayList();
  1173.          dispatchEvent(new Event("childrenChanged"));
  1174.          return _loc2_;
  1175.       }
  1176.       
  1177.       [Bindable("verticalPageScrollSizeChanged")]
  1178.       public function get verticalPageScrollSize() : Number
  1179.       {
  1180.          return _verticalPageScrollSize;
  1181.       }
  1182.       
  1183.       override public function validateDisplayList() : void
  1184.       {
  1185.          var _loc1_:EdgeMetrics = null;
  1186.          var _loc2_:Number = NaN;
  1187.          var _loc3_:Number = NaN;
  1188.          var _loc4_:Object = null;
  1189.          var _loc5_:Number = NaN;
  1190.          var _loc6_:Number = NaN;
  1191.          var _loc7_:Number = NaN;
  1192.          if(_autoLayout || forceLayout)
  1193.          {
  1194.             doingLayout = true;
  1195.             super.validateDisplayList();
  1196.             doingLayout = false;
  1197.          }
  1198.          else
  1199.          {
  1200.             layoutChrome(unscaledWidth,unscaledHeight);
  1201.          }
  1202.          invalidateDisplayListFlag = true;
  1203.          if(createContentPaneAndScrollbarsIfNeeded())
  1204.          {
  1205.             if(_autoLayout || forceLayout)
  1206.             {
  1207.                doingLayout = true;
  1208.                super.validateDisplayList();
  1209.                doingLayout = false;
  1210.             }
  1211.             createContentPaneAndScrollbarsIfNeeded();
  1212.          }
  1213.          if(mx_internal::contentPane)
  1214.          {
  1215.             _loc1_ = viewMetrics;
  1216.             if(mx_internal::overlay)
  1217.             {
  1218.                mx_internal::overlay.x = 0;
  1219.                mx_internal::overlay.y = 0;
  1220.                mx_internal::overlay.width = unscaledWidth;
  1221.                mx_internal::overlay.height = unscaledHeight;
  1222.             }
  1223.             if(horizontalScrollBar || verticalScrollBar)
  1224.             {
  1225.                if(verticalScrollBar && verticalScrollPolicy == ScrollPolicy.ON)
  1226.                {
  1227.                   _loc1_.right -= verticalScrollBar.minWidth;
  1228.                }
  1229.                if(horizontalScrollBar && horizontalScrollPolicy == ScrollPolicy.ON)
  1230.                {
  1231.                   _loc1_.bottom -= horizontalScrollBar.minHeight;
  1232.                }
  1233.                if(horizontalScrollBar)
  1234.                {
  1235.                   _loc2_ = unscaledWidth - _loc1_.left - _loc1_.right;
  1236.                   if(verticalScrollBar)
  1237.                   {
  1238.                      _loc2_ -= verticalScrollBar.minWidth;
  1239.                   }
  1240.                   horizontalScrollBar.setActualSize(_loc2_,horizontalScrollBar.minHeight);
  1241.                   horizontalScrollBar.move(_loc1_.left,unscaledHeight - _loc1_.bottom - horizontalScrollBar.minHeight);
  1242.                }
  1243.                if(verticalScrollBar)
  1244.                {
  1245.                   _loc3_ = unscaledHeight - _loc1_.top - _loc1_.bottom;
  1246.                   if(horizontalScrollBar)
  1247.                   {
  1248.                      _loc3_ -= horizontalScrollBar.minHeight;
  1249.                   }
  1250.                   verticalScrollBar.setActualSize(verticalScrollBar.minWidth,_loc3_);
  1251.                   verticalScrollBar.move(unscaledWidth - _loc1_.right - verticalScrollBar.minWidth,_loc1_.top);
  1252.                }
  1253.                if(whiteBox)
  1254.                {
  1255.                   whiteBox.x = verticalScrollBar.x;
  1256.                   whiteBox.y = horizontalScrollBar.y;
  1257.                }
  1258.             }
  1259.             mx_internal::contentPane.x = _loc1_.left;
  1260.             mx_internal::contentPane.y = _loc1_.top;
  1261.             if(focusPane)
  1262.             {
  1263.                focusPane.x = _loc1_.left;
  1264.                focusPane.y = _loc1_.top;
  1265.             }
  1266.             scrollChildren();
  1267.          }
  1268.          invalidateDisplayListFlag = false;
  1269.          if(mx_internal::blocker)
  1270.          {
  1271.             _loc1_ = viewMetrics;
  1272.             if(!(_loc4_ = !!enabled ? null : getStyle("backgroundDisabledColor")))
  1273.             {
  1274.                _loc4_ = getStyle("backgroundColor");
  1275.             }
  1276.             if(_loc4_ === null || isNaN(Number(_loc4_)))
  1277.             {
  1278.                _loc4_ = 16777215;
  1279.             }
  1280.             _loc5_ = getStyle("disabledOverlayAlpha");
  1281.             if(isNaN(_loc5_))
  1282.             {
  1283.                _loc5_ = 0.6;
  1284.             }
  1285.             mx_internal::blocker.x = _loc1_.left;
  1286.             mx_internal::blocker.y = _loc1_.top;
  1287.             _loc6_ = unscaledWidth - (_loc1_.left + _loc1_.right);
  1288.             _loc7_ = unscaledHeight - (_loc1_.top + _loc1_.bottom);
  1289.             mx_internal::blocker.graphics.clear();
  1290.             mx_internal::blocker.graphics.beginFill(uint(_loc4_),_loc5_);
  1291.             mx_internal::blocker.graphics.drawRect(0,0,_loc6_,_loc7_);
  1292.             mx_internal::blocker.graphics.endFill();
  1293.             rawChildren.setChildIndex(mx_internal::blocker,rawChildren.numChildren - 1);
  1294.          }
  1295.       }
  1296.       
  1297.       public function set horizontalLineScrollSize(param1:Number) : void
  1298.       {
  1299.          scrollPropertiesChanged = true;
  1300.          _horizontalLineScrollSize = param1;
  1301.          invalidateDisplayList();
  1302.          dispatchEvent(new Event("horizontalLineScrollSizeChanged"));
  1303.       }
  1304.       
  1305.       override public function contentToGlobal(param1:Point) : Point
  1306.       {
  1307.          if(mx_internal::contentPane)
  1308.          {
  1309.             return mx_internal::contentPane.localToGlobal(param1);
  1310.          }
  1311.          return localToGlobal(param1);
  1312.       }
  1313.       
  1314.       mx_internal function set forceClipping(param1:Boolean) : void
  1315.       {
  1316.          if(_clipContent)
  1317.          {
  1318.             if(param1)
  1319.             {
  1320.                ++_forceClippingCount;
  1321.             }
  1322.             else
  1323.             {
  1324.                --_forceClippingCount;
  1325.             }
  1326.             createContentPane();
  1327.             scrollChildren();
  1328.          }
  1329.       }
  1330.       
  1331.       [Bindable("horizontalPageScrollSizeChanged")]
  1332.       public function get horizontalPageScrollSize() : Number
  1333.       {
  1334.          return _horizontalPageScrollSize;
  1335.       }
  1336.       
  1337.       public function set defaultButton(param1:IFlexDisplayObject) : void
  1338.       {
  1339.          _defaultButton = param1;
  1340.          ContainerGlobals.focusedContainer = null;
  1341.       }
  1342.       
  1343.       private function hasChildMatchingDescriptor(param1:UIComponentDescriptor) : Boolean
  1344.       {
  1345.          var _loc2_:String = null;
  1346.          var _loc3_:int = 0;
  1347.          var _loc4_:int = 0;
  1348.          var _loc5_:IUIComponent = null;
  1349.          _loc2_ = param1.id;
  1350.          if(_loc2_ != null && document[_loc2_] == null)
  1351.          {
  1352.             return false;
  1353.          }
  1354.          _loc3_ = numChildren;
  1355.          _loc4_ = 0;
  1356.          while(_loc4_ < _loc3_)
  1357.          {
  1358.             if((_loc5_ = IUIComponent(getChildAt(_loc4_))) is IDeferredInstantiationUIComponent && IDeferredInstantiationUIComponent(_loc5_).descriptor == param1)
  1359.             {
  1360.                return true;
  1361.             }
  1362.             _loc4_++;
  1363.          }
  1364.          if(mx_internal::childRepeaters)
  1365.          {
  1366.             _loc3_ = mx_internal::childRepeaters.length;
  1367.             _loc4_ = 0;
  1368.             while(_loc4_ < _loc3_)
  1369.             {
  1370.                if(IDeferredInstantiationUIComponent(mx_internal::childRepeaters[_loc4_]).descriptor == param1)
  1371.                {
  1372.                   return true;
  1373.                }
  1374.                _loc4_++;
  1375.             }
  1376.          }
  1377.          return false;
  1378.       }
  1379.       
  1380.       override protected function commitProperties() : void
  1381.       {
  1382.          var _loc1_:String = null;
  1383.          super.commitProperties();
  1384.          if(changedStyles)
  1385.          {
  1386.             _loc1_ = changedStyles == MULTIPLE_PROPERTIES ? null : changedStyles;
  1387.             super.notifyStyleChangeInChildren(_loc1_,true);
  1388.             changedStyles = null;
  1389.          }
  1390.          createOrDestroyBlocker();
  1391.       }
  1392.       
  1393.       override public function finishPrint(param1:Object, param2:IFlexDisplayObject) : void
  1394.       {
  1395.          if(param1)
  1396.          {
  1397.             mx_internal::contentPane.scrollRect = Rectangle(param1);
  1398.          }
  1399.          super.finishPrint(param1,param2);
  1400.       }
  1401.       
  1402.       public function get autoLayout() : Boolean
  1403.       {
  1404.          return _autoLayout;
  1405.       }
  1406.       
  1407.       public function get maxHorizontalScrollPosition() : Number
  1408.       {
  1409.          return !!horizontalScrollBar ? Number(horizontalScrollBar.maxScrollPosition) : Number(Math.max(scrollableWidth - viewableWidth,0));
  1410.       }
  1411.       
  1412.       public function set creationPolicy(param1:String) : void
  1413.       {
  1414.          _creationPolicy = param1;
  1415.          setActualCreationPolicies(param1);
  1416.       }
  1417.       
  1418.       public function set verticalScrollPolicy(param1:String) : void
  1419.       {
  1420.          if(mx_internal::_verticalScrollPolicy != param1)
  1421.          {
  1422.             _verticalScrollPolicy = param1;
  1423.             invalidateDisplayList();
  1424.             dispatchEvent(new Event("verticalScrollPolicyChanged"));
  1425.          }
  1426.       }
  1427.       
  1428.       override public function prepareToPrint(param1:IFlexDisplayObject) : Object
  1429.       {
  1430.          var _loc2_:Rectangle = null;
  1431.          _loc2_ = mx_internal::contentPane && mx_internal::contentPane.scrollRect ? mx_internal::contentPane.scrollRect : null;
  1432.          if(_loc2_)
  1433.          {
  1434.             mx_internal::contentPane.scrollRect = null;
  1435.          }
  1436.          super.prepareToPrint(param1);
  1437.          return _loc2_;
  1438.       }
  1439.       
  1440.       public function set label(param1:String) : void
  1441.       {
  1442.          _label = param1;
  1443.          dispatchEvent(new Event("labelChanged"));
  1444.       }
  1445.       
  1446.       override protected function initializationComplete() : void
  1447.       {
  1448.       }
  1449.       
  1450.       override mx_internal function addingChild(param1:DisplayObject) : void
  1451.       {
  1452.          var _loc2_:IUIComponent = null;
  1453.          _loc2_ = IUIComponent(param1);
  1454.          super.addingChild(param1);
  1455.          invalidateSize();
  1456.          invalidateDisplayList();
  1457.          if(!mx_internal::contentPane)
  1458.          {
  1459.             if(mx_internal::_numChildren == 0)
  1460.             {
  1461.                _firstChildIndex = super.numChildren;
  1462.             }
  1463.             ++_numChildren;
  1464.          }
  1465.          if(mx_internal::contentPane && !autoLayout)
  1466.          {
  1467.             forceLayout = true;
  1468.             UIComponentGlobals.layoutManager.addEventListener("updateComplete",layoutCompleteHandler,false,0,true);
  1469.          }
  1470.       }
  1471.       
  1472.       mx_internal function setActualCreationPolicies(param1:String) : void
  1473.       {
  1474.          var _loc2_:String = null;
  1475.          var _loc3_:int = 0;
  1476.          var _loc4_:int = 0;
  1477.          var _loc5_:IFlexDisplayObject = null;
  1478.          var _loc6_:Container = null;
  1479.          actualCreationPolicy = param1;
  1480.          _loc2_ = param1;
  1481.          if(param1 == ContainerCreationPolicy.QUEUED)
  1482.          {
  1483.             _loc2_ = ContainerCreationPolicy.AUTO;
  1484.          }
  1485.          _loc3_ = numChildren;
  1486.          _loc4_ = 0;
  1487.          while(_loc4_ < _loc3_)
  1488.          {
  1489.             if((_loc5_ = IFlexDisplayObject(getChildAt(_loc4_))) is Container)
  1490.             {
  1491.                if((_loc6_ = Container(_loc5_)).creationPolicy == null)
  1492.                {
  1493.                   _loc6_.setActualCreationPolicies(_loc2_);
  1494.                }
  1495.             }
  1496.             _loc4_++;
  1497.          }
  1498.       }
  1499.       
  1500.       override public function set doubleClickEnabled(param1:Boolean) : void
  1501.       {
  1502.          var _loc2_:int = 0;
  1503.          var _loc3_:int = 0;
  1504.          var _loc4_:InteractiveObject = null;
  1505.          super.doubleClickEnabled = param1;
  1506.          if(mx_internal::contentPane)
  1507.          {
  1508.             _loc2_ = mx_internal::contentPane.numChildren;
  1509.             _loc3_ = 0;
  1510.             while(_loc3_ < _loc2_)
  1511.             {
  1512.                if(_loc4_ = mx_internal::contentPane.getChildAt(_loc3_) as InteractiveObject)
  1513.                {
  1514.                   _loc4_.doubleClickEnabled = param1;
  1515.                }
  1516.                _loc3_++;
  1517.             }
  1518.          }
  1519.       }
  1520.       
  1521.       override public function contains(param1:DisplayObject) : Boolean
  1522.       {
  1523.          if(mx_internal::contentPane)
  1524.          {
  1525.             return mx_internal::contentPane.contains(param1);
  1526.          }
  1527.          return super.contains(param1);
  1528.       }
  1529.       
  1530.       public function set clipContent(param1:Boolean) : void
  1531.       {
  1532.          if(_clipContent != param1)
  1533.          {
  1534.             _clipContent = param1;
  1535.             invalidateDisplayList();
  1536.          }
  1537.       }
  1538.       
  1539.       override public function notifyStyleChangeInChildren(param1:String, param2:Boolean) : void
  1540.       {
  1541.          var _loc3_:int = 0;
  1542.          var _loc4_:int = 0;
  1543.          var _loc5_:ISimpleStyleClient = null;
  1544.          _loc3_ = super.numChildren;
  1545.          _loc4_ = 0;
  1546.          while(_loc4_ < _loc3_)
  1547.          {
  1548.             if(mx_internal::contentPane || _loc4_ < _firstChildIndex || _loc4_ >= _firstChildIndex + mx_internal::_numChildren)
  1549.             {
  1550.                if(_loc5_ = super.getChildAt(_loc4_) as ISimpleStyleClient)
  1551.                {
  1552.                   _loc5_.styleChanged(param1);
  1553.                   if(_loc5_ is IStyleClient)
  1554.                   {
  1555.                      IStyleClient(_loc5_).notifyStyleChangeInChildren(param1,param2);
  1556.                   }
  1557.                }
  1558.             }
  1559.             _loc4_++;
  1560.          }
  1561.          if(param2)
  1562.          {
  1563.             changedStyles = changedStyles != null || param1 == null ? MULTIPLE_PROPERTIES : param1;
  1564.             invalidateProperties();
  1565.          }
  1566.       }
  1567.       
  1568.       override public function get contentMouseX() : Number
  1569.       {
  1570.          if(mx_internal::contentPane)
  1571.          {
  1572.             return mx_internal::contentPane.mouseX;
  1573.          }
  1574.          return super.contentMouseX;
  1575.       }
  1576.       
  1577.       override public function get contentMouseY() : Number
  1578.       {
  1579.          if(mx_internal::contentPane)
  1580.          {
  1581.             return mx_internal::contentPane.mouseY;
  1582.          }
  1583.          return super.contentMouseY;
  1584.       }
  1585.       
  1586.       override public function validateSize(param1:Boolean = false) : void
  1587.       {
  1588.          var _loc2_:int = 0;
  1589.          var _loc3_:int = 0;
  1590.          var _loc4_:DisplayObject = null;
  1591.          if(autoLayout == false && forceLayout == false)
  1592.          {
  1593.             if(param1)
  1594.             {
  1595.                _loc2_ = super.numChildren;
  1596.                _loc3_ = 0;
  1597.                while(_loc3_ < _loc2_)
  1598.                {
  1599.                   if((_loc4_ = super.getChildAt(_loc3_)) is ILayoutManagerClient)
  1600.                   {
  1601.                      ILayoutManagerClient(_loc4_).validateSize(true);
  1602.                   }
  1603.                   _loc3_++;
  1604.                }
  1605.             }
  1606.             adjustSizesForScaleChanges();
  1607.          }
  1608.          else
  1609.          {
  1610.             super.validateSize(param1);
  1611.          }
  1612.       }
  1613.       
  1614.       override public function getChildAt(param1:int) : DisplayObject
  1615.       {
  1616.          if(mx_internal::contentPane)
  1617.          {
  1618.             return mx_internal::contentPane.getChildAt(param1);
  1619.          }
  1620.          return super.getChildAt(_firstChildIndex + param1);
  1621.       }
  1622.       
  1623.       protected function layoutChrome(param1:Number, param2:Number) : void
  1624.       {
  1625.          if(mx_internal::border)
  1626.          {
  1627.             updateBackgroundImageRect();
  1628.             mx_internal::border.move(0,0);
  1629.             mx_internal::border.setActualSize(param1,param2);
  1630.          }
  1631.       }
  1632.       
  1633.       override public function addEventListener(param1:String, param2:Function, param3:Boolean = false, param4:int = 0, param5:Boolean = false) : void
  1634.       {
  1635.          super.addEventListener(param1,param2,param3,param4,param5);
  1636.          if(param1 == MouseEvent.CLICK || param1 == MouseEvent.DOUBLE_CLICK || param1 == MouseEvent.MOUSE_DOWN || param1 == MouseEvent.MOUSE_MOVE || param1 == MouseEvent.MOUSE_OVER || param1 == MouseEvent.MOUSE_OUT || param1 == MouseEvent.MOUSE_UP || param1 == MouseEvent.MOUSE_WHEEL)
  1637.          {
  1638.             if(mouseEventReferenceCount < 2147483647 && mouseEventReferenceCount++ == 0)
  1639.             {
  1640.                setStyle("mouseShield",true);
  1641.                setStyle("mouseShieldChildren",true);
  1642.             }
  1643.          }
  1644.       }
  1645.       
  1646.       override protected function attachOverlay() : void
  1647.       {
  1648.          rawChildren_addChild(mx_internal::overlay);
  1649.       }
  1650.       
  1651.       override public function localToContent(param1:Point) : Point
  1652.       {
  1653.          if(!mx_internal::contentPane)
  1654.          {
  1655.             return param1;
  1656.          }
  1657.          param1 = localToGlobal(param1);
  1658.          return globalToContent(param1);
  1659.       }
  1660.       
  1661.       public function get rawChildren() : IChildList
  1662.       {
  1663.          if(!_rawChildren)
  1664.          {
  1665.             _rawChildren = new ContainerRawChildrenList(this);
  1666.          }
  1667.          return _rawChildren;
  1668.       }
  1669.       
  1670.       public function get viewMetrics() : EdgeMetrics
  1671.       {
  1672.          var _loc1_:EdgeMetrics = null;
  1673.          var _loc2_:Boolean = false;
  1674.          var _loc3_:Boolean = false;
  1675.          _loc1_ = borderMetrics;
  1676.          _loc2_ = verticalScrollBar != null && (mx_internal::doingLayout || verticalScrollPolicy == ScrollPolicy.ON);
  1677.          _loc3_ = horizontalScrollBar != null && (mx_internal::doingLayout || horizontalScrollPolicy == ScrollPolicy.ON);
  1678.          if(!_loc2_ && !_loc3_)
  1679.          {
  1680.             return _loc1_;
  1681.          }
  1682.          if(!_viewMetrics)
  1683.          {
  1684.             _viewMetrics = _loc1_.clone();
  1685.          }
  1686.          else
  1687.          {
  1688.             _viewMetrics.left = _loc1_.left;
  1689.             _viewMetrics.right = _loc1_.right;
  1690.             _viewMetrics.top = _loc1_.top;
  1691.             _viewMetrics.bottom = _loc1_.bottom;
  1692.          }
  1693.          if(_loc2_)
  1694.          {
  1695.             _viewMetrics.right += verticalScrollBar.minWidth;
  1696.          }
  1697.          if(_loc3_)
  1698.          {
  1699.             _viewMetrics.bottom += horizontalScrollBar.minHeight;
  1700.          }
  1701.          return _viewMetrics;
  1702.       }
  1703.       
  1704.       public function set creationIndex(param1:int) : void
  1705.       {
  1706.          _creationIndex = param1;
  1707.       }
  1708.       
  1709.       public function executeChildBindings(param1:Boolean) : void
  1710.       {
  1711.          var _loc2_:int = 0;
  1712.          var _loc3_:int = 0;
  1713.          var _loc4_:IUIComponent = null;
  1714.          _loc2_ = numChildren;
  1715.          _loc3_ = 0;
  1716.          while(_loc3_ < _loc2_)
  1717.          {
  1718.             if((_loc4_ = IUIComponent(getChildAt(_loc3_))) is IDeferredInstantiationUIComponent)
  1719.             {
  1720.                IDeferredInstantiationUIComponent(_loc4_).executeBindings(param1);
  1721.             }
  1722.             _loc3_++;
  1723.          }
  1724.       }
  1725.       
  1726.       public function set verticalScrollBar(param1:ScrollBar) : void
  1727.       {
  1728.          _verticalScrollBar = param1;
  1729.       }
  1730.       
  1731.       public function get horizontalScrollBar() : ScrollBar
  1732.       {
  1733.          return _horizontalScrollBar;
  1734.       }
  1735.       
  1736.       private function createOrDestroyBlocker() : void
  1737.       {
  1738.          var _loc1_:DisplayObject = null;
  1739.          var _loc2_:ISystemManager = null;
  1740.          if(enabled)
  1741.          {
  1742.             if(mx_internal::blocker)
  1743.             {
  1744.                rawChildren.removeChild(mx_internal::blocker);
  1745.                blocker = null;
  1746.             }
  1747.          }
  1748.          else if(!mx_internal::blocker)
  1749.          {
  1750.             blocker = new FlexSprite();
  1751.             mx_internal::blocker.name = "blocker";
  1752.             mx_internal::blocker.mouseEnabled = true;
  1753.             rawChildren.addChild(mx_internal::blocker);
  1754.             mx_internal::blocker.addEventListener(MouseEvent.CLICK,blocker_clickHandler);
  1755.             _loc1_ = !!focusManager ? DisplayObject(focusManager.getFocus()) : null;
  1756.             while(_loc1_)
  1757.             {
  1758.                if(_loc1_ == this)
  1759.                {
  1760.                   _loc2_ = systemManager;
  1761.                   if(_loc2_ && _loc2_.stage)
  1762.                   {
  1763.                      _loc2_.stage.focus = null;
  1764.                   }
  1765.                   break;
  1766.                }
  1767.                _loc1_ = _loc1_.parent;
  1768.             }
  1769.          }
  1770.       }
  1771.       
  1772.       override public function set enabled(param1:Boolean) : void
  1773.       {
  1774.          super.enabled = param1;
  1775.          if(horizontalScrollBar)
  1776.          {
  1777.             horizontalScrollBar.enabled = param1;
  1778.          }
  1779.          if(verticalScrollBar)
  1780.          {
  1781.             verticalScrollBar.enabled = param1;
  1782.          }
  1783.          invalidateProperties();
  1784.       }
  1785.       
  1786.       override public function getChildByName(param1:String) : DisplayObject
  1787.       {
  1788.          var _loc2_:DisplayObject = null;
  1789.          var _loc3_:int = 0;
  1790.          if(mx_internal::contentPane)
  1791.          {
  1792.             return mx_internal::contentPane.getChildByName(param1);
  1793.          }
  1794.          _loc2_ = super.getChildByName(param1);
  1795.          if(!_loc2_)
  1796.          {
  1797.             return null;
  1798.          }
  1799.          _loc3_ = super.getChildIndex(_loc2_) - _firstChildIndex;
  1800.          if(_loc3_ < 0 || _loc3_ >= mx_internal::_numChildren)
  1801.          {
  1802.             return null;
  1803.          }
  1804.          return _loc2_;
  1805.       }
  1806.       
  1807.       override public function addChildAt(param1:DisplayObject, param2:int) : DisplayObject
  1808.       {
  1809.          addingChild(param1);
  1810.          if(mx_internal::contentPane)
  1811.          {
  1812.             mx_internal::contentPane.addChildAt(param1,param2);
  1813.          }
  1814.          else
  1815.          {
  1816.             $addChildAt(param1,_firstChildIndex + param2);
  1817.          }
  1818.          childAdded(param1);
  1819.          return param1;
  1820.       }
  1821.       
  1822.       override public function get baselinePosition() : Number
  1823.       {
  1824.          var _loc1_:IUIComponent = null;
  1825.          if(getStyle("verticalAlign") == "top" && numChildren > 0)
  1826.          {
  1827.             _loc1_ = getChildAt(0) as IUIComponent;
  1828.             if(_loc1_)
  1829.             {
  1830.                return _loc1_.y + _loc1_.baselinePosition;
  1831.             }
  1832.          }
  1833.          return super.baselinePosition;
  1834.       }
  1835.       
  1836.       private function blocker_clickHandler(param1:Event) : void
  1837.       {
  1838.          param1.stopPropagation();
  1839.       }
  1840.       
  1841.       public function get maxVerticalScrollPosition() : Number
  1842.       {
  1843.          return !!verticalScrollBar ? Number(verticalScrollBar.maxScrollPosition) : Number(Math.max(scrollableHeight - viewableHeight,0));
  1844.       }
  1845.       
  1846.       public function set verticalPageScrollSize(param1:Number) : void
  1847.       {
  1848.          scrollPropertiesChanged = true;
  1849.          _verticalPageScrollSize = param1;
  1850.          invalidateDisplayList();
  1851.          dispatchEvent(new Event("verticalPageScrollSizeChanged"));
  1852.       }
  1853.       
  1854.       private function creationCompleteHandler(param1:FlexEvent) : void
  1855.       {
  1856.          --numChildrenCreated;
  1857.          if(mx_internal::numChildrenCreated <= 0)
  1858.          {
  1859.             dispatchEvent(new FlexEvent("childrenCreationComplete"));
  1860.          }
  1861.       }
  1862.       
  1863.       override public function contentToLocal(param1:Point) : Point
  1864.       {
  1865.          if(!mx_internal::contentPane)
  1866.          {
  1867.             return param1;
  1868.          }
  1869.          param1 = contentToGlobal(param1);
  1870.          return globalToLocal(param1);
  1871.       }
  1872.       
  1873.       override public function removeChild(param1:DisplayObject) : DisplayObject
  1874.       {
  1875.          removingChild(param1);
  1876.          if(mx_internal::contentPane)
  1877.          {
  1878.             mx_internal::contentPane.removeChild(param1);
  1879.          }
  1880.          else
  1881.          {
  1882.             $removeChild(param1);
  1883.          }
  1884.          childRemoved(param1);
  1885.          return param1;
  1886.       }
  1887.       
  1888.       private function dispatchScrollEvent(param1:String, param2:Number, param3:Number, param4:String) : void
  1889.       {
  1890.          var _loc5_:ScrollEvent = null;
  1891.          (_loc5_ = new ScrollEvent(ScrollEvent.SCROLL)).direction = param1;
  1892.          _loc5_.position = param3;
  1893.          _loc5_.delta = param3 - param2;
  1894.          _loc5_.detail = param4;
  1895.          dispatchEvent(_loc5_);
  1896.       }
  1897.       
  1898.       [Bindable("labelChanged")]
  1899.       public function get label() : String
  1900.       {
  1901.          return _label;
  1902.       }
  1903.       
  1904.       mx_internal function setDocumentDescriptor(param1:UIComponentDescriptor) : void
  1905.       {
  1906.          if(processedDescriptors)
  1907.          {
  1908.             return;
  1909.          }
  1910.          if(mx_internal::_documentDescriptor && mx_internal::_documentDescriptor.properties.childDescriptors)
  1911.          {
  1912.             if(param1.properties.childDescriptors)
  1913.             {
  1914.                throw new Error(resourceMultipleChildSets_ClassAndSubclass);
  1915.             }
  1916.          }
  1917.          else
  1918.          {
  1919.             _documentDescriptor = param1;
  1920.             mx_internal::_documentDescriptor.document = this;
  1921.          }
  1922.       }
  1923.       
  1924.       override public function setChildIndex(param1:DisplayObject, param2:int) : void
  1925.       {
  1926.          var _loc3_:int = 0;
  1927.          var _loc4_:int = 0;
  1928.          var _loc5_:int = 0;
  1929.          var _loc6_:IndexChangedEvent = null;
  1930.          _loc4_ = _loc3_;
  1931.          _loc5_ = param2;
  1932.          if(mx_internal::contentPane)
  1933.          {
  1934.             mx_internal::contentPane.setChildIndex(param1,param2);
  1935.             if(_autoLayout || forceLayout)
  1936.             {
  1937.                invalidateDisplayList();
  1938.             }
  1939.          }
  1940.          else
  1941.          {
  1942.             _loc3_ = super.getChildIndex(param1);
  1943.             param2 += _firstChildIndex;
  1944.             if(param2 == _loc3_)
  1945.             {
  1946.                return;
  1947.             }
  1948.             super.setChildIndex(param1,param2);
  1949.             invalidateDisplayList();
  1950.             _loc4_ = _loc3_ - _firstChildIndex;
  1951.             _loc5_ = param2 - _firstChildIndex;
  1952.          }
  1953.          (_loc6_ = new IndexChangedEvent(IndexChangedEvent.CHILD_INDEX_CHANGE)).relatedObject = param1;
  1954.          _loc6_.oldIndex = _loc4_;
  1955.          _loc6_.newIndex = _loc5_;
  1956.          dispatchEvent(_loc6_);
  1957.          dispatchEvent(new Event("childrenChanged"));
  1958.       }
  1959.       
  1960.       override public function regenerateStyleCache(param1:Boolean) : void
  1961.       {
  1962.          var _loc2_:int = 0;
  1963.          var _loc3_:int = 0;
  1964.          var _loc4_:DisplayObject = null;
  1965.          super.regenerateStyleCache(param1);
  1966.          if(mx_internal::contentPane)
  1967.          {
  1968.             _loc2_ = mx_internal::contentPane.numChildren;
  1969.             _loc3_ = 0;
  1970.             while(_loc3_ < _loc2_)
  1971.             {
  1972.                _loc4_ = getChildAt(_loc3_);
  1973.                if(param1 && _loc4_ is UIComponent)
  1974.                {
  1975.                   if(UIComponent(_loc4_).inheritingStyles != UIComponent.STYLE_UNINITIALIZED)
  1976.                   {
  1977.                      UIComponent(_loc4_).regenerateStyleCache(param1);
  1978.                   }
  1979.                }
  1980.                else if(_loc4_ is UITextField && UITextField(_loc4_).inheritingStyles)
  1981.                {
  1982.                   StyleProtoChain.initTextField(UITextField(_loc4_));
  1983.                }
  1984.                _loc3_++;
  1985.             }
  1986.          }
  1987.       }
  1988.       
  1989.       override protected function createChildren() : void
  1990.       {
  1991.          var _loc1_:Application = null;
  1992.          super.createChildren();
  1993.          createBorder();
  1994.          createOrDestroyScrollbars(horizontalScrollPolicy == ScrollPolicy.ON,verticalScrollPolicy == ScrollPolicy.ON,horizontalScrollPolicy == ScrollPolicy.ON || verticalScrollPolicy == ScrollPolicy.ON);
  1995.          if(creationPolicy != null)
  1996.          {
  1997.             actualCreationPolicy = creationPolicy;
  1998.          }
  1999.          else if(parent is Container)
  2000.          {
  2001.             if(Container(parent).actualCreationPolicy == ContainerCreationPolicy.QUEUED)
  2002.             {
  2003.                actualCreationPolicy = ContainerCreationPolicy.AUTO;
  2004.             }
  2005.             else
  2006.             {
  2007.                actualCreationPolicy = Container(parent).actualCreationPolicy;
  2008.             }
  2009.          }
  2010.          if(actualCreationPolicy == ContainerCreationPolicy.NONE)
  2011.          {
  2012.             actualCreationPolicy = ContainerCreationPolicy.AUTO;
  2013.          }
  2014.          else if(actualCreationPolicy == ContainerCreationPolicy.QUEUED)
  2015.          {
  2016.             _loc1_ = !!parentApplication ? Application(parentApplication) : Application(Application.application);
  2017.             _loc1_.addToCreationQueue(this,creationIndex,null,this);
  2018.          }
  2019.          else if(recursionFlag)
  2020.          {
  2021.             createComponentsFromDescriptors();
  2022.          }
  2023.          if(autoLayout == false)
  2024.          {
  2025.             forceLayout = true;
  2026.          }
  2027.          UIComponentGlobals.layoutManager.addEventListener("updateComplete",layoutCompleteHandler,false,0,true);
  2028.       }
  2029.       
  2030.       mx_internal function set numChildrenCreated(param1:int) : void
  2031.       {
  2032.          _numChildrenCreated = param1;
  2033.       }
  2034.       
  2035.       public function get borderMetrics() : EdgeMetrics
  2036.       {
  2037.          return mx_internal::border && mx_internal::border is RectangularBorder ? RectangularBorder(mx_internal::border).borderMetrics : EdgeMetrics.EMPTY;
  2038.       }
  2039.       
  2040.       public function get clipContent() : Boolean
  2041.       {
  2042.          return _clipContent;
  2043.       }
  2044.       
  2045.       mx_internal function rawChildren_setChildIndex(param1:DisplayObject, param2:int) : void
  2046.       {
  2047.          var _loc3_:int = 0;
  2048.          _loc3_ = super.getChildIndex(param1);
  2049.          super.setChildIndex(param1,param2);
  2050.          if(_loc3_ < _firstChildIndex && param2 >= _firstChildIndex)
  2051.          {
  2052.             --_firstChildIndex;
  2053.          }
  2054.          else if(_loc3_ >= _firstChildIndex && param2 <= _firstChildIndex)
  2055.          {
  2056.             ++_firstChildIndex;
  2057.          }
  2058.          dispatchEvent(new Event("childrenChanged"));
  2059.       }
  2060.       
  2061.       mx_internal function rawChildren_getChildAt(param1:int) : DisplayObject
  2062.       {
  2063.          return super.getChildAt(param1);
  2064.       }
  2065.       
  2066.       public function get verticalScrollBar() : ScrollBar
  2067.       {
  2068.          return _verticalScrollBar;
  2069.       }
  2070.       
  2071.       public function get viewMetricsAndPadding() : EdgeMetrics
  2072.       {
  2073.          var _loc1_:EdgeMetrics = null;
  2074.          var _loc2_:EdgeMetrics = null;
  2075.          if(_viewMetricsAndPadding && (!horizontalScrollBar || horizontalScrollPolicy == ScrollPolicy.ON) && (!verticalScrollBar || verticalScrollPolicy == ScrollPolicy.ON))
  2076.          {
  2077.             return _viewMetricsAndPadding;
  2078.          }
  2079.          if(!_viewMetricsAndPadding)
  2080.          {
  2081.             _viewMetricsAndPadding = new EdgeMetrics();
  2082.          }
  2083.          _loc1_ = _viewMetricsAndPadding;
  2084.          _loc2_ = viewMetrics;
  2085.          _loc1_.left = _loc2_.left + getStyle("paddingLeft");
  2086.          _loc1_.right = _loc2_.right + getStyle("paddingRight");
  2087.          _loc1_.top = _loc2_.top + getStyle("paddingTop");
  2088.          _loc1_.bottom = _loc2_.bottom + getStyle("paddingBottom");
  2089.          return _loc1_;
  2090.       }
  2091.       
  2092.       public function set horizontalPageScrollSize(param1:Number) : void
  2093.       {
  2094.          scrollPropertiesChanged = true;
  2095.          _horizontalPageScrollSize = param1;
  2096.          invalidateDisplayList();
  2097.          dispatchEvent(new Event("horizontalPageScrollSizeChanged"));
  2098.       }
  2099.       
  2100.       private function layoutCompleteHandler(param1:Event) : void
  2101.       {
  2102.          var _loc2_:Boolean = false;
  2103.          UIComponentGlobals.layoutManager.removeEventListener("updateComplete",layoutCompleteHandler);
  2104.          forceLayout = false;
  2105.          _loc2_ = false;
  2106.          if(!isNaN(horizontalScrollPositionPending))
  2107.          {
  2108.             if(horizontalScrollPositionPending < 0)
  2109.             {
  2110.                horizontalScrollPositionPending = 0;
  2111.             }
  2112.             else if(horizontalScrollPositionPending > maxHorizontalScrollPosition)
  2113.             {
  2114.                horizontalScrollPositionPending = maxHorizontalScrollPosition;
  2115.             }
  2116.             if(horizontalScrollBar && horizontalScrollBar.scrollPosition != horizontalScrollPositionPending)
  2117.             {
  2118.                _horizontalScrollPosition = horizontalScrollPositionPending;
  2119.                horizontalScrollBar.scrollPosition = horizontalScrollPositionPending;
  2120.                _loc2_ = true;
  2121.             }
  2122.             horizontalScrollPositionPending = NaN;
  2123.          }
  2124.          if(!isNaN(verticalScrollPositionPending))
  2125.          {
  2126.             if(verticalScrollPositionPending < 0)
  2127.             {
  2128.                verticalScrollPositionPending = 0;
  2129.             }
  2130.             else if(verticalScrollPositionPending > maxVerticalScrollPosition)
  2131.             {
  2132.                verticalScrollPositionPending = maxVerticalScrollPosition;
  2133.             }
  2134.             if(verticalScrollBar && verticalScrollBar.scrollPosition != verticalScrollPositionPending)
  2135.             {
  2136.                _verticalScrollPosition = verticalScrollPositionPending;
  2137.                verticalScrollBar.scrollPosition = verticalScrollPositionPending;
  2138.                _loc2_ = true;
  2139.             }
  2140.             verticalScrollPositionPending = NaN;
  2141.          }
  2142.          if(_loc2_)
  2143.          {
  2144.             scrollChildren();
  2145.          }
  2146.       }
  2147.       
  2148.       override public function removeEventListener(param1:String, param2:Function, param3:Boolean = false) : void
  2149.       {
  2150.          super.removeEventListener(param1,param2,param3);
  2151.          if(param1 == MouseEvent.CLICK || param1 == MouseEvent.DOUBLE_CLICK || param1 == MouseEvent.MOUSE_DOWN || param1 == MouseEvent.MOUSE_MOVE || param1 == MouseEvent.MOUSE_OVER || param1 == MouseEvent.MOUSE_OUT || param1 == MouseEvent.MOUSE_UP || param1 == MouseEvent.MOUSE_WHEEL)
  2152.          {
  2153.             if(mouseEventReferenceCount > 0 && --mouseEventReferenceCount == 0)
  2154.             {
  2155.                setStyle("mouseShield",false);
  2156.                setStyle("mouseShieldChildren",false);
  2157.             }
  2158.          }
  2159.       }
  2160.       
  2161.       public function set autoLayout(param1:Boolean) : void
  2162.       {
  2163.          var _loc2_:IInvalidating = null;
  2164.          _autoLayout = param1;
  2165.          if(param1)
  2166.          {
  2167.             invalidateSize();
  2168.             invalidateDisplayList();
  2169.             _loc2_ = parent as IInvalidating;
  2170.             if(_loc2_)
  2171.             {
  2172.                _loc2_.invalidateSize();
  2173.                _loc2_.invalidateDisplayList();
  2174.             }
  2175.          }
  2176.       }
  2177.       
  2178.       mx_internal function rawChildren_getChildByName(param1:String) : DisplayObject
  2179.       {
  2180.          return super.getChildByName(param1);
  2181.       }
  2182.       
  2183.       mx_internal function get numChildrenCreated() : int
  2184.       {
  2185.          return _numChildrenCreated;
  2186.       }
  2187.       
  2188.       override public function initialize() : void
  2189.       {
  2190.          var _loc1_:* = undefined;
  2191.          if(isDocument && mx_internal::documentDescriptor && !processedDescriptors)
  2192.          {
  2193.             _loc1_ = mx_internal::documentDescriptor.properties;
  2194.             if(_loc1_ && _loc1_.childDescriptors)
  2195.             {
  2196.                if(_childDescriptors)
  2197.                {
  2198.                   throw new Error(resourceMultipleChildSets_ClassAndInstance);
  2199.                }
  2200.                _childDescriptors = _loc1_.childDescriptors;
  2201.             }
  2202.          }
  2203.          super.initialize();
  2204.       }
  2205.       
  2206.       mx_internal function rawChildren_addChildAt(param1:DisplayObject, param2:int) : DisplayObject
  2207.       {
  2208.          if(_firstChildIndex < param2 && param2 < _firstChildIndex + mx_internal::$numChildren + 1)
  2209.          {
  2210.             ++_numChildren;
  2211.          }
  2212.          else if(param2 <= _firstChildIndex)
  2213.          {
  2214.             ++_firstChildIndex;
  2215.          }
  2216.          super.addingChild(param1);
  2217.          $addChildAt(param1,param2);
  2218.          super.childAdded(param1);
  2219.          dispatchEvent(new Event("childrenChanged"));
  2220.          return param1;
  2221.       }
  2222.       
  2223.       public function set data(param1:Object) : void
  2224.       {
  2225.          _data = param1;
  2226.          dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
  2227.          invalidateDisplayList();
  2228.       }
  2229.       
  2230.       private function createScrollbarsIfNeeded(param1:Rectangle) : Boolean
  2231.       {
  2232.          var _loc2_:Number = NaN;
  2233.          var _loc3_:Number = NaN;
  2234.          var _loc4_:Number = NaN;
  2235.          var _loc5_:Number = NaN;
  2236.          var _loc6_:Boolean = false;
  2237.          var _loc7_:EdgeMetrics = null;
  2238.          var _loc8_:* = false;
  2239.          var _loc9_:* = false;
  2240.          var _loc10_:Boolean = false;
  2241.          var _loc11_:Boolean = false;
  2242.          _loc2_ = param1.right;
  2243.          _loc3_ = param1.bottom;
  2244.          _loc4_ = unscaledWidth;
  2245.          _loc5_ = unscaledHeight;
  2246.          _loc6_ = param1.left < 0 || param1.top < 0;
  2247.          _loc7_ = viewMetrics;
  2248.          if(scaleX != 1)
  2249.          {
  2250.             _loc4_ += 1 / Math.abs(scaleX);
  2251.          }
  2252.          if(scaleY != 1)
  2253.          {
  2254.             _loc5_ += 1 / Math.abs(scaleY);
  2255.          }
  2256.          _loc4_ = Math.floor(_loc4_);
  2257.          _loc5_ = Math.floor(_loc5_);
  2258.          _loc2_ = Math.floor(_loc2_);
  2259.          _loc3_ = Math.floor(_loc3_);
  2260.          if(horizontalScrollBar && horizontalScrollPolicy != ScrollPolicy.ON)
  2261.          {
  2262.             _loc5_ -= horizontalScrollBar.minHeight;
  2263.          }
  2264.          if(verticalScrollBar && verticalScrollPolicy != ScrollPolicy.ON)
  2265.          {
  2266.             _loc4_ -= verticalScrollBar.minWidth;
  2267.          }
  2268.          _loc4_ -= _loc7_.left + _loc7_.right;
  2269.          _loc5_ -= _loc7_.top + _loc7_.bottom;
  2270.          _loc8_ = horizontalScrollPolicy == ScrollPolicy.ON;
  2271.          _loc9_ = verticalScrollPolicy == ScrollPolicy.ON;
  2272.          _loc10_ = _loc8_ || _loc9_ || _loc6_ || mx_internal::overlay != null || _loc7_.left > 0 || _loc7_.top > 0;
  2273.          if(_loc4_ < _loc2_)
  2274.          {
  2275.             _loc10_ = true;
  2276.             if(horizontalScrollPolicy == ScrollPolicy.AUTO && unscaledHeight - _loc7_.top - _loc7_.bottom >= 18 && unscaledWidth - _loc7_.left - _loc7_.right >= 32)
  2277.             {
  2278.                _loc8_ = true;
  2279.             }
  2280.          }
  2281.          if(_loc5_ < _loc3_)
  2282.          {
  2283.             _loc10_ = true;
  2284.             if(verticalScrollPolicy == ScrollPolicy.AUTO && unscaledWidth - _loc7_.left - _loc7_.right >= 18 && unscaledHeight - _loc7_.top - _loc7_.bottom >= 32)
  2285.             {
  2286.                _loc9_ = true;
  2287.             }
  2288.          }
  2289.          if(_loc8_ && _loc9_ && horizontalScrollPolicy == ScrollPolicy.AUTO && verticalScrollPolicy == ScrollPolicy.AUTO && horizontalScrollBar && verticalScrollBar && _loc4_ + verticalScrollBar.minWidth >= _loc2_ && _loc5_ + horizontalScrollBar.minHeight >= _loc3_)
  2290.          {
  2291.             _loc8_ = Boolean(_loc9_ = Boolean(false));
  2292.          }
  2293.          else if(_loc8_ && !_loc9_ && verticalScrollBar && horizontalScrollPolicy == ScrollPolicy.AUTO && _loc4_ + verticalScrollBar.minWidth >= _loc2_)
  2294.          {
  2295.             _loc8_ = false;
  2296.          }
  2297.          _loc11_ = createOrDestroyScrollbars(_loc8_,_loc9_,_loc10_);
  2298.          if(scrollableWidth != _loc2_ || viewableWidth != _loc4_ || _loc11_)
  2299.          {
  2300.             if(horizontalScrollBar)
  2301.             {
  2302.                horizontalScrollBar.setScrollProperties(_loc4_ - borderMetrics.right,0,_loc2_ - _loc4_,horizontalPageScrollSize);
  2303.                scrollPositionChanged = true;
  2304.             }
  2305.             viewableWidth = _loc4_;
  2306.             scrollableWidth = _loc2_;
  2307.          }
  2308.          if(scrollableHeight != _loc3_ || viewableHeight != _loc5_ || _loc11_)
  2309.          {
  2310.             if(verticalScrollBar)
  2311.             {
  2312.                verticalScrollBar.setScrollProperties(_loc5_ - borderMetrics.bottom,0,_loc3_ - _loc5_,verticalPageScrollSize);
  2313.                scrollPositionChanged = true;
  2314.             }
  2315.             viewableHeight = _loc5_;
  2316.             scrollableHeight = _loc3_;
  2317.          }
  2318.          return _loc11_;
  2319.       }
  2320.       
  2321.       [Bindable("childrenChanged")]
  2322.       public function getChildren() : Array
  2323.       {
  2324.          var _loc1_:Array = null;
  2325.          var _loc2_:int = 0;
  2326.          var _loc3_:int = 0;
  2327.          _loc1_ = [];
  2328.          _loc2_ = numChildren;
  2329.          _loc3_ = 0;
  2330.          while(_loc3_ < _loc2_)
  2331.          {
  2332.             _loc1_.push(getChildAt(_loc3_));
  2333.             _loc3_++;
  2334.          }
  2335.          return _loc1_;
  2336.       }
  2337.       
  2338.       public function removeAllChildren() : void
  2339.       {
  2340.          while(numChildren > 0)
  2341.          {
  2342.             removeChildAt(0);
  2343.          }
  2344.       }
  2345.       
  2346.       override mx_internal function childRemoved(param1:DisplayObject) : void
  2347.       {
  2348.          super.childRemoved(param1);
  2349.          invalidateSize();
  2350.          invalidateDisplayList();
  2351.          if(!mx_internal::contentPane)
  2352.          {
  2353.             --_numChildren;
  2354.             if(mx_internal::_numChildren == 0)
  2355.             {
  2356.                _firstChildIndex = super.numChildren;
  2357.             }
  2358.          }
  2359.          if(mx_internal::contentPane && !autoLayout)
  2360.          {
  2361.             forceLayout = true;
  2362.             UIComponentGlobals.layoutManager.addEventListener("updateComplete",layoutCompleteHandler,false,0,true);
  2363.          }
  2364.          dispatchEvent(new Event("childrenChanged"));
  2365.       }
  2366.       
  2367.       override public function get numChildren() : int
  2368.       {
  2369.          return !!mx_internal::contentPane ? int(mx_internal::contentPane.numChildren) : int(mx_internal::_numChildren);
  2370.       }
  2371.       
  2372.       [Bindable("dataChange")]
  2373.       public function get data() : Object
  2374.       {
  2375.          return _data;
  2376.       }
  2377.       
  2378.       override public function styleChanged(param1:String) : void
  2379.       {
  2380.          var _loc2_:Boolean = false;
  2381.          var _loc3_:String = null;
  2382.          var _loc4_:String = null;
  2383.          _loc2_ = param1 == null || param1 == "styleName";
  2384.          if(_loc2_ || StyleManager.isSizeInvalidatingStyle(param1))
  2385.          {
  2386.             invalidateDisplayList();
  2387.          }
  2388.          if(_loc2_ || param1 == "borderSkin")
  2389.          {
  2390.             if(mx_internal::border)
  2391.             {
  2392.                rawChildren.removeChild(DisplayObject(mx_internal::border));
  2393.                border = null;
  2394.                createBorder();
  2395.             }
  2396.          }
  2397.          if(_loc2_ || param1 == "borderStyle" || param1 == "backgroundColor" || param1 == "backgroundImage" || param1 == "mouseShield" || param1 == "mouseShieldChildren")
  2398.          {
  2399.             createBorder();
  2400.          }
  2401.          super.styleChanged(param1);
  2402.          if(_loc2_ || StyleManager.isSizeInvalidatingStyle(param1))
  2403.          {
  2404.             invalidateViewMetricsAndPadding();
  2405.          }
  2406.          if(_loc2_ || param1 == "horizontalScrollBarStyleName")
  2407.          {
  2408.             if(horizontalScrollBar && horizontalScrollBar is ISimpleStyleClient)
  2409.             {
  2410.                _loc3_ = getStyle("horizontalScrollBarStyleName");
  2411.                ISimpleStyleClient(horizontalScrollBar).styleName = _loc3_;
  2412.             }
  2413.          }
  2414.          if(_loc2_ || param1 == "verticalScrollBarStyleName")
  2415.          {
  2416.             if(verticalScrollBar && verticalScrollBar is ISimpleStyleClient)
  2417.             {
  2418.                _loc4_ = getStyle("verticalScrollBarStyleName");
  2419.                ISimpleStyleClient(verticalScrollBar).styleName = _loc4_;
  2420.             }
  2421.          }
  2422.       }
  2423.       
  2424.       private function createContentPaneAndScrollbarsIfNeeded() : Boolean
  2425.       {
  2426.          var _loc1_:Rectangle = null;
  2427.          var _loc2_:Boolean = false;
  2428.          if(_clipContent)
  2429.          {
  2430.             _loc1_ = getScrollableRect();
  2431.             _loc2_ = createScrollbarsIfNeeded(_loc1_);
  2432.             if(mx_internal::border)
  2433.             {
  2434.                updateBackgroundImageRect();
  2435.             }
  2436.             return _loc2_;
  2437.          }
  2438.          _loc2_ = createOrDestroyScrollbars(false,false,false);
  2439.          _loc1_ = getScrollableRect();
  2440.          scrollableWidth = _loc1_.right;
  2441.          scrollableHeight = _loc1_.bottom;
  2442.          if(_loc2_ && mx_internal::border)
  2443.          {
  2444.             updateBackgroundImageRect();
  2445.          }
  2446.          return _loc2_;
  2447.       }
  2448.       
  2449.       override protected function updateDisplayList(param1:Number, param2:Number) : void
  2450.       {
  2451.          var _loc3_:Object = null;
  2452.          var _loc4_:Number = NaN;
  2453.          super.updateDisplayList(param1,param2);
  2454.          layoutChrome(param1,param2);
  2455.          if(scrollPositionChanged)
  2456.          {
  2457.             if(_horizontalScrollPosition < 0)
  2458.             {
  2459.                _horizontalScrollPosition = 0;
  2460.             }
  2461.             else if(_horizontalScrollPosition > maxHorizontalScrollPosition)
  2462.             {
  2463.                _horizontalScrollPosition = maxHorizontalScrollPosition;
  2464.             }
  2465.             if(horizontalScrollBar && horizontalScrollBar.scrollPosition != _horizontalScrollPosition)
  2466.             {
  2467.                horizontalScrollBar.scrollPosition = _horizontalScrollPosition;
  2468.             }
  2469.             if(_verticalScrollPosition < 0)
  2470.             {
  2471.                _verticalScrollPosition = 0;
  2472.             }
  2473.             else if(_verticalScrollPosition > maxVerticalScrollPosition)
  2474.             {
  2475.                _verticalScrollPosition = maxVerticalScrollPosition;
  2476.             }
  2477.             if(verticalScrollBar && verticalScrollBar.scrollPosition != _verticalScrollPosition)
  2478.             {
  2479.                verticalScrollBar.scrollPosition = _verticalScrollPosition;
  2480.             }
  2481.             scrollChildren();
  2482.             scrollPositionChanged = false;
  2483.          }
  2484.          if(scrollPropertiesChanged)
  2485.          {
  2486.             if(horizontalScrollBar)
  2487.             {
  2488.                horizontalScrollBar.lineScrollSize = horizontalLineScrollSize;
  2489.                horizontalScrollBar.pageScrollSize = horizontalPageScrollSize;
  2490.             }
  2491.             if(verticalScrollBar)
  2492.             {
  2493.                verticalScrollBar.lineScrollSize = verticalLineScrollSize;
  2494.                verticalScrollBar.pageScrollSize = verticalPageScrollSize;
  2495.             }
  2496.             scrollPropertiesChanged = false;
  2497.          }
  2498.          if(mx_internal::contentPane && mx_internal::contentPane.scrollRect)
  2499.          {
  2500.             _loc3_ = !!enabled ? null : getStyle("backgroundDisabledColor");
  2501.             if(!_loc3_)
  2502.             {
  2503.                _loc3_ = getStyle("backgroundColor");
  2504.             }
  2505.             _loc4_ = getStyle("backgroundAlpha");
  2506.             if(!_clipContent || isNaN(Number(_loc3_)) || _loc3_ === "" || !(horizontalScrollBar || verticalScrollBar) && !cacheAsBitmap)
  2507.             {
  2508.                _loc3_ = null;
  2509.             }
  2510.             else if(getStyle("backgroundImage") || getStyle("background"))
  2511.             {
  2512.                _loc3_ = null;
  2513.             }
  2514.             else if(_loc4_ != 1)
  2515.             {
  2516.                _loc3_ = null;
  2517.             }
  2518.             mx_internal::contentPane.opaqueBackground = _loc3_;
  2519.             mx_internal::contentPane.cacheAsBitmap = _loc3_ != null;
  2520.          }
  2521.       }
  2522.       
  2523.       mx_internal function rawChildren_addChild(param1:DisplayObject) : DisplayObject
  2524.       {
  2525.          if(mx_internal::_numChildren == 0)
  2526.          {
  2527.             ++_firstChildIndex;
  2528.          }
  2529.          super.addingChild(param1);
  2530.          $addChild(param1);
  2531.          super.childAdded(param1);
  2532.          dispatchEvent(new Event("childrenChanged"));
  2533.          return param1;
  2534.       }
  2535.    }
  2536. }
  2537.