Make Tweener build on JS side.

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f405d307
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f405d307
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f405d307

Branch: refs/heads/develop
Commit: f405d3070ff50012f7a9479497cca3e6f9b47888
Parents: ae39165
Author: yishayw <yishayj...@hotmail.com>
Authored: Wed Dec 14 09:21:35 2016 +0200
Committer: yishayw <yishayj...@hotmail.com>
Committed: Wed Dec 14 09:21:35 2016 +0200

----------------------------------------------------------------------
 frameworks/build.xml                            |  2 +-
 .../src/main/config/compile-js-config.xml       |  2 +-
 .../src/main/config/compile-js-config.xml       |  1 +
 .../src/main/config/compile-js-config.xml       |  1 -
 frameworks/projects/Effects/pom.xml             | 14 ++++
 .../src/main/config/compile-as-config.xml       |  1 +
 .../effects/beads/EasyAccordionCollapseBead.as  | 84 ++++++++++++++++++++
 .../org/apache/flex/utils/MockContentView.as    | 54 +++++++++++--
 .../org/apache/flex/utils/MockLayoutChild.as    | 43 +++++++++-
 .../org/apache/flex/utils/MockLayoutParent.as   | 49 ++++++++++--
 .../src/main/resources/basic-manifest.xml       |  1 +
 frameworks/projects/HTML/pom.xml                | 13 ---
 .../HTML/src/main/config/compile-as-config.xml  |  1 -
 .../html/beads/EasyAccordionCollapseBead.as     | 81 -------------------
 .../HTML/src/main/resources/basic-manifest.xml  |  1 -
 15 files changed, 233 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 4d346ff..a4087eb 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -81,9 +81,9 @@
         <antcall target="Graphics"/>
         <antcall target="Binding"/>
         <antcall target="Collections"/>
+        <antcall target="HTML"/>
         <antcall target="Effects"/>
         <antcall target="Basic"/>
-        <antcall target="HTML"/>
         <antcall target="Flat"/>
         <antcall target="Charts"/>
         <antcall target="DragDrop"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/js/FlexJS/projects/BasicJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/js/FlexJS/projects/BasicJS/src/main/config/compile-js-config.xml 
b/frameworks/js/FlexJS/projects/BasicJS/src/main/config/compile-js-config.xml
index 82ba0b1..1f22b4a 100644
--- 
a/frameworks/js/FlexJS/projects/BasicJS/src/main/config/compile-js-config.xml
+++ 
b/frameworks/js/FlexJS/projects/BasicJS/src/main/config/compile-js-config.xml
@@ -56,8 +56,8 @@
             <path-element>../../../../../libs/BindingJS.swc</path-element>
             <path-element>../../../../../libs/CoreJS.swc</path-element>
             <path-element>../../../../../libs/GraphicsJS.swc</path-element>
-            <path-element>../../../../../libs/EffectsJS.swc</path-element>
             <path-element>../../../../../libs/CollectionsJS.swc</path-element>
+            <path-element>../../../../../libs/EffectsJS.swc</path-element>
         </library-path>
         
         <namespaces>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml 
b/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
index deb72a9..7c5217c 100644
--- 
a/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
+++ 
b/frameworks/js/FlexJS/projects/EffectsJS/src/main/config/compile-js-config.xml
@@ -54,6 +54,7 @@
              if these swcs are on the external-library-path then their requires
              will not be listed -->
             <path-element>../../../../../libs/CoreJS.swc</path-element>
+                       
<path-element>../../../../../libs/HTMLJS.swc</path-element>
         </library-path>
         
         <source-path>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
----------------------------------------------------------------------
diff --git 
a/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml 
b/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
index 9a96d31..4a555f0 100644
--- a/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
+++ b/frameworks/js/FlexJS/projects/HTMLJS/src/main/config/compile-js-config.xml
@@ -57,7 +57,6 @@
             <path-element>../../../../../libs/CoreJS.swc</path-element>
             <path-element>../../../../../libs/GraphicsJS.swc</path-element>
             <path-element>../../../../../libs/CollectionsJS.swc</path-element>
-            <path-element>../../../../../libs/EffectsJS.swc</path-element>
         </library-path>
         
         <namespaces>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/pom.xml 
