royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs] 05/13: Container doesn't need these
Date Fri, 29 Jun 2018 00:46:11 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 8d280330be122b4d03b9a280c75105f33e9c046a
Author: Alex Harui <aharui@apache.org>
AuthorDate: Wed Jun 27 19:19:15 2018 -0700

    Container doesn't need these
---
 .../MXRoyale/src/main/royale/mx/core/Container.as  | 372 ---------------------
 1 file changed, 372 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 1ecc6e0..1a0f3eb 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -1080,66 +1080,6 @@ public class Container extends UIComponent
         return _childDescriptors;
     }
 
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden methods: DisplayObjectContainer
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Adds a child DisplayObject to this Container.
-     *  The child is added after other existing children,
-     *  so that the first child added has index 0,
-     *  the next has index 1, an so on.
-     *
-     *  <p><b>Note: </b>While the <code>child</code> argument
to the method
-     *  is specified as of type DisplayObject, the argument must implement
-     *  the IUIComponent interface to be added as a child of a container.
-     *  All Flex components implement this interface.</p>
-     *
-     *  <p>Children are layered from back to front.
-     *  In other words, if children overlap, the one with index 0
-     *  is farthest to the back, and the one with index
-     *  <code>numChildren - 1</code> is frontmost.
-     *  This means the newly added children are layered
-     *  in front of existing children.</p>
-     *
-     *  @param child The DisplayObject to add as a child of this Container.
-     *  It must implement the IUIComponent interface.
-     *
-     *  @return The added child as an object of type DisplayObject. 
-     *  You typically cast the return value to UIComponent, 
-     *  or to the type of the added component.
-     *
-     *  @see mx.core.IUIComponent
-     *
-     *  @tiptext Adds a child object to this container.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-	COMPILE::SWF
-    override public function addChild(child:DisplayObject):DisplayObject
-    {
-        return addChildAt(child, numChildren);
-
-        /* Application and Panel are depending on addChild calling addChildAt */
-        
-        /*
-        addingChild(child);
-
-        if (contentPane)
-            contentPane.addChild(child);
-        else
-            $addChild(child);
-
-        childAdded(child);
-
-        return child;
-        */
-    }
 
     //----------------------------------
     //  creationPolicy
@@ -1237,318 +1177,6 @@ public class Container extends UIComponent
         //setActualCreationPolicies(value);
     }
 
