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/11/11 23:08:17 UTC
[01/28] git commit: [flex-asjs] [refs/heads/develop] - need to
override clone and present a different method to be overridden without
creating a dependency on flash classes
Repository: flex-asjs
Updated Branches:
refs/heads/develop fd7c5259e -> 5909203b0
need to override clone and present a different method to be overridden without creating a dependency on flash classes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1a729c1f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1a729c1f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1a729c1f
Branch: refs/heads/develop
Commit: 1a729c1f6969a28bcea5339f98f36208fe78de19
Parents: 47499e2
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:20:14 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:56 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/events/Event.as | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1a729c1f/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
index 764240e..53a6f41 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/Event.as
@@ -53,5 +53,26 @@ package org.apache.flex.events
{
super(type, bubbles, cancelable);
}
+
+ /**
+ * @private
+ */
+ override public function clone():flash.events.Event
+ {
+ return cloneEvent();
+ }
+
+ /**
+ * Create a copy/clone of the Event object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function cloneEvent():org.apache.flex.events.Event
+ {
+ return new org.apache.flex.events.Event(type, bubbles, cancelable);
+ }
}
}
\ No newline at end of file
[15/28] git commit: [flex-asjs] [refs/heads/develop] - try out new
annotations to optimize JS cross-compile
Posted by ah...@apache.org.
try out new annotations to optimize JS cross-compile
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b8472d62
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b8472d62
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b8472d62
Branch: refs/heads/develop
Commit: b8472d6246305a313afcc655daabcf4407cffd56
Parents: d5585b6
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:07:00 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:58 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/core/ParentDocumentBead.as | 6 ++++++
.../org/apache/flex/core/StatesWithTransitionsImpl.as | 14 ++++++++++++++
2 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b8472d62/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
index 8fb623e..77c0c4c 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/ParentDocumentBead.as
@@ -35,6 +35,8 @@ package org.apache.flex.core
* this information. It is intended to be used
* as a bead in the top-level tag of an MXML document.
*
+ * @flexjsignoreimport org.apache.flex.core.IChild
+ *
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
@@ -100,6 +102,10 @@ package org.apache.flex.core
}
[Bindable("parentDocumentChange")]
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IChild
+ */
public function get parentDocument():Object
{
var child:IChild = _strand as IChild;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b8472d62/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
index ccf5e0d..0a7289a 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/StatesWithTransitionsImpl.as
@@ -40,6 +40,8 @@ package org.apache.flex.core
* It only supports AddItems and SetProperty and SetEventHandler
* changes at this time.
*
+ * @flexjsignoreimport org.apache.flex.core.IStatesObject
+ *
* @langversion 3.0
* @playerversion Flash 10.2
* @playerversion AIR 2.6
@@ -79,6 +81,10 @@ package org.apache.flex.core
IEventDispatcher(_strand).addEventListener("initComplete", initialStateHandler);
}
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
private function initialStateHandler(event:org.apache.flex.events.Event):void
{
sawInitComplete = true;
@@ -86,6 +92,10 @@ package org.apache.flex.core
IStatesObject(_strand).currentState));
}
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
private function stateChangeHandler(event:ValueChangeEvent):void
{
if (!sawInitComplete)
@@ -151,6 +161,10 @@ package org.apache.flex.core
private var transitionEffects:Array;
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
private function effectEndHandler(event:Event):void
{
var n:int = transitionEffects.length;
[05/28] git commit: [flex-asjs] [refs/heads/develop] - add rect to swc
Posted by ah...@apache.org.
add rect to swc
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/91144ace
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/91144ace
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/91144ace
Branch: refs/heads/develop
Commit: 91144ace118feee263944af6e5d7650d897f28dc
Parents: 3edc1ac
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 3 15:14:08 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:56 2014 -0800
----------------------------------------------------------------------
frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/91144ace/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 481e149..8b42a0d 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -132,6 +132,7 @@ internal class FlexJSUIClasses
import org.apache.flex.core.DropType; DropType;
import org.apache.flex.core.DataBindingBase; DataBindingBase;
import org.apache.flex.effects.PlatformWiper; PlatformWiper;
+ import org.apache.flex.geom.Rectangle; Rectangle;
import mx.core.ClassFactory; ClassFactory;
import mx.states.AddItems; AddItems;
[23/28] git commit: [flex-asjs] [refs/heads/develop] - one last lint
error
Posted by ah...@apache.org.
one last lint 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/5909203b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5909203b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5909203b
Branch: refs/heads/develop
Commit: 5909203b0053dfe4962d47486dd5712a582e1c3f
Parents: 437efb2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Nov 11 14:07:47 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5909203b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index 9022862..1e5e701 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -81,9 +81,9 @@ org.apache.flex.core.SimpleStatesImpl.prototype.set_strand =
*/
org.apache.flex.core.SimpleStatesImpl.prototype.initialStateHandler_ =
function(event) {
- /**
- * @type {Object}
- **/
+ /**
+ * @type {Object}
+ **/
var host = this.strand_;
this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChanged', null,
host.get_currentState()));
[02/28] git commit: [flex-asjs] [refs/heads/develop] - move
Transition to FlexJSJX
Posted by ah...@apache.org.
move Transition to FlexJSJX
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/47499e29
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/47499e29
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/47499e29
Branch: refs/heads/develop
Commit: 47499e292727cef8f81e4d9fa111872ee0eb2523
Parents: d53b719
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 3 16:40:31 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:56 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSJX/basic-manifest.xml | 3 +-
.../src/org/apache/flex/states/Transition.as | 80 ++++++++++++++++++++
.../as/projects/FlexJSUI/basic-manifest.xml | 1 -
.../src/org/apache/flex/states/Transition.as | 80 --------------------
4 files changed, 82 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/47499e29/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 99d855f..a1946dc 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -63,7 +63,8 @@
<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"/>
-
+ <component id="Transition" class="org.apache.flex.states.Transition" />
+
<component id="NumberFormatter" class="org.apache.flex.html.accessories.NumberFormatter"/>
<component id="CurrencyFormatter" class="org.apache.flex.html.accessories.CurrencyFormatter"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/47499e29/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
new file mode 100644
index 0000000..3469417
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/states/Transition.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.states
+{
+
+ [DefaultProperty("effects")]
+
+ /**
+ * The Transition class holds information describing what to do when
+ * changing from one state to another.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Transition
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Transition()
+ {
+ super();
+ }
+
+ /**
+ * The state or states from which the view is leaving.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var fromState:String;
+
+ /**
+ * The state or states to which the view is going.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var toState:String;
+
+
+ /**
+ * The list of effects to play
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var effects:Array;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/47499e29/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index f22dcdb..5853b20 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -86,7 +86,6 @@
<component id="PasswordInputBead" class="org.apache.flex.html.accessories.PasswordInputBead" />
<component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead" />
<component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
- <component id="Transition" class="org.apache.flex.states.Transition" />
<component id="HRule" class="org.apache.flex.html.HRule" />
<component id="Spacer" class="org.apache.flex.html.Spacer" />
<component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" />
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/47499e29/frameworks/as/projects/FlexJSUI/src/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/states/Transition.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/states/Transition.as
deleted file mode 100644
index 3469417..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/states/Transition.as
+++ /dev/null
@@ -1,80 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.states
-{
-
- [DefaultProperty("effects")]
-
- /**
- * The Transition class holds information describing what to do when
- * changing from one state to another.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Transition
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Transition()
- {
- super();
- }
-
- /**
- * The state or states from which the view is leaving.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var fromState:String;
-
- /**
- * The state or states to which the view is going.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var toState:String;
-
-
- /**
- * The list of effects to play
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var effects:Array;
-
- }
-}
[24/28] git commit: [flex-asjs] [refs/heads/develop] - fix up
state-dependent deferred instantiation (phase 1). Phase 2, shared-instances,
due next
Posted by ah...@apache.org.
fix up state-dependent deferred instantiation (phase 1). Phase 2, shared-instances, due next
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/437efb2f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/437efb2f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/437efb2f
Branch: refs/heads/develop
Commit: 437efb2f4fcda96cdf38f3ff694f713bd159759c
Parents: 0470384
Author: Alex Harui <ah...@apache.org>
Authored: Tue Nov 11 12:58:46 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
frameworks/js/FlexJS/src/mx/states/AddItems.js | 12 ++++++------
.../FlexJS/src/org/apache/flex/core/ContainerBase.js | 7 +++++++
.../src/org/apache/flex/core/SimpleStatesImpl.js | 14 +++++++++-----
3 files changed, 22 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/mx/states/AddItems.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/mx/states/AddItems.js b/frameworks/js/FlexJS/src/mx/states/AddItems.js
index a8bac93..bcc84f8 100644
--- a/frameworks/js/FlexJS/src/mx/states/AddItems.js
+++ b/frameworks/js/FlexJS/src/mx/states/AddItems.js
@@ -44,15 +44,15 @@ mx.states.AddItems.prototype.FLEXJS_CLASS_INFO =
mx.states.AddItems.prototype.setDocument = function(document, opt_id) {
opt_id = typeof opt_id !== 'undefined' ? opt_id : null;
this.document = document;
- var data = document.mxmlsd[itemsDescriptorIndex];
+ var data = document['mxmlsd'][this.itemsDescriptorIndex];
if (typeof(data.slice) == 'function') {
- itemsDescriptor = {};
- itemsDescriptor.descriptor = data;
+ this.itemsDescriptor = {};
+ this.itemsDescriptor.descriptor = data;
// replace the entry in the document so subsequent
// addItems know it is shared
- document.mxmlsd[itemsDescriptorIndex] = itemsDescriptor;
+ this.document['mxmlsd'][this.itemsDescriptorIndex] = this.itemsDescriptor;
} else
- itemsDescriptor = data;
+ this.itemsDescriptor = data;
};
@@ -80,7 +80,7 @@ mx.states.AddItems.prototype.itemsDescriptorIndex = -1;
/**
* @expose
- * @type {Array} itemsDescriptor The descriptors for items.
+ * @type {Object} itemsDescriptor The descriptors for items.
*/
mx.states.AddItems.prototype.itemsDescriptor = null;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
index 5df912a..50212ac 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ContainerBase.js
@@ -44,6 +44,13 @@ org.apache.flex.core.ContainerBase.prototype.mxmlDescriptor = null;
/**
+ * @expose
+ * @type {Array}
+ */
+org.apache.flex.core.ContainerBase.prototype.mxmlsd = null;
+
+
+/**
* Metadata
*
* @type {Object.<string, Array.<Object>>}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/437efb2f/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index b5bd91f..9022862 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -81,8 +81,12 @@ org.apache.flex.core.SimpleStatesImpl.prototype.set_strand =
*/
org.apache.flex.core.SimpleStatesImpl.prototype.initialStateHandler_ =
function(event) {
+ /**
+ * @type {Object}
+ **/
+ var host = this.strand_;
this.dispatchEvent(new org.apache.flex.events.ValueChangeEvent('currentStateChanged', null,
- this.strand_.get_currentState()));
+ host.get_currentState()));
};
@@ -185,10 +189,10 @@ org.apache.flex.core.SimpleStatesImpl.prototype.apply_ = function(s) {
if (!o.items) {
o.items = o.itemsDescriptor.items;
if (o.items == null) {
- ai.items =
- MXMLDataInterpreter.generateMXMLArray(o.document,
- null, ai.itemsDescriptor.descriptor);
- o.itemsDescriptor.items = ai.items;
+ o.items =
+ org.apache.flex.utils.MXMLDataInterpreter.generateMXMLArray(o.document,
+ null, o.itemsDescriptor.descriptor);
+ o.itemsDescriptor.items = o.items;
}
}
[26/28] git commit: [flex-asjs] [refs/heads/develop] - break linters
into own targets so you can run individually
Posted by ah...@apache.org.
break linters into own targets so you can run individually
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ee19130c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ee19130c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ee19130c
Branch: refs/heads/develop
Commit: ee19130cf5932507f303f60fe7be290f83f22cf0
Parents: a27a897
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 11:29:10 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
frameworks/js/build.xml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ee19130c/frameworks/js/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/build.xml b/frameworks/js/build.xml
index b33b0ab..9754f16 100644
--- a/frameworks/js/build.xml
+++ b/frameworks/js/build.xml
@@ -83,7 +83,9 @@
<!--<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>-->
</target>
- <target name="compile" depends="flexjsjx" description="Validates JS code" unless="no.lint">
+ <target name="compile" depends="flexjsjx, gjslint, jshint" description="Validates JS code" />
+
+ <target name="gjslint" unless="no.lint">
<echo>running gjslint</echo>
<exec executable="${gjslint}" dir="${basedir}" failonerror="true">
<arg value="--strict" />
@@ -98,6 +100,9 @@
<arg value="-r" />
<arg value="FlexJS/src" />
</exec>
+ </target>
+
+ <target name="jshint" unless="no.lint">
<echo>running jshint</echo>
<exec executable="${jshint}" dir="${basedir}" failonerror="true">
<arg value="--config" />
[06/28] git commit: [flex-asjs] [refs/heads/develop] - needs to
extend EventDispatcher to be cross-compiled
Posted by ah...@apache.org.
needs to extend EventDispatcher to be cross-compiled
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/85462e98
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/85462e98
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/85462e98
Branch: refs/heads/develop
Commit: 85462e98edd6f250e18fce50d0921bd661938e37
Parents: b274c83
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:04:42 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
.../FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/85462e98/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as
index f601ade..b31ff3e 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/BindableCSSStyles.as
@@ -31,7 +31,7 @@ package org.apache.flex.core
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
*/
- public class BindableCSSStyles
+ public class BindableCSSStyles extends EventDispatcher
{
/**
* Constructor.
[08/28] git commit: [flex-asjs] [refs/heads/develop] - add asdoc to
MXML class
Posted by ah...@apache.org.
add asdoc to MXML class
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/36560f27
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/36560f27
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/36560f27
Branch: refs/heads/develop
Commit: 36560f2748b381ad9353d51e7780487760931932
Parents: 94dba73
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:26:31 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/html/beads/TitleBarView.mxml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36560f27/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
index 18eb9fb..22baa23 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/TitleBarView.mxml
@@ -17,9 +17,17 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
+<!---
+ The TitleBarView is the view for a Panel's TitleBar written in MXML
+
+ @langversion 3.0
+ @playerversion Flash 10.2
+ @playerversion AIR 2.6
+ @productversion FlexJS 0.0
+-->
<basic:MXMLBeadViewBase xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:basic="library://ns.apache.org/flexjs/basic"
- xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:mx="library://ns.apache.org/flexjs/mx"
>
<fx:Script>
<![CDATA[
[10/28] git commit: [flex-asjs] [refs/heads/develop] - fix up events
to use FlexJS Event
Posted by ah...@apache.org.
fix up events to use FlexJS Event
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/41e0bd8e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/41e0bd8e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/41e0bd8e
Branch: refs/heads/develop
Commit: 41e0bd8e74552408e0bb382f4bd63d4a35add903
Parents: 1a729c1
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:22:09 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as | 2 +-
examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as | 2 +-
examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41e0bd8e/examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as b/examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
index b13af3e..28129e7 100755
--- a/examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
+++ b/examples/FlexJSStore/src/samples/flexstore/ProductFilterEvent.as
@@ -19,7 +19,7 @@
package samples.flexstore
{
-import flash.events.Event;
+import org.apache.flex.events.Event;
public class ProductFilterEvent extends Event
{
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41e0bd8e/examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as b/examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as
index fb4992f..b6b9371 100755
--- a/examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as
+++ b/examples/FlexJSStore/src/samples/flexstore/ProductListEvent.as
@@ -19,7 +19,7 @@
package samples.flexstore
{
-import flash.events.Event;
+import org.apache.flex.events.Event;
public class ProductListEvent extends Event
{
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41e0bd8e/examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as b/examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
index e967daf..f92dc7f 100755
--- a/examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
+++ b/examples/FlexJSStore/src/samples/flexstore/ProductThumbEvent.as
@@ -19,7 +19,7 @@
package samples.flexstore
{
-import flash.events.Event;
+import org.apache.flex.events.Event;
public class ProductThumbEvent extends Event
{
@@ -36,7 +36,7 @@ public class ProductThumbEvent extends Event
this.product = product;
}
- override public function clone():Event
+ override public function cloneEvent():Event
{
return new ProductThumbEvent(type, product);
}
[17/28] git commit: [flex-asjs] [refs/heads/develop] - add
ImageAndTextButton and MultiLineLabel
Posted by ah...@apache.org.
add ImageAndTextButton and MultiLineLabel
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3f1111c5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3f1111c5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3f1111c5
Branch: refs/heads/develop
Commit: 3f1111c597f1ef3ac9487866ac9a595bcbfab35c
Parents: 73452ea
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 09:12:13 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSUI/basic-manifest.xml | 2 +
frameworks/as/projects/FlexJSUI/defaults.css | 14 ++-
.../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 3 +
.../org/apache/flex/html/ImageAndTextButton.as | 70 +++++++++++++
.../src/org/apache/flex/html/MultilineLabel.as | 60 +++++++++++
.../apache/flex/html/beads/CSSTextButtonView.as | 11 +-
.../flex/html/beads/CSSTextToggleButtonView.as | 103 +++++++++++++++++++
.../flex/html/beads/ImageAndTextButtonView.as | 20 +---
.../flex/html/beads/models/ImageAndTextModel.as | 77 ++++++++++++++
9 files changed, 341 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index b5d4405..069eaef 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -34,6 +34,8 @@
<component id="DropDownListList" class="org.apache.flex.html.supportClasses.DropDownListList"/>
<component id="Image" class="org.apache.flex.html.Image"/>
<component id="Label" class="org.apache.flex.html.Label"/>
+ <component id="MultilineLabel" class="org.apache.flex.html.MultilineLabel"/>
+ <component id="ImageAndTextButton" class="org.apache.flex.html.ImageAndTextButton"/>
<component id="TextButton" class="org.apache.flex.html.TextButton"/>
<component id="ToggleTextButton" class="org.apache.flex.html.ToggleTextButton"/>
<component id="TextInput" class="org.apache.flex.html.TextInput"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/defaults.css b/frameworks/as/projects/FlexJSUI/defaults.css
index b616d0d..5dc967f 100644
--- a/frameworks/as/projects/FlexJSUI/defaults.css
+++ b/frameworks/as/projects/FlexJSUI/defaults.css
@@ -268,6 +268,12 @@ ImageButton
IBeadView: ClassReference("org.apache.flex.html.beads.ImageButtonView");
}
+ImageAndTextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageAndTextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ImageAndTextButtonView");
+}
+
Label
{
IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
@@ -281,6 +287,12 @@ List
iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel');
}
+MultilineLabel
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.MultilineTextFieldView");
+}
+
NumericStepper
{
IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
@@ -403,7 +415,7 @@ ToggleTextButton
h5|TextButton
{
- IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextToggleButtonView");
}
h5|TextInput
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index f6f998e..85139d8 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -57,9 +57,11 @@ internal class FlexJSUIClasses
import org.apache.flex.html.beads.ControlBarMeasurementBead; ControlBarMeasurementBead;
import org.apache.flex.html.beads.CSSButtonView; CSSButtonView;
import org.apache.flex.html.beads.CSSTextButtonView; CSSTextButtonView;
+ import org.apache.flex.html.beads.CSSTextToggleButtonView; CSSTextToggleButtonView;
import org.apache.flex.html.beads.DropDownListView; DropDownListView;
import org.apache.flex.html.beads.CloseButtonView; CloseButtonView;
import org.apache.flex.html.beads.ImageButtonView; ImageButtonView;
+ import org.apache.flex.html.beads.ImageAndTextButtonView; ImageAndTextButtonView;
import org.apache.flex.html.beads.ImageView; ImageView;
import org.apache.flex.html.beads.ListView; ListView;
import org.apache.flex.html.beads.NumericStepperView; NumericStepperView;
@@ -85,6 +87,7 @@ internal class FlexJSUIClasses
import org.apache.flex.html.beads.models.ArraySelectionModel; ArraySelectionModel;
import org.apache.flex.html.beads.models.ComboBoxModel; ComboBoxModel;
import org.apache.flex.html.beads.models.ImageModel; ImageModel;
+ import org.apache.flex.html.beads.models.ImageAndTextModel; ImageAndTextModel;
import org.apache.flex.html.beads.models.PanelModel; PanelModel;
import org.apache.flex.html.beads.models.SingleLineBorderModel; SingleLineBorderModel;
import org.apache.flex.html.beads.models.TextModel; TextModel;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageAndTextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageAndTextButton.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageAndTextButton.as
new file mode 100644
index 0000000..c2d5999
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/ImageAndTextButton.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.beads.models.ImageAndTextModel;
+
+ /**
+ * The ImageTextButton class implements a basic button that
+ * displays and image and text.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ImageAndTextButton extends TextButton
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ImageAndTextButton()
+ {
+ super();
+ }
+
+ /**
+ * The URL of an icon to use in the button
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get image():String
+ {
+ return ImageAndTextModel(model).image;
+ }
+
+ /**
+ * @private
+ */
+ public function set image(value:String):void
+ {
+ ImageAndTextModel(model).image = value;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/MultilineLabel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/MultilineLabel.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/MultilineLabel.as
new file mode 100644
index 0000000..909bf5e
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/MultilineLabel.as
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /*
+ * Label probably should extend TextField directly,
+ * but the player's APIs for TextLine do not allow
+ * direct instantiation, and we might want to allow
+ * Labels to be declared and have their actual
+ * view be swapped out.
+ */
+
+ /**
+ * The Label class implements the basic control for labeling
+ * other controls.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MultilineLabel extends Label
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MultilineLabel()
+ {
+ super();
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
index 4772e7b..ff97004 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextButtonView.as
@@ -115,14 +115,19 @@ package org.apache.flex.html.beads
if (textModel.html !== null)
html = textModel.html;
- setupSkin(overSprite, overTextField, "hover");
- setupSkin(downSprite, downTextField, "active");
- setupSkin(upSprite, upTextField);
+ setupSkins();
IEventDispatcher(_strand).addEventListener("widthChanged",sizeChangeHandler);
IEventDispatcher(_strand).addEventListener("heightChanged",sizeChangeHandler);
}
+ protected function setupSkins():void
+ {
+ setupSkin(overSprite, overTextField, "hover");
+ setupSkin(downSprite, downTextField, "active");
+ setupSkin(upSprite, upTextField);
+ }
+
private function setupSkin(sprite:Sprite, textField:TextField, state:String = null):void
{
var sw:uint = DisplayObject(_strand).width;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextToggleButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextToggleButtonView.as
new file mode 100644
index 0000000..a6b3fac
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/CSSTextToggleButtonView.as
@@ -0,0 +1,103 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+{
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IStyleableObject;
+ import org.apache.flex.core.IToggleButtonModel;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The CSSTextToggleButtonView class is the default view for
+ * the org.apache.flex.html.TextToggleButton class.
+ * It allows the look of the button to be expressed
+ * in CSS via the background-image style and displays
+ * a text label. This view does not support right-to-left
+ * text.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSTextToggleButtonView extends CSSTextButtonView
+ {
+ /**
+ * The suffix appended to the className when selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const SELECTED:String = "_Selected";
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSTextToggleButtonView()
+ {
+ }
+
+ private var toggleButtonModel:IToggleButtonModel;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function set strand(value:IStrand):void
+ {
+ super.strand = value;
+
+ toggleButtonModel = value.getBeadByType(IToggleButtonModel) as IToggleButtonModel;
+ toggleButtonModel.addEventListener("selectedChanged", selectedChangeHandler);
+ }
+
+ private function selectedChangeHandler(event:org.apache.flex.events.Event):void
+ {
+ var className:String = IStyleableObject(_strand).className;
+ if (toggleButtonModel.selected)
+ {
+ if (className.indexOf(SELECTED) == className.length - SELECTED.length)
+ IStyleableObject(_strand).className = className.substring(0, className.length - SELECTED.length);
+ setupSkins();
+ }
+ else
+ {
+ if (className.indexOf(SELECTED) == -1)
+ IStyleableObject(_strand).className += SELECTED;
+ setupSkins();
+ }
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageAndTextButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageAndTextButtonView.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageAndTextButtonView.as
index 988b293..64dd7a5 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageAndTextButtonView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/ImageAndTextButtonView.as
@@ -33,8 +33,8 @@ package org.apache.flex.html.beads
import org.apache.flex.core.IBeadView;
import org.apache.flex.core.IStrand;
import org.apache.flex.core.IStrandWithModel;
- import org.apache.flex.core.ITextModel;
import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.html.beads.models.ImageAndTextModel;
/**
* The ImageButtonView class provides an image-only view
@@ -87,7 +87,7 @@ package org.apache.flex.html.beads
override public function set strand(value:IStrand):void
{
super.strand = value;
- textModel = IStrandWithModel(value).model as ITextModel;
+ textModel = IStrandWithModel(value).model as ImageAndTextModel;
textModel.addEventListener("textChange", textChangeHandler);
textModel.addEventListener("htmlChange", htmlChangeHandler);
@@ -114,10 +114,8 @@ package org.apache.flex.html.beads
private var overSprite:Sprite;
private var shape:Shape;
- private var textModel:ITextModel;
+ private var textModel:ImageAndTextModel;
- private var _image:String;
-
/**
* The URL of an icon to use in the button
*
@@ -128,17 +126,9 @@ package org.apache.flex.html.beads
*/
public function get image():String
{
- return _image;
- }
-
- /**
- * @private
- */
- public function set image(value:String):void
- {
- _image = value;
+ return textModel.image;
}
-
+
/**
* @private
*/
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3f1111c5/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ImageAndTextModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ImageAndTextModel.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ImageAndTextModel.as
new file mode 100644
index 0000000..01dd3e9
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/models/ImageAndTextModel.as
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.models
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The ImageAndTextModel class is associates and image
+ * with some text.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ImageAndTextModel extends TextModel
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ImageAndTextModel()
+ {
+ }
+
+
+ private var _image:String;
+
+ /**
+ * The URL of an icon to use in the button
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get image():String
+ {
+ return _image;
+ }
+
+ /**
+ * @private
+ */
+ public function set image(value:String):void
+ {
+ _image = value;
+ dispatchEvent(new Event("imageChange"));
+ }
+
+ }
+}
[21/28] git commit: [flex-asjs] [refs/heads/develop] - Move Drag/Drop
controllers to FlexJSJX
Posted by ah...@apache.org.
Move Drag/Drop controllers to FlexJSJX
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ad25e3ff
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ad25e3ff
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ad25e3ff
Branch: refs/heads/develop
Commit: ad25e3ffb989ae7b56fa9c2b5ec792f4e6b9ef9e
Parents: 6a9ea39
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 7 11:07:39 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSJX/basic-manifest.xml | 3 +
.../as/projects/FlexJSJX/src/FlexJSJXClasses.as | 1 +
.../src/org/apache/flex/core/DropType.as | 64 +++++
.../beads/controllers/DragMouseController.as | 286 +++++++++++++++++++
.../beads/controllers/DropMouseController.as | 188 ++++++++++++
.../as/projects/FlexJSUI/basic-manifest.xml | 2 -
.../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 2 +-
.../src/org/apache/flex/core/DropType.as | 64 -----
.../beads/controllers/DragMouseController.as | 284 ------------------
.../beads/controllers/DropMouseController.as | 188 ------------
10 files changed, 543 insertions(+), 539 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/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 6508bf5..8070963 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -57,6 +57,9 @@
<component id="SVGWedgeItemRenderer" class="org.apache.flex.charts.supportClasses.optimized.SVGWedgeItemRenderer"/>
<component id="SVGLineSegmentItemRenderer" class="org.apache.flex.charts.supportClasses.optimized.SVGLineSegmentItemRenderer"/>
+ <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
+ <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
+
<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"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/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 423ac18..d4e51a6 100644
--- a/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
+++ b/frameworks/as/projects/FlexJSJX/src/FlexJSJXClasses.as
@@ -76,6 +76,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.DropType; DropType;
import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
import org.apache.flex.core.StatesWithTransitionsImpl; StatesWithTransitionsImpl;
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/DropType.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/DropType.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/DropType.as
new file mode 100644
index 0000000..9df59cf
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/DropType.as
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 DropType class provides a set of constant values of
+ * types of drops in a drag/drop operation
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DropType
+ {
+
+ /**
+ * The data should be moved.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const MOVE:String = "move";
+
+ /**
+ * The data should be copied.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const COPY:String = "copy";
+
+ /**
+ * The drop should be cancelled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const CANCEL:String = "cancel";
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
new file mode 100644
index 0000000..5cb5f54
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DragMouseController.as
@@ -0,0 +1,286 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.controllers
+{
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IDragInitiator;
+ import org.apache.flex.core.IPopUpHost;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.DragEvent;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.MouseEvent;
+ import org.apache.flex.geom.Point;
+ import org.apache.flex.utils.PointUtils;
+ import org.apache.flex.utils.UIUtils;
+
+ /**
+ * Indicates that a drag/drop operation is starting.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragStart", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * Indicates that the mouse is moving during
+ * a drag/drop operation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragMove", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * Indicates that a drag/drop operation is ending.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragEnd", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * The DragMouseController bead handles mouse events on the
+ * a component, looking for activity that constitutes the start
+ * of a drag drop operation.
+ *
+ * @flexjsignoreimport org.apache.flex.core.IDragInitiator
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DragMouseController extends EventDispatcher implements IBead
+ {
+ /**
+ * The data being dragged. Or an instance
+ * of an object describing the data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragSource:Object;
+
+ /**
+ * The object that wants to know if a
+ * drop is accepted.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragInitiator:IDragInitiator;
+
+ /**
+ * Whether there is a drag operation
+ * in progress.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragging:Boolean;
+
+ /**
+ * The drag image.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragImage:IUIBase;
+
+ /**
+ * The offset of the drag image.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragImageOffsetX:Number = 0;
+
+ /**
+ * The offset of the drag image.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragImageOffsetY:Number = 0;
+
+ /**
+ * The default movement in x and or y that
+ * means a drag should start
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var defaultThreshold:int = 4;
+
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DragMouseController()
+ {
+ threshold = defaultThreshold;
+ }
+
+ /**
+ * The movement in x and or y that
+ * means a drag should start
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var threshold:int = 4;
+
+ 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;
+
+ IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_DOWN, dragMouseDownHandler);
+ }
+
+ public function get strand():IStrand
+ {
+ return _strand;
+ }
+
+ private var mouseDownX:Number;
+ private var mouseDownY:Number;
+
+ private var host:IPopUpHost;
+
+ /**
+ * @private
+ */
+ private function dragMouseDownHandler(event:MouseEvent):void
+ {
+ trace("dragMouseDown");
+ IUIBase(_strand).topMostEventDispatcher.addEventListener(MouseEvent.MOUSE_MOVE, dragMouseMoveHandler);
+ IUIBase(_strand).topMostEventDispatcher.addEventListener(MouseEvent.MOUSE_UP, dragMouseUpHandler);
+ mouseDownX = event.stageX;
+ mouseDownY = event.stageY;
+ }
+
+ private function dragMouseMoveHandler(event:MouseEvent):void
+ {
+ var pt:Point;
+ var dragEvent:DragEvent;
+ trace("dragMouseMove");
+
+ if (!dragging)
+ {
+ trace("not dragging anything else");
+ if (Math.abs(event.stageX - mouseDownX) > threshold ||
+ Math.abs(event.stageY - mouseDownY) > threshold)
+ {
+ trace("sending dragStart");
+ dragEvent = new DragEvent("dragStart", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ IEventDispatcher(_strand).dispatchEvent(dragEvent);
+ if (dragSource != null)
+ {
+ dragging = true;
+ host = UIUtils.findPopUpHost(_strand as IUIBase);
+ host.addElement(dragImage);
+ pt = PointUtils.globalToLocal(new Point(event.stageX, event.stageY), host);
+ dragImage.x = pt.x + dragImageOffsetX;
+ dragImage.y = pt.y + dragImageOffsetY;
+ }
+ }
+ }
+ else
+ {
+ trace("sending dragMove", event.target);
+ dragEvent = new DragEvent("dragMove", true, true);
+ event.stopImmediatePropagation();
+ dragEvent.copyMouseEventProperties(event);
+ dragEvent.dragSource = dragSource;
+ dragEvent.dragInitiator = dragInitiator;
+ pt = PointUtils.globalToLocal(new Point(event.stageX, event.stageY), host);
+ dragImage.x = pt.x + dragImageOffsetX;
+ dragImage.y = pt.y + dragImageOffsetY;
+ event.target.dispatchEvent(dragEvent);
+ }
+ }
+
+ private function dragMouseUpHandler(event:MouseEvent):void
+ {
+ trace("dragMouseUp");
+ var dragEvent:DragEvent;
+
+ if (dragging)
+ {
+ trace("sending dragEnd");
+ dragEvent = new DragEvent("dragEnd", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ event.stopImmediatePropagation();
+ dragEvent.dragSource = dragSource;
+ dragEvent.dragInitiator = dragInitiator;
+ event.target.dispatchEvent(dragEvent);
+ }
+ dragging = false;
+ dragSource = null;
+ dragInitiator = null;
+ if (dragImage && host)
+ host.removeElement(dragImage);
+ dragImage = null;
+ IUIBase(_strand).topMostEventDispatcher.removeEventListener(MouseEvent.MOUSE_MOVE, dragMouseMoveHandler);
+ IUIBase(_strand).topMostEventDispatcher.removeEventListener(MouseEvent.MOUSE_UP, dragMouseUpHandler);
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
new file mode 100644
index 0000000..82a277a
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/beads/controllers/DropMouseController.as
@@ -0,0 +1,188 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.controllers
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IDragInitiator;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.DragEvent;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.MouseEvent;
+
+ /**
+ * Indicates that the mouse has entered the component during
+ * a drag operatino.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragEnter", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * Indicates that the mouse is moving over a component during
+ * a drag/drop operation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragOver", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * Indicates that a drop operation should be executed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragDrop", type="org.apache.flex.events.DragEvent")]
+
+ /**
+ * The DropMouseController bead handles mouse events on the
+ * a component, looking for events from a drag/drop operation.
+ *
+ * @flexjsignoreimport org.apache.flex.core.IDragInitiator
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DropMouseController extends EventDispatcher implements IBead
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropMouseController()
+ {
+ }
+
+ 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;
+
+ IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_MOVE, dragMoveHandler);
+ }
+
+ public function get strand():IStrand
+ {
+ return _strand;
+ }
+
+ private var inside:Boolean;
+
+ private var dragSource:Object;
+ private var dragInitiator:IDragInitiator;
+
+ public function acceptDragDrop(target:IUIBase, type:String):void
+ {
+ // TODO: aharui: switch icons
+ }
+
+ /**
+ * @private
+ */
+ private function dragMoveHandler(event:DragEvent):void
+ {
+ trace("dragMove");
+ var dragEvent:DragEvent;
+ if (!inside)
+ {
+ dragEvent = new DragEvent("dragEnter", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ dragSource = dragEvent.dragSource = event.dragSource;
+ dragInitiator = dragEvent.dragInitiator = event.dragInitiator;
+ dispatchEvent(dragEvent);
+ inside = true;
+ IUIBase(_strand).topMostEventDispatcher.addEventListener(DragEvent.DRAG_END, dragEndHandler);
+ IUIBase(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+ else
+ {
+ dragEvent = new DragEvent("dragOver", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ dragEvent.dragSource = event.dragSource;
+ dragEvent.dragInitiator = event.dragInitiator;
+ IEventDispatcher(_strand).dispatchEvent(dragEvent);
+ }
+ }
+
+ private function rollOutHandler(event:MouseEvent):void
+ {
+ var dragEvent:DragEvent;
+
+ if (inside)
+ {
+ dragEvent = new DragEvent("dragExit", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ dragEvent.dragSource = dragSource;
+ dragEvent.dragInitiator = dragInitiator;
+ dragSource = null;
+ dragInitiator = null;
+ event.stopImmediatePropagation();
+ dispatchEvent(dragEvent);
+ inside = false;
+ }
+ IUIBase(_strand).topMostEventDispatcher.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
+ IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+
+ private function dragEndHandler(event:DragEvent):void
+ {
+ trace("dragEnd");
+ var dragEvent:DragEvent;
+
+ dragEvent = new DragEvent("dragDrop", true, true);
+ dragEvent.copyMouseEventProperties(event);
+ dragEvent.dragSource = event.dragSource;
+ dragEvent.dragInitiator = event.dragInitiator;
+ dragSource = null;
+ dragInitiator = null;
+ event.stopImmediatePropagation();
+ dispatchEvent(dragEvent);
+
+ inside = false;
+ IUIBase(_strand).topMostEventDispatcher.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
+ IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index 7672b35..b5d4405 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -88,8 +88,6 @@
<component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
<component id="HRule" class="org.apache.flex.html.HRule" />
<component id="Spacer" class="org.apache.flex.html.Spacer" />
- <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
- <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
<component id="MXMLDragInitiator" class="org.apache.flex.core.MXMLDragInitiator" />
<component id="CallLaterBead" class="org.apache.flex.core.CallLaterBead" />
<component id="ImageAndTextButtonView" class="org.apache.flex.html.beads.ImageAndTextButtonView" />
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 7dae39f..f6f998e 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -130,9 +130,9 @@ internal class FlexJSUIClasses
import org.apache.flex.core.graphics.Text; Text;
import org.apache.flex.core.graphics.GraphicsContainer; GraphicsContainer;
import org.apache.flex.core.graphics.LinearGradient; LinearGradient;
- import org.apache.flex.core.DropType; DropType;
import org.apache.flex.core.DataBindingBase; DataBindingBase;
import org.apache.flex.effects.PlatformWiper; PlatformWiper;
+ import org.apache.flex.events.DragEvent; DragEvent;
import org.apache.flex.geom.Rectangle; Rectangle;
import mx.core.ClassFactory; ClassFactory;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DropType.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DropType.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DropType.as
deleted file mode 100644
index 9df59cf..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/DropType.as
+++ /dev/null
@@ -1,64 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- /**
- * The DropType class provides a set of constant values of
- * types of drops in a drag/drop operation
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DropType
- {
-
- /**
- * The data should be moved.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const MOVE:String = "move";
-
- /**
- * The data should be copied.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const COPY:String = "copy";
-
- /**
- * The drop should be cancelled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const CANCEL:String = "cancel";
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DragMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DragMouseController.as
deleted file mode 100644
index 0fbee44..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DragMouseController.as
+++ /dev/null
@@ -1,284 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.controllers
-{
- import flash.display.DisplayObject;
- import flash.geom.Point;
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IDragInitiator;
- import org.apache.flex.core.IPopUpHost;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.DragEvent;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.MouseEvent;
- import org.apache.flex.utils.UIUtils;
-
- /**
- * Indicates that a drag/drop operation is starting.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragStart", type="org.apache.flex.events.DragEvent")]
-
- /**
- * Indicates that the mouse is moving during
- * a drag/drop operation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragMove", type="org.apache.flex.events.DragEvent")]
-
- /**
- * Indicates that a drag/drop operation is ending.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragEnd", type="org.apache.flex.events.DragEvent")]
-
- /**
- * The DragMouseController bead handles mouse events on the
- * a component, looking for activity that constitutes the start
- * of a drag drop operation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DragMouseController extends EventDispatcher implements IBead
- {
- /**
- * The data being dragged. Or an instance
- * of an object describing the data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragSource:Object;
-
- /**
- * The object that wants to know if a
- * drop is accepted.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragInitiator:IDragInitiator;
-
- /**
- * Whether there is a drag operation
- * in progress.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragging:Boolean;
-
- /**
- * The drag image.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragImage:IUIBase;
-
- /**
- * The offset of the drag image.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragImageOffsetX:Number = 0;
-
- /**
- * The offset of the drag image.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragImageOffsetY:Number = 0;
-
- /**
- * The default movement in x and or y that
- * means a drag should start
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var defaultThreshold:int = 4;
-
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DragMouseController()
- {
- threshold = defaultThreshold;
- }
-
- /**
- * The movement in x and or y that
- * means a drag should start
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var threshold:int = 4;
-
- 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;
-
- IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_DOWN, dragMouseDownHandler);
- }
-
- public function get strand():IStrand
- {
- return _strand;
- }
-
- private var mouseDownX:Number;
- private var mouseDownY:Number;
-
- private var host:IPopUpHost;
-
- /**
- * @private
- */
- private function dragMouseDownHandler(event:MouseEvent):void
- {
- trace("dragMouseDown");
- DisplayObject(_strand).stage.addEventListener(MouseEvent.MOUSE_MOVE, dragMouseMoveHandler);
- DisplayObject(_strand).stage.addEventListener(MouseEvent.MOUSE_UP, dragMouseUpHandler);
- mouseDownX = event.stageX;
- mouseDownY = event.stageY;
- }
-
- private function dragMouseMoveHandler(event:MouseEvent):void
- {
- var pt:Point;
- var dragEvent:DragEvent;
- trace("dragMouseMove");
-
- if (!dragging)
- {
- trace("not dragging anything else");
- if (Math.abs(event.stageX - mouseDownX) > threshold ||
- Math.abs(event.stageY - mouseDownY) > threshold)
- {
- trace("sending dragStart");
- dragEvent = new DragEvent("dragStart", true, true);
- dragEvent.copyMouseEventProperties(event);
- IEventDispatcher(_strand).dispatchEvent(dragEvent);
- if (dragSource != null)
- {
- dragging = true;
- host = UIUtils.findPopUpHost(_strand as IUIBase);
- host.addElement(dragImage);
- pt = DisplayObject(host).globalToLocal(new Point(event.stageX, event.stageY));
- dragImage.x = pt.x + dragImageOffsetX;
- dragImage.y = pt.y + dragImageOffsetY;
- }
- }
- }
- else
- {
- trace("sending dragMove", event.target);
- dragEvent = new DragEvent("dragMove", true, true);
- event.stopImmediatePropagation();
- dragEvent.copyMouseEventProperties(event);
- dragEvent.dragSource = dragSource;
- dragEvent.dragInitiator = dragInitiator;
- pt = DisplayObject(host).globalToLocal(new Point(event.stageX, event.stageY));
- dragImage.x = pt.x + dragImageOffsetX;
- dragImage.y = pt.y + dragImageOffsetY;
- event.target.dispatchEvent(dragEvent);
- }
- }
-
- private function dragMouseUpHandler(event:MouseEvent):void
- {
- trace("dragMouseUp");
- var dragEvent:DragEvent;
-
- if (dragging)
- {
- trace("sending dragEnd");
- dragEvent = new DragEvent("dragEnd", true, true);
- dragEvent.copyMouseEventProperties(event);
- event.stopImmediatePropagation();
- dragEvent.dragSource = dragSource;
- dragEvent.dragInitiator = dragInitiator;
- event.target.dispatchEvent(dragEvent);
- }
- dragging = false;
- dragSource = null;
- dragInitiator = null;
- if (dragImage && host)
- host.removeElement(dragImage);
- dragImage = null;
- DisplayObject(_strand).stage.removeEventListener(MouseEvent.MOUSE_MOVE, dragMouseMoveHandler);
- DisplayObject(_strand).stage.removeEventListener(MouseEvent.MOUSE_UP, dragMouseUpHandler);
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad25e3ff/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DropMouseController.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DropMouseController.as
deleted file mode 100644
index e3a7ac6..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/beads/controllers/DropMouseController.as
+++ /dev/null
@@ -1,188 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.beads.controllers
-{
- import flash.display.DisplayObject;
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IDragInitiator;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.DragEvent;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.MouseEvent;
-
- /**
- * Indicates that the mouse has entered the component during
- * a drag operatino.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragEnter", type="org.apache.flex.events.DragEvent")]
-
- /**
- * Indicates that the mouse is moving over a component during
- * a drag/drop operation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragOver", type="org.apache.flex.events.DragEvent")]
-
- /**
- * Indicates that a drop operation should be executed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragDrop", type="org.apache.flex.events.DragEvent")]
-
- /**
- * The DropMouseController bead handles mouse events on the
- * a component, looking for events from a drag/drop operation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DropMouseController extends EventDispatcher implements IBead
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropMouseController()
- {
- }
-
- 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;
-
- IEventDispatcher(_strand).addEventListener(DragEvent.DRAG_MOVE, dragMoveHandler);
- }
-
- public function get strand():IStrand
- {
- return _strand;
- }
-
- private var inside:Boolean;
-
- private var dragSource:Object;
- private var dragInitiator:IDragInitiator;
-
- public function acceptDragDrop(target:IUIBase, type:String):void
- {
- // TODO: aharui: switch icons
- }
-
- /**
- * @private
- */
- private function dragMoveHandler(event:DragEvent):void
- {
- trace("dragMove");
- var dragEvent:DragEvent;
- if (!inside)
- {
- dragEvent = new DragEvent("dragEnter", true, true);
- dragEvent.copyMouseEventProperties(event);
- dragSource = dragEvent.dragSource = event.dragSource;
- dragInitiator = dragEvent.dragInitiator = event.dragInitiator;
- dispatchEvent(dragEvent);
- inside = true;
- DisplayObject(_strand).stage.addEventListener(DragEvent.DRAG_END, dragEndHandler);
- DisplayObject(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
- }
- else
- {
- dragEvent = new DragEvent("dragOver", true, true);
- dragEvent.copyMouseEventProperties(event);
- dragEvent.dragSource = event.dragSource;
- dragEvent.dragInitiator = event.dragInitiator;
- IEventDispatcher(_strand).dispatchEvent(dragEvent);
- }
- }
-
- private function rollOutHandler(event:MouseEvent):void
- {
- var dragEvent:DragEvent;
-
- if (inside)
- {
- dragEvent = new DragEvent("dragExit", true, true);
- dragEvent.copyMouseEventProperties(event);
- dragEvent.dragSource = dragSource;
- dragEvent.dragInitiator = dragInitiator;
- dragSource = null;
- dragInitiator = null;
- event.stopImmediatePropagation();
- dispatchEvent(dragEvent);
- inside = false;
- }
- DisplayObject(_strand).stage.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
- DisplayObject(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
- }
-
- private function dragEndHandler(event:DragEvent):void
- {
- trace("dragEnd");
- var dragEvent:DragEvent;
-
- dragEvent = new DragEvent("dragDrop", true, true);
- dragEvent.copyMouseEventProperties(event);
- dragEvent.dragSource = event.dragSource;
- dragEvent.dragInitiator = event.dragInitiator;
- dragSource = null;
- dragInitiator = null;
- event.stopImmediatePropagation();
- dispatchEvent(dragEvent);
-
- inside = false;
- DisplayObject(_strand).stage.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
- DisplayObject(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
- }
-
- }
-}
[25/28] git commit: [flex-asjs] [refs/heads/develop] - more new JS
components and beads
Posted by ah...@apache.org.
more new JS components and beads
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a27a897e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a27a897e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a27a897e
Branch: refs/heads/develop
Commit: a27a897e0cd10f0e9fa0daa52732bf327aa051f7
Parents: e70257a
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 09:15:31 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
.../org/apache/flex/html/ImageAndTextButton.js | 105 +++++++++++++++++++
.../src/org/apache/flex/html/MultilineLabel.js | 79 ++++++++++++++
.../org/apache/flex/html/ToggleTextButton.js | 103 ++++++++++++++++++
.../flex/html/beads/ScrollingContainerView.js | 89 ++++++++++++++++
.../html/beads/layouts/NonVirtualBasicLayout.js | 64 +++++++++++
.../layouts/NonVirtualBasicScrollingLayout.js | 64 +++++++++++
6 files changed, 504 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
new file mode 100644
index 0000000..2d1efa8
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
@@ -0,0 +1,105 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.ImageAndTextButton');
+
+goog.require('org.apache.flex.html.Button');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.Button}
+ */
+org.apache.flex.html.ImageAndTextButton = function() {
+ org.apache.flex.html.ImageAndTextButton.base(this, 'constructor');
+
+ /**
+ * @type {Object>}
+ */
+ this.img;
+
+};
+goog.inherits(org.apache.flex.html.ImageAndTextButton,
+ org.apache.flex.html.Button);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ImageAndTextButton',
+ qName: 'org.apache.flex.html.ImageAndTextButton'}] };
+
+
+/**
+ * @override
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.createElement =
+ function() {
+ this.element = document.createElement('button');
+ this.element.setAttribute('type', 'button');
+ this.img = document.createElement('img');
+ this.element.appendChild(img);
+
+ this.positioner = this.element;
+ this.element.flexjs_wrapper = this;
+
+ if (org.apache.flex.core.ValuesManager.valuesImpl.getValue) {
+ var impl = org.apache.flex.core.ValuesManager.valuesImpl.
+ getValue(this, 'iStatesImpl');
+ }
+
+ return this.element;
+};
+
+
+/**
+ * @expose
+ * @return {string} The text getter.
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.get_text = function() {
+ return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.set_text =
+ function(value) {
+ this.element.innerHTML = value;
+};
+
+
+/**
+ * @expose
+ * @return {string} The text getter.
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.get_image = function() {
+ return this.img.src;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html.ImageAndTextButton.prototype.set_text =
+ function(value) {
+ this.img.src = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js b/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
new file mode 100644
index 0000000..674c003
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/MultilineLabel.js
@@ -0,0 +1,79 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.MultilineLabel');
+
+goog.require('org.apache.flex.core.UIBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html.MultilineLabel = function() {
+ org.apache.flex.html.MultilineLabel.base(this, 'constructor');
+
+ this.element = document.createElement('div');
+ this.positioner = this.element;
+ this.element.flexjs_wrapper = this;
+};
+goog.inherits(org.apache.flex.html.MultilineLabel,
+ org.apache.flex.core.UIBase);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.MultilineLabel.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'MultilineLabel',
+ qName: 'org.apache.flex.html.MultilineLabel' }] };
+
+
+/**
+ * @expose
+ * @return {string} The text getter.
+ */
+org.apache.flex.html.MultilineLabel.prototype.get_text = function() {
+ return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html.MultilineLabel.prototype.set_text = function(value) {
+ this.element.innerHTML = value;
+};
+
+
+/**
+ * @expose
+ * @return {string} The html getter.
+ */
+org.apache.flex.html.MultilineLabel.prototype.get_html = function() {
+ return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The html setter.
+ */
+org.apache.flex.html.MultilineLabel.prototype.set_html = function(value) {
+ this.element.innerHTML = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
new file mode 100644
index 0000000..281b144
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
@@ -0,0 +1,103 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.ToggleTextButton');
+
+goog.require('org.apache.flex.html.Button');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.Button}
+ */
+org.apache.flex.html.ToggleTextButton = function() {
+ org.apache.flex.html.ToggleTextButton.base(this, 'constructor');
+
+
+
+ /**
+ * @type {boolean}
+ */
+ this.selected_ = false;
+};
+goog.inherits(org.apache.flex.html.ToggleTextButton,
+ org.apache.flex.html.Button);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.ToggleTextButton.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ToggleTextButton',
+ qName: 'org.apache.flex.html.ToggleTextButton'}] };
+
+
+/**
+ * @expose
+ * @return {string} The text getter.
+ */
+org.apache.flex.html.ToggleTextButton.prototype.get_text = function() {
+ return this.element.innerHTML;
+};
+
+
+/**
+ * @expose
+ * @param {string} value The text setter.
+ */
+org.apache.flex.html.ToggleTextButton.prototype.set_text =
+ function(value) {
+ this.element.innerHTML = value;
+};
+
+/**
+ * @expose
+ * @return {boolean} The selected getter.
+ */
+org.apache.flex.html.ToggleTextButton.prototype.get_selected =
+ function() {
+ return this.selected_;
+};
+
+/**
+ * @expose
+ * @param {boolean} value The selected setter.
+ */
+org.apache.flex.html.ToggleTextButton.prototype.set_selected =
+ function(value) {
+ if (this.selected_ != value) {
+ this.selected_ = value;
+
+ var className = this._strand.className;
+ if (value) {
+ if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
+ this._strand.className = className.substring(0, className.length - this.SELECTED.length);
+ }
+ else {
+ if (className.indexOf(this.SELECTED) == -1)
+ this._strand.className += this.SELECTED;
+ }
+
+ }
+};
+
+
+/**
+ * @type {string} The selected setter.
+ */
+org.apache.flex.html.ToggleTextButton.prototype.SELECTED = "_Selected";
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ScrollingContainerView.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ScrollingContainerView.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ScrollingContainerView.js
new file mode 100644
index 0000000..dcf4aad
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/ScrollingContainerView.js
@@ -0,0 +1,89 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.beads.ScrollingContainerView');
+
+goog.require('org.apache.flex.html.beads.ContainerView');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.html.beads.ContainerView}
+ */
+org.apache.flex.html.beads.ScrollingContainerView = function() {
+ this.lastSelectedIndex = -1;
+ org.apache.flex.html.beads.ScrollingContainerView.base(this, 'constructor');
+
+ this.className = 'ScrollingContainerView';
+};
+goog.inherits(
+ org.apache.flex.html.beads.ScrollingContainerView,
+ org.apache.flex.html.beads.ContainerView);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.beads.ScrollingContainerView.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ScrollingContainerView',
+ qName: 'org.apache.flex.html.beads.ScrollingContainerView' }],
+ interfaces: [org.apache.flex.core.ILayoutParent]
+ };
+
+
+/**
+ * @expose
+ * @return {Object} value The content view.
+ */
+org.apache.flex.html.beads.ScrollingContainerView.prototype.get_contentView =
+ function() {
+
+ return this._strand;
+};
+
+
+/**
+ * @expose
+ * @return {Object} value The resizeable view.
+ */
+org.apache.flex.html.beads.ScrollingContainerView.prototype.get_resizableView =
+function() {
+
+ return this._strand;
+};
+
+
+/**
+ * @expose
+ * @return {Object} value The resizeable view.
+ */
+org.apache.flex.html.beads.ScrollingContainerView.prototype.get_verticalScrollPosition =
+function() {
+
+ return this._strand.scrollTop;
+};
+
+
+/**
+ * @expose
+ * @return {Object} value The resizeable view.
+ */
+org.apache.flex.html.beads.ScrollingContainerView.prototype.get_maxVerticalScrollPosition =
+function() {
+
+ return this._strand.scrollHeight - this._strand.clientHeight;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
new file mode 100644
index 0000000..cc0d36c
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicLayout.js
@@ -0,0 +1,64 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.beads.layouts.NonVirtualBasicLayout');
+
+goog.require('org.apache.flex.core.IBeadLayout');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IBeadLayout}
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicLayout =
+ function() {
+ this.strand_ = null;
+ this.className = 'NonVirtualBasicLayout';
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicLayout.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'NonVirtualBasicLayout',
+ qName: 'org.apache.flex.html.beads.layouts.NonVirtualBasicLayout'}],
+ interfaces: [org.apache.flex.core.IBeadLayout] };
+
+
+/**
+ * @expose
+ * @param {Object} value The new host.
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicLayout.
+ prototype.set_strand = function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ this.strand_.addEventListener('childrenAdded',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('layoutNeeded',
+ goog.bind(this.changeHandler, this));
+ }
+};
+
+
+/**
+ * @param {org.apache.flex.events.Event} event The text getter.
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicLayout.
+ prototype.changeHandler = function(event) {
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a27a897e/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
new file mode 100644
index 0000000..97e4700
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/beads/layouts/NonVirtualBasicScrollingLayout.js
@@ -0,0 +1,64 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout');
+
+goog.require('org.apache.flex.core.IBeadLayout');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IBeadLayout}
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout =
+ function() {
+ this.strand_ = null;
+ this.className = 'NonVirtualBasicScrollingLayout';
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'NonVirtualBasicScrollingLayout',
+ qName: 'org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout'}],
+ interfaces: [org.apache.flex.core.IBeadLayout] };
+
+
+/**
+ * @expose
+ * @param {Object} value The new host.
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout.
+ prototype.set_strand = function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ this.strand_.addEventListener('childrenAdded',
+ goog.bind(this.changeHandler, this));
+ this.strand_.addEventListener('layoutNeeded',
+ goog.bind(this.changeHandler, this));
+ }
+};
+
+
+/**
+ * @param {org.apache.flex.events.Event} event The text getter.
+ */
+org.apache.flex.html.beads.layouts.NonVirtualBasicScrollingLayout.
+ prototype.changeHandler = function(event) {
+};
[16/28] git commit: [flex-asjs] [refs/heads/develop] - ASDoc parser
complained about this example not being proper XML
Posted by ah...@apache.org.
ASDoc parser complained about this example not being proper XML
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d5585b67
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d5585b67
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d5585b67
Branch: refs/heads/develop
Commit: d5585b6733ec6e342b3f739fcb3251d38f52bef6
Parents: 85462e9
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:05:38 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:58 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as | 2 +-
.../as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5585b67/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as
index 7f9cdd9..aa66c2a 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/HContainer.as
@@ -34,7 +34,7 @@ package org.apache.flex.html
*
* This is effectively the same as the pattern
* <code>
- * <basic:Container>
+ * <basic:Container xmlns:basic="library://ns.apache.org/flexjs/basic">
* <basic:layout>
* <basic:NonVirtualHorizontalLayout />
* </basic:layout>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5585b67/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as
index 4642da2..1544898 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/VContainer.as
@@ -34,7 +34,7 @@ package org.apache.flex.html
*
* This is effectively the same as the pattern
* <code>
- * <basic:Container>
+ * <basic:Container xmlns:basic="library://ns.apache.org/flexjs/basic">
* <basic:layout>
* <basic:NonVirtualVerticalLayout />
* </basic:layout>
[28/28] git commit: [flex-asjs] [refs/heads/develop] - switch to
using entire components instead of injecting beads because JS implementations
will be simple wrappers
Posted by ah...@apache.org.
switch to using entire components instead of injecting beads because JS implementations will be simple wrappers
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e70257a9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e70257a9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e70257a9
Branch: refs/heads/develop
Commit: e70257a9d2a1f9508a902b0f60df89f4c2aeb904
Parents: 3f1111c
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 09:13:51 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
.../src/productsView/ProductCatalogThumbnail.mxml | 6 +-----
.../FlexJSStore/src/productsView/ProductFilterPanel.mxml | 11 +++--------
2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e70257a9/examples/FlexJSStore/src/productsView/ProductCatalogThumbnail.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductCatalogThumbnail.mxml b/examples/FlexJSStore/src/productsView/ProductCatalogThumbnail.mxml
index 6b6d7a6..bd2fce0 100755
--- a/examples/FlexJSStore/src/productsView/ProductCatalogThumbnail.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductCatalogThumbnail.mxml
@@ -178,11 +178,7 @@ limitations under the License.
<basic:Label id="compHigh1" text="Highlight: {product.highlight1}" includeIn="compare"/>
<basic:Label id="compHigh2" text="Highlight: {product.highlight2}" includeIn="compare"/>
<basic:Label text="Description:" includeIn="compare"/>
- <basic:Label id="compDesc" text="{product.description}" width="100%" includeIn="compare">
- <basic:beads>
- <basic:MultilineTextFieldView />
- </basic:beads>
- </basic:Label>
+ <basic:MultilineLabel id="compDesc" text="{product.description}" width="100%" includeIn="compare"/>
</basic:VContainer>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e70257a9/examples/FlexJSStore/src/productsView/ProductFilterPanel.mxml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/src/productsView/ProductFilterPanel.mxml b/examples/FlexJSStore/src/productsView/ProductFilterPanel.mxml
index c32ba78..4777e79 100755
--- a/examples/FlexJSStore/src/productsView/ProductFilterPanel.mxml
+++ b/examples/FlexJSStore/src/productsView/ProductFilterPanel.mxml
@@ -200,18 +200,13 @@ limitations under the License.
<basic:Spacer height="8"/>
- <basic:TextButton id="compareButton" className="glass"
+ <basic:ImageAndTextButton id="compareButton" className="glass"
click.showingThumbnails="attemptCompare()"
click.showingComparison="dispatchFilter()"
text.showingComparison="Back to thumbnail view"
text.showingThumbnails="Compare Items"
- >
- <basic:beads>
- <basic:ImageAndTextButtonView
- image.showingThumbnails="assets/icon_compare.png"
- image.showingComparison="assets/icon_tiles.png" />
- </basic:beads>
- </basic:TextButton>
+ image.showingThumbnails="assets/icon_compare.png"
+ image.showingComparison="assets/icon_tiles.png" />
<basic:states>
<mx:State name="showingThumbnails" />
[07/28] git commit: [flex-asjs] [refs/heads/develop] - override more
default classes in Falcon generated code
Posted by ah...@apache.org.
override more default classes in Falcon generated code
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b274c837
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b274c837
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b274c837
Branch: refs/heads/develop
Commit: b274c83784422fe58e989d3cb940a9a0fe105bd5
Parents: 36560f2
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:27:07 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
frameworks/flex-config.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b274c837/frameworks/flex-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/flex-config.xml b/frameworks/flex-config.xml
index 56eee73..d4707fd 100644
--- a/frameworks/flex-config.xml
+++ b/frameworks/flex-config.xml
@@ -94,6 +94,8 @@
<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+ <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+ <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
[04/28] git commit: [flex-asjs] [refs/heads/develop] - wipe needs to
use this rect
Posted by ah...@apache.org.
wipe needs to use this rect
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d53b7190
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d53b7190
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d53b7190
Branch: refs/heads/develop
Commit: d53b7190c6c5c0926c043b9f5c89040a0856b97c
Parents: 91144ac
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 3 15:14:31 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:56 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d53b7190/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
index f4f2bfe..fe83935 100644
--- a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/effects/Wipe.as
@@ -20,10 +20,9 @@
package org.apache.flex.effects
{
-import flash.geom.Rectangle;
-
import org.apache.flex.core.IDocument;
import org.apache.flex.core.IUIBase;
+import org.apache.flex.geom.Rectangle;
/**
* The Fade effect animates a UI component's alpha or opacity.
[14/28] git commit: [flex-asjs] [refs/heads/develop] - add JS
versions of AS classes
Posted by ah...@apache.org.
add JS versions of AS classes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/eb5eac53
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/eb5eac53
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/eb5eac53
Branch: refs/heads/develop
Commit: eb5eac533f958cbd7d65ed6b5fad9a5340e52b99
Parents: 8649231
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:12:46 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:58 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/core/CallLaterBead.js | 93 ++++++++++++
.../org/apache/flex/effects/PlatformWiper.js | 71 +++++++++
.../src/org/apache/flex/events/DragEvent.js | 125 ++++++++++++++++
.../src/org/apache/flex/events/MouseEvent.js | 42 ++++++
.../js/FlexJS/src/org/apache/flex/geom/Point.js | 90 +++++++++++
.../src/org/apache/flex/geom/Rectangle.js | 148 +++++++++++++++++++
.../src/org/apache/flex/html/HContainer.js | 42 ++++++
.../js/FlexJS/src/org/apache/flex/html/HRule.js | 44 ++++++
.../FlexJS/src/org/apache/flex/html/Spacer.js | 44 ++++++
.../src/org/apache/flex/html/VContainer.js | 42 ++++++
.../src/org/apache/flex/utils/PointUtils.js | 77 ++++++++++
11 files changed, 818 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
new file mode 100644
index 0000000..c36af25
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
@@ -0,0 +1,93 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.core.CallLaterBead');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.core.CallLaterBead = function() {
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this.strand_ = null;
+
+ /**
+ * @protected
+ * @type {Array}
+ */
+ this.calls_ = null;
+
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.CallLaterBead.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'CallLaterBead.js',
+ qName: 'org.apache.flex.core.CallLaterBead'}] };
+
+
+/**
+ * @expose
+ * @param {Object} value The new host.
+ */
+org.apache.flex.core.CallLaterBead.prototype.set_strand =
+ function(value) {
+ if (this.strand_ !== value) {
+ this.strand_ = value;
+ }
+};
+
+
+/**
+ * @protected
+ * @param {Function} fn The fucntion to call later.
+ * @param {Array=} args The optional array of arguments.
+ * @param {Object} thisArg The optional 'this' object.
+ */
+org.apache.flex.core.CallLaterBead.prototype.callLater =
+ function(fn, args, thisArg) {
+
+ if (this.calls_ == null)
+ this.calls_ = [ {thisArg: thisArg, fn: fn, args: args } ];
+ else
+ this.calls_.push({thisArg: thisArg, fn: fn, args: args });
+
+ window.setTimeout(callback, 0);
+};
+
+
+/**
+ * @protected
+ */
+org.apache.flex.core.CallLaterBead.prototype.callback =
+ function() {
+ var list = this.calls_;
+ var n = list.length;
+ for (var i = 0; i < n; i++)
+ {
+ var call = list.shift();
+ var fn = call.fn;
+ fn.apply(call.thisArg, call.args);
+ }
+};
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js b/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
new file mode 100644
index 0000000..369f2e4
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
@@ -0,0 +1,71 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.effects.PlatformWiper');
+
+goog.require('org.apache.flex.geom.Rectangle');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.effects.PlatformWiper = function(delay, opt_repeatCount) {
+
+ /**
+ * @protected
+ * @type {Object}
+ */
+ this.target_;
+
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.effects.PlatformWiper.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'PlatformWiper',
+ qName: 'org.apache.flex.effects.PlatformWiper'}] };
+
+
+/**
+ * @expose
+ * Sets the target for the Wipe.
+ * @param {Object} target The target for the Wipe effect.
+ */
+org.apache.flex.effects.PlatformWiper.prototype.set_target =
+ function(target) {
+ if (target == null)
+ delete this.target_.style.clip;
+ this.target_ = target;
+};
+
+
+/**
+ * @expose
+ * Clips the Object.
+ * @param {org.apache.flex.geom.Rectangle} rect The visible area.
+ */
+org.apache.flex.effects.PlatformWiper.prototype.set_visibleRect =
+ function(rect) {
+ var styleString = 'rect(';
+ styleString += rect.top.toString() + 'px,';
+ styleString += rect.width.toString() + 'px,';
+ styleString += rect.height.toString() + 'px,';
+ styleString += rect.left.toString() + 'px,)';
+ this.target_.style.clip = styleString;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
new file mode 100644
index 0000000..705b531
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
@@ -0,0 +1,125 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.events.DragEvent');
+
+
+
+/**
+ * @constructor
+ * This is a shim class. A native MouseEvent is actually
+ * sent with additional properties like dragInitiator and
+ * dragSource tacked on.
+ *
+ * @extends {MouseEvent}
+ * @param {string} type The event type.
+ */
+org.apache.flex.events.DragEvent = function(type) {
+ window.MouseEvent.base(this, 'constructor', type);
+
+ this.type = type;
+};
+goog.inherits(org.apache.flex.events.DragEvent,
+ window.MouseEvent);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.events.DragEvent.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'DragEvent',
+ qName: 'org.apache.flex.events.DragEvent'}] };
+
+
+/**
+ * @expose
+ * @param {string} type The event type.
+ */
+org.apache.flex.events.DragEvent.prototype.init = function(type) {
+ this.type = type;
+};
+
+
+/**
+ * @expose
+ * @type {Object} dragInitiator The object that started the drag.
+ */
+org.apache.flex.events.DragEvent.prototype.dragInitiator = null;
+
+
+/**
+ * @expose
+ * @type {Object} dragSource The data being dragged.
+ */
+org.apache.flex.events.DragEvent.prototype.dragSource = null;
+
+
+/**
+ * @expose
+ * @param {MouseEvent} event The mouse event to copy.
+ */
+org.apache.flex.events.DragEvent.prototype.copyMouseEventProperties =
+ function(event) {
+}
+
+
+/**
+ * @expose
+ * @type {string} DRAG_START The event type for starting drag-drop.
+ */
+org.apache.flex.events.DragEvent.DRAG_START = 'dragStart';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_MOVE The event type when moving mouse during drag-drop.
+ */
+org.apache.flex.events.DragEvent.DRAG_MOVE = 'dragMove';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_END The event type for ending drag-drop.
+ */
+org.apache.flex.events.DragEvent.DRAG_END = 'dragEnd';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_ENTER The event type for entering a potential drop target.
+ */
+org.apache.flex.events.DragEvent.DRAG_ENTER = 'dragEnter';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_OVER The event type for moving over a potential drop target.
+ */
+org.apache.flex.events.DragEvent.DRAG_OVER = 'dragOver';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_EXIT The event type for leaving a potential drop target.
+ */
+org.apache.flex.events.DragEvent.DRAG_EXIT = 'dragExit';
+
+
+/**
+ * @expose
+ * @type {string} DRAG_DROP The event type for dropping on a target.
+ */
+org.apache.flex.events.DragEvent.DRAG_DROP = 'dragDrop';
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
new file mode 100644
index 0000000..88025e6
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/MouseEvent.js
@@ -0,0 +1,42 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.events.MouseEvent');
+
+
+
+/**
+ * @constructor
+ * @extends {MouseEvent}
+ * This is a shim class. As long as you don't test
+ * with "is" or "as", your code should work even
+ * if the runtime is actually sending a native
+ * browser MouseEvent
+ */
+org.apache.flex.events.MouseEvent = function() {
+ window.MouseEvent.base(this, 'constructor');
+};
+goog.inherits(org.apache.flex.events.MouseEvent,
+ window.MouseEvent);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.events.MouseEvent.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'MouseEvent',
+ qName: 'org.apache.flex.events.MouseEvent' }] };
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js b/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
new file mode 100644
index 0000000..c6e183c
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
@@ -0,0 +1,90 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.geom.Point');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.geom.Point = function(x, y) {
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.x = x;
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.y = y;
+
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.geom.Point.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'Point',
+ qName: 'org.apache.flex.geom.Point'}] };
+
+
+/**
+ * @expose
+ * The x coordinate.
+ * @return {number} value The x coordinate.
+ */
+org.apache.flex.geom.Point.prototype.get_x =
+ function() {
+ return this.x;
+};
+
+
+/**
+ * @expose
+ * The x coordinate.
+ * @param {number} value The x coordinate.
+ */
+org.apache.flex.geom.Point.prototype.set_x =
+ function(value) {
+ this.x = value;
+};
+
+
+/**
+ * @expose
+ * The y coordinate.
+ * @return {number} value The y coordinate.
+ */
+org.apache.flex.geom.Point.prototype.get_y =
+ function() {
+ return this.y;
+};
+
+
+/**
+ * @expose
+ * The y coordinate.
+ * @param {number} value The y coordinate.
+ */
+org.apache.flex.geom.Point.prototype.set_y =
+ function(value) {
+ this.y = value;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js b/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
new file mode 100644
index 0000000..9bd82a8
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
@@ -0,0 +1,148 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.geom.Rectangle');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.geom.Rectangle = function(left, top, width, height) {
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.left = left;
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.top = top;
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.width = width;
+
+ /**
+ * @protected
+ * @type {number}
+ */
+ this.height = height;
+
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.geom.Rectangle.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'Rectangle',
+ qName: 'org.apache.flex.geom.Rectangle'}] };
+
+
+/**
+ * @expose
+ * The left coordinate.
+ * @return {number} value The left coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.get_left =
+ function() {
+ return this.left;
+};
+
+
+/**
+ * @expose
+ * The left coordinate.
+ * @param {number} value The left coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.set_left =
+ function(value) {
+ this.left = value;
+};
+
+
+/**
+ * @expose
+ * The top coordinate.
+ * @return {number} value The top coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.get_top =
+ function() {
+ return this.top;
+};
+
+
+/**
+ * @expose
+ * The top coordinate.
+ * @param {number} value The top coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.set_top =
+ function(value) {
+ this.top = value;
+};
+
+
+/**
+ * @expose
+ * The width coordinate.
+ * @return {number} value The width coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.get_width =
+ function() {
+ return this.width;
+};
+
+
+/**
+ * @expose
+ * The width coordinate.
+ * @param {number} value The width coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.set_width =
+ function(value) {
+ this.width = value;
+};
+
+
+/**
+ * @expose
+ * The height coordinate.
+ * @return {number} value The height coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.get_height =
+ function() {
+ return this.height;
+};
+
+
+/**
+ * @expose
+ * The height coordinate.
+ * @param {number} value The height coordinate.
+ */
+org.apache.flex.geom.Rectangle.prototype.set_height =
+ function(value) {
+ this.height = value;
+};
+
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
new file mode 100644
index 0000000..4e24093
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
@@ -0,0 +1,42 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.HContainer');
+
+goog.require('org.apache.flex.html.Container');
+goog.require('org.apache.flex.core.IContainer');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IContainer}
+ * @extends {org.apache.flex.core.HContainerBase}
+ */
+org.apache.flex.html.HContainer = function() {
+ org.apache.flex.html.HContainer.base(this, 'constructor');
+};
+goog.inherits(org.apache.flex.html.HContainer,
+ org.apache.flex.html.Container);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.HContainer.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'HContainer',
+ qName: 'org.apache.flex.html.HContainer' }],
+ interfaces: [org.apache.flex.core.IContainer] };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/html/HRule.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/HRule.js b/frameworks/js/FlexJS/src/org/apache/flex/html/HRule.js
new file mode 100644
index 0000000..9c81982
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/HRule.js
@@ -0,0 +1,44 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.HRule');
+
+goog.require('org.apache.flex.core.UIBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html.HRule = function() {
+ org.apache.flex.html.HRule.base(this, 'constructor');
+
+ this.element = document.createElement('hr');
+ this.positioner = this.element;
+ this.element.flexjs_wrapper = this;
+};
+goog.inherits(org.apache.flex.html.HRule,
+ org.apache.flex.core.UIBase);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.Label.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'HRule',
+ qName: 'org.apache.flex.html.HRule' }] };
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/html/Spacer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/Spacer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/Spacer.js
new file mode 100644
index 0000000..96e2dcd
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/Spacer.js
@@ -0,0 +1,44 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.Spacer');
+
+goog.require('org.apache.flex.core.UIBase');
+
+
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.html.Spacer = function() {
+ org.apache.flex.html.Spacer.base(this, 'constructor');
+
+ this.element = document.createElement('div');
+ this.positioner = this.element;
+ this.element.flexjs_wrapper = this;
+};
+goog.inherits(org.apache.flex.html.Spacer,
+ org.apache.flex.core.UIBase);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.Label.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'Spacer',
+ qName: 'org.apache.flex.html.Spacer' }] };
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
new file mode 100644
index 0000000..bedd53b
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
@@ -0,0 +1,42 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.VContainer');
+
+goog.require('org.apache.flex.html.Container');
+goog.require('org.apache.flex.core.IContainer');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IContainer}
+ * @extends {org.apache.flex.core.HContainerBase}
+ */
+org.apache.flex.html.VContainer = function() {
+ org.apache.flex.html.VContainer.base(this, 'constructor');
+};
+goog.inherits(org.apache.flex.html.VContainer,
+ org.apache.flex.html.Container);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.VContainer.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'VContainer',
+ qName: 'org.apache.flex.html.VContainer' }],
+ interfaces: [org.apache.flex.core.IContainer] };
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eb5eac53/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
new file mode 100644
index 0000000..a5a8f8c
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
@@ -0,0 +1,77 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.utils.PointUtils');
+
+goog.require('org.apache.flex.geom.Point');
+
+
+
+/**
+ * @constructor
+ */
+org.apache.flex.utils.PointUtils = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.utils.PointUtils.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'PointUtils',
+ qName: 'org.apache.flex.utils.PointUtils' }] };
+
+
+/**
+ * @expose
+ * @param {org.apache.flex.geom.Point} point The Point to be converted.
+ * @param {Object} local The object used as reference.
+ * @return {org.apache.flex.geom.Point} The converted Point.
+ */
+org.apache.flex.utils.PointUtils.globalToLocal =
+ function(point, local) {
+ var x = point.x, y = point.y;
+ var element = local.element;
+
+ do {
+ x -= element.offsetLeft;
+ y -= element.offsetTop;
+ element = element.offsetParent;
+ }
+ while (element);
+ return new Point(x,y);
+};
+
+
+/**
+ * @expose
+ * @param {org.apache.flex.geom.Point} point The Point to be converted.
+ * @param {Object} local The object used as reference.
+ * @return {org.apache.flex.geom.Point} The converted Point.
+ */
+org.apache.flex.utils.PointUtils.localToGlobal =
+ function(point, local) {
+ var x = point.x, y = point.y;
+ var element = local.element;
+
+ do {
+ x += element.offsetLeft;
+ y += element.offsetTop;
+ element = element.offsetParent;
+ }
+ while (element);
+ return new Point(x,y);
+};
[19/28] git commit: [flex-asjs] [refs/heads/develop] - move
ToolTipBead to FlexJSJX
Posted by ah...@apache.org.
move ToolTipBead to FlexJSJX
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0c9555c6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0c9555c6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0c9555c6
Branch: refs/heads/develop
Commit: 0c9555c6514ddfbfe4a70e30b9879316c654dde9
Parents: eb5eac5
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 7 06:39:16 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../as/projects/FlexJSJX/basic-manifest.xml | 1 +
.../apache/flex/html/accessories/ToolTipBead.as | 126 +++++++++++++++++++
.../as/projects/FlexJSUI/basic-manifest.xml | 1 -
.../as/projects/FlexJSUI/src/FlexJSUIClasses.as | 1 +
.../apache/flex/html/accessories/ToolTipBead.as | 126 -------------------
5 files changed, 128 insertions(+), 127 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0c9555c6/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 a1946dc..6508bf5 100644
--- a/frameworks/as/projects/FlexJSJX/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSJX/basic-manifest.xml
@@ -67,6 +67,7 @@
<component id="NumberFormatter" class="org.apache.flex.html.accessories.NumberFormatter"/>
<component id="CurrencyFormatter" class="org.apache.flex.html.accessories.CurrencyFormatter"/>
+ <component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" />
<component id="BindableCSSStyles" class="org.apache.flex.core.BindableCSSStyles"/>
<component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0c9555c6/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/ToolTipBead.as b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/ToolTipBead.as
new file mode 100644
index 0000000..a1556c2
--- /dev/null
+++ b/frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/accessories/ToolTipBead.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.accessories
+{
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IPopUpHost;
+ 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.events.MouseEvent;
+ import org.apache.flex.geom.Point;
+ import org.apache.flex.html.ToolTip;
+ import org.apache.flex.utils.PointUtils;
+ import org.apache.flex.utils.UIUtils;
+
+ /**
+ * The ToolTipBead class is a specialty bead that can be used with
+ * any control. The bead floats a string over a control if
+ * the user hovers over the control with a mouse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ToolTipBead implements IBead
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ToolTipBead()
+ {
+ }
+
+ private var _toolTip:String;
+
+ /**
+ * The string to use as the toolTip.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get toolTip():String
+ {
+ return _toolTip;
+ }
+ public function set toolTip(value:String):void
+ {
+ _toolTip = value;
+ }
+
+ 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;
+
+ IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
+ }
+
+ private var tt:ToolTip;
+ private var host:IPopUpHost;
+
+ /**
+ * @private
+ */
+ private function rollOverHandler( event:MouseEvent ):void
+ {
+ IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+
+ var comp:IUIBase = _strand as IUIBase
+ host = UIUtils.findPopUpHost(comp);
+ tt = new ToolTip();
+ tt.text = toolTip;
+ var pt:Point = new Point(comp.width, comp.height);
+ pt = PointUtils.localToGlobal(pt, comp);
+ tt.x = pt.x;
+ tt.y = pt.y;
+ host.addElement(tt);
+ }
+
+ /**
+ * @private
+ */
+ private function rollOutHandler( event:MouseEvent ):void
+ {
+ if (tt)
+ host.removeElement(tt);
+ tt = null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0c9555c6/frameworks/as/projects/FlexJSUI/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/basic-manifest.xml b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
index 5853b20..7672b35 100644
--- a/frameworks/as/projects/FlexJSUI/basic-manifest.xml
+++ b/frameworks/as/projects/FlexJSUI/basic-manifest.xml
@@ -88,7 +88,6 @@
<component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
<component id="HRule" class="org.apache.flex.html.HRule" />
<component id="Spacer" class="org.apache.flex.html.Spacer" />
- <component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" />
<component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
<component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
<component id="MXMLDragInitiator" class="org.apache.flex.core.MXMLDragInitiator" />
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0c9555c6/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
index 8b42a0d..7dae39f 100644
--- a/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
+++ b/frameworks/as/projects/FlexJSUI/src/FlexJSUIClasses.as
@@ -45,6 +45,7 @@ internal class FlexJSUIClasses
import org.apache.flex.charts.supportClasses.ChartDataGroup; ChartDataGroup;
import org.apache.flex.maps.google.Map; Map;
+ import org.apache.flex.html.ToolTip; ToolTip;
import org.apache.flex.html.accessories.NumericOnlyTextInputBead; NumericOnlyTextInputBead;
import org.apache.flex.html.accessories.PasswordInputBead; PasswordInputBead;
import org.apache.flex.html.accessories.TextPromptBead; TextPromptBead;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0c9555c6/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/accessories/ToolTipBead.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/accessories/ToolTipBead.as
deleted file mode 100644
index a1556c2..0000000
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/accessories/ToolTipBead.as
+++ /dev/null
@@ -1,126 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.accessories
-{
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IPopUpHost;
- 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.events.MouseEvent;
- import org.apache.flex.geom.Point;
- import org.apache.flex.html.ToolTip;
- import org.apache.flex.utils.PointUtils;
- import org.apache.flex.utils.UIUtils;
-
- /**
- * The ToolTipBead class is a specialty bead that can be used with
- * any control. The bead floats a string over a control if
- * the user hovers over the control with a mouse.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ToolTipBead implements IBead
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ToolTipBead()
- {
- }
-
- private var _toolTip:String;
-
- /**
- * The string to use as the toolTip.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolTip():String
- {
- return _toolTip;
- }
- public function set toolTip(value:String):void
- {
- _toolTip = value;
- }
-
- 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;
-
- IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);
- }
-
- private var tt:ToolTip;
- private var host:IPopUpHost;
-
- /**
- * @private
- */
- private function rollOverHandler( event:MouseEvent ):void
- {
- IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
-
- var comp:IUIBase = _strand as IUIBase
- host = UIUtils.findPopUpHost(comp);
- tt = new ToolTip();
- tt.text = toolTip;
- var pt:Point = new Point(comp.width, comp.height);
- pt = PointUtils.localToGlobal(pt, comp);
- tt.x = pt.x;
- tt.y = pt.y;
- host.addElement(tt);
- }
-
- /**
- * @private
- */
- private function rollOutHandler( event:MouseEvent ):void
- {
- if (tt)
- host.removeElement(tt);
- tt = null;
- }
- }
-}
[11/28] git commit: [flex-asjs] [refs/heads/develop] - get asdoc
working again
Posted by ah...@apache.org.
get asdoc 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/94dba736
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/94dba736
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/94dba736
Branch: refs/heads/develop
Commit: 94dba73636b494b6d0ebe7c9f12e52b60a9e0583
Parents: 1c9846d
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:23:32 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
asdoc/build.xml | 7 +-
frameworks/asdoc-config.xml | 363 +++++++++++++++++++++++++++++++++++++++
2 files changed, 368 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/94dba736/asdoc/build.xml
----------------------------------------------------------------------
diff --git a/asdoc/build.xml b/asdoc/build.xml
index 489c4f6..eac41cb 100644
--- a/asdoc/build.xml
+++ b/asdoc/build.xml
@@ -21,7 +21,7 @@
<property environment="env"/>
<property name="FLEX_HOME" value="${basedir}/../../flex-sdk"/>
<property name="lenient" value="true"/>
- <property name="flexlib" location="${FLEX_HOME}/frameworks"/>
+ <property name="flexlib" location="${basedir}/../frameworks"/>
<property name="doc_output" location="${basedir}/../asdoc-output" />
<property name="project_home" location="${basedir}/../frameworks/as/projects"/>
@@ -69,9 +69,12 @@
main-title="${release} API Reference "
footer="${manifest.Implementation-Vendor}" >
- <!-- source path for asdoc -->
+ <load-config filename="${flexlib}/asdoc-config.xml" />
+
+ <!-- source path for asdoc -->
<compiler.source-path path-element="${project_home}/FlexJSUI/src"/>
<compiler.source-path path-element="${project_home}/FlexJSJX/src"/>
+ <compiler.source-path path-element="${project_home}/MXMLCClasses/src"/>
<!-- namespaces to include in asdoc -->
<doc-namespaces uri="library://ns.apache.org/flexjs/basic"/>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/94dba736/frameworks/asdoc-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/asdoc-config.xml b/frameworks/asdoc-config.xml
new file mode 100644
index 0000000..0e31f3f
--- /dev/null
+++ b/frameworks/asdoc-config.xml
@@ -0,0 +1,363 @@
+<?xml version="1.0"?>
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+
+<flex-config>
+ <!-- Specifies the minimum player version that will run the compiled SWF. -->
+ <target-player>11.1</target-player>
+
+ <!-- Specifies the version of the compiled SWF -->
+ <swf-version>14</swf-version>
+
+ <compiler>
+
+ <!-- Turn on generation of accessible SWFs. -->
+ <accessible>true</accessible>
+
+ <!-- Specifies the locales for internationalization. -->
+ <locale>
+ <locale-element>en_US</locale-element>
+ </locale>
+
+ <!-- List of path elements that form the roots of ActionScript class hierarchies. -->
+ <!-- not set -->
+ <!--
+ <source-path>
+ <path-element>string</path-element>
+ </source-path>
+ -->
+
+ <!-- Allow the source-path to have path-elements which contain other path-elements -->
+ <allow-source-path-overlap>false</allow-source-path-overlap>
+
+ <!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
+ <!-- code. -->
+ <show-actionscript-warnings>true</show-actionscript-warnings>
+
+ <!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
+ <!-- but true by default for compc. -->
+ <!--
+ <debug>true</debug>
+ -->
+
+ <!-- List of SWC files or directories to compile against but to omit from -->
+ <!-- linking. -->
+ <external-library-path>
+ <path-element>{playerglobalHome}/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc</path-element>
+ </external-library-path>
+
+ <!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
+ <!-- the compiler during mxml translation and are helpful with understanding and -->
+ <!-- debugging Flex applications. -->
+ <keep-generated-actionscript>false</keep-generated-actionscript>
+
+ <!-- not set -->
+ <!--
+ <include-libraries>
+ <library>string</library>
+ </include-libraries>
+ -->
+
+ <!-- List of SWC files or directories that contain SWC files. -->
+ <library-path>
+ <path-element>as/libs</path-element>
+ <path-element>{playerglobalHome}/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}</path-element>
+ </library-path>
+
+ <namespaces>
+ <!-- Specify a URI to associate with a manifest of components for use as MXML -->
+ <!-- elements. -->
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>as/projects/FlexJSUI/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+
+ <manifest>as/projects/FlexJSUI/html5-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/svg</uri>
+ <manifest>as/projects/FlexJSUI/svg-manifest.xml</manifest>
+ </namespace>
+
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/mx</uri>
+ <manifest>as/projects/FlexJSUI/mx-manifest.xml</manifest>
+ </namespace>
+
+ </namespaces>
+
+ <!-- Enable post-link SWF optimization. -->
+ <optimize>true</optimize>
+
+ <!-- Enable trace statement omission. -->
+ <omit-trace-statements>true</omit-trace-statements>
+
+ <!-- Keep the following AS3 metadata in the bytecodes. -->
+ <!-- Warning: For the data binding feature in the Flex framework to work properly, -->
+ <!-- the following metadata must be kept: -->
+ <!-- 1. Bindable -->
+ <!-- 2. Managed -->
+ <!-- 3. ChangeEvent -->
+ <!-- 4. NonCommittingChangeEvent -->
+ <!-- 5. Transient -->
+ <!--
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+ -->
+
+ <!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
+ <!-- will not be able to detect assignments to "foo". -->
+ <show-binding-warnings>true</show-binding-warnings>
+
+ <!-- toggle whether warnings generated from unused type selectors are displayed -->
+ <show-unused-type-selector-warnings>true</show-unused-type-selector-warnings>
+
+ <!-- Run the AS3 compiler in strict error checking mode. -->
+ <strict>true</strict>
+
+ <!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
+ <!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
+ <!-- (-strict is recommended, but not required, for earlier errors) -->
+ <as3>true</as3>
+
+ <!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
+ <!-- properties. In the prototype based object model built-in functions are implemented as dynamic -->
+ <!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for -->
+ <!-- references to dynamic properties) -->
+ <es>false</es>
+
+ <!-- List of CSS or SWC files to apply as a theme. -->
+ <theme>
+ </theme>
+
+ <!-- Turns on the display of stack traces for uncaught runtime errors. -->
+ <verbose-stacktraces>false</verbose-stacktraces>
+
+ <!-- Defines the AS3 file encoding. -->
+ <!-- not set -->
+ <!--
+ <actionscript-file-encoding></actionscript-file-encoding>
+ -->
+
+ <fonts>
+
+ <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater clarity for small -->
+ <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
+ <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing <flash-type>true</flash-type> -->
+ <advanced-anti-aliasing>true</advanced-anti-aliasing>
+
+ <!-- The number of embedded font faces that are cached. -->
+ <max-cached-fonts>20</max-cached-fonts>
+
+ <!-- The number of character glyph outlines to cache for each font face. -->
+ <max-glyphs-per-face>1000</max-glyphs-per-face>
+
+ <!-- Defines ranges that can be used across multiple font-face declarations. -->
+ <!-- See flash-unicode-table.xml for more examples. -->
+ <!-- not set -->
+ <!--
+ <languages>
+ <language-range>
+ <lang>englishRange</lang>
+ <range>U+0020-007E</range>
+ </language-range>
+ </languages>
+ -->
+
+ <!-- Compiler font manager classes, in policy resolution order -->
+ <!-- NOTE: For Apache Flex -->
+ <!-- AFEFontManager and CFFFontManager both use proprietary technology. -->
+ <!-- You must install the optional font jars if you wish to use embedded fonts -->
+ <!-- directly or you can use fontswf to precompile the font as a swf. -->
+ <managers>
+ <manager-class>flash.fonts.JREFontManager</manager-class>
+ <manager-class>flash.fonts.BatikFontManager</manager-class>
+ <manager-class>flash.fonts.AFEFontManager</manager-class>
+ <manager-class>flash.fonts.CFFFontManager</manager-class>
+ </managers>
+
+ <!-- File containing cached system font licensing information produced via
+ java -cp mxmlc.jar flex2.tools.FontSnapshot (fontpath)
+ Will default to winFonts.ser on Windows XP and
+ macFonts.ser on Mac OS X, so is commented out by default.
+
+ <local-fonts-snapshot>localFonts.ser</local-fonts-snapshot>
+ -->
+
+ </fonts>
+
+ <!-- Array.toString() format has changed. -->
+ <warn-array-tostring-changes>false</warn-array-tostring-changes>
+
+ <!-- Assignment within conditional. -->
+ <warn-assignment-within-conditional>true</warn-assignment-within-conditional>
+
+ <!-- Possibly invalid Array cast operation. -->
+ <warn-bad-array-cast>true</warn-bad-array-cast>
+
+ <!-- Non-Boolean value used where a Boolean value was expected. -->
+ <warn-bad-bool-assignment>true</warn-bad-bool-assignment>
+
+ <!-- Invalid Date cast operation. -->
+ <warn-bad-date-cast>true</warn-bad-date-cast>
+
+ <!-- Unknown method. -->
+ <warn-bad-es3-type-method>true</warn-bad-es3-type-method>
+
+ <!-- Unknown property. -->
+ <warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>
+
+ <!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
+ <warn-bad-nan-comparison>true</warn-bad-nan-comparison>
+
+ <!-- Impossible assignment to null. -->
+ <warn-bad-null-assignment>true</warn-bad-null-assignment>
+
+ <!-- Illogical comparison with null. -->
+ <warn-bad-null-comparison>true</warn-bad-null-comparison>
+
+ <!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
+ <warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>
+
+ <!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
+ <warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>
+
+ <!-- __resolve is no longer supported. -->
+ <warn-changes-in-resolve>false</warn-changes-in-resolve>
+
+ <!-- Class is sealed. It cannot have members added to it dynamically. -->
+ <warn-class-is-sealed>true</warn-class-is-sealed>
+
+ <!-- Constant not initialized. -->
+ <warn-const-not-initialized>true</warn-const-not-initialized>
+
+ <!-- Function used in new expression returns a value. Result will be what the -->
+ <!-- function returns, rather than a new instance of that function. -->
+ <warn-constructor-returns-value>false</warn-constructor-returns-value>
+
+ <!-- EventHandler was not added as a listener. -->
+ <warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>
+
+ <!-- Unsupported ActionScript 2.0 function. -->
+ <warn-deprecated-function-error>true</warn-deprecated-function-error>
+
+ <!-- Unsupported ActionScript 2.0 property. -->
+ <warn-deprecated-property-error>true</warn-deprecated-property-error>
+
+ <!-- More than one argument by the same name. -->
+ <warn-duplicate-argument-names>true</warn-duplicate-argument-names>
+
+ <!-- Duplicate variable definition -->
+ <warn-duplicate-variable-def>true</warn-duplicate-variable-def>
+
+ <!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
+ <warn-for-var-in-changes>false</warn-for-var-in-changes>
+
+ <!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
+ <warn-import-hides-class>true</warn-import-hides-class>
+
+ <!-- Use of the instanceof operator. -->
+ <warn-instance-of-changes>true</warn-instance-of-changes>
+
+ <!-- Internal error in compiler. -->
+ <warn-internal-error>true</warn-internal-error>
+
+ <!-- _level is no longer supported. For more information, see the flash.display package. -->
+ <warn-level-not-supported>true</warn-level-not-supported>
+
+ <!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
+ <warn-missing-namespace-decl>true</warn-missing-namespace-decl>
+
+ <!-- Negative value will become a large positive value when assigned to a uint data type. -->
+ <warn-negative-uint-literal>true</warn-negative-uint-literal>
+
+ <!-- Missing constructor. -->
+ <warn-no-constructor>false</warn-no-constructor>
+
+ <!-- The super() statement was not called within the constructor. -->
+ <warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>
+
+ <!-- Missing type declaration. -->
+ <warn-no-type-decl>true</warn-no-type-decl>
+
+ <!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
+ <!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space. -->
+ <warn-number-from-string-changes>false</warn-number-from-string-changes>
+
+ <!-- Change in scoping for the this keyword. Class methods extracted from an -->
+ <!-- instance of a class will always resolve this back to that instance. In -->
+ <!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
+ <!-- is invoked from. -->
+ <warn-scoping-change-in-this>false</warn-scoping-change-in-this>
+
+ <!-- Inefficient use of += on a TextField.-->
+ <warn-slow-text-field-addition>true</warn-slow-text-field-addition>
+
+ <!-- Possible missing parentheses. -->
+ <warn-unlikely-function-value>true</warn-unlikely-function-value>
+
+ <!-- Possible usage of the ActionScript 2.0 XML class. -->
+ <warn-xml-class-has-changed>false</warn-xml-class-has-changed>
+
+ </compiler>
+
+ <!-- compute-digest: writes a digest to the catalog.xml of a library. Use this when the library will be used as a
+ cross-domain rsl.-->
+ <!-- compute-digest usage:
+ <compute-digest>boolean</compute-digest>
+ -->
+
+ <!-- remove-unused-rsls: remove RSLs that are not being used by the application-->
+ <remove-unused-rsls>true</remove-unused-rsls>
+
+ <!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
+ <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
+
+ <!-- target-player: specifies the version of the player the application is targeting.
+ Features requiring a later version will not be compiled into the application.
+ The minimum value supported is "9.0.0".-->
+ <!-- target-player usage:
+ <target-player>version</target-player>
+ -->
+
+ <!-- Enables SWFs to access the network. -->
+ <use-network>true</use-network>
+
+ <!-- Metadata added to SWFs via the SWF Metadata tag. -->
+ <metadata>
+ <title>Apache FlexJS Application</title>
+ <description>http://flex.apache.org/</description>
+ <publisher>Apache Software Foundation</publisher>
+ <creator>unknown</creator>
+ <language>EN</language>
+ </metadata>
+
+</flex-config>
[12/28] git commit: [flex-asjs] [refs/heads/develop] - keep asdoc
nodes to allow for optimization
Posted by ah...@apache.org.
keep asdoc nodes to allow for optimization
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/afd6ad97
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/afd6ad97
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/afd6ad97
Branch: refs/heads/develop
Commit: afd6ad97a6bdffbf3d758560d0d9e8754332c044
Parents: b8472d6
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:10:36 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:58 2014 -0800
----------------------------------------------------------------------
frameworks/js/build.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/afd6ad97/frameworks/js/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/build.xml b/frameworks/js/build.xml
index 118c190..b33b0ab 100644
--- a/frameworks/js/build.xml
+++ b/frameworks/js/build.xml
@@ -117,6 +117,7 @@
<jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
<arg value="+flexlib=${FLEX_HOME}/frameworks" />
<arg value="-js-output-type=FLEXJS" />
+ <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
<arg value="-output=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
<arg value="-load-config=${FLEXJS_HOME}/frameworks/as/projects/FlexJSJX/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
[27/28] git commit: [flex-asjs] [refs/heads/develop] - lint
Posted by ah...@apache.org.
lint
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/04703847
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/04703847
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/04703847
Branch: refs/heads/develop
Commit: 047038475b169efd0118dbaf97106855ed9711d7
Parents: ee19130
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 11:29:23 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:08:00 2014 -0800
----------------------------------------------------------------------
frameworks/js/FlexJS/src/mx/states/AddItems.js | 6 ++--
.../src/org/apache/flex/core/CallLaterBead.js | 12 +++----
.../org/apache/flex/core/SimpleStatesImpl.js | 15 ++++----
.../org/apache/flex/effects/PlatformWiper.js | 16 ++++-----
.../src/org/apache/flex/events/DragEvent.js | 6 ++--
.../js/FlexJS/src/org/apache/flex/geom/Point.js | 18 +++++-----
.../src/org/apache/flex/geom/Rectangle.js | 36 +++++++++++---------
.../src/org/apache/flex/html/HContainer.js | 2 +-
.../org/apache/flex/html/ImageAndTextButton.js | 10 ++----
.../org/apache/flex/html/ToggleTextButton.js | 27 ++++++++-------
.../src/org/apache/flex/html/VContainer.js | 2 +-
.../src/org/apache/flex/utils/PointUtils.js | 8 ++---
12 files changed, 81 insertions(+), 77 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/mx/states/AddItems.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/mx/states/AddItems.js b/frameworks/js/FlexJS/src/mx/states/AddItems.js
index 31cd682..a8bac93 100644
--- a/frameworks/js/FlexJS/src/mx/states/AddItems.js
+++ b/frameworks/js/FlexJS/src/mx/states/AddItems.js
@@ -46,7 +46,7 @@ mx.states.AddItems.prototype.setDocument = function(document, opt_id) {
this.document = document;
var data = document.mxmlsd[itemsDescriptorIndex];
if (typeof(data.slice) == 'function') {
- itemsDescriptor = {};
+ itemsDescriptor = {};
itemsDescriptor.descriptor = data;
// replace the entry in the document so subsequent
// addItems know it is shared
@@ -72,10 +72,10 @@ mx.states.AddItems.prototype.items = null;
/**
* @expose
- * @type {Array} itemsDescriptor The index into the array
+ * @type {number} itemsDescriptor The index into the array
* of itemDescriptors on the document
*/
-mx.states.AddItems.prototype.itemsDescriptorIndex;
+mx.states.AddItems.prototype.itemsDescriptorIndex = -1;
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
index c36af25..d2f2003 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/CallLaterBead.js
@@ -28,7 +28,7 @@ org.apache.flex.core.CallLaterBead = function() {
this.strand_ = null;
/**
- * @protected
+ * @private
* @type {Array}
*/
this.calls_ = null;
@@ -61,16 +61,16 @@ org.apache.flex.core.CallLaterBead.prototype.set_strand =
/**
* @protected
* @param {Function} fn The fucntion to call later.
- * @param {Array=} args The optional array of arguments.
- * @param {Object} thisArg The optional 'this' object.
+ * @param {Array=} opt_args The optional array of arguments.
+ * @param {Object=} opt_thisArg The optional 'this' object.
*/
org.apache.flex.core.CallLaterBead.prototype.callLater =
- function(fn, args, thisArg) {
+ function(fn, opt_args, opt_thisArg) {
if (this.calls_ == null)
- this.calls_ = [ {thisArg: thisArg, fn: fn, args: args } ];
+ this.calls_ = [{thisArg: opt_thisArg, fn: fn, args: opt_args }];
else
- this.calls_.push({thisArg: thisArg, fn: fn, args: args });
+ this.calls_.push({thisArg: opt_thisArg, fn: fn, args: opt_args });
window.setTimeout(callback, 0);
};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index 6a1d99c..b5bd91f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -15,8 +15,8 @@
goog.provide('org.apache.flex.core.SimpleStatesImpl');
goog.require('mx.states.AddItems');
-goog.require('mx.states.SetProperty');
goog.require('mx.states.SetEventHandler');
+goog.require('mx.states.SetProperty');
goog.require('mx.states.State');
goog.require('org.apache.flex.core.IBead');
goog.require('org.apache.flex.core.IStatesImpl');
@@ -183,14 +183,13 @@ org.apache.flex.core.SimpleStatesImpl.prototype.apply_ = function(s) {
o = arr[p];
if (org.apache.flex.utils.Language.is(o, mx.states.AddItems)) {
if (!o.items) {
- o.items = o.itemsDescriptor.items;
- if (o.items == null)
- {
- ai.items =
- MXMLDataInterpreter.generateMXMLArray(o.document,
+ o.items = o.itemsDescriptor.items;
+ if (o.items == null) {
+ ai.items =
+ MXMLDataInterpreter.generateMXMLArray(o.document,
null, ai.itemsDescriptor.descriptor);
- o.itemsDescriptor.items = ai.items;
- }
+ o.itemsDescriptor.items = ai.items;
+ }
}
for (q in o.items) {
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js b/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
index 369f2e4..3b48370 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/effects/PlatformWiper.js
@@ -21,13 +21,13 @@ goog.require('org.apache.flex.geom.Rectangle');
/**
* @constructor
*/
-org.apache.flex.effects.PlatformWiper = function(delay, opt_repeatCount) {
+org.apache.flex.effects.PlatformWiper = function() {
/**
- * @protected
+ * @private
* @type {Object}
*/
- this.target_;
+ this.target_ = null;
};
@@ -47,10 +47,10 @@ org.apache.flex.effects.PlatformWiper.prototype.FLEXJS_CLASS_INFO =
* Sets the target for the Wipe.
* @param {Object} target The target for the Wipe effect.
*/
-org.apache.flex.effects.PlatformWiper.prototype.set_target =
- function(target) {
+org.apache.flex.effects.PlatformWiper.prototype.set_target =
+ function(target) {
if (target == null)
- delete this.target_.style.clip;
+ delete this.target_.style.clip;
this.target_ = target;
};
@@ -60,8 +60,8 @@ org.apache.flex.effects.PlatformWiper.prototype.set_target =
* Clips the Object.
* @param {org.apache.flex.geom.Rectangle} rect The visible area.
*/
-org.apache.flex.effects.PlatformWiper.prototype.set_visibleRect =
- function(rect) {
+org.apache.flex.effects.PlatformWiper.prototype.set_visibleRect =
+ function(rect) {
var styleString = 'rect(';
styleString += rect.top.toString() + 'px,';
styleString += rect.width.toString() + 'px,';
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
index 705b531..34395e4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/events/DragEvent.js
@@ -71,9 +71,9 @@ org.apache.flex.events.DragEvent.prototype.dragSource = null;
* @expose
* @param {MouseEvent} event The mouse event to copy.
*/
-org.apache.flex.events.DragEvent.prototype.copyMouseEventProperties =
- function(event) {
-}
+org.apache.flex.events.DragEvent.prototype.copyMouseEventProperties =
+ function(event) {
+};
/**
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js b/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
index c6e183c..febb4dd 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/geom/Point.js
@@ -18,6 +18,8 @@ goog.provide('org.apache.flex.geom.Point');
/**
* @constructor
+ * @param {number} x
+ * @param {number} y
*/
org.apache.flex.geom.Point = function(x, y) {
@@ -51,8 +53,8 @@ org.apache.flex.geom.Point.prototype.FLEXJS_CLASS_INFO =
* The x coordinate.
* @return {number} value The x coordinate.
*/
-org.apache.flex.geom.Point.prototype.get_x =
- function() {
+org.apache.flex.geom.Point.prototype.get_x =
+ function() {
return this.x;
};
@@ -62,8 +64,8 @@ org.apache.flex.geom.Point.prototype.get_x =
* The x coordinate.
* @param {number} value The x coordinate.
*/
-org.apache.flex.geom.Point.prototype.set_x =
- function(value) {
+org.apache.flex.geom.Point.prototype.set_x =
+ function(value) {
this.x = value;
};
@@ -73,8 +75,8 @@ org.apache.flex.geom.Point.prototype.set_x =
* The y coordinate.
* @return {number} value The y coordinate.
*/
-org.apache.flex.geom.Point.prototype.get_y =
- function() {
+org.apache.flex.geom.Point.prototype.get_y =
+ function() {
return this.y;
};
@@ -84,7 +86,7 @@ org.apache.flex.geom.Point.prototype.get_y =
* The y coordinate.
* @param {number} value The y coordinate.
*/
-org.apache.flex.geom.Point.prototype.set_y =
- function(value) {
+org.apache.flex.geom.Point.prototype.set_y =
+ function(value) {
this.y = value;
};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js b/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
index 9bd82a8..32f126c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/geom/Rectangle.js
@@ -18,6 +18,10 @@ goog.provide('org.apache.flex.geom.Rectangle');
/**
* @constructor
+ * @param {number} left
+ * @param {number} top
+ * @param {number} width
+ * @param {number} height
*/
org.apache.flex.geom.Rectangle = function(left, top, width, height) {
@@ -63,8 +67,8 @@ org.apache.flex.geom.Rectangle.prototype.FLEXJS_CLASS_INFO =
* The left coordinate.
* @return {number} value The left coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.get_left =
- function() {
+org.apache.flex.geom.Rectangle.prototype.get_left =
+ function() {
return this.left;
};
@@ -74,8 +78,8 @@ org.apache.flex.geom.Rectangle.prototype.get_left =
* The left coordinate.
* @param {number} value The left coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.set_left =
- function(value) {
+org.apache.flex.geom.Rectangle.prototype.set_left =
+ function(value) {
this.left = value;
};
@@ -85,8 +89,8 @@ org.apache.flex.geom.Rectangle.prototype.set_left =
* The top coordinate.
* @return {number} value The top coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.get_top =
- function() {
+org.apache.flex.geom.Rectangle.prototype.get_top =
+ function() {
return this.top;
};
@@ -96,8 +100,8 @@ org.apache.flex.geom.Rectangle.prototype.get_top =
* The top coordinate.
* @param {number} value The top coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.set_top =
- function(value) {
+org.apache.flex.geom.Rectangle.prototype.set_top =
+ function(value) {
this.top = value;
};
@@ -107,8 +111,8 @@ org.apache.flex.geom.Rectangle.prototype.set_top =
* The width coordinate.
* @return {number} value The width coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.get_width =
- function() {
+org.apache.flex.geom.Rectangle.prototype.get_width =
+ function() {
return this.width;
};
@@ -118,8 +122,8 @@ org.apache.flex.geom.Rectangle.prototype.get_width =
* The width coordinate.
* @param {number} value The width coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.set_width =
- function(value) {
+org.apache.flex.geom.Rectangle.prototype.set_width =
+ function(value) {
this.width = value;
};
@@ -129,8 +133,8 @@ org.apache.flex.geom.Rectangle.prototype.set_width =
* The height coordinate.
* @return {number} value The height coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.get_height =
- function() {
+org.apache.flex.geom.Rectangle.prototype.get_height =
+ function() {
return this.height;
};
@@ -140,8 +144,8 @@ org.apache.flex.geom.Rectangle.prototype.get_height =
* The height coordinate.
* @param {number} value The height coordinate.
*/
-org.apache.flex.geom.Rectangle.prototype.set_height =
- function(value) {
+org.apache.flex.geom.Rectangle.prototype.set_height =
+ function(value) {
this.height = value;
};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
index 4e24093..f00c395 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/HContainer.js
@@ -14,8 +14,8 @@
goog.provide('org.apache.flex.html.HContainer');
-goog.require('org.apache.flex.html.Container');
goog.require('org.apache.flex.core.IContainer');
+goog.require('org.apache.flex.html.Container');
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
index 2d1efa8..e33eae4 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ImageAndTextButton.js
@@ -24,12 +24,8 @@ goog.require('org.apache.flex.html.Button');
*/
org.apache.flex.html.ImageAndTextButton = function() {
org.apache.flex.html.ImageAndTextButton.base(this, 'constructor');
-
- /**
- * @type {Object>}
- */
- this.img;
-
+
+
};
goog.inherits(org.apache.flex.html.ImageAndTextButton,
org.apache.flex.html.Button);
@@ -54,7 +50,7 @@ org.apache.flex.html.ImageAndTextButton.prototype.createElement =
this.element.setAttribute('type', 'button');
this.img = document.createElement('img');
this.element.appendChild(img);
-
+
this.positioner = this.element;
this.element.flexjs_wrapper = this;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
index 281b144..065df45 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ToggleTextButton.js
@@ -28,6 +28,7 @@ org.apache.flex.html.ToggleTextButton = function() {
/**
+ * @private
* @type {boolean}
*/
this.selected_ = false;
@@ -64,6 +65,7 @@ org.apache.flex.html.ToggleTextButton.prototype.set_text =
this.element.innerHTML = value;
};
+
/**
* @expose
* @return {boolean} The selected getter.
@@ -73,6 +75,7 @@ org.apache.flex.html.ToggleTextButton.prototype.get_selected =
return this.selected_;
};
+
/**
* @expose
* @param {boolean} value The selected setter.
@@ -80,17 +83,17 @@ org.apache.flex.html.ToggleTextButton.prototype.get_selected =
org.apache.flex.html.ToggleTextButton.prototype.set_selected =
function(value) {
if (this.selected_ != value) {
- this.selected_ = value;
-
- var className = this._strand.className;
- if (value) {
- if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
- this._strand.className = className.substring(0, className.length - this.SELECTED.length);
- }
- else {
- if (className.indexOf(this.SELECTED) == -1)
- this._strand.className += this.SELECTED;
- }
+ this.selected_ = value;
+
+ var className = this._strand.className;
+ if (value) {
+ if (className.indexOf(this.SELECTED) == className.length - this.SELECTED.length)
+ this._strand.className = className.substring(0, className.length - this.SELECTED.length);
+ }
+ else {
+ if (className.indexOf(this.SELECTED) == -1)
+ this._strand.className += this.SELECTED;
+ }
}
};
@@ -99,5 +102,5 @@ org.apache.flex.html.ToggleTextButton.prototype.set_selected =
/**
* @type {string} The selected setter.
*/
-org.apache.flex.html.ToggleTextButton.prototype.SELECTED = "_Selected";
+org.apache.flex.html.ToggleTextButton.prototype.SELECTED = '_Selected';
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js b/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
index bedd53b..8d646a0 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/VContainer.js
@@ -14,8 +14,8 @@
goog.provide('org.apache.flex.html.VContainer');
-goog.require('org.apache.flex.html.Container');
goog.require('org.apache.flex.core.IContainer');
+goog.require('org.apache.flex.html.Container');
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/04703847/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
index a5a8f8c..e18aa71 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/PointUtils.js
@@ -49,10 +49,10 @@ org.apache.flex.utils.PointUtils.globalToLocal =
do {
x -= element.offsetLeft;
y -= element.offsetTop;
- element = element.offsetParent;
+ element = element.offsetParent;
}
while (element);
- return new Point(x,y);
+ return new Point(x, y);
};
@@ -70,8 +70,8 @@ org.apache.flex.utils.PointUtils.localToGlobal =
do {
x += element.offsetLeft;
y += element.offsetTop;
- element = element.offsetParent;
+ element = element.offsetParent;
}
while (element);
- return new Point(x,y);
+ return new Point(x, y);
};
[18/28] git commit: [flex-asjs] [refs/heads/develop] - more missing
classes
Posted by ah...@apache.org.
more missing classes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/002bbd1e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/002bbd1e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/002bbd1e
Branch: refs/heads/develop
Commit: 002bbd1eabd0d560d6648d6515f6e6535d19c5a0
Parents: ad25e3f
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 7 13:22:14 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/core/ILayoutChild.js | 39 +++++++++++++++++++
.../src/org/apache/flex/core/IMXMLDocument.js | 41 ++++++++++++++++++++
.../FlexJS/src/org/apache/flex/html/ToolTip.js | 40 +++++++++++++++++++
3 files changed, 120 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/002bbd1e/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js b/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
new file mode 100644
index 0000000..4ba8c17
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/ILayoutChild.js
@@ -0,0 +1,39 @@
+/**
+ * Licensed 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.
+ */
+
+/**
+ * @fileoverview
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.core.ILayoutChild');
+
+
+
+/**
+ * @interface
+ */
+org.apache.flex.core.ILayoutChild = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.ILayoutChild.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ILayoutChild',
+ qName: 'org.apache.flex.core.ILayoutChild' }] };
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/002bbd1e/frameworks/js/FlexJS/src/org/apache/flex/core/IMXMLDocument.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/IMXMLDocument.js b/frameworks/js/FlexJS/src/org/apache/flex/core/IMXMLDocument.js
new file mode 100644
index 0000000..88c76e1
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/IMXMLDocument.js
@@ -0,0 +1,41 @@
+/**
+ * Licensed 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.
+ */
+
+/**
+ * @fileoverview
+ * @suppress {checkTypes}
+ */
+
+goog.provide('org.apache.flex.core.IMXMLDocument');
+
+
+
+/**
+ * IMXMLDocument
+ *
+ * @interface
+ */
+org.apache.flex.core.IMXMLDocument = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.core.IMXMLDocument.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'IMXMLDocument',
+ qName: 'org.apache.flex.core.IMXMLDocument' }] };
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/002bbd1e/frameworks/js/FlexJS/src/org/apache/flex/html/ToolTip.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/html/ToolTip.js b/frameworks/js/FlexJS/src/org/apache/flex/html/ToolTip.js
new file mode 100644
index 0000000..f1bf5a8
--- /dev/null
+++ b/frameworks/js/FlexJS/src/org/apache/flex/html/ToolTip.js
@@ -0,0 +1,40 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('org.apache.flex.html.ToolTip');
+
+goog.require('org.apache.flex.html.Label');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IContainer}
+ * @extends {org.apache.flex.core.ToolTipBase}
+ */
+org.apache.flex.html.ToolTip = function() {
+ org.apache.flex.html.ToolTip.base(this, 'constructor');
+};
+goog.inherits(org.apache.flex.html.ToolTip,
+ org.apache.flex.html.Label);
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+org.apache.flex.html.ToolTip.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'ToolTip',
+ qName: 'org.apache.flex.html.ToolTip' }]};
[09/28] git commit: [flex-asjs] [refs/heads/develop] - override a few
more default types in Falcon
Posted by ah...@apache.org.
override a few more default types in Falcon
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1c9846d2
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1c9846d2
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1c9846d2
Branch: refs/heads/develop
Commit: 1c9846d2869e0d0367433b7a47f07c18845af231
Parents: 41e0bd8
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 22:22:55 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:57 2014 -0800
----------------------------------------------------------------------
frameworks/as/flex-config-template.xml | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c9846d2/frameworks/as/flex-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/as/flex-config-template.xml b/frameworks/as/flex-config-template.xml
index ddd83ac..65a7fc1 100644
--- a/frameworks/as/flex-config-template.xml
+++ b/frameworks/as/flex-config-template.xml
@@ -94,6 +94,8 @@
<binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event>
<binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind>
<binding-value-change-event-type>valueChange</binding-value-change-event-type>
+ <binding-event-handler-event>org.apache.flex.events.Event</binding-event-handler-event>
+ <binding-event-handler-class>org.apache.flex.events.EventDispatcher</binding-event-handler-class>
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
[13/28] git commit: [flex-asjs] [refs/heads/develop] - sync up
StatesImpl with the AS version
Posted by ah...@apache.org.
sync up StatesImpl with the AS version
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/86492313
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/86492313
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/86492313
Branch: refs/heads/develop
Commit: 8649231302a2c1a985eadf0af30bbad96837d3b7
Parents: afd6ad9
Author: Alex Harui <ah...@apache.org>
Authored: Thu Nov 6 23:11:57 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:58 2014 -0800
----------------------------------------------------------------------
frameworks/js/FlexJS/src/mx/states/AddItems.js | 17 ++++
.../js/FlexJS/src/mx/states/SetEventHandler.js | 91 ++++++++++++++++++++
.../org/apache/flex/core/SimpleStatesImpl.js | 28 ++++--
3 files changed, 131 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/86492313/frameworks/js/FlexJS/src/mx/states/AddItems.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/mx/states/AddItems.js b/frameworks/js/FlexJS/src/mx/states/AddItems.js
index 215bdb5..31cd682 100644
--- a/frameworks/js/FlexJS/src/mx/states/AddItems.js
+++ b/frameworks/js/FlexJS/src/mx/states/AddItems.js
@@ -44,6 +44,15 @@ mx.states.AddItems.prototype.FLEXJS_CLASS_INFO =
mx.states.AddItems.prototype.setDocument = function(document, opt_id) {
opt_id = typeof opt_id !== 'undefined' ? opt_id : null;
this.document = document;
+ var data = document.mxmlsd[itemsDescriptorIndex];
+ if (typeof(data.slice) == 'function') {
+ itemsDescriptor = {};
+ itemsDescriptor.descriptor = data;
+ // replace the entry in the document so subsequent
+ // addItems know it is shared
+ document.mxmlsd[itemsDescriptorIndex] = itemsDescriptor;
+ } else
+ itemsDescriptor = data;
};
@@ -63,6 +72,14 @@ mx.states.AddItems.prototype.items = null;
/**
* @expose
+ * @type {Array} itemsDescriptor The index into the array
+ * of itemDescriptors on the document
+ */
+mx.states.AddItems.prototype.itemsDescriptorIndex;
+
+
+/**
+ * @expose
* @type {Array} itemsDescriptor The descriptors for items.
*/
mx.states.AddItems.prototype.itemsDescriptor = null;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/86492313/frameworks/js/FlexJS/src/mx/states/SetEventHandler.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/mx/states/SetEventHandler.js b/frameworks/js/FlexJS/src/mx/states/SetEventHandler.js
new file mode 100644
index 0000000..35e583d
--- /dev/null
+++ b/frameworks/js/FlexJS/src/mx/states/SetEventHandler.js
@@ -0,0 +1,91 @@
+/**
+ * Licensed 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.
+ */
+
+goog.provide('mx.states.SetEventHandler');
+
+goog.require('org.apache.flex.core.IDocument');
+
+
+
+/**
+ * @constructor
+ * @implements {org.apache.flex.core.IDocument}
+ */
+mx.states.SetEventHandler = function() {
+};
+
+
+/**
+ * Metadata
+ *
+ * @type {Object.<string, Array.<Object>>}
+ */
+mx.states.SetEventHandler.prototype.FLEXJS_CLASS_INFO =
+ { names: [{ name: 'SetEventHandler',
+ qName: 'mx.states.SetEventHandler' }],
+ interfaces: [org.apache.flex.core.IDocument] };
+
+
+/**
+ * @param {Object} document The MXML object.
+ * @param {?string=} opt_id The id.
+ */
+mx.states.SetEventHandler.prototype.setDocument = function(document, opt_id) {
+ opt_id = typeof opt_id !== 'undefined' ? opt_id : null;
+ this.document = document;
+};
+
+
+/**
+ * @expose
+ * @type {Object} document The MXML object.
+ */
+mx.states.SetEventHandler.prototype.document = null;
+
+
+/**
+ * @expose
+ * @type {string} name The event to listen for.
+ */
+mx.states.SetEventHandler.prototype.name = '';
+
+
+/**
+ * @expose
+ * @type {string} target The id of the object.
+ */
+mx.states.SetEventHandler.prototype.target = '';
+
+
+/**
+ * @expose
+ * @type {Object} handlerFunction The listener to be added.
+ */
+mx.states.SetEventHandler.prototype.handlerFunction = null;
+
+
+/**
+ * @expose
+ * @param {Object} properties The properties for the new object.
+ * @return {Object} The new object.
+ */
+mx.states.SetEventHandler.prototype.initializeFromObject = function(properties) {
+ var p;
+
+ for (p in properties) {
+ this[p] = properties[p];
+ }
+
+ return this;
+};
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/86492313/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
index 9813730..6a1d99c 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleStatesImpl.js
@@ -16,6 +16,7 @@ goog.provide('org.apache.flex.core.SimpleStatesImpl');
goog.require('mx.states.AddItems');
goog.require('mx.states.SetProperty');
+goog.require('mx.states.SetEventHandler');
goog.require('mx.states.State');
goog.require('org.apache.flex.core.IBead');
goog.require('org.apache.flex.core.IStatesImpl');
@@ -155,6 +156,13 @@ org.apache.flex.core.SimpleStatesImpl.prototype.revert_ = function(s) {
} else {
target[o.name] = o.previousValue;
}
+ } else if (org.apache.flex.utils.Language.is(o, mx.states.SetEventHandler)) {
+ if (typeof(o.document['get_' + o.target]) === 'function') {
+ target = o.document['get_' + o.target]();
+ } else {
+ target = o.document[o.target];
+ }
+ target.removeEventListener(o.name, o.handlerFunction);
}
}
};
@@ -175,11 +183,14 @@ org.apache.flex.core.SimpleStatesImpl.prototype.apply_ = function(s) {
o = arr[p];
if (org.apache.flex.utils.Language.is(o, mx.states.AddItems)) {
if (!o.items) {
- //TODO (aharui). This array should be deferred
- //var di = org.apache.flex.utils.MXMLDataInterpreter;
- //o.items = di.generateMXMLArray(o.document,
- // null, o.itemsDescriptor, true);
- o.items = o.itemsDescriptor;
+ o.items = o.itemsDescriptor.items;
+ if (o.items == null)
+ {
+ ai.items =
+ MXMLDataInterpreter.generateMXMLArray(o.document,
+ null, ai.itemsDescriptor.descriptor);
+ o.itemsDescriptor.items = ai.items;
+ }
}
for (q in o.items) {
@@ -234,6 +245,13 @@ org.apache.flex.core.SimpleStatesImpl.prototype.apply_ = function(s) {
} else {
target[o.name] = o.value;
}
+ } else if (org.apache.flex.utils.Language.is(o, mx.states.SetEventHandler)) {
+ if (typeof(o.document['get_' + o.target]) === 'function') {
+ target = o.document['get_' + o.target]();
+ } else {
+ target = o.document[o.target];
+ }
+ target.addEventListener(o.name, o.handlerFunction);
}
}
};
[03/28] git commit: [flex-asjs] [refs/heads/develop] - attempt JS
compile
Posted by ah...@apache.org.
attempt JS compile
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/3edc1aca
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/3edc1aca
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/3edc1aca
Branch: refs/heads/develop
Commit: 3edc1aca80d23848b6f17de548acbb071abee139
Parents: fd7c525
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 3 15:10:44 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:56 2014 -0800
----------------------------------------------------------------------
examples/FlexJSStore/build.xml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3edc1aca/examples/FlexJSStore/build.xml
----------------------------------------------------------------------
diff --git a/examples/FlexJSStore/build.xml b/examples/FlexJSStore/build.xml
index 6a6643b..afffb8d 100644
--- a/examples/FlexJSStore/build.xml
+++ b/examples/FlexJSStore/build.xml
@@ -33,13 +33,11 @@
<include file="${basedir}/../build_example.xml" />
- <!-- disable JS compile until we get it working
- <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">-->
- <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+ <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
<mkdir dir="${basedir}/bin-debug/data" />
<copy file="${basedir}/src/data/catalog.json" tofile="${basedir}/bin-debug/data/catalog.json" />
</target>
-
+
<target name="clean">
<delete dir="${basedir}/bin" failonerror="false" />
<delete dir="${basedir}/bin-debug" failonerror="false" />
[22/28] git commit: [flex-asjs] [refs/heads/develop] - allow writing
of className via the interface
Posted by ah...@apache.org.
allow writing of className via the 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/73452ea9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/73452ea9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/73452ea9
Branch: refs/heads/develop
Commit: 73452ea968fe5052e44dacdbd00c31c1e4c56cd5
Parents: 002bbd1
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 10 09:11:18 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/73452ea9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as
index 74cc62d..9bc9c5d 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IStyleableObject.as
@@ -43,6 +43,7 @@ package org.apache.flex.core
* @productversion FlexJS 0.0
*/
function get className():String;
+ function set className(value:String):void;
/**
* Get the object containing styles
[20/28] git commit: [flex-asjs] [refs/heads/develop] - add a way to
get top level event dispatcher
Posted by ah...@apache.org.
add a way to get top level event dispatcher
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/6a9ea39a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/6a9ea39a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/6a9ea39a
Branch: refs/heads/develop
Commit: 6a9ea39a761c82f187718947364969e5117a044a
Parents: 0c9555c
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 7 09:33:26 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 11 14:07:59 2014 -0800
----------------------------------------------------------------------
.../src/org/apache/flex/core/IUIBase.as | 10 ++
.../src/org/apache/flex/core/StageProxy.as | 126 +++++++++++++++++++
.../FlexJSUI/src/org/apache/flex/core/UIBase.as | 27 ++++
.../src/org/apache/flex/core/UIButtonBase.as | 16 +++
.../supportClasses/TextFieldItemRenderer.as | 17 +++
5 files changed, 196 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a9ea39a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
index 4b2a72f..b033edc 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/IUIBase.as
@@ -119,5 +119,15 @@ package org.apache.flex.core
function get visible():Boolean;
function set visible(value:Boolean):void;
+ /**
+ * The top most event dispatcher. Good for trying to capture
+ * all input events.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get topMostEventDispatcher():IEventDispatcher;
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a9ea39a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/StageProxy.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/StageProxy.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/StageProxy.as
new file mode 100644
index 0000000..879d2d5
--- /dev/null
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/StageProxy.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 flash.display.Stage;
+ import flash.events.Event;
+
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The StageProxy class wraps the stage and
+ * presents it as a FlexJS IEventDispatcher.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class StageProxy implements IEventDispatcher
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StageProxy(stage:Stage)
+ {
+ super();
+ _stage = stage;
+ _stage.addEventListener("removedFromStage", removedFromStageHandler);
+ }
+
+ private var _stage:Stage;
+
+ private function removedFromStageHandler(event:flash.events.Event):void
+ {
+ _stage.removeEventListener("removedFromStage", removedFromStageHandler);
+ dispatchEvent(new org.apache.flex.events.Event("removedFromStage"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#addEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReferences:Boolean = false):void
+ {
+ _stage.addEventListener(type, listener, useCapture);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+ {
+ _stage.removeEventListener(type, listener, useCapture);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function dispatchEvent(event:flash.events.Event):Boolean
+ {
+ return _stage.dispatchEvent(event);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#willTriger()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function willTrigger(eventName:String):Boolean
+ {
+ return _stage.willTrigger(eventName);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#hasEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function hasEventListener(eventName:String):Boolean
+ {
+ return _stage.hasEventListener(eventName);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a9ea39a/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 e837e36..c4a7c4f 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
@@ -20,6 +20,7 @@ package org.apache.flex.core
{
import flash.display.DisplayObject;
import flash.display.Sprite;
+ import flash.display.Stage;
import org.apache.flex.events.Event;
import org.apache.flex.events.IEventDispatcher;
@@ -905,5 +906,31 @@ package org.apache.flex.core
return measurementBead;
}
+ private var _stageProxy:StageProxy;
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ if (!_stageProxy)
+ {
+ _stageProxy = new StageProxy(stage);
+ _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
+ }
+
+ return _stageProxy;
+ }
+
+ private function stageProxy_removedFromStageHandler(event:Event):void
+ {
+ _stageProxy = null;
+ }
+
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a9ea39a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
index 226d69d..34b750c 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/UIButtonBase.as
@@ -773,5 +773,21 @@ package org.apache.flex.core
return measurementBead;
}
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ if (!parent)
+ return null;
+ return IUIBase(parent).topMostEventDispatcher;
+ }
+
+
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/6a9ea39a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as
index f349803..b49bac1 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/supportClasses/TextFieldItemRenderer.as
@@ -28,6 +28,7 @@ package org.apache.flex.html.supportClasses
import org.apache.flex.core.UIBase;
import org.apache.flex.core.ValuesManager;
import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
import org.apache.flex.events.MouseEvent;
import org.apache.flex.events.utils.MouseEventConverter;
import org.apache.flex.html.beads.ITextItemRenderer;
@@ -358,5 +359,21 @@ package org.apache.flex.html.supportClasses
}
}
}
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ if (!parent)
+ return null;
+ return IUIBase(parent).topMostEventDispatcher;
+ }
+
}
}