You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/04/15 23:43:14 UTC
[09/55] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
AS classes from FlexJSJX to final home. Build scripts will be fixed up in a
later commit
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/StackedViewManagerView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
deleted file mode 100644
index 1d3ae57..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
+++ /dev/null
@@ -1,184 +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.mobile.beads
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout;
- import org.apache.flex.mobile.ManagerBase;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.ToolBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The StackedViewManagerView creates the visual elements of the StackedViewManager. This
- * includes a NavigationBar, ToolBar, and contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class StackedViewManagerView implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StackedViewManagerView()
- {
- super();
-
- layoutReady = false;
- }
-
- private var _navigationBar:NavigationBar;
- private var _toolBar:ToolBar;
-
- private var layoutReady:Boolean;
-
- private var _strand:ManagerBase;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value as ManagerBase;
- _strand.addEventListener("widthChanged", changeHandler);
- _strand.addEventListener("heightChanged", changeHandler);
-
- var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
- model.addEventListener("viewsChanged", handleModelChanged);
- model.addEventListener("viewPushed", handleModelChanged);
- model.addEventListener("viewPopped", handleModelChanged);
-
- if (model.navigationBarItems)
- {
- _navigationBar = new NavigationBar();
- _navigationBar.controls = model.navigationBarItems;
- _navigationBar.addBead(new NonVirtualHorizontalLayout());
- _strand.addElement(_navigationBar);
- }
-
- if (model.toolBarItems)
- {
- _toolBar = new ToolBar();
- _toolBar.controls = model.toolBarItems;
- _toolBar.addBead(new NonVirtualHorizontalLayout());
- _strand.addElement(_toolBar);
- }
-
- layoutReady = true;
- layoutChromeElements();
- }
-
- /**
- * @private
- */
- private function layoutChromeElements():void
- {
- var contentAreaY:Number = 0;
- var contentAreaHeight:Number = _strand.height;
-
- var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (_navigationBar)
- {
- _navigationBar.x = 0;
- _navigationBar.y = 0;
- _navigationBar.width = _strand.width;
-
- contentAreaY = _navigationBar.height;
- contentAreaHeight -= _navigationBar.height;
-
- model.navigationBar = _navigationBar;
- }
-
- if (_toolBar)
- {
- _toolBar.x = 0;
- _toolBar.y = _strand.height - _toolBar.height;
- _toolBar.width = _strand.width;
-
- contentAreaHeight -= _toolBar.height;
-
- model.toolBar = _toolBar;
- }
-
- _strand.contentArea.x = 0;
- _strand.contentArea.y = contentAreaY;
- _strand.contentArea.width = _strand.width;
- _strand.contentArea.height = contentAreaHeight;
- }
-
-
- /**
- * @private
- */
- protected function changeHandler(event:Event):void
- {
- if (layoutReady) layoutChromeElements();
- }
-
- /**
- * @private
- */
- private function handleModelChanged(event:Event):void
- {
- trace("Model event: "+event.type);
- }
-
- /**
- * @private
- */
- public function get host():IUIBase
- {
- return _strand;
- }
-
- /**
- * @private
- */
- public function get viewWidth():Number
- {
- return _strand.width;
- }
-
- /**
- * @private
- */
- public function get viewHeight():Number
- {
- return _strand.height;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
deleted file mode 100644
index e5652c8..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
+++ /dev/null
@@ -1,184 +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.mobile.beads
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.layouts.NonVirtualHorizontalLayout;
- import org.apache.flex.mobile.ManagerBase;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.TabBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The TabbedViewManagerView constructs the visual elements of the TabbedViewManager. The
- * elements may be a navigation bar, a tab bar, and the contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TabbedViewManagerView implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function TabbedViewManagerView()
- {
- super();
- layoutReady = false;
- }
-
- private var _navigationBar:NavigationBar;
- private var _tabBar:TabBar;
-
- private var layoutReady:Boolean;
-
- private var _strand:ManagerBase;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value as ManagerBase;
- _strand.addEventListener("widthChanged", changeHandler);
- _strand.addEventListener("heightChanged", changeHandler);
-
- var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
- model.addEventListener("viewsChanged", changeHandler);
-
- if (model.navigationBarItems)
- {
- _navigationBar = new NavigationBar();
- _navigationBar.controls = model.navigationBarItems;
- _navigationBar.addBead(new NonVirtualHorizontalLayout());
- _strand.addElement(_navigationBar);
- }
-
- // TabbedViewManager always has a TabBar
- _tabBar = new TabBar();
- _tabBar.dataProvider = model.views;
- _tabBar.labelField = "title";
- _strand.addElement(_tabBar);
- _tabBar.addEventListener("change",handleButtonBarChange);
-
- layoutReady = true;
- layoutChromeElements();
- }
-
- /**
- * @private
- */
- private function layoutChromeElements():void
- {
- var contentAreaY:Number = 0;
- var contentAreaHeight:Number = _strand.height;
-
- var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (_navigationBar)
- {
- _navigationBar.x = 0;
- _navigationBar.y = 0;
- _navigationBar.width = _strand.width;
-
- contentAreaY = _navigationBar.height;
- contentAreaHeight -= _navigationBar.height;
-
- model.navigationBar = _navigationBar;
- }
-
- if (_tabBar)
- {
- _tabBar.x = 0;
- _tabBar.y = _strand.height - _tabBar.height;
- _tabBar.width = _strand.width;
-
- contentAreaHeight -= _tabBar.height;
-
- model.tabBar = _tabBar;
- }
-
- _strand.contentArea.x = 0;
- _strand.contentArea.y = contentAreaY;
- _strand.contentArea.width = _strand.width;
- _strand.contentArea.height = contentAreaHeight;
- }
-
- /**
- * @private
- */
- protected function changeHandler(event:Event):void
- {
- if (layoutReady) layoutChromeElements();
- }
-
- /**
- * @private
- */
- private function handleButtonBarChange(event:Event):void
- {
- var newIndex:Number = _tabBar.selectedIndex;
- var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- // doing this will trigger the selectedIndexChanged event which will
- // tell the strand to switch views
- model.selectedIndex = newIndex;
- }
-
- /**
- * @private
- */
- public function get host():IUIBase
- {
- return _strand;
- }
-
- /**
- * @private
- */
- public function get viewWidth():Number
- {
- return _strand.width;
- }
-
- /**
- * @private
- */
- public function get viewHeight():Number
- {
- return _strand.height;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/NavigationBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/NavigationBar.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/NavigationBar.as
deleted file mode 100644
index 5e7873e..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/NavigationBar.as
+++ /dev/null
@@ -1,103 +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.mobile.chrome
-{
- import org.apache.flex.core.IChrome;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.html.Container;
-
- /**
- * The NavigationBar class is part of the mobile view manager's chrome. When present,
- * it provides a place for content at the top of the view, above the contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class NavigationBar extends Container implements IChrome
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function NavigationBar()
- {
- super();
-
- className = "NavigationBar";
- }
-
- public function hidesBackButton(value:Boolean):void
- {
-
- }
-
- private var _controls:Array;
-
- /**
- * The controls of the NavigationBar (eg, a button to go back and a title).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set controls(value:Array):void
- {
- _controls = value;
- }
- public function get controls():Array
- {
- return _controls;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- for (var i:int=0; i < _controls.length; i++)
- {
- addElement( _controls[i], false );
-
- var ctrl:IEventDispatcher = _controls[i] as IEventDispatcher;
- ctrl.addEventListener("show", handleVisibilityChange);
- ctrl.addEventListener("hide", handleVisibilityChange);
- }
-
- dispatchEvent(new Event("layoutNeeded"));
- }
-
- /**
- * @private
- */
- private function handleVisibilityChange(event:Event):void
- {
- dispatchEvent(new Event("layoutNeeded"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/TabBar.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/TabBar.as
deleted file mode 100644
index 7ab2047..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/TabBar.as
+++ /dev/null
@@ -1,80 +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.mobile.chrome
-{
- import org.apache.flex.core.IChrome;
- import org.apache.flex.html.ButtonBar;
-
- /**
- * The TabBar class displays a set of buttons that can be used to
- * switch between navigation panels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TabBar extends ButtonBar implements IChrome
- {
- /**
- * Constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function TabBar()
- {
- super();
-
- className = "TabBar";
- }
-
- /**
- * Sets the width of the TabBar.
- *
- * @param value The new width in pixels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function set width(value:Number):void
- {
- super.width = value;
- }
-
- /**
- * Sets the height of the TabBar.
- *
- * @param value The new height in pixels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function set height(value:Number):void
- {
- super.height = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/ToolBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/ToolBar.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/ToolBar.as
deleted file mode 100644
index 6c8c748..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/chrome/ToolBar.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.mobile.chrome
-{
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IChrome;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Container;
-
- /**
- * The ToolBar class provides a space below the contentArea of a view manager which can
- * be used to house controls for the view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ToolBar extends Container implements IChrome
- {
- public function ToolBar()
- {
- super();
-
- className = "ToolBar";
- }
-
- private var _controls:Array;
-
- /**
- * The control components of the ToolBar (eg, a settings button).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set controls(value:Array):void
- {
- _controls = value;
- }
- public function get controls():Array
- {
- return _controls;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- var layout:IBeadLayout = this.getBeadByType(IBeadLayout) as IBeadLayout;
- trace("layout = "+layout);
-
- for (var i:int=0; i < _controls.length; i++)
- {
- addElement( _controls[i], false );
- }
-
- dispatchEvent(new Event("layoutNeeded"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/models/ViewManagerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/models/ViewManagerModel.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/models/ViewManagerModel.as
deleted file mode 100644
index faa3936..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/mobile/models/ViewManagerModel.as
+++ /dev/null
@@ -1,257 +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.mobile.models
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.TabBar;
- import org.apache.flex.mobile.chrome.ToolBar;
-
- /**
- * The ViewManagerModel houses properties and values common to the components
- * which make up view managers. These properties include the title, which view
- * is currently active and selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ViewManagerModel extends EventDispatcher implements IBeadModel
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ViewManagerModel()
- {
- super();
-
- _views = new Array();
- }
-
- private var _strand:IStrand;
-
- public function set strand(value:IStrand):void
- {
- _strand = value;
- }
-
- private var _views:Array;
-
- /**
- * The array of views displayed in the contentArea of the ViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get views():Array
- {
- return _views;
- }
- public function set views(value:Array):void
- {
- if (value != _views) {
- _views = value;
- _selectedIndex = value.length - 1;
- dispatchEvent(new Event("viewsChanged"));
- }
- }
-
- /**
- * Pushes a view onto the top/end of the stack of views. This view becomes
- * the active view. Mostly used by the StackedViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function pushView(value:Object):void
- {
- _views.push(value);
- _selectedIndex = _views.length - 1;
- dispatchEvent(new Event("viewPushed"));
- }
-
- /**
- * Removes the most recently added view. The next view in the stack becomes the
- * active view. Mostly used by StackedViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function popView():Object
- {
- if (_views.length > 1) {
- var discard:Object = _views.pop();
- _selectedIndex = _views.length - 1;
- dispatchEvent(new Event("viewPopped"));
- }
- return _views[_views.length-1];
- }
-
- private var _selectedIndex:Number = -1;
-
- /**
- * The index into the views array of the currently active view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedIndex():Number
- {
- return _selectedIndex;
- }
- public function set selectedIndex(value:Number):void
- {
- if (value != _selectedIndex) {
- _selectedIndex = value;
- dispatchEvent(new Event("selectedIndexChanged"));
- }
- }
-
- private var _title:String;
-
- /**
- * The title of the view..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get title():String
- {
- return _title;
- }
- public function set title(value:String):void
- {
- _title = value;
- }
-
- private var _navigationBarItems:Array;
-
- /**
- * The array of controls that make up the NavigationBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBarItems():Array
- {
- return _navigationBarItems;
- }
- public function set navigationBarItems(value:Array):void
- {
- _navigationBarItems = value;
- }
-
- private var _navigationBar:NavigationBar;
-
- /**
- * The NavigationBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBar():NavigationBar
- {
- return _navigationBar;
- }
- public function set navigationBar(value:NavigationBar):void
- {
- _navigationBar = value;
- }
-
- private var _toolBarItems:Array;
-
- /**
- * The array of controls that make up the ToolBar..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBarItems():Array
- {
- return _toolBarItems;
- }
- public function set toolBarItems(value:Array):void
- {
- _toolBarItems = value;
- }
-
- private var _toolBar:ToolBar;
-
- /**
- * The ToolBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBar():ToolBar
- {
- return _toolBar;
- }
- public function set toolBar(value:ToolBar):void
- {
- _toolBar = value;
- }
-
- private var _tabBar:TabBar;
-
- /**
- * The TabBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get tabBar():TabBar
- {
- return _tabBar;
- }
- public function set tabBar(value:TabBar):void
- {
- _tabBar = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
deleted file mode 100644
index 3469417..0000000
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
+++ /dev/null
@@ -1,80 +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.states
-{
-
- [DefaultProperty("effects")]
-
- /**
- * The Transition class holds information describing what to do when
- * changing from one state to another.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Transition
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Transition()
- {
- super();
- }
-
- /**
- * The state or states from which the view is leaving.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var fromState:String;
-
- /**
- * The state or states to which the view is going.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var toState:String;
-
-
- /**
- * The list of effects to play
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var effects:Array;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/tests/FlexUnitFlexJSApplication.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/tests/FlexUnitFlexJSApplication.mxml b/frameworks/as/projects/FlexJSJX/tests/FlexUnitFlexJSApplication.mxml
deleted file mode 100644
index a8d533c..0000000
--- a/frameworks/as/projects/FlexJSJX/tests/FlexUnitFlexJSApplication.mxml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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.
-
--->
-
-<basic:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:basic="library://ns.apache.org/flexjs/basic"
- applicationComplete="runTests()"
- >
- <fx:Script>
- <![CDATA[
- import flexUnitTests.DataGridColumnTesterTest;
- import flexUnitTests.DataGridColumnTester;
-
- import org.flexunit.listeners.CIListener;
- import org.flexunit.runner.FlexUnitCore;
-
- public function runTests() : void
- {
- var core : FlexUnitCore = new FlexUnitCore();
- core.addListener(new CIListener());
- core.run(DataGridColumnTester);
- }
-
- ]]>
- </fx:Script>
- <basic:valuesImpl>
- <basic:SimpleValuesImpl />
- </basic:valuesImpl>
-
-</basic:Application>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/tests/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/tests/build.xml b/frameworks/as/projects/FlexJSJX/tests/build.xml
deleted file mode 100644
index d7f0c94..0000000
--- a/frameworks/as/projects/FlexJSJX/tests/build.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?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.
-
--->
-
-
-<project name="flexjsjx.test" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../../../../.."/>
-
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
- <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-
- <condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
- <os family="windows"/>
- </condition>
- <condition property="browser" value="/Applications/Safari.app/Contents/MacOS/Safari">
- <os family="mac"/>
- </condition>
-
- <property name="report.dir" value="${basedir}/out" />
-
- <available file="${FLEXJS_HOME}/../flex-flexunit"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${FLEXJS_HOME}/../flex-flexunit" />
-
- <available file="${FLEXJS_HOME}/../flexunit"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${FLEXJS_HOME}/../flexunit" />
-
- <available file="${env.FLEXUNIT_HOME}"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${env.FLEXUNIT_HOME}"/>
-
- <target name="main" depends="clean,compile,test" description="Clean test of FlexJSUI.swc">
- </target>
-
- <target name="clean">
- <delete failonerror="false">
- <fileset dir="${basedir}">
- <include name="FlexUnitFlexJSApplication.swf"/>
- </fileset>
- </delete>
- </target>
-
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
-
- <target name="compile" description="Compiles FlexUnitApplication.swf">
- <echo message="Compiling FlexUnitFlexJSApplication.swf"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCON_HOME: ${FALCON_HOME}"/>
- <echo message="FLEXUNIT_HOME: ${FLEXUNIT_HOME}"/>
- <echo message="playerglobal.version: ${playerglobal.version}"/>
-
- <!-- Load the <compc> task. We can't do this at the <project> level -->
- <!-- because targets that run before flexTasks.jar gets built would fail. -->
- <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
- <!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in FlexJSUIClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
- <mxmlc fork="true"
- file="${basedir}/FlexUnitFlexJSApplication.mxml"
- output="${basedir}/FlexUnitFlexJSApplication.swf">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug" />
- <arg value="-compiler.mxml.children-as-data" />
- <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="+playerglobal.version=${playerglobal.version}" />
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
- <arg value="-source-path+=${FLEXJS_HOME}/frameworks/as/projects/FlexJSJX/src" />
- <arg value="-library-path+=${FLEXJS_HOME}/frameworks/as/libs" />
- <arg value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4/target" />
- <arg value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4CIListener/target" />
- </mxmlc>
- </target>
-
- <target name="test">
- <taskdef resource="flexUnitTasks.tasks">
- <classpath>
- <fileset dir="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target">
- <include name="flexUnitTasks*.jar" />
- </fileset>
- </classpath>
- </taskdef>
- <mkdir dir="${report.dir}" />
- <flexunit
- swf="${basedir}/FlexUnitFlexJSApplication.swf"
- workingDir="${basedir}"
- toDir="${report.dir}"
- haltonfailure="false"
- verbose="true"
- localTrusted="true"
- command="${browser}">
- <source dir="${FLEXJS_HOME}/frameworks/as/projects/FlexJSJX/src" />
- <library dir="${FLEXJS_HOME}/frameworks/as/libs" />
- </flexunit>
-
- <!-- Generate readable JUnit-style reports -->
- <junitreport todir="${report.dir}">
- <fileset dir="${report.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="${report.dir}/html" />
- </junitreport>
-
- </target>
-</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTester.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTester.as b/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTester.as
deleted file mode 100644
index e060b1f..0000000
--- a/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTester.as
+++ /dev/null
@@ -1,27 +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 flexUnitTests
-{
- [Suite]
- [RunWith("org.flexunit.runners.Suite")]
- public class DataGridColumnTester
- {
- public var dataGridColumnTesterTest:DataGridColumnTesterTest;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTesterTest.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTesterTest.as b/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTesterTest.as
deleted file mode 100644
index 1a3cc0f..0000000
--- a/frameworks/as/projects/FlexJSJX/tests/flexUnitTests/DataGridColumnTesterTest.as
+++ /dev/null
@@ -1,55 +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 flexUnitTests
-{
- import flexunit.framework.Assert;
-
- import org.apache.flex.html.supportClasses.DataGridColumn;
-
- public class DataGridColumnTesterTest
- {
- [Before]
- public function setUp():void
- {
- }
-
- [After]
- public function tearDown():void
- {
- }
-
- [BeforeClass]
- public static function setUpBeforeClass():void
- {
- }
-
- [AfterClass]
- public static function tearDownAfterClass():void
- {
- }
-
- [Test]
- public function testLabelProperty():void
- {
- var column:DataGridColumn = new DataGridColumn();
- column.label = "foo";
- Assert.assertEquals("Error testing DataGridColumn.label", column.label, "foo");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/ChartsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/ChartsClasses.as b/frameworks/projects/Charts/asjs/ChartsClasses.as
new file mode 100644
index 0000000..9454aad
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/ChartsClasses.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class FlexJSJXClasses
+{
+ import org.apache.flex.mobile.beads.StackedViewManagerView; StackedViewManagerView;
+ import org.apache.flex.mobile.beads.TabbedViewManagerView; TabbedViewManagerView;
+ import org.apache.flex.mobile.chrome.NavigationBar; NavigationBar;
+ import org.apache.flex.mobile.chrome.TabBar; TabBar;
+ import org.apache.flex.mobile.chrome.ToolBar; ToolBar;
+ import org.apache.flex.mobile.models.ViewManagerModel; ViewManagerModel;
+
+ import org.apache.flex.charts.beads.ChartView; ChartView;
+ import org.apache.flex.charts.beads.ChartItemRendererFactory; ChartItemRendererFactory;
+ import org.apache.flex.charts.beads.DataItemRendererFactoryForSeriesData; DataItemRendererFactoryForSeriesData;
+ import org.apache.flex.charts.beads.DataTipBead; DataTipBead;
+ import org.apache.flex.charts.beads.HorizontalCategoryAxisBead; HorizontalCategoryAxisBead;
+ import org.apache.flex.charts.beads.HorizontalLinearAxisBead; HorizontalLinearAxisBead;
+ import org.apache.flex.charts.beads.VerticalCategoryAxisBead; VerticalCategoryAxisBead;
+ import org.apache.flex.charts.beads.VerticalLinearAxisBead; VerticalLinearAxisBead;
+ import org.apache.flex.charts.beads.layouts.BarChartLayout; BarChartLayout;
+ import org.apache.flex.charts.beads.layouts.ColumnChartLayout; ColumnChartLayout;
+ import org.apache.flex.charts.beads.layouts.LineChartCategoryVsLinearLayout; LineChartCategoryVsLinearLayout;
+ import org.apache.flex.charts.beads.layouts.LineChartLinearVsLinearLayout; LineChartLinearVsLinearLayout;
+ import org.apache.flex.charts.beads.layouts.PieChartLayout; PieChartLayout;
+ import org.apache.flex.charts.beads.layouts.StackedBarChartLayout; StackedBarChartLayout;
+ import org.apache.flex.charts.beads.layouts.StackedColumnChartLayout; StackedColumnChartLayout;
+ import org.apache.flex.charts.supportClasses.BarSeries; BarSeries;
+ import org.apache.flex.charts.supportClasses.LineSeries; LineSeries;
+ import org.apache.flex.charts.supportClasses.PieSeries; PieSeries;
+ import org.apache.flex.charts.supportClasses.BoxItemRenderer; BoxItemRenderer;
+ import org.apache.flex.charts.supportClasses.LineSegmentItemRenderer; LineSegmentItemRenderer;
+ import org.apache.flex.charts.supportClasses.WedgeItemRenderer; WedgeItemRenderer;
+ import org.apache.flex.charts.optimized.SVGChartAxisGroup; SVGChartAxisGroup;
+ import org.apache.flex.charts.optimized.SVGChartDataGroup; SVGChartDataGroup;
+ import org.apache.flex.charts.optimized.SVGBoxItemRenderer; SVGBoxItemRenderer;
+ import org.apache.flex.charts.optimized.SVGWedgeItemRenderer; SVGWedgeItemRenderer;
+ import org.apache.flex.charts.optimized.SVGLineSegmentItemRenderer; SVGLineSegmentItemRenderer;
+
+ import org.apache.flex.effects.Tween; Tween;
+ import org.apache.flex.effects.Move; Move;
+ import org.apache.flex.effects.Fade; Fade;
+
+ import org.apache.flex.html.accessories.DateFormatMMDDYYYYBead; DateFormatMMDDYYYYBead;
+ import org.apache.flex.html.beads.DataGridColumnView; DataGridColumnView;
+ import org.apache.flex.html.beads.DataGridView; DataGridView;
+ import org.apache.flex.html.beads.DateChooserView; DateChooserView;
+ import org.apache.flex.html.beads.DateFieldView; DateFieldView;
+ import org.apache.flex.html.beads.FormatableLabelView; FormatableLabelView;
+ import org.apache.flex.html.beads.FormatableTextInputView; FormatableTextInputView;
+ import org.apache.flex.html.beads.layouts.DataGridLayout; DataGridLayout;
+ import org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout; FlexibleFirstChildHorizontalLayout;
+ import org.apache.flex.html.beads.models.DataGridModel; DataGridModel;
+ import org.apache.flex.html.beads.models.DateChooserModel; DateChooserModel;
+ import org.apache.flex.html.beads.models.DataGridPresentationModel; DataGridPresentationModel;
+ import org.apache.flex.html.beads.controllers.DateChooserMouseController; DateChooserMouseController;
+ import org.apache.flex.html.beads.controllers.DateFieldMouseController; DateFieldMouseController;
+ import org.apache.flex.html.supportClasses.DataGridColumn; DataGridColumn;
+ import org.apache.flex.html.supportClasses.DateChooserButton; DateChooserButton;
+ import org.apache.flex.html.supportClasses.GraphicsItemRenderer; GraphicsItemRenderer;
+
+ import org.apache.flex.html.beads.TitleBarView; TitleBarView;
+ import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
+
+ import org.apache.flex.core.DropType; DropType;
+ import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
+ import org.apache.flex.core.StatesWithTransitionsImpl; StatesWithTransitionsImpl;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/BarChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/BarChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/BarChart.as
new file mode 100644
index 0000000..4065dd3
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/BarChart.as
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The BarChart class draws a multi-series graph of data using vertical
+ * columns. The series property is an array of BarChartSeries instances
+ * that represent the data in the model.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BarChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BarChart()
+ {
+ super();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/ColumnChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/ColumnChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/ColumnChart.as
new file mode 100644
index 0000000..c9010b8
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/ColumnChart.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The ColumnChart displays a histogram chart where each series in
+ * in the chart is a vertical column placed side by side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ColumnChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ColumnChart()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/LineChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/LineChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/LineChart.as
new file mode 100644
index 0000000..27ba0a5
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/LineChart.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The LineChart displays a series of line graphs with optional
+ * graphics at each vertex.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class LineChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function LineChart()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/PieChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/PieChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/PieChart.as
new file mode 100644
index 0000000..591e2d7
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/PieChart.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The PieChart displays data as a percentage of pie.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class PieChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function PieChart()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedBarChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedBarChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedBarChart.as
new file mode 100644
index 0000000..415b176
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedBarChart.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The StackedBarChart displays a histogram chart where each series in
+ * the chart is stack next to each other.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class StackedBarChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StackedBarChart()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedColumnChart.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedColumnChart.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedColumnChart.as
new file mode 100644
index 0000000..ab9ae2d
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/StackedColumnChart.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts
+{
+ import org.apache.flex.charts.core.ChartBase;
+ import org.apache.flex.charts.core.IChart;
+
+ /**
+ * The StackedColumnChart displays a histogram chart where each series in
+ * the chart is stack on top of each other.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class StackedColumnChart extends ChartBase implements IChart
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StackedColumnChart()
+ {
+ super();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/AxisBaseBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/AxisBaseBead.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/AxisBaseBead.as
new file mode 100644
index 0000000..29990b0
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/AxisBaseBead.as
@@ -0,0 +1,229 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts.beads
+{
+ import org.apache.flex.charts.core.IAxisBead;
+ import org.apache.flex.charts.core.IAxisGroup;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.graphics.GraphicsContainer;
+ import org.apache.flex.core.graphics.IFill;
+ import org.apache.flex.core.graphics.IStroke;
+ import org.apache.flex.core.graphics.SolidColor;
+ import org.apache.flex.core.graphics.SolidColorStroke;
+
+ /**
+ * The AxisBaseBead is the base class for the chart axis beads.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class AxisBaseBead implements IAxisBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function AxisBaseBead()
+ {
+ // create default dark stroke for the axis line and tick marks
+ // in case they are not set otherwise.
+
+ var blackLine:SolidColorStroke = new SolidColorStroke();
+ blackLine.color = 0x111111;
+ blackLine.weight = 1;
+ blackLine.alpha = 1.0;
+
+ axisStroke = blackLine;
+ tickStroke = blackLine;
+
+ var blackFill:SolidColor = new SolidColor();
+ blackFill.color = 0x111111;
+ blackFill.alpha = 1.0;
+
+ tickFill = blackFill;
+ }
+
+ private var _strand:IStrand;
+ private var wrapper:GraphicsContainer;
+ private var _axisGroup:IAxisGroup;
+
+ private var _placement:String = "unset";
+ private var _axisStroke:IStroke;
+ private var _tickStroke:IStroke;
+ private var _tickFill:IFill;
+
+ private var tickPathString:String = null;
+ private var tickMaxWidth:Number = 0;
+ private var tickMaxHeight:Number = 0;
+
+ /**
+ * The placement of the axis with respect to the chart area. Valid
+ * values are: top, bottom (for IHorizontalAxisBeads), left, and right
+ * (for IVerticalAxisBeads).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get placement():String
+ {
+ return _placement;
+ }
+ public function set placement(value:String):void
+ {
+ _placement = value;
+ }
+
+ /**
+ * The stroke used to draw the line for the axis.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get axisStroke():IStroke
+ {
+ return _axisStroke;
+ }
+ public function set axisStroke(value:IStroke):void
+ {
+ _axisStroke = value;
+ }
+
+ /**
+ * The stroke used to draw each tick mark.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get tickStroke():IStroke
+ {
+ return _tickStroke;
+ }
+ public function set tickStroke(value:IStroke):void
+ {
+ _tickStroke = value;
+ }
+
+ /**
+ * The stroke used to draw each tick label.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get tickFill():IFill
+ {
+ return _tickFill;
+ }
+ public function set tickFill(value:IFill):void
+ {
+ _tickFill = value;
+ }
+
+ /**
+ * The container space for lines, tick marks, etc.
+ */
+ public function get axisGroup():IAxisGroup
+ {
+ return _axisGroup;
+ }
+ public function set axisGroup(value:IAxisGroup):void
+ {
+ _axisGroup = value;
+
+ wrapper = new GraphicsContainer();
+ UIBase(_axisGroup).addElement(wrapper);
+ wrapper.x = 0;
+ wrapper.y = 0;
+ wrapper.width = UIBase(_axisGroup).width;
+ wrapper.height = UIBase(_axisGroup).height;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ }
+ public function get strand():IStrand
+ {
+ return _strand;
+ }
+
+ /**
+ * @private
+ */
+ protected function drawAxisPath(originX:Number, originY:Number, xoffset:Number, yoffset:Number):void
+ {
+ axisGroup.drawAxisLine(originX, originY, xoffset, yoffset, axisStroke);
+ }
+
+ /**
+ * @private
+ */
+ protected function addTickLabel(text:String, xpos:Number, ypos:Number, boxWidth:Number, boxHeight:Number):void
+ {
+ var isHorizontal:Boolean = (placement == "bottom") || (placement == "top");
+
+ if (isHorizontal) axisGroup.drawHorizontalTickLabel(text, xpos, ypos, boxWidth, boxHeight, tickFill);
+ else axisGroup.drawVerticalTickLabel(text, xpos, ypos, boxWidth, boxHeight, tickFill);
+ }
+
+ /**
+ * @private
+ */
+ protected function addTickMark(xpos:Number, ypos:Number, xoffset:Number, yoffset:Number):void
+ {
+ if (tickPathString == null) tickPathString = "";
+ tickPathString = tickPathString + " M "+String(xpos)+" "+String(ypos);
+ tickPathString = tickPathString + " l " + String(xoffset)+" "+String(yoffset);
+
+ tickMaxWidth = Math.max(tickMaxWidth, xpos+xoffset);
+ tickMaxHeight= Math.max(tickMaxHeight, ypos+yoffset);
+ }
+
+ /**
+ * @private
+ */
+ protected function drawTickPath(originX:Number, originY:Number):void
+ {
+ axisGroup.drawTickMarks(originX, originY, tickMaxWidth, tickMaxHeight, tickPathString, tickStroke);
+ tickPathString = null;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
new file mode 100644
index 0000000..2909b03
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartItemRendererFactory.as
@@ -0,0 +1,147 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts.beads
+{
+ import org.apache.flex.charts.core.IChart;
+ import org.apache.flex.charts.core.IChartItemRenderer;
+ import org.apache.flex.charts.core.IChartSeries;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IDataProviderItemRendererMapper;
+ import org.apache.flex.core.IItemRendererClassFactory;
+ import org.apache.flex.core.IItemRendererParent;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.beads.IListView;
+
+ /**
+ * The ChartItemRendererFactory class implements IDataProviderItemRendererMapper
+ * and creats the itemRenderers for each series in a chart. The itemRenderer class
+ * is identified on each series either through a property or through a CSS style.
+ * Once all of the itemRenderers are created, an itemsCreated event is dispatched
+ * causing the layout associated with the chart to size and position the items.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ChartItemRendererFactory implements IBead, IDataProviderItemRendererMapper
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ChartItemRendererFactory()
+ {
+ }
+
+ private var selectionModel:ISelectionModel;
+ protected var dataGroup:IItemRendererParent;
+
+ private var _seriesRenderers:Array;
+
+ /**
+ * The array of renderers created for each series.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get seriesRenderers():Array
+ {
+ return _seriesRenderers;
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+ var listView:IListView = value.getBeadByType(IListView) as IListView;
+ dataGroup = listView.dataGroup;
+ // selectionModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+
+ var dp:Array = selectionModel.dataProvider as Array;
+ if (!dp)
+ return;
+
+ _seriesRenderers = new Array();
+
+ dataGroup.removeAllElements();
+
+ var series:Array = IChart(_strand).series;
+
+ for( var j:int=0; j < dp.length; j++)
+ {
+ var renderers:Array = new Array();
+
+ for( var i:int=0; i < series.length; i++)
+ {
+ var s:IChartSeries = series[i] as IChartSeries;
+ var k:IChartItemRenderer = s.itemRenderer.newInstance() as IChartItemRenderer;
+ k.itemRendererParent = dataGroup;
+ k.xField = s.xField;
+ k.yField = s.yField;
+ //k.fillColor = s.fillColor;
+ k.data = dp[j];
+ //k.index = j;
+
+ renderers.push(k);
+
+ dataGroup.addElement(k);
+ }
+
+ _seriesRenderers.push(renderers);
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ }
+
+ /**
+ * @private
+ */
+ public function get itemRendererFactory():IItemRendererClassFactory
+ {
+ return null;
+ }
+
+ /**
+ * @private
+ */
+ public function set itemRendererFactory(value:IItemRendererClassFactory):void
+ {
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
new file mode 100644
index 0000000..6593d1a
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/ChartView.as
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts.beads
+{
+ import org.apache.flex.charts.core.IAxisGroup;
+ import org.apache.flex.charts.core.IHorizontalAxisBead;
+ import org.apache.flex.charts.core.IVerticalAxisBead;
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IParent;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.beads.ListView;
+
+ public class ChartView extends ListView implements IBeadView
+ {
+ public function ChartView()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+ private var _horizontalAxisGroup:IAxisGroup;
+ private var _verticalAxisGroup:IAxisGroup;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function set strand(value:IStrand):void
+ {
+ super.strand = value;
+
+ _strand = value;
+ IEventDispatcher(_strand).addEventListener("widthChanged", handleLocalChange);
+ IEventDispatcher(_strand).addEventListener("heightChanged",handleLocalChange);
+
+ var listModel:ISelectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+ listModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+
+ var haxis:IHorizontalAxisBead = _strand.getBeadByType(IHorizontalAxisBead) as IHorizontalAxisBead;
+ if (haxis && _horizontalAxisGroup == null) {
+ var m1:Class = ValuesManager.valuesImpl.getValue(value, "iHorizontalAxisGroup");
+ _horizontalAxisGroup = new m1();
+ haxis.axisGroup = _horizontalAxisGroup;
+ IParent(_strand).addElement(_horizontalAxisGroup);
+ }
+
+ var vaxis:IVerticalAxisBead = _strand.getBeadByType(IVerticalAxisBead) as IVerticalAxisBead;
+ if (vaxis && _verticalAxisGroup == null) {
+ var m2:Class = ValuesManager.valuesImpl.getValue(value, "iVerticalAxisGroup");
+ _verticalAxisGroup = new m2();
+ vaxis.axisGroup = _verticalAxisGroup;
+ IParent(_strand).addElement(_verticalAxisGroup);
+ }
+
+ if (_strand.getBeadByType(IBeadLayout) == null)
+ {
+ var layout:IBeadLayout = new (ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout")) as IBeadLayout;
+ _strand.addBead(layout);
+ }
+
+ handleLocalChange(null);
+
+ IEventDispatcher(_strand).dispatchEvent( new Event("viewCreated") );
+ }
+
+ public function get horizontalAxisGroup():IAxisGroup
+ {
+ return _horizontalAxisGroup;
+ }
+
+ public function get verticalAxisGroup():IAxisGroup
+ {
+ return _verticalAxisGroup;
+ }
+
+ /**
+ * @private
+ */
+ override protected function dataProviderChangeHandler(event:Event):void
+ {
+ if (verticalAxisGroup) {
+ verticalAxisGroup.removeAllElements();
+ }
+
+ if (horizontalAxisGroup) {
+ horizontalAxisGroup.removeAllElements();
+ }
+
+ dataGroup.removeAllElements();
+ }
+
+ /**
+ * @private
+ */
+ private function handleLocalChange(event:Event):void
+ {
+ var widthAdjustment:Number = 0;
+ var heightAdjustment:Number = 0;
+
+ var vaxis:IVerticalAxisBead = _strand.getBeadByType(IVerticalAxisBead) as IVerticalAxisBead;
+ var haxis:IHorizontalAxisBead = _strand.getBeadByType(IHorizontalAxisBead) as IHorizontalAxisBead;
+
+ if (vaxis) {
+ widthAdjustment = vaxis.axisWidth;
+ }
+
+ if (haxis) {
+ heightAdjustment = haxis.axisHeight;
+ }
+
+ var dg:UIBase = UIBase(dataGroup);
+ var strandWidth:Number = UIBase(_strand).width;
+ var strandHeight:Number = UIBase(_strand).height;
+
+ dg.x = widthAdjustment;
+ dg.y = 0;
+ dg.width = strandWidth - widthAdjustment;
+ dg.height= strandHeight - heightAdjustment;
+
+ if (verticalAxisGroup) {
+ UIBase(verticalAxisGroup).x = 0;
+ UIBase(verticalAxisGroup).y = 0;
+ UIBase(verticalAxisGroup).width = widthAdjustment;
+ UIBase(verticalAxisGroup).height = strandHeight - heightAdjustment;
+ }
+
+ if (horizontalAxisGroup) {
+ UIBase(horizontalAxisGroup).x = widthAdjustment;
+ UIBase(horizontalAxisGroup).y = strandHeight - heightAdjustment;
+ UIBase(horizontalAxisGroup).width = strandWidth - widthAdjustment;
+ UIBase(horizontalAxisGroup).height = heightAdjustment;
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72b21f62/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
new file mode 100644
index 0000000..e904375
--- /dev/null
+++ b/frameworks/projects/Charts/asjs/src/org/apache/flex/charts/beads/DataItemRendererFactoryForSeriesData.as
@@ -0,0 +1,127 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.charts.beads
+{
+ import org.apache.flex.charts.core.IChart;
+ import org.apache.flex.charts.core.IChartDataGroup;
+ import org.apache.flex.charts.core.IChartItemRenderer;
+ import org.apache.flex.charts.core.IChartSeries;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IDataProviderItemRendererMapper;
+ import org.apache.flex.core.IItemRendererClassFactory;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.beads.IListView;
+
+ /**
+ * The DataItemRendererFactoryForSeriesData creates the itemRenderers necessary for series-based
+ * charts.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DataItemRendererFactoryForSeriesData implements IBead, IDataProviderItemRendererMapper
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DataItemRendererFactoryForSeriesData()
+ {
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ var selectionModel:ISelectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+ selectionModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
+
+ dataProviderChangeHandler(null);
+ }
+
+ /**
+ * For series data, the 'global' itemRendererFactory is not used. Each series supplies
+ * its own itemRendererFactory.
+ */
+ public function get itemRendererFactory():IItemRendererClassFactory
+ {
+ return null;
+ }
+ public function set itemRendererFactory(value:IItemRendererClassFactory):void
+ {
+ }
+
+ /**
+ * @private
+ */
+ private function dataProviderChangeHandler(event:Event):void
+ {
+ var selectionModel:ISelectionModel = _strand.getBeadByType(ISelectionModel) as ISelectionModel;
+ var dp:Array = selectionModel.dataProvider as Array;
+ if (!dp)
+ return;
+
+ var listView:IListView = _strand.getBeadByType(IListView) as IListView;
+ var dataGroup:IChartDataGroup = listView.dataGroup as IChartDataGroup;
+ dataGroup.removeAllElements();
+
+ var chart:IChart = _strand as IChart;
+ var series:Array = chart.series;
+
+ for (var s:int=0; s < series.length; s++)
+ {
+ var n:int = dp.length;
+ var chartSeries:IChartSeries = series[s] as IChartSeries;
+
+ for (var i:int = 0; i < n; i++)
+ {
+ if (chartSeries.itemRenderer)
+ {
+ var ir:IChartItemRenderer = chartSeries.itemRenderer.newInstance() as IChartItemRenderer;
+ dataGroup.addElement(ir);
+ ir.itemRendererParent = dataGroup;
+ ir.data = dp[i];
+ ir.series = chartSeries;
+ }
+ }
+
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new Event("itemsCreated"));
+ }
+ }
+}
\ No newline at end of file