b/frameworks/projects/Effects/pom.xml
index eab99ae..3db961f 100644
--- a/frameworks/projects/Effects/pom.xml
+++ b/frameworks/projects/Effects/pom.xml
@@ -69,6 +69,20 @@
       <type>swc</type>
       <classifier>typedefs</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.flex.flexjs.framework</groupId>
+      <artifactId>HTML</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <type>swc</type>
+      <classifier>typedefs</classifier>
+    </dependency>
+    
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/config/compile-as-config.xml 
b/frameworks/projects/Effects/src/main/config/compile-as-config.xml
index f5bd6ba..0c35f10 100644
--- a/frameworks/projects/Effects/src/main/config/compile-as-config.xml
+++ b/frameworks/projects/Effects/src/main/config/compile-as-config.xml
@@ -24,6 +24,7 @@
         <external-library-path>
             
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
             <path-element>../../../../../libs/Core.swc</path-element>
+                       
<path-element>../../../../../libs/HTML.swc</path-element>
         </external-library-path>
         
                <mxml>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/EasyAccordionCollapseBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/EasyAccordionCollapseBead.as
 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/EasyAccordionCollapseBead.as
new file mode 100644
index 0000000..273ced6
--- /dev/null
+++ 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/beads/EasyAccordionCollapseBead.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.effects.beads
+{
+       
+       import org.apache.flex.core.ILayoutChild;
+       import org.apache.flex.core.ILayoutParent;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.html.beads.layouts.IOneFlexibleChildLayout;
+       import org.apache.flex.html.supportClasses.ICollapsible;
+       import org.apache.flex.utils.LayoutTweener;
+       import org.apache.flex.html.beads.AccordionCollapseBead;
+       import org.apache.flex.html.beads.AccordionView;
+       import org.apache.flex.html.beads.IListView;
+       
+       public class EasyAccordionCollapseBead extends AccordionCollapseBead
+       {
+               public function EasyAccordionCollapseBead()
+               {
+                       super();
+               }
+               
+               private function findPreviousNonCollapsedIndex():int
+               {
+                       var n:int = view.dataGroup.numElements;
+                       for (var i:int = 0; i < n; i++)
+                       {
+                               var collapsible:ICollapsible = 
view.dataGroup.getElementAt(i) as ICollapsible;
+                               if (collapsible.collapsedHeight != (collapsible 
as ILayoutChild).height)
+                               {
+                                       return i;
+                               }
+                       }
+                       return -1;
+               }
+               
+               private function get view():IListView
+               {
+                       return host.view as IListView;                  
+               }
+               
+               override protected function 
selectedIndexChangedHandler(event:Event):void
+               {
+                       var newChild:UIBase = 
view.dataGroup.getElementAt(host.selectedIndex) as UIBase;
+                       var oldChildIndex:int = findPreviousNonCollapsedIndex();
+                       var oldCollapsible:ICollapsible = 
view.dataGroup.getElementAt(oldChildIndex) as ICollapsible;
+                       if (!newChild || oldChildIndex < 0)
+                       {
+                               return;
+                       }
+                       var collapseHeight:Number = 
oldCollapsible.collapsedHeight;
+                       var tweener:LayoutTweener = new LayoutTweener(layout, 
host as ILayoutParent);
+                       tweener.setBaseline();
+                       var oldLayoutChild:ILayoutChild = 
tweener.mockLayoutParent.contentView.getElementAt(oldChildIndex) as 
ILayoutChild;
+                       oldLayoutChild.height = collapseHeight;
+                       layout.flexibleChild = newChild.id;
+                       layout.layout();
+                       tweener.play();
+               }
+               
+               private function get layout():IOneFlexibleChildLayout
+               {
+                       return (view as AccordionView).layout;
+               }
+               
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockContentView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockContentView.as
 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockContentView.as
index d48e9f3..1b1d8f0 100644
--- 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockContentView.as
+++ 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockContentView.as
@@ -18,9 +18,15 @@
 
////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-       import flash.display.DisplayObject;
-       import flash.events.Event;
-       
+       COMPILE::SWF
+       {
+               import flash.display.DisplayObject;
+               import flash.events.Event;
+       }
+       COMPILE::JS
+       {
+               import org.apache.flex.core.WrappedHTMLElement;
+       }
        import org.apache.flex.core.IBead;
        import org.apache.flex.core.IChild;
        import org.apache.flex.core.IContentView;
@@ -130,10 +136,11 @@ package org.apache.flex.utils
                {
                        public function internalChildren():Array
                        {
-                               
+                               return null;
                        }
                }
 
+               COMPILE::SWF
                public function get $displayObject():DisplayObject
                {
                        // TODO Auto Generated method stub
@@ -158,13 +165,26 @@ package org.apache.flex.utils
                        return null;
                }
                
+               COMPILE::SWF
                public function addEventListener(type:String, 
listener:Function, useCapture:Boolean=false, priority:int=0, 
useWeakReference:Boolean=false):void
                {
                        // TODO Auto Generated method stub
-                       
                }
                
-               public function dispatchEvent(event:Event):Boolean
+               COMPILE::JS
+               public function addEventListener(type:String, handler:Function, 
opt_capture:Boolean = false, opt_handlerScope:Object = null):void
+               {
+               }
+               
+               COMPILE::SWF
+               public function dispatchEvent(event:flash.events.Event):Boolean
+               {
+                       // TODO Auto Generated method stub
+                       return false;
+               }
+
+               COMPILE::JS
+               public function dispatchEvent(event:Object):Boolean
                {
                        // TODO Auto Generated method stub
                        return false;
@@ -176,12 +196,18 @@ package org.apache.flex.utils
                        return false;
                }
                
+               COMPILE::SWF
                public function removeEventListener(type:String, 
listener:Function, useCapture:Boolean=false):void
                {
                        // TODO Auto Generated method stub
-                       
                }
-               
+
+               COMPILE::JS
+               public function removeEventListener(type:String, 
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = 
null):void
+               {
+                       // TODO Auto Generated method stub
+               }
+
                public function willTrigger(type:String):Boolean
                {
                        // TODO Auto Generated method stub
@@ -229,6 +255,18 @@ package org.apache.flex.utils
                        // TODO Auto Generated method stub
                        return false;
                }
+       
+               COMPILE::JS
+               public function get positioner():WrappedHTMLElement
+               {
+                       return null;
+               }
+               
+               COMPILE::JS
+               public function get element():WrappedHTMLElement
+               {
+                       return null;
+               }
                
        }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
index 13c1a0b..ed20875 100644
--- 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
+++ 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
@@ -24,6 +24,11 @@ package org.apache.flex.utils
                import flash.events.Event;
        }
        
