You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/12/12 08:31:23 UTC
[1/3] git commit: [flex-asjs] [refs/heads/core_js_to_as] - have
ViewBase also implement IStatesObject
Repository: flex-asjs
Updated Branches:
refs/heads/core_js_to_as 8a3755f29 -> 20e764d25
have ViewBase also implement IStatesObject
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/018ff46d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/018ff46d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/018ff46d
Branch: refs/heads/core_js_to_as
Commit: 018ff46d42722be0cd0a952a1bb204b4e997db05
Parents: 8a3755f
Author: Alex Harui <ah...@apache.org>
Authored: Fri Dec 11 23:26:16 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Dec 11 23:26:16 2015 -0800
----------------------------------------------------------------------
.../org/apache/flex/core/IApplicationView.as | 2 +-
.../src/org/apache/flex/core/IStatesObject.as | 5 +
.../org/apache/flex/createjs/core/ViewBase.as | 121 +++++++++++++++++++
3 files changed, 127 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/018ff46d/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
index b011cd1..c4eab58 100755
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
@@ -27,7 +27,7 @@ package org.apache.flex.core
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- public interface IApplicationView extends IUIBase
+ public interface IApplicationView extends IUIBase, IStatesObject
{
/**
* The application model.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/018ff46d/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
index 2088e7b..52bcdb6 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
@@ -51,6 +51,11 @@ package org.apache.flex.core
* @productversion FlexJS 0.0
*/
function get currentState():String;
+
+ /**
+ * @private
+ */
+ function set currentState(value:String):void;
/**
* The array of view state transitions.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/018ff46d/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
index b210559..9fb19e8 100644
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
+++ b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
@@ -29,6 +29,15 @@ package org.apache.flex.createjs.core
import org.apache.flex.core.IUIBase;
import org.apache.flex.events.Event;
import org.apache.flex.utils.MXMLDataInterpreter;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStatesImpl;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.states.State;
+ }
COMPILE::AS3
public class ViewBase extends org.apache.flex.core.ViewBase
@@ -81,5 +90,117 @@ package org.apache.flex.createjs.core
dispatchEvent(new Event("modelChanged"));
}
+ private var _states:Array;
+
+ /**
+ * The array of view states. These should
+ * be instances of org.apache.flex.states.State.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get states():Array
+ {
+ return _states;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion Class
+ * @flexjsignorecoercion org.apache.flex.core.IBead
+ */
+ public function set states(value:Array):void
+ {
+ _states = value;
+ _currentState = _states[0].name;
+
+ try{
+ if (getBeadByType(IStatesImpl) == null)
+ {
+ var c:Class = ValuesManager.valuesImpl.getValue(this, "iStatesImpl") as Class;
+ var b:Object = new c();
+ addBead(b as IBead);
+ }
+ }
+ //TODO: Need to handle this case more gracefully
+ catch(e:Error)
+ {
+ }
+
+ }
+
+ /**
+ * <code>true</code> if the array of states
+ * contains a state with this name.
+ *
+ * @param state The state namem.
+ * @return True if state in state array
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function hasState(state:String):Boolean
+ {
+ for each (var s:State in _states)
+ {
+ if (s.name == state)
+ return true;
+ }
+ return false;
+ }
+
+ private var _currentState:String;
+
+ [Bindable("currentStateChange")]
+ /**
+ * The name of the current state.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get currentState():String
+ {
+ return _currentState;
+ }
+
+ /**
+ * @private
+ */
+ public function set currentState(value:String):void
+ {
+ var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
+ _currentState = value;
+ dispatchEvent(event);
+ }
+
+ private var _transitions:Array;
+
+ /**
+ * The array of transitions.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get transitions():Array
+ {
+ return _transitions;
+ }
+
+ /**
+ * @private
+ */
+ public function set transitions(value:Array):void
+ {
+ _transitions = value;
+ }
+
}
}
[2/3] git commit: [flex-asjs] [refs/heads/core_js_to_as] - fix up
FlexJSStore_jquery
Posted by ah...@apache.org.
fix up FlexJSStore_jquery
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b1f78ddf
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b1f78ddf
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b1f78ddf
Branch: refs/heads/core_js_to_as
Commit: b1f78ddfb31104aa34309c627a265b2a16df2398
Parents: 018ff46
Author: Alex Harui <ah...@apache.org>
Authored: Fri Dec 11 23:26:29 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Dec 11 23:26:29 2015 -0800
----------------------------------------------------------------------
.../src/productsView/ProductCatalogThumbnail.mxml | 6 +++---
.../FlexJSStore_jquery/src/productsView/ProductDetails.mxml | 6 +++---
.../FlexJSStore_jquery/src/productsView/ProductListItem.mxml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b1f78ddf/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
index dec248f..1d8ce8f 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductCatalogThumbnail.mxml
@@ -183,21 +183,21 @@ limitations under the License.
<js:style>
<js:SimpleCSSStyles paddingRight="8" right="8" top="12" /> <!-- gap="4" -->
</js:style>
- <js:ImageButton id="purchase" backgroundImage="assets/button_cart_empty.png" className="hoverButton"
+ <js:ImageButton id="purchase" source="assets/button_cart_empty.png" className="hoverButton"
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))"
width="30">
<js:beads>
<js:ToolTipBead toolTip="Add to cart"/>
</js:beads>
</js:ImageButton>
- <js:ImageButton id="compare" backgroundImage="assets/button_compare.png" className="hoverButton"
+ <js:ImageButton id="compare" source="assets/button_compare.png" className="hoverButton"
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))"
width="30">
<js:beads>
<js:ToolTipBead toolTip="Add to compare list"/>
</js:beads>
</js:ImageButton>
- <js:ImageButton id="details" backgroundImage="assets/button_details.png" className="hoverButton"
+ <js:ImageButton id="details" source="assets/button_details.png" className="hoverButton"
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.DETAILS, product))"
width="30">
<js:beads>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b1f78ddf/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductDetails.mxml b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
index f0162ad..fa32497 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductDetails.mxml
@@ -125,17 +125,17 @@ limitations under the License.
<js:SimpleCSSStyles marginTop="4" right="16" top="36" />
</js:style>
<js:Spacer width="100%"/>
- <js:ImageButton id="purchase" backgroundImage="assets/button_cart_empty.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))" width="30">
+ <js:ImageButton id="purchase" source="assets/button_cart_empty.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))" width="30">
<js:beads>
<js:ToolTipBead toolTip="Add to cart"/>
</js:beads>
</js:ImageButton>
- <js:ImageButton id="compare" backgroundImage="assets/button_compare.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))" width="30">
+ <js:ImageButton id="compare" source="assets/button_compare.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))" width="30">
<js:beads>
<js:ToolTipBead toolTip="Add to compare list"/>
</js:beads>
</js:ImageButton>
- <js:ImageButton id="tiles" backgroundImage="assets/button_tiles.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.BROWSE, product));" width="30">
+ <js:ImageButton id="tiles" source="assets/button_tiles.png" click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.BROWSE, product));" width="30">
<js:beads>
<js:ToolTipBead toolTip="Back to thumbnail view"/>
</js:beads>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b1f78ddf/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductListItem.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductListItem.mxml b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductListItem.mxml
index 0a83e1a..2864cca 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductListItem.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/productsView/ProductListItem.mxml
@@ -99,7 +99,7 @@ limitations under the License.
<js:ContainerDataBinding />
</js:beads>
- <js:ImageButton id="removeButton" backgroundImage="assets/trashcan.png"
+ <js:ImageButton id="removeButton" source="assets/trashcan.png"
width="14" height="14" y="5"
click="removeItem()">
<js:beads>
[3/3] git commit: [flex-asjs] [refs/heads/core_js_to_as] - forgot
about svg textbutton
Posted by ah...@apache.org.
forgot about svg textbutton
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/20e764d2
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/20e764d2
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/20e764d2
Branch: refs/heads/core_js_to_as
Commit: 20e764d251772ded2d6ccf90bb6765f12883df1b
Parents: b1f78dd
Author: Alex Harui <ah...@apache.org>
Authored: Fri Dec 11 23:31:09 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Dec 11 23:31:09 2015 -0800
----------------------------------------------------------------------
frameworks/projects/HTML/compile-asjs-config.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/20e764d2/frameworks/projects/HTML/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/compile-asjs-config.xml b/frameworks/projects/HTML/compile-asjs-config.xml
index 32f4278..2139379 100644
--- a/frameworks/projects/HTML/compile-asjs-config.xml
+++ b/frameworks/projects/HTML/compile-asjs-config.xml
@@ -81,6 +81,7 @@
<include-namespaces>
<uri>library://ns.apache.org/flexjs/basic</uri>
+ <uri>library://ns.apache.org/flexjs/svg</uri>
</include-namespaces>
<target-player>${playerglobal.version}</target-player>