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 2014/10/02 21:58:57 UTC
[1/8] git commit: [flex-asjs] [refs/heads/develop] - add
IMXMLDocument interface
Repository: flex-asjs
Updated Branches:
refs/heads/develop e5b1ae790 -> 36f1ce4ca
add IMXMLDocument interface
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/95473095
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/95473095
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/95473095
Branch: refs/heads/develop
Commit: 95473095cfda88a683a1df17dc8003487400cd73
Parents: c1bd651
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:41:53 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:44 2014 -0700
----------------------------------------------------------------------
.../src/org/apache/flex/core/ContainerBase.as | 8 +--
.../src/org/apache/flex/core/IMXMLDocument.as | 53 ++++++++++++++++++++
2 files changed, 58 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/95473095/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
index d83a601..3e14705 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/ContainerBase.as
@@ -20,7 +20,8 @@ package org.apache.flex.core
{
import mx.states.State;
- import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.core.IMXMLDocument;
+ import org.apache.flex.core.ValuesManager;
import org.apache.flex.events.Event;
import org.apache.flex.events.ValueChangeEvent;
import org.apache.flex.utils.MXMLDataInterpreter;
@@ -71,7 +72,7 @@ package org.apache.flex.core
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- public class ContainerBase extends UIBase
+ public class ContainerBase extends UIBase implements IMXMLDocument
{
/**
* Constructor.
@@ -204,6 +205,7 @@ package org.apache.flex.core
private var _currentState:String;
+ [Bindable("currentStateChange")]
/**
* The name of the current state.
*
@@ -222,7 +224,7 @@ package org.apache.flex.core
*/
public function set currentState(value:String):void
{
- var event:ValueChangeEvent = new ValueChangeEvent("currentStateChanged", false, false, _currentState, value)
+ var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
dispatchEvent(event);
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/95473095/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IMXMLDocument.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IMXMLDocument.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IMXMLDocument.as
new file mode 100644
index 0000000..d9e0edd
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IMXMLDocument.as
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.core
+{
+ /**
+ * The IMXMLDocument interface is an interface for a component that
+ * supports being written in MXML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IMXMLDocument
+ {
+ /**
+ * @copy org.apache.flex.core.Application#MXMLDescriptor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get MXMLDescriptor():Array;
+
+ /**
+ * @copy org.apache.flex.core.Application#generateMXMLAttributes()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function generateMXMLAttributes(data:Array):void
+
+ }
+}
\ No newline at end of file
[8/8] git commit: [flex-asjs] [refs/heads/develop] - add more change
events, and tweak names of a few events
Posted by ah...@apache.org.
add more change events, and tweak names of a few events
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/36f1ce4c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/36f1ce4c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/36f1ce4c
Branch: refs/heads/develop
Commit: 36f1ce4ca764740bf638be05e22f986c10a8bb59
Parents: 337d223
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:58:30 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:47 2014 -0700
----------------------------------------------------------------------
.../FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as | 3 ++-
.../FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as | 2 +-
.../as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as | 2 ++
.../as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as | 1 +
.../as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as | 2 ++
.../projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as | 3 ++-
6 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
index 1a63cac..5d5921c 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/MXMLBeadViewBase.as
@@ -193,6 +193,7 @@ package org.apache.flex.core
private var _currentState:String;
+ [Bindable("currentStateChange")]
/**
* The name of the current state.
*
@@ -211,7 +212,7 @@ package org.apache.flex.core
*/
public function set currentState(value:String):void
{
- var event:ValueChangeEvent = new ValueChangeEvent("currentStateChanged", false, false, _currentState, value)
+ var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
dispatchEvent(event);
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as
index 1f5dd4d..e878440 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/SimpleStatesImpl.as
@@ -69,7 +69,7 @@ package org.apache.flex.core
public function set strand(value:IStrand):void
{
_strand = value;
- IEventDispatcher(_strand).addEventListener("currentStateChanged", stateChangeHandler);
+ IEventDispatcher(_strand).addEventListener("currentStateChange", stateChangeHandler);
}
private function stateChangeHandler(event:ValueChangeEvent):void
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
index 8965db8..de1816e 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIBase.as
@@ -213,6 +213,7 @@ package org.apache.flex.core
private var _width:Number;
+ [Bindable("widthChanged")]
[PercentProxy("percentWidth")]
/**
* The width of the component. If no width has been previously
@@ -274,6 +275,7 @@ package org.apache.flex.core
private var _height:Number;
+ [Bindable("heightChanged")]
[PercentProxy("percentHeight")]
/**
* The height of the component. If no height has been previously
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as
index 7fa5601..b718a95 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/CheckBox.as
@@ -86,6 +86,7 @@ package org.apache.flex.html
IToggleButtonModel(model).text = value;
}
+ [Bindable("change")]
/**
* <code>true</code> if the check mark is displayed.
*
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as
index 9c60f85..43b34ea 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/DropDownList.as
@@ -90,6 +90,7 @@ package org.apache.flex.html
ISelectionModel(model).dataProvider = value;
}
+ [Bindable("change")]
/**
* @copy org.apache.flex.core.ISelectionModel#selectedIndex
*
@@ -112,6 +113,7 @@ package org.apache.flex.html
}
+ [Bindable("change")]
/**
* @copy org.apache.flex.core.ISelectionModel#selectedItem
*
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36f1ce4c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as
index ef8de09..b7e6c13 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/NumericStepper.as
@@ -20,7 +20,7 @@ package org.apache.flex.html
{
import org.apache.flex.core.IRangeModel;
- [Event(name="valueChanged", type="org.apache.flex.events.Event")]
+ [Event(name="valueChange", type="org.apache.flex.events.Event")]
/**
* The NumericStepper class is a component that displays a numeric
@@ -51,6 +51,7 @@ package org.apache.flex.html
super();
}
+ [Bindable("valueChange")]
/**
* The current value of the control.
*
[7/8] git commit: [flex-asjs] [refs/heads/develop] - also create
fx:Declaration instances
Posted by ah...@apache.org.
also create fx:Declaration instances
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/337d223a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/337d223a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/337d223a
Branch: refs/heads/develop
Commit: 337d223af1cbd2cdf808b1fe118888b6913709e9
Parents: a327d20
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:58:06 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:47 2014 -0700
----------------------------------------------------------------------
.../as/projects/FlexJSUI/src/org/apache/flex/core/Application.as | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/337d223a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
index 215a883..ffc2c8c 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as
@@ -121,6 +121,8 @@ package org.apache.flex.core
private function initHandler(event:flash.events.Event):void
{
+ MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
+
dispatchEvent(new Event("initialize"));
if (initialView)
[6/8] git commit: [flex-asjs] [refs/heads/develop] - silence binding
warnings
Posted by ah...@apache.org.
silence binding warnings
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a327d20c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a327d20c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a327d20c
Branch: refs/heads/develop
Commit: a327d20c811da53510f4b584267192b27367fc07
Parents: c812e0d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:44:13 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:46 2014 -0700
----------------------------------------------------------------------
.../src/org/apache/flex/html/supportClasses/UIItemRendererBase.as | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a327d20c/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
index f0f9a89..1f491ab 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/UIItemRendererBase.as
@@ -113,6 +113,7 @@ package org.apache.flex.html.supportClasses
private var _data:Object;
+ [Bindable("__NoChangeEvent__")]
/**
* The data being represented by this itemRenderer. This can be something simple like a String or
* a Number or something very complex.
[3/8] git commit: [flex-asjs] [refs/heads/develop] - don't require
all objects to have id properties
Posted by ah...@apache.org.
don't require all objects to have id properties
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d4d2ae9a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d4d2ae9a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d4d2ae9a
Branch: refs/heads/develop
Commit: d4d2ae9a1c7bae98706d3a49db30db274f2516aa
Parents: 4a76018
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:43:01 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:45 2014 -0700
----------------------------------------------------------------------
.../src/org/apache/flex/utils/MXMLDataInterpreter.as | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d4d2ae9a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
index ec96f89..94b59d7 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -180,6 +180,16 @@ public class MXMLDataInterpreter
comp.document = document;
else if (name == "_id")
id = value as String; // and don't assign to comp
+ else if (name == "id")
+ {
+ // not all objects have to have their own id property
+ try {
+ comp["id"] = value;
+ } catch (e:Error)
+ {
+
+ }
+ }
else
comp[name] = value;
}
[2/8] git commit: [flex-asjs] [refs/heads/develop] - more beads
needed by FlexJSStore
Posted by ah...@apache.org.
more beads needed by FlexJSStore
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c1bd651d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c1bd651d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c1bd651d
Branch: refs/heads/develop
Commit: c1bd651d7f776e28b3c25449c4f1e1279fe365e0
Parents: e5b1ae7
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:40:45 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:44 2014 -0700
----------------------------------------------------------------------
.../as/projects/FlexJSJX/basic-manifest.xml | 2 +
.../as/projects/FlexJSJX/src/FlexJSJXClasses.as | 1 +
.../org/apache/flex/core/ParentDocumentBead.as | 121 ++++++++++++
.../src/org/apache/flex/effects/Resize.as | 191 +++++++++++++++++++
4 files changed, 315 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1bd651d/frameworks/as/projects/FlexJSJX/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/basic-manifest.xml b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
index eebea31..ae2109e 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -54,6 +54,7 @@
<component id="Fade" class="org.apache.flex.effects.Fade"/>
<component id="Move" class="org.apache.flex.effects.Move"/>
+ <component id="Resize" class="org.apache.flex.effects.Resize"/>
<component id="Wipe" class="org.apache.flex.effects.Wipe"/>
<component id="Sequence" class="org.apache.flex.effects.Sequence"/>
<component id="Parallel" class="org.apache.flex.effects.Parallel"/>
@@ -66,5 +67,6 @@
<component id="MXMLBeadViewBaseDataBinding" class="org.apache.flex.core.MXMLBeadViewBaseDataBinding"/>
<component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier"/>
<component id="ImageButton" class="org.apache.flex.html.ImageButton"/>
+ <component id="ParentDocumentBead" class="org.apache.flex.core.ParentDocumentBead"/>
</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1bd651d/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
index d103772..5e10ded 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -72,6 +72,7 @@ internal class FlexJSJXClasses
import org.apache.flex.html.beads.TitleBarView; TitleBarView;
import org.apache.flex.html.beads.TitleBarMeasurementBead; TitleBarMeasurementBead;
+ import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
}
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1bd651d/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as
new file mode 100644
index 0000000..8fb623e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.core
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.core.IMXMLDocument;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+
+ /**
+ * The ParentDocumentBead class looks up the parent
+ * chain to find a parent that was written in MXML.
+ * Because it is usually rare for an application
+ * to need to know this information, an optional bead
+ * is used to compute it, instead of baking in the
+ * overhead of a recursive infrastucture to store
+ * this information. It is intended to be used
+ * as a bead in the top-level tag of an MXML document.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ParentDocumentBead extends EventDispatcher implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ParentDocumentBead()
+ {
+ super();
+ }
+
+ 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;
+
+ //TODO (aharui) watch for re-parenting
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new org.apache.flex.events.Event("idChanged"));
+ }
+ }
+
+ [Bindable("parentDocumentChange")]
+ public function get parentDocument():Object
+ {
+ var child:IChild = _strand as IChild;
+ child = child.parent as IChild;
+ while (child)
+ {
+ if (child is IMXMLDocument)
+ {
+ var doc:IMXMLDocument = child as IMXMLDocument;
+ if (doc.MXMLDescriptor != null)
+ return doc;
+ }
+ child = child.parent as IChild;
+ }
+ return null;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c1bd651d/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
new file mode 100644
index 0000000..298dc39
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Resize.as
@@ -0,0 +1,191 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+
+/**
+ * The Resize effect animates a UI component's width or height.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Resize extends Tween implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param target Object ID or reference to an object that will
+ * have its x and/or y property animated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Resize(target:IUIBase = null)
+ {
+ super();
+
+ this.target = target;
+ startValue = 0;
+ endValue = 1;
+
+ listener = this;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var target:IUIBase;
+
+ /**
+ * The change in width.
+ */
+ public var widthBy:Number;
+
+ /**
+ * The change in height.
+ */
+ public var heightBy:Number;
+
+ /**
+ * @private
+ * The starting width.
+ */
+ private var widthStart:Number;
+
+ /**
+ * @private
+ * The starting height.
+ */
+ private var heightStart:Number;
+
+ /**
+ * Starting width value. If NaN, the current width value is used
+ */
+ public var widthFrom:Number;
+
+ /**
+ * Starting height value. If NaN, the current height value is used
+ */
+ public var heightFrom:Number;
+
+ /**
+ * Ending width value.
+ */
+ public var widthTo:Number;
+
+ /**
+ * Ending height value.
+ */
+ public var heightTo:Number;
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ if (target is String)
+ target = document[target];
+
+ if (isNaN(widthFrom))
+ widthStart = target.width;
+ if (isNaN(widthBy))
+ {
+ if (isNaN(widthTo))
+ widthBy = 0;
+ else
+ widthBy = widthTo - widthStart;
+ }
+
+ if (isNaN(heightFrom))
+ heightStart = target.height;
+ if (isNaN(heightBy))
+ {
+ if (isNaN(heightTo))
+ heightBy = 0;
+ else
+ heightBy = heightTo - heightStart;
+ }
+ super.play();
+ }
+
+ public function onTweenUpdate(value:Number):void
+ {
+ if (widthBy)
+ target.width = widthStart + value * widthBy;
+ if (heightBy)
+ target.height = heightStart + value * heightBy;
+ }
+
+ public function onTweenEnd(value:Number):void
+ {
+ if (widthBy)
+ target.width = widthStart + widthBy;
+ if (heightBy)
+ target.height = heightStart + heightBy;
+ }
+}
+
+}
[5/8] git commit: [flex-asjs] [refs/heads/develop] - add length prop
Posted by ah...@apache.org.
add length prop
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c812e0d9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c812e0d9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c812e0d9
Branch: refs/heads/develop
Commit: c812e0d9912f00ed1237bc35d08ddd3080ce9500
Parents: d4d2ae9
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:43:53 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:46 2014 -0700
----------------------------------------------------------------------
.../apache/flex/net/dataConverters/LazyCollection.as | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c812e0d9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/dataConverters/LazyCollection.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/dataConverters/LazyCollection.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/dataConverters/LazyCollection.as
index 8a2cb3b..572b2a0 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/dataConverters/LazyCollection.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/net/dataConverters/LazyCollection.as
@@ -216,5 +216,19 @@ package org.apache.flex.net.dataConverters
}
return data[index];
}
+
+ /**
+ * The number of items.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get length():int
+ {
+ return rawData ? rawData.length : 0;
+ }
+
}
}
\ No newline at end of file
[4/8] git commit: [flex-asjs] [refs/heads/develop] - add margin styles
Posted by ah...@apache.org.
add margin 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/4a760182
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4a760182
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4a760182
Branch: refs/heads/develop
Commit: 4a760182ae1e768be771a70bc85f36af9d70cb2d
Parents: 9547309
Author: Alex Harui <ah...@apache.org>
Authored: Thu Oct 2 12:42:16 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Oct 2 12:58:45 2014 -0700
----------------------------------------------------------------------
.../FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4a760182/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
index f3add4d..3367bb5 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
@@ -81,6 +81,11 @@ package org.apache.flex.core
public var paddingRight:*;
public var paddingTop:*;
public var paddingBottom:*;
+ public var margin:*;
+ public var marginLeft:*;
+ public var marginRight:*;
+ public var marginTop:*;
+ public var marginBottom:*;
public var horizontalCenter:*;
public var verticalCenter:*;
public var horizontalAlign:*;