+       COMPILE::JS
+       {
+               import org.apache.flex.core.WrappedHTMLElement;
+       }
+
        import org.apache.flex.core.IBead;
        import org.apache.flex.core.ILayoutChild;
        import org.apache.flex.core.IParent;
@@ -224,28 +229,50 @@ package org.apache.flex.utils
                        return null;
                }
                
+               COMPILE::JS
+               public function addEventListener(type:String, handler:Function, 
opt_capture:Boolean = false, opt_handlerScope:Object = null):void
+               {
+               }
+
+               COMPILE::SWF
                public function addEventListener(type:String, 
listener:Function, useCapture:Boolean=false, priority:int=0, 
useWeakReference:Boolean=false):void
                {
                }
                
+               COMPILE::SWF
                public function removeEventListener(type:String, 
listener:Function, useCapture:Boolean=false):void
                {
                }
                
+               COMPILE::JS
+               public function removeEventListener(type:String, 
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = 
null):void
+               {
+                       // TODO Auto Generated method stub
+               }
+
+               
                COMPILE::SWF
                public function dispatchEvent(event:Event):Boolean
                {
                        return false;
                }
                
+               COMPILE::JS
+               public function dispatchEvent(event:Object):Boolean
+               {
+                       return false;
+               }
+               
+               COMPILE::SWF
                public function hasEventListener(type:String):Boolean
                {
-                       return _source.hasEventListener(type);
+                       return (_source as 
IEventDispatcher).hasEventListener(type);
                }
                
+               COMPILE::SWF
                public function willTrigger(type:String):Boolean
                {
-                       return _source.willTrigger(type);
+                       return (_source as IEventDispatcher).willTrigger(type);
                }
                
                public function get className():String
