You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by yi...@apache.org on 2016/10/13 07:40:02 UTC
[01/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Fixed a problem building the distribution on windows machines
Repository: flex-asjs
Updated Branches:
refs/heads/refactor-sprite e45f83648 -> fe03efdf6
- Fixed a problem building the distribution on windows machines
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/864ddbb1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/864ddbb1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/864ddbb1
Branch: refs/heads/refactor-sprite
Commit: 864ddbb103902c3001b677d931fa4ab8f6a98331
Parents: 734e89a
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 13:32:44 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 13:32:44 2016 +0200
----------------------------------------------------------------------
distribution/pom.xml | 3 ++-
distribution/src/main/assembly/component-air.xml | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/864ddbb1/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 09f41bf..9d9ac10 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -648,7 +648,8 @@
<groupId>com.adobe.air.compiler</groupId>
<artifactId>adt</artifactId>
<version>${air.version}</version>
- <classifier>win</classifier>
+ <!-- TODO: Change this back to "win" after fixing the mavenizer -->
+ <classifier>windows</classifier>
<type>zip</type>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/864ddbb1/distribution/src/main/assembly/component-air.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-air.xml b/distribution/src/main/assembly/component-air.xml
index 1655f6d..99ed7f6 100644
--- a/distribution/src/main/assembly/component-air.xml
+++ b/distribution/src/main/assembly/component-air.xml
@@ -34,6 +34,8 @@ under the License.
<include>com.adobe.air.compiler:adt:zip:android</include>
<include>com.adobe.air.compiler:adt:zip:desktop</include>
<include>com.adobe.air.compiler:adt:zip:ios</include>
+ <!-- TODO: Change this back to "win" after fixing the mavenizer -->
+ <include>com.adobe.air.compiler:adt:zip:windows</include>
</includes>
<unpack>true</unpack>
</dependencySet>
[11/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Fixed the MobileStocks maven build - Added the MobileStocks example to the
maven build
Posted by yi...@apache.org.
- Fixed the MobileStocks maven build
- Added the MobileStocks example to the maven build
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/17c59712
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/17c59712
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/17c59712
Branch: refs/heads/refactor-sprite
Commit: 17c59712d4be4b9b19135e4eb1c964aabc4e6f79
Parents: 55d89c7
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Oct 8 09:16:35 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Oct 8 09:16:35 2016 +0200
----------------------------------------------------------------------
examples/flexjs/MobileStocks/pom.xml | 12 +++++++++---
examples/flexjs/pom.xml | 1 +
2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17c59712/examples/flexjs/MobileStocks/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/pom.xml b/examples/flexjs/MobileStocks/pom.xml
index 7868f63..d069049 100644
--- a/examples/flexjs/MobileStocks/pom.xml
+++ b/examples/flexjs/MobileStocks/pom.xml
@@ -64,9 +64,9 @@
<dependencies>
<dependency>
- <groupId>com.adobe.flash.framework</groupId>
- <artifactId>playerglobal</artifactId>
- <version>${flash.version}</version>
+ <groupId>com.adobe.air.framework</groupId>
+ <artifactId>airglobal</artifactId>
+ <version>${air.version}</version>
<type>swc</type>
<scope>provided</scope>
</dependency>
@@ -89,6 +89,12 @@
<version>0.8.0-SNAPSHOT</version>
<type>swc</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>Storage</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <type>swc</type>
+ </dependency>
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17c59712/examples/flexjs/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/pom.xml b/examples/flexjs/pom.xml
index e6aa721..2098382 100644
--- a/examples/flexjs/pom.xml
+++ b/examples/flexjs/pom.xml
@@ -50,6 +50,7 @@
<module>MapSearch</module>
<module>MobileMap</module>
<module>MobileTrader</module>
+ <module>MobileStocks</module>
<module>StorageExample</module>
<module>StyleExample</module>
<module>TodoListSampleApp</module>
[18/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
[Tests] Added extra check for static initialization to DataBindingTestbed
Posted by yi...@apache.org.
[Tests] Added extra check for static initialization to DataBindingTestbed
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6ecf8916
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6ecf8916
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6ecf8916
Branch: refs/heads/refactor-sprite
Commit: 6ecf8916c12837db431e5ffaa69e3d32efdef0c9
Parents: 4262fbe
Author: greg-dove <gr...@gmail.com>
Authored: Tue Oct 11 18:25:36 2016 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Tue Oct 11 18:25:36 2016 +1300
----------------------------------------------------------------------
.../DataBindingTestbed/src/MyInitialView.mxml | 19 ++++++++
.../bindables/BindableWithConstructorInit.as | 46 ++++++++++++++++++++
2 files changed, 65 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ecf8916/manualtests/DataBindingTestbed/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/MyInitialView.mxml b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
index 3f788fe..67d5ac7 100644
--- a/manualtests/DataBindingTestbed/src/MyInitialView.mxml
+++ b/manualtests/DataBindingTestbed/src/MyInitialView.mxml
@@ -174,6 +174,25 @@ limitations under the License.
addErrorReport("problem with explicit dispatching from BindableSubVO3 ",e);
}
+ test=null;
+ try {
+ test = BindableWithConstructorInit.STATIC_INIT;
+ if (test.value !="STATIC_INIT") {
+ throw new Error("problem with static init in BindableWithConstructorInit ");
+ }
+ test.value= "STATIC_INIT_CHANGED";
+ } catch (e:Error) {
+ addErrorReport("problem with static init in BindableWithConstructorInit ",e);
+ }
+
+ test=null;
+ try {
+ test = new BindableWithConstructorInit("string",99)
+ } catch (e:Error) {
+ addErrorReport("problem instantiating BindableWithConstructorInit ",e);
+ }
+
+
}
private var _expectedTarget:Object;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6ecf8916/manualtests/DataBindingTestbed/src/bindables/BindableWithConstructorInit.as
----------------------------------------------------------------------
diff --git a/manualtests/DataBindingTestbed/src/bindables/BindableWithConstructorInit.as b/manualtests/DataBindingTestbed/src/bindables/BindableWithConstructorInit.as
new file mode 100644
index 0000000..b150bd3
--- /dev/null
+++ b/manualtests/DataBindingTestbed/src/bindables/BindableWithConstructorInit.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 bindables
+{
+
+
+ [Bindable]
+ public class BindableWithConstructorInit
+ {
+
+ public static const STATIC_INIT:BindableWithConstructorInit = new BindableWithConstructorInit( "STATIC_INIT" ,-1 );
+
+ public var ordinal:int;
+ public var value:String;
+
+ public function BindableWithConstructorInit ( value:String, ordinal:int )
+ {
+ this.value = value;
+ this.ordinal = ordinal;
+ }
+
+
+
+ public function equals( other:BindableWithConstructorInit ):Boolean
+ {
+ return ( this.ordinal == other.ordinal && this.value == other.value );
+ }
+ }
+
+}
\ No newline at end of file
[02/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Changed the cassified of "adt" back to "win"
Posted by yi...@apache.org.
- Changed the cassified of "adt" back to "win"
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f4d3d1a2
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f4d3d1a2
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f4d3d1a2
Branch: refs/heads/refactor-sprite
Commit: f4d3d1a201be886cf6b189067bb93d264c36f797
Parents: 864ddbb
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 16:00:21 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 16:00:21 2016 +0200
----------------------------------------------------------------------
distribution/pom.xml | 3 +--
distribution/src/main/assembly/component-air.xml | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4d3d1a2/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 9d9ac10..09f41bf 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -648,8 +648,7 @@
<groupId>com.adobe.air.compiler</groupId>
<artifactId>adt</artifactId>
<version>${air.version}</version>
- <!-- TODO: Change this back to "win" after fixing the mavenizer -->
- <classifier>windows</classifier>
+ <classifier>win</classifier>
<type>zip</type>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f4d3d1a2/distribution/src/main/assembly/component-air.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-air.xml b/distribution/src/main/assembly/component-air.xml
index 99ed7f6..d2a9636 100644
--- a/distribution/src/main/assembly/component-air.xml
+++ b/distribution/src/main/assembly/component-air.xml
@@ -34,8 +34,7 @@ under the License.
<include>com.adobe.air.compiler:adt:zip:android</include>
<include>com.adobe.air.compiler:adt:zip:desktop</include>
<include>com.adobe.air.compiler:adt:zip:ios</include>
- <!-- TODO: Change this back to "win" after fixing the mavenizer -->
- <include>com.adobe.air.compiler:adt:zip:windows</include>
+ <include>com.adobe.air.compiler:adt:zip:win</include>
</includes>
<unpack>true</unpack>
</dependencySet>
[04/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Switched to cordova:Application.
Posted by yi...@apache.org.
Switched to cordova:Application.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d626525d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d626525d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d626525d
Branch: refs/heads/refactor-sprite
Commit: d626525da445917175c8b7adc74b2858e6ef5c0b
Parents: bf0ec84
Author: Peter Ent <pe...@apache.org>
Authored: Thu Oct 6 16:35:46 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Oct 6 16:35:46 2016 -0400
----------------------------------------------------------------------
.../flexjs/MobileStocks/src/MobileStocks.mxml | 52 ++++++++++----------
1 file changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d626525d/examples/flexjs/MobileStocks/src/MobileStocks.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/MobileStocks.mxml b/examples/flexjs/MobileStocks/src/MobileStocks.mxml
old mode 100755
new mode 100644
index 5b208ba..15c983e
--- a/examples/flexjs/MobileStocks/src/MobileStocks.mxml
+++ b/examples/flexjs/MobileStocks/src/MobileStocks.mxml
@@ -1,28 +1,23 @@
<?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.
-//
-////////////////////////////////////////////////////////////////////////////////
--->
-<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:local="*"
- xmlns:models="models.*"
- xmlns:js="library://ns.apache.org/flexjs/basic"
- >
+<cordova:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:local="*"
+ xmlns:models="models.*"
+ xmlns:views="views.*"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ xmlns:cordova="library://ns.apache.org/flexjs/cordova"
+ xmlns:controller="controller.*"
+ applicationComplete="showDetails()">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+ <fx:Script>
+ <![CDATA[
+ private function showDetails():void
+ {
+ trace("Size is "+width+" x "+height);
+ }
+ ]]>
+ </fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
@@ -33,11 +28,16 @@
</js:model>
<js:initialView>
- <local:MyInitialView width="100%" height="100%" />
+ <local:MyInitialView width="100%" height="100%" className="InitalView" />
</js:initialView>
<js:beads>
+ <cordova:Weinre guid="aharui" />
<js:MixinManager />
+ <js:DeviceSizeBead />
+ //native application and compile with air global airbeads.
+ //need orientation beads, size beads.
</js:beads>
-</js:Application>
+
+</cordova:Application>
[12/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Tried to speed up the testsuite by running debug only builds
Posted by yi...@apache.org.
- Tried to speed up the testsuite by running debug only builds
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6b7afecf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6b7afecf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6b7afecf
Branch: refs/heads/refactor-sprite
Commit: 6b7afecfd877f1176c1b4ba39f863dc208fcf453
Parents: 17c5971
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Oct 8 09:18:20 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Oct 8 09:18:20 2016 +0200
----------------------------------------------------------------------
testsuite/src/it/compiler-options/custom-html-template/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6b7afecf/testsuite/src/it/compiler-options/custom-html-template/pom.xml
----------------------------------------------------------------------
diff --git a/testsuite/src/it/compiler-options/custom-html-template/pom.xml b/testsuite/src/it/compiler-options/custom-html-template/pom.xml
index eeb1d43..298904e 100644
--- a/testsuite/src/it/compiler-options/custom-html-template/pom.xml
+++ b/testsuite/src/it/compiler-options/custom-html-template/pom.xml
@@ -41,6 +41,7 @@
<version>@flexjs.compiler.version@</version>
<extensions>true</extensions>
<configuration>
+ <debug>true</debug>
<mainClass>HelloWorld.mxml</mainClass>
<outputJavaScript>true</outputJavaScript>
<htmlTemplate>${basedir}/src/main/template/custom-js-index-template.html</htmlTemplate>
[24/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Updated MobileStocks example with better resize handling.
Posted by yi...@apache.org.
Updated MobileStocks example with better resize handling.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/80583865
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/80583865
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/80583865
Branch: refs/heads/refactor-sprite
Commit: 805838652cb668143361ce74cbd58f02c2850c33
Parents: 5df884a
Author: Peter Ent <pe...@apache.org>
Authored: Tue Oct 11 16:49:21 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Oct 11 16:49:21 2016 -0400
----------------------------------------------------------------------
.../src/StockDataJSONItemConverter.as | 11 ++--
.../MobileStocks/src/models/ProductsModel.as | 1 +
.../MobileStocks/src/views/LaunchView.mxml | 68 +++++++++++++-------
.../MobileStocks/src/views/WatchListView.mxml | 41 ++++--------
4 files changed, 63 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80583865/examples/flexjs/MobileStocks/src/StockDataJSONItemConverter.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/StockDataJSONItemConverter.as b/examples/flexjs/MobileStocks/src/StockDataJSONItemConverter.as
index 5c21c26..92a75dc 100755
--- a/examples/flexjs/MobileStocks/src/StockDataJSONItemConverter.as
+++ b/examples/flexjs/MobileStocks/src/StockDataJSONItemConverter.as
@@ -17,24 +17,25 @@
//
////////////////////////////////////////////////////////////////////////////////
package
-{
+{
import org.apache.flex.collections.converters.JSONItemConverter;
-
+
public class StockDataJSONItemConverter extends JSONItemConverter
{
public function StockDataJSONItemConverter()
{
super();
}
-
+
override public function convertItem(data:String):Object
{
var obj:Object = super.convertItem(data);
+ if (obj["query"] == null) return "No Data";
if (obj["query"]["count"] == 0)
return "No Data";
-
+
obj = obj["query"]["results"]["quote"];
return obj;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80583865/examples/flexjs/MobileStocks/src/models/ProductsModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/models/ProductsModel.as b/examples/flexjs/MobileStocks/src/models/ProductsModel.as
index 91bc792..b807e19 100755
--- a/examples/flexjs/MobileStocks/src/models/ProductsModel.as
+++ b/examples/flexjs/MobileStocks/src/models/ProductsModel.as
@@ -232,6 +232,7 @@ package models
private function completeHandler(event:Event):void
{
var responseData:Object = collection.getItemAt(0);
+ if ((responseData is String) && (responseData == "No Data")) return;
var sym:String = responseData["Symbol"];
var queueNext:Stock = null;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80583865/examples/flexjs/MobileStocks/src/views/LaunchView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/views/LaunchView.mxml b/examples/flexjs/MobileStocks/src/views/LaunchView.mxml
index 5d14065..094da51 100644
--- a/examples/flexjs/MobileStocks/src/views/LaunchView.mxml
+++ b/examples/flexjs/MobileStocks/src/views/LaunchView.mxml
@@ -80,6 +80,22 @@ limitations under the License.
padding-bottom: 2px;
padding-right: 10px;
}
+
+ .Outer1 {
+ background-color: #FFFFCC;
+ }
+
+ .Outer2 {
+ background-color: #FF0000;
+ }
+
+ .LaunchGrid {
+ background-color: #0000FF;
+ }
+
+ .DataGridListArea {
+ background-color: #CCFFFF;
+ }
</fx:Style>
<fx:Metadata>
@@ -94,7 +110,10 @@ limitations under the License.
<models:AssetsModel />
</js:model>
- <js:HContainer height="10%">
+ <js:Container height="40" width="100%" className="Outer1">
+ <js:beads>
+ <js:OneFlexibleChildHorizontalLayout flexibleChild="spacer1" maxWidth="400" maxHeight="20" />
+ </js:beads>
<js:Label text="Symbol:" />
<js:TextInput id="symbolInput" width="50" />
<js:Spacer width="10" />
@@ -102,37 +121,40 @@ limitations under the License.
<js:TextInput id="sharesInput" width="50" />
<js:Spacer width="10" />
<js:TextButton id="addButton" text="Add" width="80" click="addSymbol()" />
- <js:Spacer width="30" />
+ <js:Spacer id="spacer1" width="1" />
<js:TextButton id="removeButton" text="Remove" width="80" click="removeSymbol()" />
- </js:HContainer>
+ </js:Container>
- <js:DataGrid id="assetGrid" height="45%" width="510" rowHeight="25" change="gridSelected()">
- <js:beads>
- <js:SimpleBinding
- eventName="update"
- sourceID="dataModel"
- sourcePropertyName="assetList"
- destinationPropertyName="dataProvider" />
- <js:DataProviderChangeNotifier sourceID="dataModel" propertyName="assetList"
- destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
- </js:beads>
- <js:columns>
- <js:DataGridColumn columnWidth="250" label="Company (SYMB)" dataField="name" itemRenderer="renderers.CompanyNameRenderer" />
- <js:DataGridColumn columnWidth="80" label="Shares" dataField="shares" />
- <js:DataGridColumn columnWidth="80" label="Last" dataField="last" />
- <js:DataGridColumn columnWidth="100" label="Total $" dataField="shares" itemRenderer="renderers.SharesTotalRenderer" />
- </js:columns>
- </js:DataGrid>
+ <js:Container height="45%" width="100%" className="Outer2">
+ <js:DataGrid id="assetGrid" height="100%" width="100%" rowHeight="25" change="gridSelected()" className="LaunchGrid">
+ <js:beads>
+ <js:DataGridPercentageLayout />
+ <js:SimpleBinding
+ eventName="update"
+ sourceID="dataModel"
+ sourcePropertyName="assetList"
+ destinationPropertyName="dataProvider" />
+ <js:DataProviderChangeNotifier sourceID="dataModel" propertyName="assetList"
+ destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
+ </js:beads>
+ <js:columns>
+ <js:DataGridColumn columnWidth="36" label="Company (SYMB)" dataField="name" itemRenderer="renderers.CompanyNameRenderer" />
+ <js:DataGridColumn columnWidth="20" label="Shares" dataField="shares" />
+ <js:DataGridColumn columnWidth="20" label="Last" dataField="last" />
+ <js:DataGridColumn columnWidth="24" label="Total $" dataField="shares" itemRenderer="renderers.SharesTotalRenderer" />
+ </js:columns>
+ </js:DataGrid>
+ </js:Container>
<js:Spacer height="3%" />
- <js:StackedBarChart id="barChart" width="510" height="40%" className="AllCharts">
+ <js:BarChart id="barChart" width="100%" height="40%" className="AllCharts">
<js:model>
<js:ChartArrayListSelectionModel />
</js:model>
<js:beads>
<js:DataItemRendererFactoryForSeriesArrayListData />
- <js:StackedBarChartLayoutForArrayList />
+ <js:BarChartLayoutForArrayList />
<js:SimpleBinding
eventName="update"
sourceID="dataModel"
@@ -156,6 +178,6 @@ limitations under the License.
</js:itemRenderer>
</js:BarSeries>
</js:series>
- </js:StackedBarChart>
+ </js:BarChart>
</js:TitleView>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/80583865/examples/flexjs/MobileStocks/src/views/WatchListView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/views/WatchListView.mxml b/examples/flexjs/MobileStocks/src/views/WatchListView.mxml
index f4dcd94..1c317fe 100755
--- a/examples/flexjs/MobileStocks/src/views/WatchListView.mxml
+++ b/examples/flexjs/MobileStocks/src/views/WatchListView.mxml
@@ -107,6 +107,7 @@ limitations under the License.
<js:DataGrid id="dataGrid" width="100%" height="85%" change="selectRow()" className="WatchListDataGrid">
<js:beads>
+ <js:DataGridPercentageLayout />
<js:SimpleBinding
eventName="update"
sourceID="dataModel"
@@ -116,38 +117,18 @@ limitations under the License.
destinationPropertyName="dataProvider" changeEventName="dataProviderChanged" />
</js:beads>
<js:columns>
- <js:DataGridColumn label="Company (SYMB)" dataField="symbol"
+ <js:DataGridColumn label="Company (SYMB)" dataField="symbol" columnWidth="45"
itemRenderer="renderers.CompanyNameRenderer" />
- <js:DataGridColumn label="Open" dataField="open"
+ <js:DataGridColumn label="Open" dataField="open" columnWidth="11"
+ itemRenderer="renderers.StockRenderer" />
+ <js:DataGridColumn label="Last" dataField="last"columnWidth="11"
+ itemRenderer="renderers.StockRenderer" />
+ <js:DataGridColumn label="Change" dataField="change"columnWidth="11"
+ itemRenderer="renderers.StockRenderer" />
+ <js:DataGridColumn label="High" dataField="high"columnWidth="11"
+ itemRenderer="renderers.StockRenderer" />
+ <js:DataGridColumn label="Low" dataField="low" columnWidth="11"
itemRenderer="renderers.StockRenderer" />
- <js:DataGridColumn label="Last" dataField="last" >
- <js:itemRenderer>
- <fx:Component>
- <renderers:StockRenderer />
- </fx:Component>
- </js:itemRenderer>
- </js:DataGridColumn>
- <js:DataGridColumn label="Change" dataField="change">
- <js:itemRenderer>
- <fx:Component>
- <renderers:StockRenderer />
- </fx:Component>
- </js:itemRenderer>
- </js:DataGridColumn>
- <js:DataGridColumn label="High" dataField="high" >
- <js:itemRenderer>
- <fx:Component>
- <renderers:StockRenderer />
- </fx:Component>
- </js:itemRenderer>
- </js:DataGridColumn>
- <js:DataGridColumn label="Low" dataField="low" >
- <js:itemRenderer>
- <fx:Component>
- <renderers:StockRenderer />
- </fx:Component>
- </js:itemRenderer>
- </js:DataGridColumn>
</js:columns>
</js:DataGrid>
[16/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Moved
comment to fix compilation error.
Posted by yi...@apache.org.
Moved comment to fix compilation error.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e118e31d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e118e31d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e118e31d
Branch: refs/heads/refactor-sprite
Commit: e118e31d8dc3764bd21026e68edeb4bc1f18d32c
Parents: 5ee2995
Author: Peter Ent <pe...@apache.org>
Authored: Mon Oct 10 13:26:04 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Oct 10 13:26:04 2016 -0400
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/html/beads/DateChooserView.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e118e31d/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index 96f5019..b185559 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -289,10 +289,10 @@ package org.apache.flex.html.beads
updateCalendar();
}
- COMPILE::SWF
/**
* @private
*/
+ COMPILE::SWF
protected function displayBackgroundAndBorder(host:UIBase) : void
{
var backgroundColor:Object = ValuesManager.valuesImpl.getValue(host, "background-color");
[26/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
DateFieldMouseController has the wrong data type for the receiving event
handler.
Posted by yi...@apache.org.
DateFieldMouseController has the wrong data type for the receiving event handler.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fbc7d5c0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fbc7d5c0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fbc7d5c0
Branch: refs/heads/refactor-sprite
Commit: fbc7d5c06362f44f5dbbbe6f033c93b2bf115d44
Parents: 4c8bd84
Author: Peter Ent <pe...@apache.org>
Authored: Wed Oct 12 17:31:47 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Oct 12 17:31:47 2016 -0400
----------------------------------------------------------------------
.../flex/html/beads/controllers/DateFieldMouseController.as | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fbc7d5c0/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/DateFieldMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/DateFieldMouseController.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/DateFieldMouseController.as
index 05b852d..c4f130a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/DateFieldMouseController.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/controllers/DateFieldMouseController.as
@@ -23,6 +23,7 @@ package org.apache.flex.html.beads.controllers
import org.apache.flex.core.IStrand;
import org.apache.flex.core.UIBase;
import org.apache.flex.events.Event;
+ import org.apache.flex.events.MouseEvent;
import org.apache.flex.events.IEventDispatcher;
import org.apache.flex.html.beads.DateFieldView;
@@ -71,7 +72,7 @@ package org.apache.flex.html.beads.controllers
/**
* @private
*/
- private function clickHandler(event:Event):void
+ private function clickHandler(event:MouseEvent):void
{
var viewBead:DateFieldView = _strand.getBeadByType(DateFieldView) as DateFieldView;
viewBead.popUpVisible = true;
[23/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Update
to Chart: get BarChart to resize properly. Need to carry this over to the
other chart types.
Posted by yi...@apache.org.
Update to Chart: get BarChart to resize properly. Need to carry this over to the other chart types.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5df884ae
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5df884ae
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5df884ae
Branch: refs/heads/refactor-sprite
Commit: 5df884ae9def2dcb297830f4a6135079cd534f34
Parents: 23403e5
Author: Peter Ent <pe...@apache.org>
Authored: Tue Oct 11 16:46:48 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Oct 11 16:46:48 2016 -0400
----------------------------------------------------------------------
.../apache/flex/charts/beads/layouts/BarChartLayout.as | 6 ++++--
.../charts/beads/layouts/BarChartLayoutForArrayList.as | 10 +++++++---
.../org/apache/flex/charts/core/IChartItemRenderer.as | 10 ++++++++++
.../apache/flex/charts/supportClasses/BoxItemRenderer.as | 2 ++
4 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5df884ae/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
index 8cfe12c..44c123b 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayout.as
@@ -86,9 +86,9 @@ package org.apache.flex.charts.beads.layouts
var n:int = dp.length;
var useWidth:Number = UIBase(chartDataGroup).width;
var useHeight:Number = UIBase(chartDataGroup).height;
- var itemHeight:Number = (useHeight - gap*(dp.length-1))/dp.length;
+ var itemHeight:Number = useHeight/dp.length - gap;
var seriesHeight:Number = itemHeight/chart.series.length;
- var ypos:Number = useHeight;
+ var ypos:Number = useHeight - gap/2;
var maxXValue:Number = 0;
var minXValue:Number = 0;
@@ -138,6 +138,8 @@ package org.apache.flex.charts.beads.layouts
child.width = xValue;
child.height = seriesHeight;
ypos -= seriesHeight;
+
+ child.updateRenderer();
}
ypos -= gap;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5df884ae/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayoutForArrayList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayoutForArrayList.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayoutForArrayList.as
index bea8734..c59f329 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayoutForArrayList.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/beads/layouts/BarChartLayoutForArrayList.as
@@ -62,14 +62,16 @@ package org.apache.flex.charts.beads.layouts
var dp:ArrayList = selectionModel.dataProvider as ArrayList;
if (!dp)
return;
+ if (dp.length == 0)
+ return;
var n:int = dp.length;
var useWidth:Number = UIBase(chartDataGroup).width;
var useHeight:Number = UIBase(chartDataGroup).height;
- var itemHeight:Number = (useHeight - gap*(dp.length-1))/dp.length;
+ var itemHeight:Number = useHeight/dp.length - gap;
var seriesHeight:Number = itemHeight/chart.series.length;
- var ypos:Number = useHeight;
-
+ var ypos:Number = useHeight - gap/2;
+
var maxXValue:Number = 0;
var minXValue:Number = 0;
var scaleFactor:Number = 1.0;
@@ -118,6 +120,8 @@ package org.apache.flex.charts.beads.layouts
child.width = xValue;
child.height = seriesHeight;
ypos -= seriesHeight;
+
+ child.updateRenderer();
}
ypos -= gap;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5df884ae/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
index fe4c8bc..9500fbb 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/core/IChartItemRenderer.as
@@ -123,5 +123,15 @@ package org.apache.flex.charts.core
* @productversion FlexJS 0.0
*/
function set height(value:Number):void;
+
+ /**
+ * Invoke this function to force the itemRenderer to redraw.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function updateRenderer():void;
}
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5df884ae/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BoxItemRenderer.as b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
index 573a192..3d30b64 100644
--- a/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
+++ b/frameworks/projects/Charts/src/main/flex/org/apache/flex/charts/supportClasses/BoxItemRenderer.as
@@ -235,6 +235,8 @@ package org.apache.flex.charts.supportClasses
override public function updateRenderer():void
{
+ if (filledRect == null) return;
+
if (down||selected||hovered) {
if (hoverFill == null) {
if(fill is SolidColor)
[22/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Changed DataGridExample to show use of DataGridPercentageLayout.
Posted by yi...@apache.org.
Changed DataGridExample to show use of DataGridPercentageLayout.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/23403e53
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/23403e53
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/23403e53
Branch: refs/heads/refactor-sprite
Commit: 23403e53dc6472a11e82fd6ec0d1df22457159e5
Parents: 9bd1e9f
Author: Peter Ent <pe...@apache.org>
Authored: Tue Oct 11 11:06:46 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Oct 11 11:06:46 2016 -0400
----------------------------------------------------------------------
examples/flexjs/DataGridExample/src/MyInitialView.mxml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23403e53/examples/flexjs/DataGridExample/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataGridExample/src/MyInitialView.mxml b/examples/flexjs/DataGridExample/src/MyInitialView.mxml
index 242c122..2f543e5 100644
--- a/examples/flexjs/DataGridExample/src/MyInitialView.mxml
+++ b/examples/flexjs/DataGridExample/src/MyInitialView.mxml
@@ -33,15 +33,16 @@ limitations under the License.
<js:DataGrid id="dataGrid" x="20" y="30" width="400" height="300" change="dataGridChange()" rowHeight="30">
<js:beads>
+ <js:DataGridPercentageLayout />
<js:ConstantBinding
sourceID="applicationModel"
sourcePropertyName="productList"
destinationPropertyName="dataProvider" />
</js:beads>
<js:columns>
- <js:DataGridColumn label="Image" dataField="image" columnWidth="100" itemRenderer="products.ProductItemRenderer" />
- <js:DataGridColumn label="Title" dataField="title" columnWidth="200" />
- <js:DataGridColumn label="Sales" dataField="sales" columnWidth="100" />
+ <js:DataGridColumn label="Image" dataField="image" columnWidth="25" itemRenderer="products.ProductItemRenderer" />
+ <js:DataGridColumn label="Title" dataField="title" columnWidth="50" />
+ <js:DataGridColumn label="Sales" dataField="sales" columnWidth="25" />
</js:columns>
</js:DataGrid>
[21/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Changes to DataGrid component and beads. Adding DataGridPercentageLayout so
column widths can be specified as percentages.
Posted by yi...@apache.org.
Changes to DataGrid component and beads. Adding DataGridPercentageLayout so column widths can be specified as percentages.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9bd1e9ff
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9bd1e9ff
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9bd1e9ff
Branch: refs/heads/refactor-sprite
Commit: 9bd1e9ff9fe90335b60872fb2363194e9d1513f3
Parents: dcc5ff3
Author: Peter Ent <pe...@apache.org>
Authored: Tue Oct 11 11:06:06 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Oct 11 11:06:06 2016 -0400
----------------------------------------------------------------------
.../projects/HTML/src/main/flex/HTMLClasses.as | 4 +
.../org/apache/flex/html/beads/DataGridView.as | 107 ++++-----
.../flex/html/beads/layouts/DataGridLayout.as | 116 +++++++---
.../beads/layouts/DataGridPercentageLayout.as | 224 +++++++++++++++++++
.../flex/html/beads/layouts/IDataGridLayout.as | 52 +++++
.../HTML/src/main/resources/basic-manifest.xml | 2 +
.../HTML/src/main/resources/defaults.css | 1 +
7 files changed, 407 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
index e5310a0..1271417 100644
--- a/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
+++ b/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
@@ -136,6 +136,9 @@ internal class HTMLClasses
import org.apache.flex.html.beads.layouts.VerticalLayout; VerticalLayout;
import org.apache.flex.html.beads.layouts.HorizontalLayout; HorizontalLayout;
import org.apache.flex.html.beads.layouts.BasicLayout; BasicLayout;
+ import org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout; OneFlexibleChildHorizontalLayout;
+ import org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout; OneFlexibleChildVerticalLayout;
+
COMPILE::SWF
{
import org.apache.flex.html.beads.layouts.HScrollBarLayout; HScrollBarLayout;
@@ -155,6 +158,7 @@ internal class HTMLClasses
import org.apache.flex.html.DataGridButtonBar; DataGridButtonBar;
import org.apache.flex.html.beads.DataGridColumnView; DataGridColumnView;
import org.apache.flex.html.beads.DataGridView; DataGridView;
+ import org.apache.flex.html.beads.layouts.DataGridLayout; DataGridLayout;
import org.apache.flex.html.beads.DateChooserView; DateChooserView;
import org.apache.flex.html.beads.DateFieldView; DateFieldView;
import org.apache.flex.html.beads.DecrementButtonView; DecrementButtonView;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
index be81545..8393057 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
@@ -20,6 +20,7 @@ package org.apache.flex.html.beads
{
import org.apache.flex.core.IBead;
import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadLayout;
import org.apache.flex.core.IBeadView;
import org.apache.flex.core.IDataGridModel;
import org.apache.flex.core.ISelectableItemRenderer;
@@ -34,6 +35,8 @@ package org.apache.flex.html.beads
import org.apache.flex.html.Container;
import org.apache.flex.html.beads.layouts.ButtonBarLayout;
import org.apache.flex.html.beads.layouts.VerticalLayout;
+ import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ import org.apache.flex.html.beads.layouts.IDataGridLayout;
import org.apache.flex.html.beads.models.ArraySelectionModel;
import org.apache.flex.html.beads.models.DataGridPresentationModel;
import org.apache.flex.html.supportClasses.DataGridColumn;
@@ -74,10 +77,19 @@ package org.apache.flex.html.beads
/**
* An array of List objects the comprise the columns of the DataGrid.
*/
- public function get getColumnLists():Array
+ public function get columnLists():Array
{
return _lists;
}
+
+ /**
+ * The area used to hold the columns
+ *
+ */
+ public function get listArea():Container
+ {
+ return _listArea;
+ }
/**
* @private
@@ -86,6 +98,14 @@ package org.apache.flex.html.beads
{
return _strand as IUIBase;
}
+
+ /**
+ * Returns the component used as the header for the DataGrid.
+ */
+ public function get header():IUIBase
+ {
+ return _header;
+ }
/**
* @copy org.apache.flex.core.IBead#strand
@@ -100,19 +120,25 @@ package org.apache.flex.html.beads
_strand = value;
var host:UIBase = value as UIBase;
- host.addEventListener("widthChanged", handleSizeChanges);
- host.addEventListener("heightChanged", handleSizeChanges);
_header = new DataGridButtonBar();
_header.id = "dataGridHeader";
var scrollPort:ScrollingViewport = new ScrollingViewport();
-// scrollPort.showsHorizontalScrollBar = false;
_listArea = new Container();
_listArea.id = "dataGridListArea";
_listArea.className = "DataGridListArea";
_listArea.addBead(scrollPort);
+
+ if (_strand.getBeadByType(IBeadLayout) == null) {
+ var c:Class = ValuesManager.valuesImpl.getValue(host, "iBeadLayout");
+ if (c)
+ {
+ var layout:IBeadLayout = new c() as IBeadLayout;
+ _strand.addBead(layout);
+ }
+ }
finishSetup(null);
}
@@ -135,19 +161,13 @@ package org.apache.flex.html.beads
IEventDispatcher(sharedModel).addEventListener("dataProviderChanged",handleDataProviderChanged);
var columnLabels:Array = new Array();
- var buttonWidths:Array = new Array();
for(var i:int=0; i < sharedModel.columns.length; i++) {
var dgc:DataGridColumn = sharedModel.columns[i] as DataGridColumn;
columnLabels.push(dgc.label);
- if (!isNaN(dgc.columnWidth)) buttonWidths.push(dgc.columnWidth);
}
var bblayout:ButtonBarLayout = new ButtonBarLayout();
- if (buttonWidths.length == sharedModel.columns.length) {
- bblayout.buttonWidths = buttonWidths;
- }
-
var buttonBarModel:ArraySelectionModel = new ArraySelectionModel();
buttonBarModel.dataProvider = columnLabels;
@@ -158,62 +178,19 @@ package org.apache.flex.html.beads
host.addElement(_listArea);
- // do we know what the size is? If not, wait to be sized
-
- if (host.isHeightSizedToContent() || host.isWidthSizedToContent()) {
- host.addEventListener("sizeChanged", handleSizeChanges);
- }
-
- // else size now
- else {
- handleDataProviderChanged(event);
- }
+ handleDataProviderChanged(event);
}
/**
* @private
*/
private function handleSizeChanges(event:Event):void
- {
- var useWidth:Number = _listArea.width;
- var useHeight:Number = _listArea.height;
-
- if (host.width > 0) {
- useWidth = host.width;
- }
-
- _header.x = 0;
- _header.y = 0;
- _header.width = useWidth;
- _header.height = 25;
-
- if (host.height > 0) {
- useHeight = host.height - _header.height;
- }
-
- _listArea.x = 0;
- _listArea.y = 26;
- _listArea.width = useWidth;
- _listArea.height = useHeight;
-
- var sharedModel:IDataGridModel = _strand.getBeadByType(IBeadModel) as IDataGridModel;
-
- if (_lists != null && _lists.length > 0) {
- var xpos:Number = 0;
- var listWidth:Number = host.width / _lists.length;
- for (var i:int=0; i < _lists.length; i++) {
- var list:DataGridColumnList = _lists[i] as DataGridColumnList;
- list.x = xpos;
- list.y = 0;
-
- var dataGridColumn:DataGridColumn = sharedModel.columns[i] as DataGridColumn;
- var colWidth:Number = dataGridColumn.columnWidth;
- if (!isNaN(colWidth)) list.width = colWidth;
- else list.width = listWidth;
-
- xpos += list.width;
- }
- }
+ {
+ var layoutBead:IDataGridLayout = _strand.getBeadByType(IBeadLayout) as IDataGridLayout;
+ layoutBead.header = _header;
+ layoutBead.columns = _lists;
+ layoutBead.listArea = _listArea;
+ layoutBead.layout();
}
/**
@@ -234,7 +211,7 @@ package org.apache.flex.html.beads
listModel.dataProvider = sharedModel.dataProvider;
}
- handleSizeChanges(event);
+ host.dispatchEvent(new Event("layoutNeeded"));
}
/**
@@ -253,7 +230,7 @@ package org.apache.flex.html.beads
}
}
- IEventDispatcher(_strand).dispatchEvent(new Event('change'));
+ host.dispatchEvent(new Event('change'));
}
/**
@@ -278,15 +255,11 @@ package org.apache.flex.html.beads
list.addEventListener('change',handleColumnListChange);
list.addBead(presentationModel);
- var colWidth:Number = dataGridColumn.columnWidth;
- if (!isNaN(colWidth)) list.width = colWidth;
- else list.width = listWidth;
-
_listArea.addElement(list);
_lists.push(list);
}
- _listArea.dispatchEvent(new Event("layoutNeeded"));
+ host.dispatchEvent(new Event("layoutNeeded"));
}
}
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
index 1cfba0b..1d22956 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
@@ -19,6 +19,8 @@
package org.apache.flex.html.beads.layouts
{
import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadView;
import org.apache.flex.core.IDataGridModel;
import org.apache.flex.core.IStrand;
import org.apache.flex.core.IUIBase;
@@ -26,6 +28,9 @@ package org.apache.flex.html.beads.layouts
import org.apache.flex.events.Event;
import org.apache.flex.events.IEventDispatcher;
import org.apache.flex.html.ButtonBar;
+ import org.apache.flex.html.beads.DataGridView;
+ import org.apache.flex.html.beads.layouts.BasicLayout;
+ import org.apache.flex.html.supportClasses.DataGridColumnList;
import org.apache.flex.html.supportClasses.DataGridColumn;
/**
@@ -38,7 +43,7 @@ package org.apache.flex.html.beads.layouts
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- public class DataGridLayout implements IBeadLayout
+ public class DataGridLayout implements IDataGridLayout
{
/**
* constructor
@@ -65,6 +70,17 @@ package org.apache.flex.html.beads.layouts
public function set strand(value:IStrand):void
{
_strand = value;
+
+ var host:UIBase = _strand as UIBase;
+ host.addEventListener("widthChanged", handleSizeChanges);
+ host.addEventListener("heightChanged", handleSizeChanges);
+ host.addEventListener("sizeChanged", handleSizeChanges);
+ host.addEventListener("layoutNeeded", handleSizeChanges);
+
+ var view:DataGridView = host.view as DataGridView;
+ header = view.header;
+ listArea = view.listArea;
+ listArea.addBead(new BasicLayout());
}
private var _header:UIBase;
@@ -105,52 +121,88 @@ package org.apache.flex.html.beads.layouts
_columns = value;
}
+ private var _listArea:IUIBase;
+
+ public function get listArea():IUIBase
+ {
+ return _listArea;
+ }
+ public function set listArea(value:IUIBase):void
+ {
+ _listArea = value;
+ }
+
/**
* @copy org.apache.flex.core.IBeadLayout#layout
*/
public function layout():Boolean
{
- var sw:Number = UIBase(_strand).width;
- var sh:Number = UIBase(_strand).height;
-
- var columnHeight:Number = Math.floor(sh - header.height);
- var columnWidth:Number = Math.floor(sw / columns.length);
-
- var xpos:Number = 0;
- var ypos:Number = Math.floor(header.height);
-
- // TODO: change the layout so that the model's DataGridColumn.columnWidth
- // isn't used blindly, but is considered in the overall width. In other words,
- // right now the width could exceed the strand's width.
- var model:IDataGridModel = _strand.getBeadByType(IDataGridModel) as IDataGridModel;
+ if (columns == null || columns.length == 0) {
+ return false;
+ }
+ var host:UIBase = _strand as UIBase;
- var buttonWidths:Array = new Array();
+ var useWidth:Number = host.width;
+ var useHeight:Number = host.height;
+
+ if (host.height > 0) {
+ useHeight = host.height - _header.height;
+ }
- for(var i:int=0; i < columns.length; i++) {
- var column:UIBase = columns[i] as UIBase;
- column.x = xpos;
- column.y = ypos;
- column.height = columnHeight;
-
- var dgc:DataGridColumn = model.columns[i];
- if (!isNaN(dgc.columnWidth)) column.width = dgc.columnWidth;
- else column.width = columnWidth;
-
- xpos += column.width;
-
- buttonWidths.push(column.width);
+ var thisisnothing:Number = -1234;
+
+ _listArea.x = 0;
+ _listArea.y = 26;
+ _listArea.width = useWidth;
+ _listArea.height = useHeight;
+
+ var sharedModel:IDataGridModel = host.model as IDataGridModel;
+ var buttonWidths:Array = [];
+
+ if (_columns != null && _columns.length > 0) {
+ var xpos:Number = 0;
+ var listWidth:Number = host.width / _columns.length;
+ for (var i:int=0; i < _columns.length; i++) {
+ var list:DataGridColumnList = _columns[i] as DataGridColumnList;
+ list.x = xpos;
+ list.y = 0;
+
+ var dataGridColumn:DataGridColumn = sharedModel.columns[i] as DataGridColumn;
+ var colWidth:Number = dataGridColumn.columnWidth;
+ if (!isNaN(colWidth)) list.width = colWidth;
+ else list.width = listWidth;
+
+ xpos += list.width;
+
+ buttonWidths.push(list.width);
+ }
}
var bar:ButtonBar = header as ButtonBar;
var barLayout:ButtonBarLayout = bar.getBeadByType(ButtonBarLayout) as ButtonBarLayout;
barLayout.buttonWidths = buttonWidths;
+ bar.dispatchEvent(new Event("layoutNeeded"));
- header.x = 0;
- header.y = 0;
- header.width = sw;
- header.dispatchEvent(new Event("layoutNeeded"));
+ _header.x = 0;
+ _header.y = 0;
+ _header.width = useWidth;
+ _header.height = 25;
+ _header.dispatchEvent(new Event("layoutNeeded"));
return true;
}
+
+ /**
+ * @private
+ */
+ private function handleSizeChanges(event:Event):void
+ {
+ var view:DataGridView = UIBase(_strand).view as DataGridView;
+ if (view == null) return;
+
+ columns = view.columnLists;
+
+ layout();
+ }
}
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridPercentageLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridPercentageLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridPercentageLayout.as
new file mode 100644
index 0000000..7459a24
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridPercentageLayout.as
@@ -0,0 +1,224 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IDataGridModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.ButtonBar;
+ import org.apache.flex.html.beads.DataGridView;
+ import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ import org.apache.flex.html.supportClasses.DataGridColumn;
+
+ /**
+ * DataGridPercentageLayout is a class that handles the size and positioning of the
+ * elements of a DataGrid. This includes the ButtonBar used for the column
+ * headers and the Lists that are the columns. The columns are sized on their
+ * percentage of the width of the DataGrid space.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DataGridPercentageLayout implements IDataGridLayout
+ {
+ /**
+ * constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DataGridPercentageLayout()
+ {
+ }
+
+ 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 host:UIBase = value as UIBase;
+
+ var view:DataGridView = host.view as DataGridView;
+
+ header = view.header;
+ listArea = view.listArea;
+
+ var anylayout:IBead = listArea.getBeadByType(IBeadLayout);
+ if (anylayout != null) {
+ listArea.removeBead(anylayout);
+ }
+ listArea.addBead(new HorizontalLayout());
+
+ host.addEventListener("widthChanged", handleSizeChanges);
+ host.addEventListener("heightChanged", handleSizeChanges);
+ host.addEventListener("sizeChanged", handleSizeChanges);
+ host.addEventListener("layoutNeeded", handleSizeChanges);
+ }
+
+ private var _header:UIBase;
+
+ /**
+ * The element that is the header for the DataGrid
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get header():IUIBase
+ {
+ return _header;
+ }
+ public function set header(value:IUIBase):void
+ {
+ _header = UIBase(value);
+ }
+
+ private var _columns:Array;
+
+ /**
+ * The array of column elements.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get columns():Array
+ {
+ return _columns;
+ }
+ public function set columns(value:Array):void
+ {
+ _columns = value;
+ }
+
+ private var _listArea:IUIBase;
+
+ public function get listArea():IUIBase
+ {
+ return _listArea;
+ }
+ public function set listArea(value:IUIBase):void
+ {
+ _listArea = value;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IBeadLayout#layout
+ */
+ public function layout():Boolean
+ {
+ if (columns == null || columns.length == 0) {
+ return false;
+ }
+
+ var host:UIBase = _strand as UIBase;
+
+ var sw:Number = host.width;
+ var sh:Number = host.height;
+
+ var columnHeight:Number = Math.floor(sh - header.height);
+ var columnWidth:Number = Math.floor(sw / columns.length);
+
+ var xpos:Number = 0;
+ var ypos:Number = 26;
+
+ _header.x = 0;
+ _header.y = 0;
+ _header.width = sw;
+ _header.height = 25;
+
+ if (sh > 0) {
+ sh = sh - _header.height;
+ }
+
+ // TODO: change the layout so that the model's DataGridColumn.columnWidth
+ // isn't used blindly, but is considered in the overall width. In other words,
+ // right now the width could exceed the strand's width.
+ var model:IDataGridModel = host.model as IDataGridModel;
+
+ var buttonWidths:Array = new Array();
+
+ for(var i:int=0; i < columns.length; i++) {
+ var column:UIBase = columns[i] as UIBase;
+ column.percentHeight = 100;
+
+ var dgc:DataGridColumn = model.columns[i];
+ if (!isNaN(dgc.columnWidth)) {
+ column.percentWidth = dgc.columnWidth;
+ columnWidth = sw * (dgc.columnWidth/100.0);
+ }
+ else column.explicitWidth = columnWidth;
+
+ buttonWidths.push(columnWidth);
+ }
+
+ _listArea.x = 0;
+ _listArea.y = 26;
+ _listArea.width = sw;
+ _listArea.height = sh;
+ _listArea.dispatchEvent(new Event("layoutNeeded"));
+
+ var bar:ButtonBar = header as ButtonBar;
+ var barLayout:ButtonBarLayout = bar.getBeadByType(ButtonBarLayout) as ButtonBarLayout;
+ barLayout.buttonWidths = buttonWidths;
+
+ _header.x = 0;
+ _header.y = 0;
+ _header.width = sw;
+ _header.height = 25;
+ _header.dispatchEvent(new Event("layoutNeeded"));
+
+ return true;
+ }
+
+ /**
+ * @private
+ */
+ private function handleSizeChanges(event:Event):void
+ {
+ var view:DataGridView = UIBase(_strand).view as DataGridView;
+ if (view == null) return;
+
+ columns = view.columnLists;
+
+ layout();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/IDataGridLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/IDataGridLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/IDataGridLayout.as
new file mode 100644
index 0000000..2f22ec4
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/IDataGridLayout.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads.layouts
+{
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IDataGridModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.ButtonBar;
+ import org.apache.flex.html.supportClasses.DataGridColumn;
+
+ /**
+ * DataGridLayout is a class that handles the size and positioning of the
+ * elements of a DataGrid. This includes the ButtonBar used for the column
+ * headers and the Lists that are the columns.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDataGridLayout extends IBeadLayout
+ {
+ function get header():IUIBase;
+ function set header(value:IUIBase):void;
+
+ function get columns():Array;
+ function set columns(value:Array):void;
+
+ function get listArea():IUIBase;
+ function set listArea(value:IUIBase):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index f916c4a..f56d4d8 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -97,6 +97,8 @@
<component id="DataGridColumn" class="org.apache.flex.html.supportClasses.DataGridColumn"/>
<component id="DataGridLinesBead" class="org.apache.flex.html.beads.DataGridLinesBead"/>
<component id="DataGridColumnList" class="org.apache.flex.html.supportClasses.DataGridColumnList"/>
+ <component id="DataGridLayout" class="org.apache.flex.html.beads.layouts.DataGridLayout" />
+ <component id="DataGridPercentageLayout" class="org.apache.flex.html.beads.layouts.DataGridPercentageLayout" />
<component id="DataItemRendererFactoryForArrayData" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayData" />
<component id="DataItemRendererFactoryForArrayList" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayList" />
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9bd1e9ff/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index dd9bf27..28f2077 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -110,6 +110,7 @@ DataGrid
IDataGridPresentationModel: ClassReference("org.apache.flex.html.beads.models.DataGridPresentationModel");
IBeadView: ClassReference("org.apache.flex.html.beads.DataGridView");
IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataGridModel");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.DataGridLayout");
background-color: #FFFFFF;
border-style: solid;
[20/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Fix
for compilation/build error.
Posted by yi...@apache.org.
Fix for compilation/build error.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dcc5ff3b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dcc5ff3b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dcc5ff3b
Branch: refs/heads/refactor-sprite
Commit: dcc5ff3b889ae491b0a81f08552c6afabfae62f5
Parents: b7f661c
Author: Peter Ent <pe...@apache.org>
Authored: Tue Oct 11 10:03:07 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Oct 11 10:03:07 2016 -0400
----------------------------------------------------------------------
.../src/main/flex/org/apache/flex/html/beads/DateChooserView.as | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dcc5ff3b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index b185559..54b2550 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -54,8 +54,6 @@ package org.apache.flex.html.beads
{
}
- private var _strand:IStrand;
-
/**
* @copy org.apache.flex.core.IBead#strand
*
[10/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Added the Apache License Header to MobileStocks.mxml to make the maven build
pass again
Posted by yi...@apache.org.
- Added the Apache License Header to MobileStocks.mxml to make the maven build pass again
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/55d89c77
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/55d89c77
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/55d89c77
Branch: refs/heads/refactor-sprite
Commit: 55d89c771aaef6c13cbe044b4e6b7c89d4238279
Parents: 3336361
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Oct 8 08:55:54 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Oct 8 08:55:54 2016 +0200
----------------------------------------------------------------------
.../flexjs/MobileStocks/src/MobileStocks.mxml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/55d89c77/examples/flexjs/MobileStocks/src/MobileStocks.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/MobileStocks.mxml b/examples/flexjs/MobileStocks/src/MobileStocks.mxml
index 15c983e..22d17c0 100644
--- a/examples/flexjs/MobileStocks/src/MobileStocks.mxml
+++ b/examples/flexjs/MobileStocks/src/MobileStocks.mxml
@@ -1,4 +1,22 @@
<?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.
+
+-->
<cordova:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
xmlns:models="models.*"
[13/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Excluded the testsuite from the rat checks as when the testsuite is run once
but a build without is being performed,
then rat will detect all the files in the "target" directory
Posted by yi...@apache.org.
- Excluded the testsuite from the rat checks as when the testsuite is run once but a build without is being performed, then rat will detect all the files in the "target" directory
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0e312181
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0e312181
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0e312181
Branch: refs/heads/refactor-sprite
Commit: 0e3121817b5efcf66c17e2673ecd273bb1149cbf
Parents: 6b7afec
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Sat Oct 8 09:19:14 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Sat Oct 8 09:19:14 2016 +0200
----------------------------------------------------------------------
pom.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e312181/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f20976..8db9821 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,6 +176,8 @@
<exclude>**/.settings/**</exclude>
<!-- Examples needs to be fixed -->
<exclude>native/**</exclude>
+ <!-- After running the testsuite, the target directory is full of non-header files -->
+ <exclude>testsuite/**</exclude>
</excludes>
</configuration>
<dependencies>
[03/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - -
Fixed a problem building the distribution on windows machines
Posted by yi...@apache.org.
- Fixed a problem building the distribution on windows machines
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/bf0ec84d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bf0ec84d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bf0ec84d
Branch: refs/heads/refactor-sprite
Commit: bf0ec84dbac446af979bf85cce0353ed9df5693f
Parents: f4d3d1a
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 16:39:51 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 16:39:51 2016 +0200
----------------------------------------------------------------------
distribution/src/main/assembly/component-air.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bf0ec84d/distribution/src/main/assembly/component-air.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-air.xml b/distribution/src/main/assembly/component-air.xml
index d2a9636..5a0be3c 100644
--- a/distribution/src/main/assembly/component-air.xml
+++ b/distribution/src/main/assembly/component-air.xml
@@ -113,13 +113,14 @@ under the License.
<unpack>true</unpack>
</dependencySet>
<!-- Unpack the rest of the stuff that usually belongs to an AIR SDK -->
- <dependencySet>
+ <!-- TODO: This seems to be empty on windows machines -->
+ <!--dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>com.adobe.air:misc:zip</include>
</includes>
<unpack>true</unpack>
- </dependencySet>
+ </dependencySet-->
</dependencySets>
<fileSets>
<!-- Copy the adt scripts and update the air version-number -->
[05/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Re-Added the misc artifact to the distribution
Posted by yi...@apache.org.
Re-Added the misc artifact to the distribution
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ac43c3d4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ac43c3d4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ac43c3d4
Branch: refs/heads/refactor-sprite
Commit: ac43c3d4df43503f80ebc851513969afcdc00fc3
Parents: d626525
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Fri Oct 7 12:03:23 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Fri Oct 7 12:03:42 2016 +0200
----------------------------------------------------------------------
distribution/src/main/assembly/component-air.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ac43c3d4/distribution/src/main/assembly/component-air.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/assembly/component-air.xml b/distribution/src/main/assembly/component-air.xml
index 5a0be3c..d2a9636 100644
--- a/distribution/src/main/assembly/component-air.xml
+++ b/distribution/src/main/assembly/component-air.xml
@@ -113,14 +113,13 @@ under the License.
<unpack>true</unpack>
</dependencySet>
<!-- Unpack the rest of the stuff that usually belongs to an AIR SDK -->
- <!-- TODO: This seems to be empty on windows machines -->
- <!--dependencySet>
+ <dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>com.adobe.air:misc:zip</include>
</includes>
<unpack>true</unpack>
- </dependencySet-->
+ </dependencySet>
</dependencySets>
<fileSets>
<!-- Copy the adt scripts and update the air version-number -->
[14/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - add
XML swc to pom
Posted by yi...@apache.org.
add XML swc to pom
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/93797c2d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/93797c2d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/93797c2d
Branch: refs/heads/refactor-sprite
Commit: 93797c2d7405b63fa7203ba245cf995fe345a530
Parents: 0e31218
Author: Alex Harui <ah...@apache.org>
Authored: Sat Oct 8 07:33:04 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Sat Oct 8 07:33:04 2016 -0700
----------------------------------------------------------------------
examples/flexjs/MobileStocks/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/93797c2d/examples/flexjs/MobileStocks/pom.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/pom.xml b/examples/flexjs/MobileStocks/pom.xml
index d069049..f34b042 100644
--- a/examples/flexjs/MobileStocks/pom.xml
+++ b/examples/flexjs/MobileStocks/pom.xml
@@ -95,6 +95,12 @@
<version>0.8.0-SNAPSHOT</version>
<type>swc</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.flex.flexjs.framework</groupId>
+ <artifactId>XML</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <type>swc</type>
+ </dependency>
</dependencies>
</project>
[19/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Merge
branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into
develop
Posted by yi...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/flex-asjs into develop
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b7f661c7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b7f661c7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b7f661c7
Branch: refs/heads/refactor-sprite
Commit: b7f661c75b3616e0fff5daddcb19f67a41ec2e63
Parents: 6ecf891 e118e31
Author: greg-dove <gr...@gmail.com>
Authored: Tue Oct 11 18:25:56 2016 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Tue Oct 11 18:25:56 2016 +1300
----------------------------------------------------------------------
.../apache/flex/html/beads/DateChooserView.as | 61 ++++++++++++++++----
1 file changed, 50 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[06/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Adding
DeviceSizeBead to Mobile project.
Posted by yi...@apache.org.
Adding DeviceSizeBead to Mobile project.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d03463c4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d03463c4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d03463c4
Branch: refs/heads/refactor-sprite
Commit: d03463c436b379d2f13f498bd80a1b63fe1222c1
Parents: ac43c3d
Author: Peter Ent <pe...@apache.org>
Authored: Fri Oct 7 11:55:51 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Fri Oct 7 11:55:51 2016 -0400
----------------------------------------------------------------------
.../apache/flex/mobile/beads/DeviceSizeBead.as | 105 +++++++++++++++++++
1 file changed, 105 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d03463c4/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
new file mode 100644
index 0000000..eb004d0
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/DeviceSizeBead.as
@@ -0,0 +1,105 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.Application;
+ import org.apache.flex.core.View;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+
+ COMPILE::SWF
+ {
+ import flash.events.Event;
+ import flash.external.ExternalInterface;
+ import flash.utils.getQualifiedClassName;
+ }
+
+ /**
+ * The DeviceSizeBead.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DeviceSizeBead implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DeviceSizeBead()
+ {
+ super();
+ }
+
+ private var _app:Application;
+
+ /**
+ * @private
+ */
+ public function set strand(value:IStrand):void
+ {
+ _app = value as Application;
+
+ COMPILE::SWF
+ {
+ _app.stage.addEventListener("resize", onResize);
+ onResize(null);
+ }
+
+ COMPILE::JS {
+ window.addEventListener("resize", onResize, false);
+ onResize();
+ }
+ }
+
+ COMPILE::JS
+ private function onResize():void
+ {
+ var initialView:UIBase = _app.initialView as UIBase;
+ var element:HTMLElement = _app.element;
+ //if (!isNaN(initialView.percentWidth) || !isNaN(initialView.percentHeight)) {
+ element.style.height = window.innerHeight.toString() + 'px';
+ element.style.width = window.innerWidth.toString() + 'px';
+ initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
+ //}
+ //initialView.setWidthAndHeight(window.innerWidth, window.innerHeight);
+ }
+
+ COMPILE::SWF
+ private function onResize(event:flash.events.Event):void
+ {
+ var initialView:UIBase = _app.initialView as UIBase;
+ if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
+ initialView.setWidthAndHeight(_app.stage.stageWidth, _app.stage.stageHeight);
+ else if (!isNaN(initialView.percentWidth))
+ initialView.setWidth(_app.stage.stageWidth);
+ else if (!isNaN(initialView.percentHeight))
+ initialView.setHeight(_app.stage.stageHeight);
+ }
+ }
+}
[09/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - get
binding working again
Posted by yi...@apache.org.
get binding working again
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/33363618
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/33363618
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/33363618
Branch: refs/heads/refactor-sprite
Commit: 33363618f1ba692e42fd55e826519835b1805438
Parents: a42e69e
Author: Alex Harui <ah...@apache.org>
Authored: Fri Oct 7 22:09:29 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Oct 7 22:09:41 2016 -0700
----------------------------------------------------------------------
.../apache/flex/binding/ApplicationDataBinding.as | 8 ++++----
.../org/apache/flex/binding/ContainerDataBinding.as | 8 ++++----
.../apache/flex/binding/MXMLBeadViewDataBinding.as | 8 ++++----
.../flex/org/apache/flex/binding/PropertyWatcher.as | 16 +++++++++++++---
.../flex/org/apache/flex/binding/ViewDataBinding.as | 4 ++--
5 files changed, 27 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33363618/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
index c8a501f..e4130c9 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ApplicationDataBinding.as
@@ -235,10 +235,10 @@ package org.apache.flex.binding
{
case "property":
{
- var pw:PropertyWatcher = new PropertyWatcher(this,
- watcher.propertyName,
- watcher.eventNames,
- (typeof(gb.source) === "function") ? gb.source as Function : watcher.getterFunction);
+ var pw:PropertyWatcher = new PropertyWatcher(_strand,
+ watcher.propertyName,
+ watcher.eventNames,
+ (typeof(gb.source) === "function" && watcher.children == null) ? gb.source as Function : watcher.getterFunction);
watcher.watcher = pw;
if (parentWatcher)
pw.parentChanged(parentWatcher.value);
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33363618/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
index 5deb680..1a0fdfb 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ContainerDataBinding.as
@@ -281,10 +281,10 @@ package org.apache.flex.binding
{
case "property":
{
- var pw:PropertyWatcher = new PropertyWatcher(this,
- watcher.propertyName,
- watcher.eventNames,
- (typeof(gb.source) === "function") ? gb.source as Function : watcher.getterFunction);
+ var pw:PropertyWatcher = new PropertyWatcher(_strand,
+ watcher.propertyName,
+ watcher.eventNames,
+ (typeof(gb.source) === "function" && watcher.children == null) ? gb.source as Function : watcher.getterFunction);
watcher.watcher = pw;
if (parentWatcher)
pw.parentChanged(parentWatcher.value);
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33363618/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
index 043e10f..0579ace 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/MXMLBeadViewDataBinding.as
@@ -230,10 +230,10 @@ package org.apache.flex.binding
{
case "property":
{
- var pw:PropertyWatcher = new PropertyWatcher(this,
- watcher.propertyName,
- watcher.eventNames,
- (typeof(gb.source) === "function") ? gb.source as Function : watcher.getterFunction);
+ var pw:PropertyWatcher = new PropertyWatcher(_strand,
+ watcher.propertyName,
+ watcher.eventNames,
+ (typeof(gb.source) === "function" && watcher.children == null) ? gb.source as Function : watcher.getterFunction);
watcher.watcher = pw;
if (parentWatcher)
pw.parentChanged(parentWatcher.value);
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33363618/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
index 98015dc..1ea83ef 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/PropertyWatcher.as
@@ -48,10 +48,10 @@ package org.apache.flex.binding
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- public function PropertyWatcher(source:Object, propertyName:String, eventNames:Object,
+ public function PropertyWatcher(document:Object, propertyName:String, eventNames:Object,
getterFunction:Function)
{
- this.source = source;
+ this.document = document;
this.propertyName = propertyName;
this.getterFunction = getterFunction;
this.eventNames = eventNames;
@@ -71,6 +71,16 @@ package org.apache.flex.binding
protected var dispatcher:IEventDispatcher;
/**
+ * The document we belong to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var document:Object;
+
+ /**
* The object who's property we are watching.
*
* @langversion 3.0
@@ -226,7 +236,7 @@ package org.apache.flex.binding
{
if (getterFunction != null)
{
- value = getterFunction.apply(source, [ propertyName ]);
+ value = getterFunction.apply(document, [ propertyName ]);
}
else
{
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/33363618/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
index d9cdfd2..44c5489 100644
--- a/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
+++ b/frameworks/projects/Binding/src/main/flex/org/apache/flex/binding/ViewDataBinding.as
@@ -266,10 +266,10 @@ package org.apache.flex.binding
gb.isStatic = true;
case "property":
{
- var pw:PropertyWatcher = new PropertyWatcher(this,
+ var pw:PropertyWatcher = new PropertyWatcher(_strand,
watcher.propertyName,
watcher.eventNames,
- (typeof(gb.source) === "function") ? gb.source as Function : watcher.getterFunction);
+ (typeof(gb.source) === "function" && watcher.children == null) ? gb.source as Function : watcher.getterFunction);
watcher.watcher = pw;
if (parentWatcher)
pw.parentChanged(parentWatcher.value);
[17/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
[Tests] Fixed test for SWF,
and added back the failing js release-mode test. This failing test should
remain until it is either a) no longer apparent or b) becomes 'expected' for
JS via docum
Posted by yi...@apache.org.
[Tests] Fixed test for SWF, and added back the failing js release-mode test.
This failing test should remain until it is either a) no longer apparent or b) becomes 'expected' for JS via documentation.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4262fbe7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4262fbe7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4262fbe7
Branch: refs/heads/refactor-sprite
Commit: 4262fbe7e882825927c7ab4a39efe8cc283bb72e
Parents: 93797c2
Author: greg-dove <gr...@gmail.com>
Authored: Tue Oct 11 18:23:53 2016 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Tue Oct 11 18:23:53 2016 +1300
----------------------------------------------------------------------
.../observedbugs/ObservedBugTests.as | 23 ++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4262fbe7/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
----------------------------------------------------------------------
diff --git a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
index 4590c7b..46887ac 100644
--- a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
+++ b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
@@ -59,24 +59,39 @@ package flexUnitTests.observedbugs
}
- [TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
[Test]
- public function testTryCatchJSReleaseModeFail():void
+ public function testTryCatchJSReleaseModeWorks_a():void
{
var js:int = 1;
try {
- js = getDefinitionByName("flash.system.Capabilities") == null ? 1 : 0;
+ js = getDefinitionByName("flash.system.Capabilities") != null ? 1 : 0;
} catch (e:Error) {
js = 2;
}
+ Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1));
+
+ }
+
+
+ [TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
+ [Test]
+ public function testTryCatchJSReleaseModeFails_b():void
+ {
+ var js:Boolean = false;
+ try {
+ var check:* = getDefinitionByName("flash.system.Capabilities");
+ } catch (e:Error) {
+ js = true;
+ }
+
//if this next reference to 'check' variable is not included, then the above try/catch code
// appears to be optimized away in js-release mode
//todo: this is inconsistent with swf
/* if (check == null) {
js = true;
}*/
- Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1));
+ Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == true) : (js == false));
}
[25/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Test
view for MobileSocks.
Posted by yi...@apache.org.
Test view for MobileSocks.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4c8bd848
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4c8bd848
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4c8bd848
Branch: refs/heads/refactor-sprite
Commit: 4c8bd84808efbd3fa13a24e26f9091923be01602
Parents: 8058386
Author: Peter Ent <pe...@apache.org>
Authored: Wed Oct 12 08:52:49 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Oct 12 08:52:49 2016 -0400
----------------------------------------------------------------------
.../src/VerticalLayoutTextView.mxml | 68 ++++++++++++++++++++
1 file changed, 68 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4c8bd848/examples/flexjs/MobileStocks/src/VerticalLayoutTextView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/src/VerticalLayoutTextView.mxml b/examples/flexjs/MobileStocks/src/VerticalLayoutTextView.mxml
new file mode 100755
index 0000000..0353195
--- /dev/null
+++ b/examples/flexjs/MobileStocks/src/VerticalLayoutTextView.mxml
@@ -0,0 +1,68 @@
+<?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.
+
+-->
+<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ >
+
+ <fx:Style>
+ @namespace js "library://ns.apache.org/flexjs/basic";
+ @namespace views "views.*";
+
+ .TopContainer {
+ background-color: #FFFFCC;
+ }
+
+ .MidContainer {
+ background-color: #FFCCFF;
+ }
+
+ .BotContainer {
+ background-color: #CCFFFF;
+ }
+
+ </fx:Style>
+
+ <fx:Script>
+ <![CDATA[
+
+ ]]>
+ </fx:Script>
+
+ <js:beads>
+ <js:ViewDataBinding />
+ </js:beads>
+
+ <js:VContainer width="100%" height="100%">
+
+ <js:Container width="100%" height="25%" className="TopContainer">
+ <js:Label text="Top Container: 25%" />
+ </js:Container>
+
+ <js:Container width="100%" height="50%" className="MidContainer">
+ <js:Label text="Middle Container: 50%" />
+ </js:Container>
+
+ <js:Container width="100%" height="25%" className="BotContainer">
+ <js:Label text="Bottom Container: 25%" />
+ </js:Container>
+
+ </js:VContainer>
+
+</js:View>
[27/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Merge
branch 'develop' into refactor-sprite
Posted by yi...@apache.org.
Merge branch 'develop' into refactor-sprite
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fe03efdf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fe03efdf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fe03efdf
Branch: refs/heads/refactor-sprite
Commit: fe03efdf641828d1bd37eeb93d26dd513f02dd95
Parents: e45f836 fbc7d5c
Author: yishayw <yi...@hotmail.com>
Authored: Thu Oct 13 10:16:50 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Oct 13 10:16:50 2016 +0300
----------------------------------------------------------------------
LICENSE | 22 +-
.../src/main/assembly/component-air.xml | 1 +
.../DataGridExample/src/MyInitialView.mxml | 7 +-
examples/flexjs/MobileStocks/pom.xml | 18 +-
.../flexjs/MobileStocks/src/MobileStocks.mxml | 68 +++---
.../src/StockDataJSONItemConverter.as | 11 +-
.../src/VerticalLayoutTextView.mxml | 68 ++++++
.../MobileStocks/src/models/ProductsModel.as | 1 +
.../MobileStocks/src/views/LaunchView.mxml | 68 ++++--
.../MobileStocks/src/views/WatchListView.mxml | 41 +---
examples/flexjs/pom.xml | 1 +
.../flex/binding/ApplicationDataBinding.as | 8 +-
.../apache/flex/binding/ContainerDataBinding.as | 8 +-
.../flex/binding/MXMLBeadViewDataBinding.as | 8 +-
.../org/apache/flex/binding/PropertyWatcher.as | 16 +-
.../org/apache/flex/binding/ViewDataBinding.as | 4 +-
.../flex/charts/beads/layouts/BarChartLayout.as | 6 +-
.../beads/layouts/BarChartLayoutForArrayList.as | 10 +-
.../flex/charts/core/IChartItemRenderer.as | 10 +
.../charts/supportClasses/BoxItemRenderer.as | 2 +
.../projects/HTML/src/main/flex/HTMLClasses.as | 4 +
.../org/apache/flex/html/beads/DataGridView.as | 107 ++++-----
.../apache/flex/html/beads/DateChooserView.as | 61 ++++-
.../controllers/DateFieldMouseController.as | 3 +-
.../flex/html/beads/layouts/DataGridLayout.as | 116 +++++++---
.../beads/layouts/DataGridPercentageLayout.as | 224 +++++++++++++++++++
.../flex/html/beads/layouts/IDataGridLayout.as | 52 +++++
.../HTML/src/main/resources/basic-manifest.xml | 2 +
.../HTML/src/main/resources/defaults.css | 1 +
.../main/flex/org/apache/cordova/Application.as | 1 +
.../apache/flex/mobile/beads/DeviceSizeBead.as | 105 +++++++++
.../src/main/resources/basic-manifest.xml | 1 +
.../DataBindingTestbed/src/MyInitialView.mxml | 19 ++
.../bindables/BindableWithConstructorInit.as | 46 ++++
.../observedbugs/ObservedBugTests.as | 23 +-
pom.xml | 2 +
.../custom-html-template/pom.xml | 1 +
37 files changed, 914 insertions(+), 232 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe03efdf/frameworks/projects/HTML/src/main/flex/HTMLClasses.as
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe03efdf/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fe03efdf/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
[08/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Change
MIT license text to be more readable
Posted by yi...@apache.org.
Change MIT license text to be more readable
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a42e69e7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a42e69e7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a42e69e7
Branch: refs/heads/refactor-sprite
Commit: a42e69e7448232fb8316b9081faea7151b889512
Parents: a3ba4df
Author: Justin Mclean <jm...@apache.org>
Authored: Sat Oct 8 12:43:10 2016 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Sat Oct 8 12:43:10 2016 +1100
----------------------------------------------------------------------
LICENSE | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a42e69e7/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 9966a39..1918f0c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -232,8 +232,20 @@ MIT License.
Copyright (c) 2013-2016 Joshua Granick and other OpenFL contributors
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
[07/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
Updates for Mobile project.
Posted by yi...@apache.org.
Updates for Mobile project.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a3ba4dfd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a3ba4dfd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a3ba4dfd
Branch: refs/heads/refactor-sprite
Commit: a3ba4dfdafa21bfb035637fc21c239375a7873cd
Parents: d03463c
Author: Peter Ent <pe...@apache.org>
Authored: Fri Oct 7 13:39:49 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Fri Oct 7 13:39:49 2016 -0400
----------------------------------------------------------------------
.../projects/Mobile/src/main/flex/org/apache/cordova/Application.as | 1 +
frameworks/projects/Mobile/src/main/resources/basic-manifest.xml | 1 +
2 files changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3ba4dfd/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
index 59acda8..2564637 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
@@ -37,6 +37,7 @@ package org.apache.cordova
* "inject_html" tag as follows:
*
* <inject_html>
+ * <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
* <script type="text/javascript" src="cordova.js"></script>
* </inject_html>
*/
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3ba4dfd/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
index 4264191..e0f523d 100644
--- a/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
@@ -28,4 +28,5 @@
<component id="TabBar" class="org.apache.flex.mobile.chrome.TabBar" />
<component id="ToggleSwitch" class="org.apache.flex.mobile.ToggleSwitch" />
<component id="DatePicker" class="org.apache.flex.mobile.DatePicker" />
+ <component id="DeviceSizeBead" class="org.apache.flex.mobile.beads.DeviceSizeBead" />
</componentPackage>
[15/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Fixed
bug in DataChooserView which was causing problems on the SWF side due to
missing/incomplete handling of background and border styles.
Posted by yi...@apache.org.
Fixed bug in DataChooserView which was causing problems on the SWF side due to missing/incomplete handling of background and border styles.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5ee2995a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5ee2995a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5ee2995a
Branch: refs/heads/refactor-sprite
Commit: 5ee2995aec843972154490460a563473024084f6
Parents: 93797c2
Author: Peter Ent <pe...@apache.org>
Authored: Mon Oct 10 11:37:03 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Mon Oct 10 11:37:03 2016 -0400
----------------------------------------------------------------------
.../apache/flex/html/beads/DateChooserView.as | 61 ++++++++++++++++----
1 file changed, 50 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5ee2995a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index 0af846a..96f5019 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -18,11 +18,7 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.flex.html.beads
{
- import org.apache.flex.html.beads.models.DateChooserModel;
- import org.apache.flex.html.supportClasses.DateChooserButton;
- import org.apache.flex.html.supportClasses.DateHeaderButton;
-
- import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.BeadViewBase;
import org.apache.flex.core.IBead;
import org.apache.flex.core.IBeadModel;
import org.apache.flex.core.IBeadView;
@@ -31,9 +27,12 @@ package org.apache.flex.html.beads
import org.apache.flex.core.ValuesManager;
import org.apache.flex.events.Event;
import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.html.beads.layouts.TileLayout;
import org.apache.flex.html.Container;
import org.apache.flex.html.TextButton;
+ import org.apache.flex.html.beads.layouts.TileLayout;
+ import org.apache.flex.html.beads.models.DateChooserModel;
+ import org.apache.flex.html.supportClasses.DateChooserButton;
+ import org.apache.flex.html.supportClasses.DateHeaderButton;
/**
* The DateChooserView class is a view bead for the DateChooser. This class
@@ -54,6 +53,8 @@ package org.apache.flex.html.beads
public function DateChooserView()
{
}
+
+ private var _strand:IStrand;
/**
* @copy org.apache.flex.core.IBead#strand
@@ -66,11 +67,7 @@ package org.apache.flex.html.beads
override public function set strand(value:IStrand):void
{
super.strand = value;
-
- COMPILE::SWF {
- value.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBackgroundBead")) as IBead);
- value.addBead(new (ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead);
- }
+ _strand = value;
// make sure there is a model.
model = _strand.getBeadByType(IBeadModel) as DateChooserModel;
@@ -153,6 +150,10 @@ package org.apache.flex.html.beads
dayContainer.y = monthLabel.y + monthLabel.height + 5;
dayContainer.width = sw;
dayContainer.height = sh - (monthLabel.height+5);
+
+ COMPILE::SWF {
+ displayBackgroundAndBorder(_strand as UIBase);
+ }
IEventDispatcher(_strand).dispatchEvent( new Event("layoutNeeded") );
IEventDispatcher(dayContainer).dispatchEvent( new Event("layoutNeeded") );
@@ -287,5 +288,43 @@ package org.apache.flex.html.beads
{
updateCalendar();
}
+
+ COMPILE::SWF
+ /**
+ * @private
+ */
+ protected function displayBackgroundAndBorder(host:UIBase) : void
+ {
+ var backgroundColor:Object = ValuesManager.valuesImpl.getValue(host, "background-color");
+ var backgroundImage:Object = ValuesManager.valuesImpl.getValue(host, "background-image");
+ if (backgroundColor != null || backgroundImage != null)
+ {
+ if (host.getBeadByType(IBackgroundBead) == null)
+ var c:Class = ValuesManager.valuesImpl.getValue(host, "iBackgroundBead");
+ if (c) {
+ host.addBead( new c() as IBead );
+ }
+ }
+
+ var borderStyle:String;
+ var borderStyles:Object = ValuesManager.valuesImpl.getValue(host, "border");
+ if (borderStyles is Array)
+ {
+ borderStyle = borderStyles[1];
+ }
+ if (borderStyle == null)
+ {
+ borderStyle = ValuesManager.valuesImpl.getValue(host, "border-style") as String;
+ }
+ if (borderStyle != null && borderStyle != "none")
+ {
+ if (host.getBeadByType(IBorderBead) == null) {
+ c = ValuesManager.valuesImpl.getValue(host, "iBorderBead");
+ if (c) {
+ host.addBead( new c() as IBead );
+ }
+ }
+ }
+ }
}
}