Author: cframpton
Date: Fri Dec  7 22:23:54 2012
New Revision: 1418520

URL: http://svn.apache.org/viewvc?rev=1418520&view=rev
Log:
Donate OLAPDataGrid tests from Adobe.  Embed the fonts and update the pngs.

Added:
    incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis.png
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis_All.png
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis.png
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis_All.png
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
   (with props)
    
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
   (with props)

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis.png
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis.png?rev=1418520&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis_All.png
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis_All.png?rev=1418520&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis_All.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis.png
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis.png?rev=1418520&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis_All.png
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis_All.png?rev=1418520&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/Baselines/OLAPDatGrid_RowAxis_All.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<UnitTester testDir="tests/components/OLAPDataGrid/CheckInSuite/" 
xmlns:mx="http://www.adobe.com/2006/mxml"; xmlns="*" testSWF="ODGMain.mxml">
+
+       <!-- this set of lines form a template that must be in each unit test 
-->
+       <mx:Script>
+       <![CDATA[
+       public static function init(o:DisplayObject):void
+       {
+       }                                       
+       ]]>
+       </mx:Script>
+       <mx:Metadata>
+       <![CDATA[
+               [Mixin]
+       ]]>
+       </mx:Metadata>  
+       <!-- end of set of lines that must be in each unit test -->
+       <mx:Script>
+       <![CDATA[
+                                               
+               ]]>
+       </mx:Script>
+       <testCases>
+            <TestCase testID="OLAPDG_RowAxis" keywords="[ Row Axis]">
+               <setup>
+                       <ResetComponent target="myCustomODG" 
className="CustomODG" waitTarget="myCustomODG" waitEvent="updateComplete"/>
+                       <Pause timeout="5000"/>
+               </setup>
+               <body>
+
+                  <CompareBitmap target="myCustomODG" 
url="../CheckInSuite/Baselines/OLAPDatGrid_RowAxis.png" timeout="5000"/>
+
+               </body>
+            </TestCase>
+            <TestCase testID="OLAPDG_ColumnAxis" keywords="[Column Axis]">
+               <setup>
+                  <ResetComponent target="myCustomOlapDataGrid" 
className="CustomOlapDataGrid" waitTarget="myCustomOlapDataGrid" 
waitEvent="updateComplete"/>
+                  <Pause timeout="5000"/>
+               </setup>
+               <body>
+
+                  <CompareBitmap target="myCustomOlapDataGrid" 
url="../CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis.png" timeout="5000"/>
+
+               </body>
+            </TestCase>
+            <TestCase testID="OLAPDG_RowAxis_All" keywords="[ Row Axis, ALL]">
+               <setup>
+                       <ResetComponent target="myCustomODG" 
className="CustomODG" waitTarget="myCustomODG" waitEvent="updateComplete"/>
+                       <Pause timeout="5000"/>
+               </setup>
+               <body>
+
+                  <CompareBitmap target="myCustomODG" 
url="../CheckInSuite/Baselines/OLAPDatGrid_RowAxis_All.png" timeout="5000"/>
+
+               </body>
+            </TestCase>
+            <TestCase testID="OLAPDG_ColumnAxis_All" keywords="[Column 
Axis,All]">
+               <setup>
+                  <ResetComponent target="myCustomOlapDataGrid" 
className="CustomOlapDataGrid" waitTarget="myCustomOlapDataGrid" 
waitEvent="updateComplete"/>
+                  <Pause timeout="5000"/>
+               </setup>
+               <body>
+
+                  <CompareBitmap target="myCustomOlapDataGrid" 
url="../CheckInSuite/Baselines/OLAPDatGrid_ColumnAxis_All.png" timeout="5000"/>
+
+               </body>
+            </TestCase>
+            
+       </testCases>
+</UnitTester>

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/CheckInSuite/OLAPDatGrid_CheckInSuite.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+       import mx.olap.IOLAPCustomAggregator;
+
+       public class CustomAvarage implements IOLAPCustomAggregator
+       {
+               public function CustomAvarage()
+               {
+                       //TODO: implement function
+               }
+
+               public function computeBegin(dataField:String):Object
+               {
+                       //TODO: implement function
+                       return { sales:0, revenue:0 } ;
+               }
+               
+               public function computeLoop(data:Object, dataField:String, 
value:Object):void
+               {
+                       //TODO: implement function
+                       data.sales += value.sales;
+                       data.revenue += value.revenue;
+               }
+               
+               public function computeEnd(data:Object, dataField:String):Number
+               {
+                       //TODO: implement function
+                       return data.revenue/data.sales;
+               }
+               
+               public function computeObjectBegin(value:Object):Object
+               {
+                       //TODO: implement function
+                       return {sales:value.sales, revenue:value.revenue};
+               }
+               
+               public function computeObjectLoop(value:Object, 
newValue:Object):void
+               {
+                       //TODO: implement function
+                       value.sales += newValue.sales;
+                       value.revenue += newValue.revenue;
+               }
+               
+               public function computeObjectEnd(value:Object, 
dataField:String):Number
+               {
+                       //TODO: implement function
+                       var avg:Number = value.revenue/value.sales;
+                       avg = Math.round(avg*1000);
+                       avg = avg/1000;
+                       return avg;
+               }
+               
+       }
+}
\ No newline at end of file

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomAvarage.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; xmlns="*"  
creationComplete="creationCompleteHandler()"  width="100%" height="100%">
+       <mx:Script>
+               <![CDATA[
+                       import mx.olap.OLAPMember;
+                       import mx.rpc.AsyncResponder;
+                       import mx.rpc.AsyncToken;
+                       import mx.messaging.messages.ErrorMessage;
+                       import mx.olap.OLAPQuery;
+                       import mx.olap.OLAPSet;
+                       import mx.olap.IOLAPQuery;
+                       import mx.olap.IOLAPQueryAxis;
+                       import mx.olap.IOLAPCube;
+                       import mx.olap.OLAPResult;
+                       import mx.events.CubeEvent;
+                       import mx.controls.Alert;
+                       import mx.collections.ArrayCollection;
+                       
+                       include "dataIntro.as"
+                       
+                       private function creationCompleteHandler():void {
+                               myMXMLCube.refresh();
+                       }
+                       private function getQuery(cube:IOLAPCube):IOLAPQuery {
+                               var query:OLAPQuery = new OLAPQuery;
+                               var om:OLAPMember;
+                               
+                               var rowQueryAxis:IOLAPQueryAxis = 
query.getAxis(OLAPQuery.ROW_AXIS);
+                               var productSet:OLAPSet = new OLAPSet;
+                               productSet.addElement(
+                                       
cube.findDimension("ProductDim").findAttribute("Product").findMember("ColdFusion"));
+                               productSet.addElement(
+                                       
cube.findDimension("ProductDim").findAttribute("Product").findMember("Flex"));
+                               
+                               om = 
OLAPMember(cube.findDimension("ProductDim").findAttribute("Product").defaultMember);
 
+                               om.displayName = "Total";
+                               productSet.addElement(om);
+                               
+                               rowQueryAxis.addSet(productSet);
+                               
+                               var colQueryAxis:IOLAPQueryAxis = 
query.getAxis(OLAPQuery.COLUMN_AXIS);         
+                               var quarterSet:OLAPSet= new OLAPSet;
+                               quarterSet.addElement(
+                                       
cube.findDimension("TimeDim").findAttribute("Quarter").findMember("Q1"));
+                               quarterSet.addElement(
+                                       
cube.findDimension("TimeDim").findAttribute("Quarter").findMember("Q2"));
+                               
+                               om = 
OLAPMember(cube.findDimension("TimeDim").findAttribute("Quarter").defaultMember);
 
+                               om.displayName = "Total";
+                               quarterSet.addElement(om);
+                               
+                               colQueryAxis.addSet(quarterSet);
+                               
+                               return query;       
+                       }
+
+                       private function runQuery():void {
+                               var cube:IOLAPCube = myMXMLCube;
+                               var query:IOLAPQuery = getQuery(cube);
+                               var token:AsyncToken = cube.execute(query);
+                               token.addResponder(new 
AsyncResponder(showResult, showFault));
+                       }
+                       
+                       private function showFault(error:ErrorMessage, 
token:Object):void {
+                               Alert.show(error.faultString);
+                       }
+                       
+                       private function showResult(result:Object, 
token:Object):void {
+                               if (!result) {
+                                       Alert.show("No results from query.");
+                                       return;
+                               }
+                               OLAPDG1.dataProvider= result as OLAPResult;     
       
+                       }        
+               ]]>
+       </mx:Script>
+       
+       <mx:OLAPCube name="FlatSchemaCube" dataProvider="{flatData}" 
id="myMXMLCube" complete="runQuery()">
+               
+               <mx:OLAPDimension name="CustomerDim">
+                       <mx:OLAPAttribute name="Customer" dataField="customer"/>
+                       <mx:OLAPHierarchy name="CustomerHier" 
+                                                         hasAll="true">
+                               <mx:OLAPLevel attributeName="Customer"/>
+                       </mx:OLAPHierarchy>
+               </mx:OLAPDimension>
+               
+               <mx:OLAPDimension name="ProductDim">
+                       <mx:OLAPAttribute name="Product" dataField="product"/>
+                       <mx:OLAPHierarchy name="ProductHier" 
+                                                         hasAll="true">
+                               <mx:OLAPLevel attributeName="Product"/>
+                       </mx:OLAPHierarchy>
+               </mx:OLAPDimension>
+               
+               <mx:OLAPDimension name="TimeDim">
+                       <mx:OLAPAttribute name="Year" dataField="year"/>
+                       <mx:OLAPAttribute name="Quarter" dataField="quarter"/>
+                       <mx:OLAPAttribute name="Month" dataField="month"/>
+                       <mx:OLAPHierarchy name="Time-Period" 
+                                                         hasAll="true">
+                               <mx:OLAPLevel attributeName="Year"/>
+                               <mx:OLAPLevel attributeName="Quarter"/>
+                               <mx:OLAPLevel attributeName="Month"/>
+                       </mx:OLAPHierarchy> 
+               </mx:OLAPDimension>
+               
+               <mx:OLAPDimension name="GeographyDim">  
+                       <mx:OLAPAttribute name="Country" dataField="country"/>
+                       <mx:OLAPAttribute name="Region" dataField="region"/>
+                       <mx:OLAPAttribute name="State" dataField="state"/>
+                       <mx:OLAPHierarchy name="Country-Region-State" 
+                                                         hasAll="true">
+                               <mx:OLAPLevel attributeName="Country"/>
+                               <mx:OLAPLevel attributeName="Region"/>
+                               <mx:OLAPLevel attributeName="State"/>
+                       </mx:OLAPHierarchy> 
+               </mx:OLAPDimension>
+               
+               <mx:OLAPMeasure name="Revenue" dataField="revenue" 
aggregator="SUM"/>
+               <mx:OLAPMeasure name="Cost" dataField="cost" aggregator="SUM"/>
+       </mx:OLAPCube>
+       <mx:OLAPDataGrid id="OLAPDG1"/>
+
+</mx:VBox>
\ No newline at end of file

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomODG.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; xmlns="*" 
creationComplete="buildCube()"  width="100%" height="100%">
+       <mx:Script>
+               <![CDATA[
+                       import mx.olap.OLAPSet;
+                       import mx.collections.ArrayCollection;
+                       import mx.rpc.AsyncResponder;
+                       import mx.rpc.AsyncToken;
+                       import mx.olap.OLAPQuery;
+                       private var inputData:ArrayCollection = new 
ArrayCollection( [
+                               
+                       { product:"FlexBuilder", revenue:100, sales:10, 
version:1 },
+                               { product:"FlexBuilder", revenue:200, sales:15, 
version:1 },
+                               { product:"FlexBuilder", revenue:150, sales:10, 
version:2 },
+                               { product:"FlexBuilder", revenue:170, sales:8, 
version:2 },
+                               { product:"FlexBuilder", revenue:150, sales:7, 
version:3 },
+                               { product:"FlexBuilder", revenue:180, sales:9, 
version:3 },
+                               
+                               { product:"Fireworks", revenue:70, sales:11, 
version:1 },
+                               { product:"Fireworks", revenue:20, sales:14, 
version:1 },
+                               { product:"Fireworks", revenue:130, sales:8, 
version:3 },
+                               { product:"Fireworks", revenue:150, sales:6, 
version:3 },
+                               
+                               ]);
+                       
+                       private function buildCube():void
+                       {
+                               sales.refresh();                        
+                       }
+                       
+                       private function cubeCompleteHandler():void
+                       {
+                               var query:OLAPQuery = new OLAPQuery();
+                               
+                               var colSet:OLAPSet = new OLAPSet();
+                               
colSet.addElements(sales.findDimension("Product").findAttribute("Version").members);
+                               
+                               var measureSet:OLAPSet = new OLAPSet();
+                               
measureSet.addElements(sales.findDimension("Measures").members);
+                               
query.getAxis(OLAPQuery.COLUMN_AXIS).addSet(colSet.crossJoin(measureSet));
+                               
+                               var rowSet:OLAPSet = new OLAPSet();
+                               
rowSet.addElements(sales.findDimension("Product").findAttribute("Product").members);
+                               
query.getAxis(OLAPQuery.ROW_AXIS).addSet(rowSet);
+                               
+                               var token:AsyncToken = sales.execute(query);
+                               token.addResponder(new 
AsyncResponder(resultHandler, faultHandler));
+                       }
+                       
+                       private function resultHandler(data:Object, 
token:Object):void
+                       {
+                               OLAPDG2.dataProvider = data;
+                       }
+                       
+                       private function faultHandler(error:Object, 
token:Object):void
+                       {
+                               trace("Error");
+                       }
+               ]]>
+       </mx:Script>
+       
+       <mx:OLAPCube id="sales" complete="cubeCompleteHandler()" 
dataProvider="{inputData}" >
+               <mx:OLAPDimension name="Product">
+                       <mx:OLAPAttribute dataField="product" name="Product" />
+                       <mx:OLAPAttribute dataField="version" name="Version" />
+               </mx:OLAPDimension>
+               <mx:OLAPMeasure name="Revenue" dataField="revenue" 
aggregator="SUM" />
+               <mx:OLAPMeasure name="Sales" dataField="sales" aggregator="SUM" 
/>
+               <mx:OLAPMeasure name="AvarageRevenue" 
dataField="avarageRevenue" aggregator="{new CustomAvarage()}" />
+       </mx:OLAPCube>
+       
+       <mx:OLAPDataGrid id="OLAPDG2"  />
+
+</mx:VBox>
\ No newline at end of file

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/CustomOlapDataGrid.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+[Bindable]
+private var flatData:ArrayCollection = new ArrayCollection(
+[
+  {customer:"AAA", product:"ColdFusion", quarter:"Q1", revenue:210, cost:25},
+  {customer:"AAA", product:"Flex", quarter:"Q2", revenue:210, cost:25},
+  {customer:"AAA", product:"Dreamweaver", quarter:"Q3", revenue:250, cost:125},
+  {customer:"AAA", product:"Flash", quarter:"Q4", revenue:430, cost:75},
+  
+  {customer:"BBB", product:"ColdFusion", quarter:"Q2", revenue:125, cost:20},
+  {customer:"BBB", product:"Flex", quarter:"Q3", revenue:210, cost:20},
+  {customer:"BBB", product:"Dreamweaver", quarter:"Q4", revenue:320, cost:120},
+  {customer:"BBB", product:"Flash", quarter:"Q1", revenue:280, cost:70},
+  
+  {customer:"CCC", product:"ColdFusion", quarter:"Q3", revenue:375, cost:120},
+  {customer:"CCC", product:"Flex", quarter:"Q4", revenue:430, cost:120},
+  {customer:"CCC", product:"Dreamweaver", quarter:"Q1", revenue:470, cost:220},
+  {customer:"CCC", product:"Flash", quarter:"Q2", revenue:570, cost:170},
+  
+  {customer:"AAA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
+  {customer:"AAA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
+  {customer:"AAA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
+  {customer:"AAA", product:"Flash", quarter:"Q3", revenue:670, cost:75},
+  
+  {customer:"BBB", product:"ColdFusion", quarter:"Q1", revenue:175, cost:20},
+  {customer:"BBB", product:"Flex", quarter:"Q2", revenue:210, cost:20},
+  {customer:"BBB", product:"Dreamweaver",quarter:"Q3", revenue:120, cost:120},
+  {customer:"BBB", product:"Flash", quarter:"Q4", revenue:310, cost:70},
+  
+  {customer:"CCC", product:"ColdFusion", quarter:"Q1", revenue:385, cost:120},
+  {customer:"CCC", product:"Flex", quarter:"Q2", revenue:340, cost:120},
+  {customer:"CCC", product:"Dreamweaver", quarter:"Q3", revenue:470, cost:220},
+  {customer:"CCC", product:"Flash", quarter:"Q4", revenue:270, cost:170},
+  
+  
+  {customer:"AAA", product:"ColdFusion", quarter:"Q1", revenue:100, cost:25},
+  {customer:"AAA", product:"Flex", quarter:"Q2", revenue:150, cost:25},
+  {customer:"AAA", product:"Dreamweaver", quarter:"Q3", revenue:200, cost:125},
+  {customer:"AAA", product:"Flash", quarter:"Q4", revenue:300, cost:75},
+  
+  {customer:"BBB", product:"ColdFusion", quarter:"Q2", revenue:175, cost:20},
+  {customer:"BBB", product:"Flex", quarter:"Q3", revenue:100, cost:20},
+  {customer:"BBB", product:"Dreamweaver", quarter:"Q4", revenue:270, cost:120},
+  {customer:"BBB", product:"Flash", quarter:"Q1", revenue:370, cost:70},
+  
+  {customer:"CCC", product:"ColdFusion", quarter:"Q3", revenue:410, cost:120},
+  {customer:"CCC", product:"Flex", quarter:"Q4", revenue:300, cost:320},
+  {customer:"CCC", product:"Dreamweaver", quarter:"Q1", revenue:510, cost:220},
+  {customer:"CCC", product:"Flash", quarter:"Q2", revenue:620, cost:170},
+  
+  {customer:"AAA", product:"ColdFusion", quarter:"Q4", revenue:215, cost:90},
+  {customer:"AAA", product:"Flex", quarter:"Q1", revenue:210, cost:90},
+  {customer:"AAA", product:"Dreamweaver", quarter:"Q2", revenue:175, cost:190},
+  {customer:"AAA", product:"Flash", quarter:"Q3", revenue:420, cost:75},
+  
+  {customer:"BBB", product:"ColdFusion", quarter:"Q1", revenue:240, cost:20},
+  {customer:"BBB", product:"Flex", quarter:"Q2", revenue:100, cost:20},
+  {customer:"BBB", product:"Dreamweaver", quarter:"Q3", revenue:270, cost:120},
+  {customer:"BBB", product:"Flash", quarter:"Q4", revenue:370, cost:70},
+  
+  {customer:"CCC", product:"ColdFusion", quarter:"Q1", revenue:375, cost:120},
+  {customer:"CCC", product:"Flex", quarter:"Q2", revenue:420, cost:120},
+  {customer:"CCC", product:"Dreamweaver", quarter:"Q3", revenue:680, cost:220},
+  {customer:"CCC", product:"Flash", quarter:"Q4", revenue:570, cost:170}
+          
+]);

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/DataIntro.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml?rev=1418520&view=auto
==============================================================================
--- 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
 (added)
+++ 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
 Fri Dec  7 22:23:54 2012
@@ -0,0 +1,59 @@
+<?xml version="1.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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; xmlns="*" 
width="100%" height="100%" >
+
+    <mx:Style>
+        @font-face {
+            src: 
url("../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+            fontFamily: "OpenSans";
+            embedAsCFF: false;
+        }
+        
+        @font-face {
+            src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+            fontFamily: "OpenSans";
+            fontWeight: bold;
+            embedAsCFF: false;
+        }
+        
+        @font-face {
+            src: url("../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+            fontFamily: "OpenSans";
+            fontStyle: italic;
+            embedAsCFF: false;
+        }
+        
+        @font-face {
+            src: 
url("../../../../Assets/Fonts/Open_Sans/OpenSans-BoldItalic.ttf");
+            fontFamily: "OpenSans";
+            fontWeight: bold;
+            fontStyle: italic;
+            embedAsCFF: false;
+        }
+            
+        global {
+            fontFamily: "OpenSans";
+            fontAntiAliasType: "normal";
+        }
+    </mx:Style>
+    
+    <CustomODG id="myCustomODG"/>      
+    <CustomOlapDataGrid id="myCustomOlapDataGrid"/>    
+</mx:Application>

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/flex/sdk/branches/develop/mustella/tests/components/OLAPDataGrid/SWFs/ODGMain.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to