@@ -268,5 +295,17 @@ package org.apache.flex.utils
                        return (_source as IStyleableObject).style;
                }
                
+               COMPILE::JS
+               public function get positioner():WrappedHTMLElement
+               {
+                       return null;
+               }
+               
+               COMPILE::JS
+               public function get element():WrappedHTMLElement
+               {
+                       return null;
+               }
+
        }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
index e823087..295933a 100644
--- 
a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
+++ 
b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
@@ -18,9 +18,17 @@
 
////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.utils
 {
-       import flash.display.DisplayObject;
-       import flash.events.Event;
+       COMPILE::SWF
+       {
+               import flash.display.DisplayObject;
+               import flash.events.Event;
+       }
        
+       COMPILE::JS
+       {
+               import org.apache.flex.core.WrappedHTMLElement;
+       }
+
        import org.apache.flex.core.IBead;
        import org.apache.flex.core.ILayoutChild;
        import org.apache.flex.core.ILayoutHost;
@@ -236,15 +244,25 @@ package org.apache.flex.utils
                        
                }
                
+               COMPILE::JS
+               public function addEventListener(type:String, handler:Function, 
opt_capture:Boolean = false, opt_handlerScope:Object = null):void
+               {
+               }
+               
+               COMPILE::SWF
                public function addEventListener(type:String, 
listener:Function, useCapture:Boolean=false, priority:int=0, 
useWeakReference:Boolean=false):void
                {
-                       // TODO Auto Generated method stub
-                       
                }
                
+               COMPILE::SWF
                public function dispatchEvent(event:Event):Boolean
                {
-                       // TODO Auto Generated method stub
+                       return false;
+               }
+               
+               COMPILE::JS
+               public function dispatchEvent(event:Object):Boolean
+               {
                        return false;
                }
                
@@ -254,10 +272,15 @@ package org.apache.flex.utils
                        return false;
                }
                
+               COMPILE::SWF
                public function removeEventListener(type:String, 
listener:Function, useCapture:Boolean=false):void
                {
+               }
+               
+               COMPILE::JS
+               public function removeEventListener(type:String, 
handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = 
null):void
+               {
                        // TODO Auto Generated method stub
-                       
                }
                
                public function willTrigger(type:String):Boolean
@@ -266,11 +289,25 @@ package org.apache.flex.utils
                        return false;
                }
                
+               COMPILE::SWF
                public function get $displayObject():DisplayObject
                {
                        // TODO Auto Generated method stub
                        return null;
                }
                
+               COMPILE::JS
+               public function get positioner():WrappedHTMLElement
+               {
+                       return null;
+               }
+
+               COMPILE::JS
+               public function get element():WrappedHTMLElement
+               {
+                       return null;
+               }
+
+               
        }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/basic-manifest.xml 
b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
index 64a6c26..3b060a2 100644
--- a/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
@@ -28,5 +28,6 @@
     <component id="Sequence" class="org.apache.flex.effects.Sequence"/>
     <component id="Parallel" class="org.apache.flex.effects.Parallel"/>
     <component id="Transition" class="org.apache.flex.states.Transition" />
+    <component id="EasyAccordionCollapseBead" 
class="org.apache.flex.effects.beads.EasyAccordionCollapseBead"/>
 
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/HTML/pom.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/pom.xml b/frameworks/projects/HTML/pom.xml
index c41420c..5eab490 100644
--- a/frameworks/projects/HTML/pom.xml
+++ b/frameworks/projects/HTML/pom.xml
@@ -123,19 +123,6 @@
       <type>swc</type>
       <classifier>typedefs</classifier>
     </dependency>
-    <dependency>
-      <groupId>org.apache.flex.flexjs.framework</groupId>
-      <artifactId>Effects</artifactId>
-      <version>0.8.0-SNAPSHOT</version>
-      <type>swc</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.flex.flexjs.framework</groupId>
-      <artifactId>Effects</artifactId>
-      <version>0.8.0-SNAPSHOT</version>
-      <type>swc</type>
-      <classifier>typedefs</classifier>
-    </dependency>
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/HTML/src/main/config/compile-as-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/config/compile-as-config.xml 
b/frameworks/projects/HTML/src/main/config/compile-as-config.xml
index a5bf243..7b1c242 100644
--- a/frameworks/projects/HTML/src/main/config/compile-as-config.xml
+++ b/frameworks/projects/HTML/src/main/config/compile-as-config.xml
@@ -27,7 +27,6 @@
             <path-element>../../../../../libs/Core.swc</path-element>
             <path-element>../../../../../libs/Graphics.swc</path-element>
             <path-element>../../../../../libs/Collections.swc</path-element>