-    //----------------------------------
-    //  enabled
-    //----------------------------------
-
-    [Inspectable(category="General", enumeration="true,false", defaultValue="true")]
-
-    /**
-     *  @private
-     */
-    override public function set enabled(value:Boolean):void
-    {
-        super.enabled = value;
-
-        // Scrollbars must be enabled/disabled when this container is.
-        /*if (horizontalScrollBar)
-            horizontalScrollBar.enabled = value;
-        if (verticalScrollBar)
-            verticalScrollBar.enabled = value;
-
-        invalidateProperties();
-        
-        if (border && border is IInvalidating)
-            IInvalidating(border).invalidateDisplayList();*/
-    }
-
-    //----------------------------------
-    //  numChildren
-    //----------------------------------
-
-    /**
-     *  @private
-     *  Storage for the numChildren property.
-     */
-    /*mx_internal*/private var _numChildren:int = 0;
-
-    /**
-     *  Number of child components in this container.
-     *
-     *  <p>The number of children is initially equal
-     *  to the number of children declared in MXML.
-     *  At runtime, new children may be added by calling
-     *  <code>addChild()</code> or <code>addChildAt()</code>,
-     *  and existing children may be removed by calling
-     *  <code>removeChild()</code>, <code>removeChildAt()</code>,
-     *  or <code>removeAllChildren()</code>.</p>
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-    override public function get numChildren():int
-    {
-        return _numChildren;//contentPane ? contentPane.numChildren : _numChildren;
-    }
-
-    /**
-     *  @inheritDoc
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function removeElementAt(index:int):IVisualElement
-    {
-        return removeChildAt(index) as IVisualElement;
-    }
-    
-    /**
-     *  @inheritDoc
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function removeAllElements():void
-    {
-        for (var i:int = numElements - 1; i >= 0; i--)
-        {
-            removeElementAt(i);
-        }
-    }
-     /**
-     *  Removes all children from the child list of this container.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public function removeAllChildren():void
-    {
-        while (numChildren > 0)
-        {
-            removeChildAt(0);
-        }
-    }
-
-    /**
-     *  Removes a child DisplayObject from the child list of this Container
-     *  at the specified index.
-     *  The removed child will have its <code>parent</code>
-     *  property set to null. 
-     *  The child will still exist unless explicitly destroyed.
-     *  If you add it to another container,
-     *  it will retain its last known state.
-     *
-     *  @param index The child index of the DisplayObject to remove.
-     *
-     *  @return The removed child as an object of type DisplayObject. 
-     *  You typically cast the return value to UIComponent, 
-     *  or to the type of the removed component.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Royale 0.9.3
-     */
-	COMPILE::SWF
-    override public function removeChildAt(index:int):DisplayObject
-    {
-        return removeChild(getChildAt(index));
-
-        /*
-
-        Shouldn't implement removeChildAt() in terms of removeChild().
-        If we change this ViewStack IList, Application, and Panel are depending on it
-
-        */
-    }
-
-    /**
-     *  @private
-     */
-    override public function validateDisplayList():void
-    {
-        // trace(">>Container validateLayoutPhase " + this);
-        
-        var vm:EdgeMetrics;
-		/*
-        // If autoLayout is turned off and we haven't recently created or
-        // destroyed any children, then don't do any layout
-        if (_autoLayout || forceLayout)
-        {
-            doingLayout = true;
-            super.validateDisplayList();
-            doingLayout = false;
-        }
-        else
-        {
-            // Layout borders, Panel headers, and other border chrome.
-            layoutChrome(unscaledWidth, unscaledHeight);
-        }
-
-        // Set this to block requeuing when sizing children.
-        invalidateDisplayListFlag = true;
-
-        // Based on the positions of the children, determine
-        // whether a clip mask and scrollbars are needed.
-        if (createContentPaneAndScrollbarsIfNeeded())
-        {
-            // Redo layout if scrollbars just got created or destroyed (because
-            // now we may have more or less space).
-            if (_autoLayout || forceLayout)
-            {
-                doingLayout = true;
-                super.validateDisplayList();
-                doingLayout = false;
-            }
-
-            // If a scrollbar was created, that may precipitate the need
-            // for a second scrollbar, so run it a second time.
-            createContentPaneAndScrollbarsIfNeeded();
-        }
-
-        // The relayout performed by the above calls
-        // to super.validateDisplayList() may result
-        // in new max scroll positions that are less
-        // than previously-set scroll positions.
-        // For example, when a maximally-scrolled container
-        // is resized to be larger, the new max scroll positions
-        // are reduced and the current scroll positions
-        // will be invalid unless we clamp them.
-        if (clampScrollPositions())
-            scrollChildren();
-        
-        if (contentPane)
-        {
-            vm = viewMetrics;
-
-            // Set the position and size of the overlay .
-            if (effectOverlay)
-            {
-                effectOverlay.x = 0;
-                effectOverlay.y = 0;
-                effectOverlay.width = unscaledWidth;
-                effectOverlay.height = unscaledHeight;
-            }
-
-            // Set the positions and sizes of the scrollbars.
-            if (horizontalScrollBar || verticalScrollBar)
-            {
-                // Get the view metrics and remove the thickness
-                // of the scrollbars from the view metrics.
-                // We can't simply get the border metrics,
-                // because some subclass (e.g.: Window)
-                // might add to the metrics.
-                if (verticalScrollBar &&
-                    verticalScrollPolicy == ScrollPolicy.ON)
-                {
-                    vm.right -= verticalScrollBar.minWidth;
-                }
-                if (horizontalScrollBar &&
-                    horizontalScrollPolicy == ScrollPolicy.ON)
-                {
-                    vm.bottom -= horizontalScrollBar.minHeight;
-                }
-
-                if (horizontalScrollBar)
-                {
-                    var w:Number = unscaledWidth - vm.left - vm.right;
-                    if (verticalScrollBar)
-                        w -= verticalScrollBar.minWidth;
-
-                    horizontalScrollBar.setActualSize(
-                        w, horizontalScrollBar.minHeight);
-                    
-                    horizontalScrollBar.move(vm.left,
-                                             unscaledHeight - vm.bottom -
-                                             horizontalScrollBar.minHeight);
-                }
-
-                if (verticalScrollBar)
-                {
-                    var h:Number = unscaledHeight - vm.top - vm.bottom;
-                    if (horizontalScrollBar)
-                        h -= horizontalScrollBar.minHeight;
-
-                    verticalScrollBar.setActualSize(
-                        verticalScrollBar.minWidth, h);
-
-                    verticalScrollBar.move(unscaledWidth - vm.right -
-                                           verticalScrollBar.minWidth,
-                                           vm.top);
-                }
-
-                // Set the position of the box
-                // that covers the gap between the scroll bars.
-                if (whiteBox)
-                {
-                    whiteBox.x = verticalScrollBar.x;
-                    whiteBox.y = horizontalScrollBar.y;
-                }
-            }
-
-            contentPane.x = vm.left;
-            contentPane.y = vm.top;
-
-            if (focusPane)
-            {
-                focusPane.x = vm.left
-                focusPane.y = vm.top;
-            }
-
-            scrollChildren();
-        }
-
-        invalidateDisplayListFlag = false;
-
-        // that blocks UI input as well as draws an alpha overlay.
-        // Make sure the blocker is correctly positioned and sized here.
-        if (blocker)
-        {
-            vm = viewMetrics;
-
-            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
-                vm = EdgeMetrics.EMPTY;
-                
-            var bgColor:Object = enabled ?
-                                 null :
-                                 getStyle("backgroundDisabledColor");
-            if (bgColor === null || isNaN(Number(bgColor)))
-                bgColor = getStyle("backgroundColor");
-
-            if (bgColor === null || isNaN(Number(bgColor)))
-                bgColor = 0xFFFFFF;
-
-            var blockerAlpha:Number = getStyle("disabledOverlayAlpha");
-            
-            if (isNaN(blockerAlpha))
-                blockerAlpha = 0.6;
-                
-            blocker.x = vm.left;
-            blocker.y = vm.top;
-
-            var widthToBlock:Number = unscaledWidth - (vm.left + vm.right);
-            var heightToBlock:Number = unscaledHeight - (vm.top + vm.bottom);
-
-            blocker.graphics.clear();
-            blocker.graphics.beginFill(uint(bgColor), blockerAlpha);
-            blocker.graphics.drawRect(0, 0, widthToBlock, heightToBlock);
-            blocker.graphics.endFill();
-
-            // Blocker must be in front of everything
-            rawChildren.setChildIndex(blocker, rawChildren.numChildren - 1);
-        }
-
-        // trace("<<Container internalValidateDisplayList " + this);*/
-    }
-
 }
 
 }


Mime
View raw message