-            <path-element>../../../../../libs/Effects.swc</path-element>
         </external-library-path>
         
                <mxml>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/EasyAccordionCollapseBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/EasyAccordionCollapseBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/EasyAccordionCollapseBead.as
deleted file mode 100644
index 22c6f1c..0000000
--- 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/EasyAccordionCollapseBead.as
+++ /dev/null
@@ -1,81 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads
-{
-       
-       import org.apache.flex.core.ILayoutChild;
-       import org.apache.flex.core.ILayoutParent;
-       import org.apache.flex.core.UIBase;
-       import org.apache.flex.events.Event;
-       import org.apache.flex.html.beads.layouts.IOneFlexibleChildLayout;
-       import org.apache.flex.html.supportClasses.ICollapsible;
-       import org.apache.flex.utils.LayoutTweener;
-       
-       public class EasyAccordionCollapseBead extends AccordionCollapseBead
-       {
-               public function EasyAccordionCollapseBead()
-               {
-                       super();
-               }
-               
-               private function findPreviousNonCollapsedIndex():int
-               {
-                       var n:int = view.dataGroup.numElements;
-                       for (var i:int = 0; i < n; i++)
-                       {
-                               var collapsible:ICollapsible = 
view.dataGroup.getElementAt(i) as ICollapsible;
-                               if (collapsible.collapsedHeight != (collapsible 
as ILayoutChild).height)
-                               {
-                                       return i;
-                               }
-                       }
-                       return -1;
-               }
-               
-               private function get view():IListView
-               {
-                       return host.view as IListView;                  
-               }
-               
-               override protected function 
selectedIndexChangedHandler(event:Event):void
-               {
-                       var newChild:UIBase = 
view.dataGroup.getElementAt(host.selectedIndex) as UIBase;
-                       var oldChildIndex:int = findPreviousNonCollapsedIndex();
-                       var oldCollapsible:ICollapsible = 
view.dataGroup.getElementAt(oldChildIndex) as ICollapsible;
-                       if (!newChild || oldChildIndex < 0)
-                       {
-                               return;
-                       }
-                       var collapseHeight:Number = 
oldCollapsible.collapsedHeight;
-                       var tweener:LayoutTweener = new LayoutTweener(layout, 
host as ILayoutParent);
-                       tweener.setBaseline();
-                       var oldLayoutChild:ILayoutChild = 
tweener.mockLayoutParent.contentView.getElementAt(oldChildIndex) as 
ILayoutChild;
-                       oldLayoutChild.height = collapseHeight;
-                       layout.flexibleChild = newChild.id;
-                       layout.layout();
-                       tweener.play();
-               }
-               
-               private function get layout():IOneFlexibleChildLayout
-               {
-                       return (view as AccordionView).layout;
-               }
-               
-       }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f405d307/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml 
b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index aeb558d..6b4a40c 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -77,7 +77,6 @@
     <component id="StringItemRenderer" 
class="org.apache.flex.html.supportClasses.StringItemRenderer"/>
     <component id="AccordionItemRenderer" 
class="org.apache.flex.html.supportClasses.AccordionItemRenderer"/>
     <component id="AccordionCollapseBead" 
class="org.apache.flex.html.beads.AccordionCollapseBead"/>
-    <component id="EasyAccordionCollapseBead" 
class="org.apache.flex.html.beads.EasyAccordionCollapseBead"/>
     <component id="TreeItemRenderer" 
class="org.apache.flex.html.supportClasses.TreeItemRenderer"/>
     <component id="DataItemRenderer" 
class="org.apache.flex.html.supportClasses.DataItemRenderer"/>
     <component id="MXMLItemRenderer" 
class="org.apache.flex.html.supportClasses.MXMLItemRenderer"/>

Reply via email to