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 2016/02/03 19:05:54 UTC
[01/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
effects folders
Repository: flex-asjs
Updated Branches:
refs/heads/develop e04aaa2f7 -> e52e01764
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
new file mode 100644
index 0000000..3b9415e
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Tween.as
@@ -0,0 +1,665 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IEffectTimer;
+import org.apache.flex.core.ValuesManager;
+import org.apache.flex.events.ValueEvent;
+import org.apache.flex.events.Event;
+import org.apache.flex.events.EventDispatcher;
+
+/**
+ * Tween is the underlying animation class for the effects in FlexJS.
+ *
+ * The Tween class defines a tween, a property animation performed
+ * on a target object over a period of time.
+ * That animation can be a change in position, such as performed by
+ * the Move effect; a change in size, as performed by the Resize or
+ * Zoom effects; a change in visibility, as performed by the Fade or
+ * Dissolve effects; or other types of animations.
+ *
+ * <p>A Tween instance accepts the <code>startValue</code>,
+ * <code>endValue</code>, and <code>duration</code> properties,
+ * and an optional easing function to define the animation.</p>
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Tween extends Effect
+{
+ //--------------------------------------------------------------------------
+ //
+ // Class constants
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * The <code>Tween.TWEEN_END</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>tweenEnd</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * <tr><td><code>value</code></td><td>The value passed to the
+ * <code>onTweenEnd()</code> method.</td></tr>
+ * </table>
+ *
+ * @see org.apache.flex.effects.Effect
+ * @see org.apache.flex.effects.TweenEffect
+ * @see org.apache.flex.events.EffectEvent
+ * @eventType tweenEnd
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const TWEEN_END:String = "tweenEnd";
+
+ /**
+ * The <code>Tween.TWEEN_START</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>tweenStart</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * <tr><td><code>value</code></td><td>The value passed to the
+ * <code>onTweenUpdate()</code> method.</td></tr>
+ * </table>
+ *
+ * @eventType tweenStart
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const TWEEN_START:String = "tweenStart";
+
+ /**
+ * The <code>Tween.TWEEN_UPDATE</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>tweenUpdate</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * <tr><td><code>value</code></td><td>The value passed to the
+ * <code>onTweenUpdate()</code> method.</td></tr>
+ * </table>
+ *
+ * @eventType tweenUpdate
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const TWEEN_UPDATE:String = "tweenUpdate";
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Class variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * The list of tweens that are currently playing.
+ */
+ public static var activeTweens:Object = {};
+
+ private static var timer:IEffectTimer;
+
+ private static var currentID:int = 1;
+
+ //--------------------------------------------------------------------------
+ //
+ // Class properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // currentTime
+ //----------------------------------
+
+ /**
+ * Used by effects to get the current effect time tick.
+ */
+ public static var currentTime:Number = NaN;
+
+ //--------------------------------------------------------------------------
+ //
+ // Class methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private static function addTween(tween:Tween):void
+ {
+ tween.id = currentID++;
+
+ activeTweens[tween.id] = tween;
+
+ if (!timer)
+ {
+ timer = ValuesManager.valuesImpl.newInstance(tween, "iEffectTimer") as IEffectTimer;
+ timer.addEventListener("update", updateHandler);
+ }
+ currentTime = timer.start();
+
+ tween.startTime = tween.previousUpdateTime = currentTime;
+ }
+
+
+ /**
+ * @private
+ */
+ private static function removeTween(tween:Tween):void
+ {
+ delete activeTweens[tween.id];
+ if (activeTweens.length == 0)
+ timer.stop();
+ }
+
+ /**
+ * @private
+ */
+ private static function updateHandler(event:ValueEvent):void
+ {
+ var oldTime:Number = currentTime;
+
+ // the IEFfectTimer can control the current time
+ // if it wants. This can be useful for automated
+ // testing.
+ currentTime = event.value as Number;
+
+ for (var id:String in activeTweens)
+ {
+ var tween:Tween = Tween(activeTweens[id]);
+ tween.update();
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Tween()
+ {
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private var id:int = -1;
+
+ /**
+ * @private
+ */
+ private var _doSeek:Boolean = false;
+
+ /**
+ * @private
+ */
+ private var _isPlaying:Boolean = true;
+
+ /**
+ * @private
+ */
+ private var _doReverse:Boolean = false;
+
+ /**
+ * @private
+ */
+ private var startTime:Number;
+
+ /**
+ * @private
+ */
+ private var previousUpdateTime:Number;
+
+ /**
+ * @private
+ */
+ private var userEquation:Function;
+
+ /**
+ * Final value of the animation.
+ */
+ public var endValue:Number;
+
+ /**
+ * Initial value of the animation.
+ */
+ public var startValue:Number;
+
+ /**
+ * @private
+ */
+ private var started:Boolean = false;
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // listener
+ //----------------------------------
+
+ /**
+ * Object that is notified at each interval of the animation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var listener:Object;
+
+ //----------------------------------
+ // playheadTime
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for the playheadTime property.
+ */
+ private var _playheadTime:Number = 0;
+
+ /**
+ * @private
+ * The current millisecond position in the tween.
+ * This value is between 0 and duration.
+ * Use the seek() method to change the position of the tween.
+ */
+ private function get playheadTime():Number
+ {
+ return _playheadTime;
+ }
+
+ //----------------------------------
+ // playReversed
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for the playReversed property.
+ */
+ private var _invertValues:Boolean = false;
+
+ /**
+ * @private
+ * Starts playing reversed from start of tween.
+ * Setting this property to <code>true</code>
+ * inverts the values returned by the tween.
+ * Using reverse inverts the values and only plays
+ * for as much time that has already elapsed.
+ */
+ private function get playReversed():Boolean
+ {
+ return _invertValues;
+ }
+
+ /**
+ * @private
+ */
+ private function set playReversed(value:Boolean):void
+ {
+ _invertValues = value;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+
+ /**
+ * Sets the easing function for the animation.
+ * The easing function is used to interpolate between
+ * the <code>startValue</code> value and the <code>endValue</code>.
+ * A trivial easing function does linear interpolation,
+ * but more sophisticated easing functions create the illusion of
+ * acceleration and deceleration, which makes the animation seem
+ * more natural.
+ *
+ * <p>If no easing function is specified, an easing function based
+ * on the <code>Math.sin()</code> method is used.</p>
+ *
+ * <p>The easing function follows the function signature
+ * popularized by Robert Penner.
+ * The function accepts four arguments.
+ * The first argument is the "current time",
+ * where the animation start time is 0.
+ * The second argument is a the initial value
+ * at the beginning of the animation (a Number).
+ * The third argument is the ending value
+ * minus the initial value.
+ * The fourth argument is the duration of the animation.
+ * The return value is the interpolated value for the current time
+ * (usually a value between the initial value and the ending value).</p>
+ *
+ * <p>Flex includes a set of easing functions
+ * in the mx.effects.easing package.</p>
+ *
+ * @param easingFunction Function that implements the easing equation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set easingFunction(value:Function):void
+ {
+ userEquation = value;
+ }
+
+ /**
+ * Interrupt the tween, jump immediately to the end of the tween,
+ * and invoke the <code>onTweenEnd()</code> callback function.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function endTween():void
+ {
+ var event:ValueEvent = new ValueEvent(Tween.TWEEN_END);
+ var value:Object = getCurrentValue(duration);
+
+ event.value = value;
+
+ dispatchEvent(event);
+
+ listener.onTweenEnd(value);
+
+ dispatchEvent(new Event(Effect.EFFECT_END));
+
+ // If tween has been added, id >= 0
+ // but if duration = 0, this might not be the case.
+ if (id >= 0) {
+ Tween.removeTween(this);
+ id = -1;
+ }
+ }
+
+ /**
+ * @private
+ * Returns true if the tween has ended.
+ */
+ protected function update():Boolean
+ {
+ var tweenEnded:Boolean = false;
+
+ // If user specified a minimum frames per second, we can't guarantee
+ // that we'll be called often enough to satisfy that request.
+ // However, we can avoid skipping over part of the animation.
+ // If this callback arrives too late, adjust the animation startTime,
+ // so that the animation starts up 'maxDelay' milliseconds
+ // after its last update.
+ /*
+ if (intervalTime - previousUpdateTime > maxDelay)
+ {
+ startTime += intervalTime - previousUpdateTime - maxDelay;
+ }
+ */
+ previousUpdateTime = currentTime;
+
+ if (_isPlaying || _doSeek)
+ {
+
+ var elapsedTime:Number = currentTime - startTime;
+ _playheadTime = elapsedTime;
+
+ var currentValue:Object =
+ getCurrentValue(elapsedTime);
+
+ if (elapsedTime >= duration && !_doSeek)
+ {
+ endTween();
+ tweenEnded = true;
+ }
+ else
+ {
+ if (!started)
+ {
+ var startEvent:ValueEvent = new ValueEvent(Tween.TWEEN_START);
+ dispatchEvent(startEvent);
+ started = true;
+ }
+
+ var event:ValueEvent =
+ new ValueEvent(Tween.TWEEN_UPDATE);
+ event.value = currentValue;
+
+ dispatchEvent(event);
+
+ listener.onTweenUpdate(currentValue);
+ }
+
+ _doSeek = false;
+ }
+ return tweenEnded;
+ }
+
+ /**
+ * @private
+ */
+ protected function getCurrentValue(currentTime:Number):Object
+ {
+ if (duration == 0)
+ {
+ return endValue;
+ }
+
+ if (_invertValues)
+ currentTime = duration - currentTime;
+
+ return userEquation(currentTime, startValue,
+ endValue - startValue,
+ duration);
+ }
+
+ /**
+ * @private
+ */
+ private function defaultEasingFunction(t:Number, b:Number,
+ c:Number, d:Number):Number
+ {
+ return c / 2 * (Math.sin(Math.PI * (t / d - 0.5)) + 1) + b;
+ }
+
+ /**
+ * Advances the tween effect to the specified position.
+ *
+ * @param playheadTime The position, in milliseconds, between 0
+ * and the value of the <code>duration</code> property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function seek(playheadTime:Number):void
+ {
+ // Set value between 0 and duration
+ //playheadTime = Math.min(Math.max(playheadTime, 0), duration);
+
+ var clockTime:Number = currentTime;
+
+ // Reset the previous update time
+ previousUpdateTime = clockTime;
+
+ // Reset the start time
+ startTime = clockTime - playheadTime;
+
+ _doSeek = true;
+
+ update();
+ }
+
+ /**
+ * Plays the effect in reverse,
+ * starting from the current position of the effect.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ override public function reverse():void
+ {
+ if (_isPlaying)
+ {
+ _doReverse = false;
+ seek(duration - _playheadTime);
+ _invertValues = !_invertValues;
+ }
+ else
+ {
+ _doReverse = !_doReverse;
+ }
+ }
+
+ /**
+ * Pauses the effect until you call the <code>resume()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ override public function pause():void
+ {
+ _isPlaying = false;
+ }
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ override public function play():void
+ {
+ if (userEquation == null)
+ userEquation = defaultEasingFunction;
+ Tween.addTween(this);
+ }
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ override public function stop():void
+ {
+ if (id >= 0) {
+ Tween.removeTween(this);
+ id = -1;
+ }
+ }
+
+ /**
+ * Resumes the effect after it has been paused
+ * by a call to the <code>pause()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ override public function resume():void
+ {
+ _isPlaying = true;
+
+ startTime = currentTime - _playheadTime;
+ if (_doReverse)
+ {
+ reverse();
+ _doReverse = false;
+ }
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
new file mode 100644
index 0000000..fe83935
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Wipe.as
@@ -0,0 +1,156 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+import org.apache.flex.geom.Rectangle;
+
+/**
+ * The Fade effect animates a UI component's alpha or opacity.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Wipe extends Tween implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param target Object ID or reference to an object that will
+ * have its x and/or y property animated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Wipe(target:IUIBase = null)
+ {
+ super();
+
+ this.actualTarget = target;
+
+ listener = this;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var actualTarget:IUIBase;
+
+ /**
+ * The target as the String id
+ * of a widget in an MXML Document.
+ */
+ public var target:String;
+
+ /**
+ * The direction of the Wipe. "up" means the top will be the last
+ * part to disappear. "down" will reveal from the top down.
+ */
+ public var direction:String;
+
+ private var wiper:PlatformWiper = new PlatformWiper();
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ if (target != null)
+ actualTarget = document[target];
+
+
+ wiper.target = actualTarget;
+ if (direction == "up")
+ {
+ startValue = actualTarget.height;
+ endValue = 0;
+ }
+ else
+ {
+ startValue = 0;
+ endValue = actualTarget.height;
+ // WipeDown makes something appear
+ actualTarget.visible = true;
+ wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, 0);
+ }
+
+ super.play();
+ }
+
+ public function onTweenUpdate(value:Number):void
+ {
+ trace(actualTarget, value);
+ wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, value);
+ }
+
+ public function onTweenEnd(value:Number):void
+ {
+ // WipeUp makes something disappear
+ if (direction == "up")
+ actualTarget.visible = false;
+ wiper.target = null;
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/states/Transition.as
new file mode 100644
index 0000000..3469417
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/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/bbf9301e/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/basic-manifest.xml b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..64a6c26
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/basic-manifest.xml
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Fade" class="org.apache.flex.effects.Fade"/>
+ <component id="Move" class="org.apache.flex.effects.Move"/>
+ <component id="Resize" class="org.apache.flex.effects.Resize"/>
+ <component id="Wipe" class="org.apache.flex.effects.Wipe"/>
+ <component id="Sequence" class="org.apache.flex.effects.Sequence"/>
+ <component id="Parallel" class="org.apache.flex.effects.Parallel"/>
+ <component id="Transition" class="org.apache.flex.states.Transition" />
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..8f64d55
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,79 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-classes>
+ <class>EffectsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-config.xml b/frameworks/projects/Effects/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..a07b904
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/resources/compile-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>EffectsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[51/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
these too
Posted by ah...@apache.org.
move these too
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e52e0176
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e52e0176
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e52e0176
Branch: refs/heads/develop
Commit: e52e01764faa76dec2a983ccaebca5673d2935b9
Parents: 17e9ced
Author: Alex Harui <ah...@apache.org>
Authored: Wed Feb 3 10:05:37 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:05:37 2016 -0800
----------------------------------------------------------------------
.../GoogleMaps/as/src/google/pseudo/HTMLInputElement.as | 5 -----
frameworks/projects/GoogleMaps/as/src/google/pseudo/Node.as | 5 -----
.../GoogleMaps/src/main/flex/google/pseudo/HTMLInputElement.as | 5 +++++
.../projects/GoogleMaps/src/main/flex/google/pseudo/Node.as | 5 +++++
4 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e52e0176/frameworks/projects/GoogleMaps/as/src/google/pseudo/HTMLInputElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/pseudo/HTMLInputElement.as b/frameworks/projects/GoogleMaps/as/src/google/pseudo/HTMLInputElement.as
deleted file mode 100644
index 27b12aa..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/pseudo/HTMLInputElement.as
+++ /dev/null
@@ -1,5 +0,0 @@
-package google.pseudo {
-public class HTMLInputElement extends Object {
-}
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e52e0176/frameworks/projects/GoogleMaps/as/src/google/pseudo/Node.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/pseudo/Node.as b/frameworks/projects/GoogleMaps/as/src/google/pseudo/Node.as
deleted file mode 100644
index 3f67a33..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/pseudo/Node.as
+++ /dev/null
@@ -1,5 +0,0 @@
-package google.pseudo {
-public class Node extends Object {
-}
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e52e0176/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/HTMLInputElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/HTMLInputElement.as b/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/HTMLInputElement.as
new file mode 100644
index 0000000..27b12aa
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/HTMLInputElement.as
@@ -0,0 +1,5 @@
+package google.pseudo {
+public class HTMLInputElement extends Object {
+}
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e52e0176/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/Node.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/Node.as b/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/Node.as
new file mode 100644
index 0000000..3f67a33
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/pseudo/Node.as
@@ -0,0 +1,5 @@
+package google.pseudo {
+public class Node extends Object {
+}
+}
+
[10/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for DragDrop
Posted by ah...@apache.org.
new folders for DragDrop
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/51c4ffee
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/51c4ffee
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/51c4ffee
Branch: refs/heads/develop
Commit: 51c4ffeec7de8b856096bbeb118400db2cbf1c55
Parents: 447b2d8
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:45:13 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
.../projects/DragDrop/as/src/DragDropClasses.as | 35 --
.../as/src/org/apache/flex/core/DropType.as | 64 ----
.../as/src/org/apache/flex/events/DragEvent.as | 373 -------------------
.../src/org/apache/flex/events/DragEventBase.as | 51 ---
.../beads/controllers/DragMouseController.as | 261 -------------
.../beads/controllers/DropMouseController.as | 185 ---------
frameworks/projects/DragDrop/basic-manifest.xml | 27 --
.../projects/DragDrop/compile-asjs-config.xml | 79 ----
frameworks/projects/DragDrop/compile-config.xml | 78 ----
.../DragDrop/src/main/flex/DragDropClasses.as | 35 ++
.../main/flex/org/apache/flex/core/DropType.as | 64 ++++
.../flex/org/apache/flex/events/DragEvent.as | 373 +++++++++++++++++++
.../org/apache/flex/events/DragEventBase.as | 51 +++
.../beads/controllers/DragMouseController.as | 261 +++++++++++++
.../beads/controllers/DropMouseController.as | 185 +++++++++
.../src/main/resources/basic-manifest.xml | 27 ++
.../src/main/resources/compile-asjs-config.xml | 79 ++++
.../src/main/resources/compile-config.xml | 78 ++++
18 files changed, 1153 insertions(+), 1153 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/as/src/DragDropClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/DragDropClasses.as b/frameworks/projects/DragDrop/as/src/DragDropClasses.as
deleted file mode 100644
index 14d0b54..0000000
--- a/frameworks/projects/DragDrop/as/src/DragDropClasses.as
+++ /dev/null
@@ -1,35 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class DragDropClasses
-{
- import org.apache.flex.core.DropType; DropType;
- import org.apache.flex.events.DragEvent; DragEvent;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/as/src/org/apache/flex/core/DropType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/org/apache/flex/core/DropType.as b/frameworks/projects/DragDrop/as/src/org/apache/flex/core/DropType.as
deleted file mode 100644
index 9df59cf..0000000
--- a/frameworks/projects/DragDrop/as/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/51c4ffee/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEvent.as b/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEvent.as
deleted file mode 100644
index 7d9fefb..0000000
--- a/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEvent.as
+++ /dev/null
@@ -1,373 +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.events
-{
- import org.apache.flex.core.IDragInitiator;
- COMPILE::JS
- {
- import org.apache.flex.core.IUIBase;
- import window.Event;
- import window.MouseEvent;
- }
-
- /**
- * Drag and Drop Events.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DragEvent extends DragEventBase
- {
- /**
- * The <code>DragEvent.DRAG_START</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragStart</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragStart
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_START:String = "dragStart";
-
- /**
- * The <code>DragEvent.DRAG_MOVE</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragMove</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragMove
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_MOVE:String = "dragMove";
-
- /**
- * The <code>DragEvent.DRAG_END</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragEnd</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragEnd
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_END:String = "dragEnd";
-
- /**
- * The <code>DragEvent.DRAG_ENTER</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragEnter</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragEnter
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_ENTER:String = "dragEnter";
-
- /**
- * The <code>DragEvent.DRAG_OVER</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragOver</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragOver
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_OVER:String = "dragOver";
-
- /**
- * The <code>DragEvent.DRAG_EXIT</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragExit</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragExit
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_EXIT:String = "dragExit";
-
- /**
- * The <code>DragEvent.DRAG_DROP</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>dragDrop</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType dragDrop
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const DRAG_DROP:String = "dragDrop";
-
- /**
- * The object that wants to know if a drop is accepted
- *
- * @param type The name of the event.
- * @param bubbles Whether the event bubbles.
- * @param cancelable Whether the event can be canceled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var dragInitiator:IDragInitiator;
-
- /**
- * 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;
-
-
- /**
- * Constructor. Do not call 'new DragEvent', use the
- * createDragEvent method instead.
- *
- * @param type The name of the event.
- * @param bubbles Whether the event bubbles.
- * @param cancelable Whether the event can be canceled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DragEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- this.type = type;
- }
- }
-
- /**
- * Factory for DragEvents.
- *
- * @param type The name of the event.
- * @param event The MouseEvent properties to copy into the DragEvent.
- * @return The new DragEvent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.events.DragEvent
- * @flexjsignorecoercion window.Event
- * @flexjsignorecoercion Event
- */
- public static function createDragEvent(type:String, event:MouseEvent):DragEvent
- {
- COMPILE::AS3
- {
- var de:DragEvent = new DragEvent(type, true, true);
- de.localX = event.localX;
- de.localY = event.localY;
- de.altKey = event.altKey;
- de.ctrlKey = event.ctrlKey;
- de.shiftKey = event.shiftKey;
- de.buttonDown = event.buttonDown;
- de.delta = event.delta;
- de.relatedObject = event.relatedObject;
- return de;
- }
- COMPILE::JS
- {
- var out:window.MouseEvent = new window.MouseEvent(type);
- var e:window.Event = event as window.Event;
- (out as window.Event).initMouseEvent(type, true, true,
- e.view, e.detail, e.screenX, e.screenY,
- e.clientX, e.clientY, e.ctrlKey, e.altKey,
- e.shiftKey, e.metaKey, e.button, e.relatedTarget);
- return out as DragEvent;
- }
- }
-
-
- /**
- * Dispatch a DragEvent
- *
- * @param event The DragEvent to dispatch.
- * @param target The target to dispatch the event from.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.IUIBase
- * @flexjsignorecoercion window.Event
- */
- public static function dispatchDragEvent(event:DragEvent, target:IEventDispatcher):void
- {
- COMPILE::AS3
- {
- target.dispatchEvent(event);
- }
- COMPILE::JS
- {
- (target as IUIBase).element.dispatchEvent(event as window.Event);
- }
- }
-
- /**
- */
- COMPILE::JS
- private static function installDragEventMixin():Boolean
- {
- var o:Object = org.apache.flex.events.ElementEvents.elementEvents;
- o['dragEnd'] = 1;
- o['dragMove'] = 1;
- return true;
- }
-
-
- /**
- * Add some other events to listen from the element
- */
- COMPILE::JS
- private static var dragEventMixin:Boolean = installDragEventMixin();
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEventBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEventBase.as b/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEventBase.as
deleted file mode 100644
index aaa8ddf..0000000
--- a/frameworks/projects/DragDrop/as/src/org/apache/flex/events/DragEventBase.as
+++ /dev/null
@@ -1,51 +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.events
-{
- COMPILE::AS3
- {
- import org.apache.flex.events.MouseEvent;
- }
- COMPILE::JS
- {
- import goog.events.BrowserEvent;
- }
-
- /**
- * Drag and Drop Events.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class DragEventBase extends MouseEvent
- {
- public function DragEventBase(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- super(type, bubbles, cancelable);
- }
- }
-
- COMPILE::JS
- public class DragEventBase extends goog.events.BrowserEvent
- {
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DragMouseController.as b/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DragMouseController.as
deleted file mode 100644
index 01351b8..0000000
--- a/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DragMouseController.as
+++ /dev/null
@@ -1,261 +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 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
- {
- /**
- * 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 = false;
-
- /**
- * 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.screenX;
- mouseDownY = event.screenY;
- event.preventDefault();
- }
-
- private function dragMouseMoveHandler(event:MouseEvent):void
- {
- var pt:Point;
- var dragEvent:DragEvent;
- trace("dragMouseMove");
-
- event.preventDefault();
-
- if (!dragging)
- {
- trace("not dragging anything else");
- if (Math.abs(event.screenX - mouseDownX) > threshold ||
- Math.abs(event.screenY - mouseDownY) > threshold)
- {
- trace("sending dragStart");
- dragEvent = DragEvent.createDragEvent("dragStart", event);
- DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(_strand));
- if (DragEvent.dragSource != null)
- {
- dragging = true;
- host = UIUtils.findPopUpHost(_strand as IUIBase);
- host.addElement(dragImage);
- pt = PointUtils.globalToLocal(new Point(event.clientX, event.clientY), host);
- dragImage.x = pt.x + dragImageOffsetX;
- dragImage.y = pt.y + dragImageOffsetY;
- }
- }
- }
- else
- {
- trace("sending dragMove " + event.target.toString());
- dragEvent = DragEvent.createDragEvent("dragMove", event);
- trace("client: " + event.clientX.toString() + " " + event.clientY.toString() + " " + event.target.toString());
- pt = PointUtils.globalToLocal(new Point(event.clientX, event.clientY), host);
- trace("host: " + pt.x.toString() + " " + pt.y.toString());
- dragImage.x = pt.x + dragImageOffsetX;
- dragImage.y = pt.y + dragImageOffsetY;
- DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(event.target));
- }
- }
-
- private function dragMouseUpHandler(event:MouseEvent):void
- {
- trace("dragMouseUp");
- var dragEvent:DragEvent;
-
- if (dragging)
- {
- trace("sending dragEnd");
- dragEvent = DragEvent.createDragEvent("dragEnd", event);
- DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(event.target));
- event.preventDefault();
- }
- dragging = false;
- DragEvent.dragSource = null;
- DragEvent.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/51c4ffee/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DropMouseController.as b/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DropMouseController.as
deleted file mode 100644
index 3165241..0000000
--- a/frameworks/projects/DragDrop/as/src/org/apache/flex/html/beads/controllers/DropMouseController.as
+++ /dev/null
@@ -1,185 +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 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 the mouse is moving out of a component during
- * a drag/drop operation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="dragExit", 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
- * @flexjsignorecoercion org.apache.flex.events.MouseEvent
- */
- private function dragMoveHandler(event:DragEvent):void
- {
- trace("dragMove");
- var dragEvent:DragEvent;
- if (!inside)
- {
- dragEvent = DragEvent.createDragEvent("dragEnter", event as MouseEvent);
- dispatchEvent(dragEvent);
- inside = true;
- IUIBase(_strand).topMostEventDispatcher.addEventListener(DragEvent.DRAG_END, dragEndHandler);
- IUIBase(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
- }
- else
- {
- dragEvent = DragEvent.createDragEvent("dragOver", event as MouseEvent);
- dispatchEvent(dragEvent);
- }
- }
-
- private function rollOutHandler(event:MouseEvent):void
- {
- var dragEvent:DragEvent;
-
- if (inside)
- {
- dragEvent = DragEvent.createDragEvent("dragExit", event);
- dispatchEvent(dragEvent);
- inside = false;
- }
- IUIBase(_strand).topMostEventDispatcher.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
- IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
- }
-
- /**
- * @flexjsignorecoercion org.apache.flex.events.MouseEvent
- */
- private function dragEndHandler(event:DragEvent):void
- {
- trace("dragEnd");
- var dragEvent:DragEvent;
-
- dragEvent = DragEvent.createDragEvent("dragDrop", event as MouseEvent);
- 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/51c4ffee/frameworks/projects/DragDrop/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/basic-manifest.xml b/frameworks/projects/DragDrop/basic-manifest.xml
deleted file mode 100644
index bf5911f..0000000
--- a/frameworks/projects/DragDrop/basic-manifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
- <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/compile-asjs-config.xml b/frameworks/projects/DragDrop/compile-asjs-config.xml
deleted file mode 100644
index 1ad65d7..0000000
--- a/frameworks/projects/DragDrop/compile-asjs-config.xml
+++ /dev/null
@@ -1,79 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-classes>
- <class>DragDropClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/compile-config.xml b/frameworks/projects/DragDrop/compile-config.xml
deleted file mode 100644
index f8d1526..0000000
--- a/frameworks/projects/DragDrop/compile-config.xml
+++ /dev/null
@@ -1,78 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>DragDropClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
new file mode 100644
index 0000000..14d0b54
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/DragDropClasses.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class DragDropClasses
+{
+ import org.apache.flex.core.DropType; DropType;
+ import org.apache.flex.events.DragEvent; DragEvent;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/core/DropType.as
new file mode 100644
index 0000000..9df59cf
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/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/51c4ffee/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
new file mode 100644
index 0000000..7d9fefb
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
@@ -0,0 +1,373 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.events
+{
+ import org.apache.flex.core.IDragInitiator;
+ COMPILE::JS
+ {
+ import org.apache.flex.core.IUIBase;
+ import window.Event;
+ import window.MouseEvent;
+ }
+
+ /**
+ * Drag and Drop Events.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DragEvent extends DragEventBase
+ {
+ /**
+ * The <code>DragEvent.DRAG_START</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragStart</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragStart
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_START:String = "dragStart";
+
+ /**
+ * The <code>DragEvent.DRAG_MOVE</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragMove</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragMove
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_MOVE:String = "dragMove";
+
+ /**
+ * The <code>DragEvent.DRAG_END</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragEnd</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragEnd
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_END:String = "dragEnd";
+
+ /**
+ * The <code>DragEvent.DRAG_ENTER</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragEnter</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragEnter
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_ENTER:String = "dragEnter";
+
+ /**
+ * The <code>DragEvent.DRAG_OVER</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragOver</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragOver
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_OVER:String = "dragOver";
+
+ /**
+ * The <code>DragEvent.DRAG_EXIT</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragExit</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragExit
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_EXIT:String = "dragExit";
+
+ /**
+ * The <code>DragEvent.DRAG_DROP</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>dragDrop</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType dragDrop
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const DRAG_DROP:String = "dragDrop";
+
+ /**
+ * The object that wants to know if a drop is accepted
+ *
+ * @param type The name of the event.
+ * @param bubbles Whether the event bubbles.
+ * @param cancelable Whether the event can be canceled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var dragInitiator:IDragInitiator;
+
+ /**
+ * 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;
+
+
+ /**
+ * Constructor. Do not call 'new DragEvent', use the
+ * createDragEvent method instead.
+ *
+ * @param type The name of the event.
+ * @param bubbles Whether the event bubbles.
+ * @param cancelable Whether the event can be canceled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DragEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ this.type = type;
+ }
+ }
+
+ /**
+ * Factory for DragEvents.
+ *
+ * @param type The name of the event.
+ * @param event The MouseEvent properties to copy into the DragEvent.
+ * @return The new DragEvent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.events.DragEvent
+ * @flexjsignorecoercion window.Event
+ * @flexjsignorecoercion Event
+ */
+ public static function createDragEvent(type:String, event:MouseEvent):DragEvent
+ {
+ COMPILE::AS3
+ {
+ var de:DragEvent = new DragEvent(type, true, true);
+ de.localX = event.localX;
+ de.localY = event.localY;
+ de.altKey = event.altKey;
+ de.ctrlKey = event.ctrlKey;
+ de.shiftKey = event.shiftKey;
+ de.buttonDown = event.buttonDown;
+ de.delta = event.delta;
+ de.relatedObject = event.relatedObject;
+ return de;
+ }
+ COMPILE::JS
+ {
+ var out:window.MouseEvent = new window.MouseEvent(type);
+ var e:window.Event = event as window.Event;
+ (out as window.Event).initMouseEvent(type, true, true,
+ e.view, e.detail, e.screenX, e.screenY,
+ e.clientX, e.clientY, e.ctrlKey, e.altKey,
+ e.shiftKey, e.metaKey, e.button, e.relatedTarget);
+ return out as DragEvent;
+ }
+ }
+
+
+ /**
+ * Dispatch a DragEvent
+ *
+ * @param event The DragEvent to dispatch.
+ * @param target The target to dispatch the event from.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.IUIBase
+ * @flexjsignorecoercion window.Event
+ */
+ public static function dispatchDragEvent(event:DragEvent, target:IEventDispatcher):void
+ {
+ COMPILE::AS3
+ {
+ target.dispatchEvent(event);
+ }
+ COMPILE::JS
+ {
+ (target as IUIBase).element.dispatchEvent(event as window.Event);
+ }
+ }
+
+ /**
+ */
+ COMPILE::JS
+ private static function installDragEventMixin():Boolean
+ {
+ var o:Object = org.apache.flex.events.ElementEvents.elementEvents;
+ o['dragEnd'] = 1;
+ o['dragMove'] = 1;
+ return true;
+ }
+
+
+ /**
+ * Add some other events to listen from the element
+ */
+ COMPILE::JS
+ private static var dragEventMixin:Boolean = installDragEventMixin();
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
new file mode 100644
index 0000000..aaa8ddf
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEventBase.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.events
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.events.MouseEvent;
+ }
+ COMPILE::JS
+ {
+ import goog.events.BrowserEvent;
+ }
+
+ /**
+ * Drag and Drop Events.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class DragEventBase extends MouseEvent
+ {
+ public function DragEventBase(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ super(type, bubbles, cancelable);
+ }
+ }
+
+ COMPILE::JS
+ public class DragEventBase extends goog.events.BrowserEvent
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
new file mode 100644
index 0000000..01351b8
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DragMouseController.as
@@ -0,0 +1,261 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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
+ {
+ /**
+ * 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 = false;
+
+ /**
+ * 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.screenX;
+ mouseDownY = event.screenY;
+ event.preventDefault();
+ }
+
+ private function dragMouseMoveHandler(event:MouseEvent):void
+ {
+ var pt:Point;
+ var dragEvent:DragEvent;
+ trace("dragMouseMove");
+
+ event.preventDefault();
+
+ if (!dragging)
+ {
+ trace("not dragging anything else");
+ if (Math.abs(event.screenX - mouseDownX) > threshold ||
+ Math.abs(event.screenY - mouseDownY) > threshold)
+ {
+ trace("sending dragStart");
+ dragEvent = DragEvent.createDragEvent("dragStart", event);
+ DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(_strand));
+ if (DragEvent.dragSource != null)
+ {
+ dragging = true;
+ host = UIUtils.findPopUpHost(_strand as IUIBase);
+ host.addElement(dragImage);
+ pt = PointUtils.globalToLocal(new Point(event.clientX, event.clientY), host);
+ dragImage.x = pt.x + dragImageOffsetX;
+ dragImage.y = pt.y + dragImageOffsetY;
+ }
+ }
+ }
+ else
+ {
+ trace("sending dragMove " + event.target.toString());
+ dragEvent = DragEvent.createDragEvent("dragMove", event);
+ trace("client: " + event.clientX.toString() + " " + event.clientY.toString() + " " + event.target.toString());
+ pt = PointUtils.globalToLocal(new Point(event.clientX, event.clientY), host);
+ trace("host: " + pt.x.toString() + " " + pt.y.toString());
+ dragImage.x = pt.x + dragImageOffsetX;
+ dragImage.y = pt.y + dragImageOffsetY;
+ DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(event.target));
+ }
+ }
+
+ private function dragMouseUpHandler(event:MouseEvent):void
+ {
+ trace("dragMouseUp");
+ var dragEvent:DragEvent;
+
+ if (dragging)
+ {
+ trace("sending dragEnd");
+ dragEvent = DragEvent.createDragEvent("dragEnd", event);
+ DragEvent.dispatchDragEvent(dragEvent, IEventDispatcher(event.target));
+ event.preventDefault();
+ }
+ dragging = false;
+ DragEvent.dragSource = null;
+ DragEvent.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);
+ }
+
+ }
+}
[26/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after new folders
Posted by ah...@apache.org.
fix scripts after new folders
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b5d922d0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b5d922d0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b5d922d0
Branch: refs/heads/develop
Commit: b5d922d05e06e536d0d325ee3320ec6b7778492a
Parents: a95bd7a
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:21:13 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Graphics/build.xml | 72 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 4 +-
.../src/main/resources/compile-config.xml | 6 +-
3 files changed, 44 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b5d922d0/frameworks/projects/Graphics/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/build.xml b/frameworks/projects/Graphics/build.xml
index 04e35ae..63d9f84 100644
--- a/frameworks/projects/Graphics/build.xml
+++ b/frameworks/projects/Graphics/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Graphics-${release.version}.swc" />
+ <property name="target.name.no.version" value="Graphics.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Graphics.swc">
</target>
@@ -49,53 +51,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Graphics.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Graphics.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
-
+ <!-- make JS output folder now so include-file doesn't error -->
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in GraphicsClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Graphics.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
- <target name="compile-asjs" >
- <echo message="Cross-compiling Graphics/asjs"/>
+
+ <target name="compile-asjs">
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -105,8 +110,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -117,13 +122,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Graphics.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -141,9 +147,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Graphics.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -152,13 +158,13 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
-
- <target name="copy-js" >
+
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b5d922d0/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
index 4943b8e..aa9ab36 100644
--- a/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
@@ -45,7 +45,7 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<namespaces>
@@ -56,7 +56,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b5d922d0/frameworks/projects/Graphics/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/compile-config.xml b/frameworks/projects/Graphics/src/main/resources/compile-config.xml
index 200768a..9fc8b25 100644
--- a/frameworks/projects/Graphics/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Graphics/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,7 +61,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[44/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for mobile
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/compile-config.xml b/frameworks/projects/Mobile/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..8a4b4ed
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/resources/compile-config.xml
@@ -0,0 +1,89 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/Graphics.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+ <manifest>cordova-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>MobileClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/resources/cordova-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/cordova-manifest.xml b/frameworks/projects/Mobile/src/main/resources/cordova-manifest.xml
new file mode 100644
index 0000000..002eed1
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/resources/cordova-manifest.xml
@@ -0,0 +1,28 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Application" class="org.apache.cordova.Application"/>
+ <component id="Camera" class="org.apache.cordova.camera.Camera"/>
+ <component id="Weinre" class="org.apache.cordova.Weinre"/>
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/defaults.css b/frameworks/projects/Mobile/src/main/resources/defaults.css
new file mode 100644
index 0000000..d529595
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/resources/defaults.css
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace "library://ns.apache.org/flexjs/basic";
+@namespace svg "library://ns.apache.org/flexjs/svg";
+
+StackedViewManager
+{
+ IBeadModel: ClassReference("org.apache.flex.mobile.models.ViewManagerModel");
+ IBeadView: ClassReference("org.apache.flex.mobile.beads.StackedViewManagerView");
+}
+
+TabbedViewManager
+{
+ IBeadModel: ClassReference("org.apache.flex.mobile.models.ViewManagerModel");
+ IBeadView: ClassReference("org.apache.flex.mobile.beads.TabbedViewManagerView");
+}
[17/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder move
Posted by ah...@apache.org.
fix scripts after folder move
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b7951c21
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b7951c21
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b7951c21
Branch: refs/heads/develop
Commit: b7951c2102df73f2b7f7916f14ce98f30b0cbb72
Parents: fab4c21
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 17:08:08 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:50 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Flat/build.xml | 66 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 6 +-
.../Flat/src/main/resources/compile-config.xml | 14 ++---
3 files changed, 46 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7951c21/frameworks/projects/Flat/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/build.xml b/frameworks/projects/Flat/build.xml
index 86bd50c..b23122d 100644
--- a/frameworks/projects/Flat/build.xml
+++ b/frameworks/projects/Flat/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Flat-${release.version}.swc" />
+ <property name="target.name.no.version" value="Flat.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,compile,copy-js,test" description="Full build of Flat.swc">
</target>
@@ -48,55 +50,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Flat.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Flat"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in FlatClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Flat.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
<target name="compile-asjs">
- <echo message="Cross-compiling Flat"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -106,8 +109,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -120,11 +123,12 @@
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Flat.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -133,7 +137,7 @@
Link in the classes (and their dependencies) for the MXML tags
listed in this project's manifest.xml.
Also link the additional classes (and their dependencies)
- listed in FlatClasses.as,
+ listed in CoreClasses.as,
because these aren't referenced by the manifest classes.
Keep the standard metadata when compiling.
Include the appropriate CSS files and assets in the SWC.
@@ -142,9 +146,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Flat.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -153,13 +157,15 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
- <target name="copy-js" >
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
+
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7951c21/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
index a755d5c..b7fc0eb 100644
--- a/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
@@ -45,8 +45,8 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<namespaces>
@@ -57,7 +57,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7951c21/frameworks/projects/Flat/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/compile-config.xml b/frameworks/projects/Flat/src/main/resources/compile-config.xml
index 44c7c9f..7d1e0f0 100644
--- a/frameworks/projects/Flat/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Flat/src/main/resources/compile-config.xml
@@ -23,10 +23,10 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Binding.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/Graphics.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Binding.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Graphics.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -60,7 +60,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
<!--<path-element>asjs/src</path-element>-->
</source-path>
@@ -69,11 +69,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[24/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Map.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Map.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Map.as
deleted file mode 100644
index 43ce77b..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Map.as
+++ /dev/null
@@ -1,168 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Map extends google.maps.MVCObject {
-
- /**
- * @param mapDiv [(Node|null)]
- * @param opt_opts [(Object<?,string>|google.maps.MapOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Map(mapDiv:Object, opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see JSType - [(Array((google.maps.MVCArray|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var controls:Array;
-
- /**
- * @see JSType - [(google.maps.MapTypeRegistry|null)]
- * @see [google_maps_api_v3_11]
- */
- public var mapTypes:google.maps.MapTypeRegistry;
-
- /**
- * @see JSType - [(google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlayMapTypes:google.maps.MVCArray;
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getCenter():google.maps.LatLng { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getTilt():Number { return 0; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Node|null)}
- */
- public function getDiv():Object { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Projection|null)}
- */
- public function getProjection():Object { return null; } //google.maps.Projection { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getHeading():Number { return 0; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapTypeId|null|string)}
- */
- public function getMapTypeId():Object { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.StreetViewPanorama|null)}
- */
- public function getStreetView():google.maps.StreetViewPanorama { return null; }
-
- /**
- * @param x [number]
- * @param y [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function panBy(x:Number, y:Number):Object /* undefined */ { return null; }
-
- /**
- * @param panorama [(google.maps.StreetViewPanorama|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setStreetView(panorama:google.maps.StreetViewPanorama):Object /* undefined */ { return null; }
-
- /**
- * @param bounds [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function fitBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.MapOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param zoom [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setZoom(zoom:Number):Object /* undefined */ { return null; }
-
- /**
- * @param tilt [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setTilt(tilt:Number):Object /* undefined */ { return null; }
-
- /**
- * @param mapTypeId [(google.maps.MapTypeId|null|string)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMapTypeId(mapTypeId:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getZoom():Number { return 0; }
-
- /**
- * @param latLng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function panTo(latLng:google.maps.LatLng):Object /* undefined */ { return null; }
-
- /**
- * @param latLngBounds [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function panToBounds(latLngBounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
-
- /**
- * @param heading [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setHeading(heading:Number):Object /* undefined */ { return null; }
-
- /**
- * @param latlng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setCenter(latlng:google.maps.LatLng):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapCanvasProjection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapCanvasProjection.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapCanvasProjection.as
deleted file mode 100644
index c63c20f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapCanvasProjection.as
+++ /dev/null
@@ -1,52 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class MapCanvasProjection extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MapCanvasProjection() {
- super();
- }
-
- /**
- * @param latLng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Point|null)}
- */
- public function fromLatLngToDivPixel(latLng:google.maps.LatLng):google.maps.Point { return null; }
-
- /**
- * @param pixel [(google.maps.Point|null)]
- * @param opt_nowrap [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function fromContainerPixelToLatLng(pixel:google.maps.Point, opt_nowrap:Boolean = false):google.maps.LatLng { return null; }
-
- /**
- * @param latLng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Point|null)}
- */
- public function fromLatLngToContainerPixel(latLng:google.maps.LatLng):google.maps.Point { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getWorldWidth():Number { return 0; }
-
- /**
- * @param pixel [(google.maps.Point|null)]
- * @param opt_nowrap [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function fromDivPixelToLatLng(pixel:google.maps.Point, opt_nowrap:Boolean = false):google.maps.LatLng { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapPanes.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapPanes.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapPanes.as
deleted file mode 100644
index 7ad8104..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapPanes.as
+++ /dev/null
@@ -1,60 +0,0 @@
-package google.maps {
-
-import google.pseudo.Node;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MapPanes {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MapPanes() {
- super();
- }
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var floatShadow:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlayImage:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var floatPane:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlayMouseTarget:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var mapPane:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlayShadow:Node;
-
- /**
- * @see JSType - [(Node|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlayLayer:Node;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeControlStyle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeControlStyle.as
deleted file mode 100644
index 8bb2221..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeControlStyle.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MapTypeControlStyle {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DROPDOWN_MENU:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const HORIZONTAL_BAR:Number = 1;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DEFAULT:Number = 2;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeId.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeId.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeId.as
deleted file mode 100644
index b73a3c2..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeId.as
+++ /dev/null
@@ -1,38 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MapTypeId {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SATELLITE:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ROADMAP:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const HYBRID:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TERRAIN:String = '4';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeRegistry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeRegistry.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeRegistry.as
deleted file mode 100644
index 4352140..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapTypeRegistry.as
+++ /dev/null
@@ -1,17 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class MapTypeRegistry extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MapTypeRegistry() {
- super();
- }
-
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MapsEventListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MapsEventListener.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MapsEventListener.as
deleted file mode 100644
index fae3495..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MapsEventListener.as
+++ /dev/null
@@ -1,16 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MapsEventListener {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MapsEventListener() {
- super();
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Marker.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Marker.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Marker.as
deleted file mode 100644
index 1d48f65..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Marker.as
+++ /dev/null
@@ -1,299 +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 google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Marker extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.MarkerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Marker(opt_opts:Object = null) {
- super();
-
- _options = opt_opts;
- }
-
- private var _options:Object;
- private var _animation:Animation;
- private var _position:LatLng;
- private var _icon:Object;
- private var _shape:Object;
- private var _shadow:Object;
- private var _title:String;
- private var _draggable:Boolean;
- private var _zIndex:Number;
- private var _visible:Boolean;
- private var _cursor:String;
- private var _flat:Boolean;
- private var _map:Object;
- private var _clickable:Boolean;
-
- /**
- * @see JSType - [(number|string)]
- * @see [google_maps_api_v3_11]
- */
- public static var MAX_ZINDEX:Object;
-
- /**
- * @param animation [(google.maps.Animation|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setAnimation(animation:google.maps.Animation):Object /* undefined */ {
- _animation:animation;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getPosition():google.maps.LatLng {
- return _position;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Icon|google.maps.Symbol|null|string)}
- */
- public function getIcon():Object {
- return _icon;
- }
-
- /**
- * @param shape [(google.maps.MarkerShape|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setShape(shape:Object):Object /* undefined */ {
- _shape = shape;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Icon|google.maps.Symbol|null|string)}
- */
- public function getShadow():Object {
- return _shadow;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getTitle():String {
- return _title;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getDraggable():Boolean {
- return _draggable;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MarkerShape|null)}
- */
- public function getShape():Object {
- return _shape;
- }
-
- /**
- * @param zIndex [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setZIndex(zIndex:Number):Object /* undefined */ {
- _zIndex = zIndex;
- return undefined;
- }
-
- /**
- * @param flag [(boolean|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDraggable(flag:Boolean):Object /* undefined */ {
- _draggable = flag;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Animation|null)}
- */
- public function getAnimation():google.maps.Animation {
- return _animation;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getZIndex():Number {
- return _zIndex;
- }
-
- /**
- * @param visible [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(visible:Boolean):Object /* undefined */ {
- _visible = visible;
- return undefined;
- }
-
- /**
- * @param cursor [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setCursor(cursor:String):Object /* undefined */ {
- _cursor = cursor;
- return undefined;
- }
-
- /**
- * @param latlng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPosition(latlng:google.maps.LatLng):Object /* undefined */ {
- _position = latlng;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getFlat():Boolean {
- return _flat;
- }
-
- /**
- * @param map [(google.maps.Map|google.maps.StreetViewPanorama|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:Object):Object /* undefined */ {
- _map = map;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|google.maps.StreetViewPanorama|null)}
- */
- public function getMap():Object {
- return _map;
- }
-
- /**
- * @param flag [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setClickable(flag:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean {
- return _visible;
- }
-
- /**
- * @param shadow [(google.maps.Icon|google.maps.Symbol|null|string)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setShadow(shadow:Object):Object /* undefined */ {
- _shadow = shadow;
- return undefined;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getCursor():String {
- return _cursor;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getClickable():Boolean {
- return _clickable;
- }
-
- /**
- * @param flag [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setFlat(flag:Boolean):Object /* undefined */ {
- _flat = flag;
- return undefined;
- }
-
- /**
- * @param title [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setTitle(title:String):Object /* undefined */ {
- _title = title;
- return undefined;
- }
-
- /**
- * @param options [(Object<?,string>|google.maps.MarkerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ {
- _options = options;
- return undefined;
- }
-
- /**
- * @param icon [(google.maps.Icon|google.maps.Symbol|null|string)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setIcon(icon:Object):Object /* undefined */ {
- _icon = icon;
- return undefined;
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomService.as
deleted file mode 100644
index 17bb027..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomService.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MaxZoomService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MaxZoomService() {
- super();
- }
-
- /**
- * @param latlng [(google.maps.LatLng|null)]
- * @param callback [function ((google.maps.MaxZoomResult|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getMaxZoomAtLatLng(latlng:google.maps.LatLng, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomStatus.as
deleted file mode 100644
index d5ffa09..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MaxZoomStatus.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MaxZoomStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ERROR:String = '1';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MouseEvent.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MouseEvent.as
deleted file mode 100644
index f06d7c5..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MouseEvent.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MouseEvent {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MouseEvent() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- */
- public var latLng:google.maps.LatLng;
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function stop():Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/OverlayView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/OverlayView.as b/frameworks/projects/GoogleMaps/as/src/google/maps/OverlayView.as
deleted file mode 100644
index a01a0aa..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/OverlayView.as
+++ /dev/null
@@ -1,59 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class OverlayView extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function OverlayView() {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function draw():Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function onRemove():Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function onAdd():Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapPanes|null)}
- */
- public function getPanes():google.maps.MapPanes { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapCanvasProjection|null)}
- */
- public function getProjection():google.maps.MapCanvasProjection { return null; }
-
- /**
- * @param map [(google.maps.Map|google.maps.StreetViewPanorama|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|google.maps.StreetViewPanorama|null)}
- */
- public function getMap():Object { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Point.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Point.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Point.as
deleted file mode 100644
index 0bd9f35..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Point.as
+++ /dev/null
@@ -1,43 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class Point {
-
- /**
- * @param x [number]
- * @param y [number]
- * @see [google_maps_api_v3_11]
- */
- public function Point(x:Number, y:Number) {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var y:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var x:Number;
-
- /**
- * @param other [(google.maps.Point|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function equals(other:google.maps.Point):Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toString():String { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/PolyMouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/PolyMouseEvent.as b/frameworks/projects/GoogleMaps/as/src/google/maps/PolyMouseEvent.as
deleted file mode 100644
index b31af4e..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/PolyMouseEvent.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MouseEvent */
-public class PolyMouseEvent extends google.maps.MouseEvent {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PolyMouseEvent() {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var edge:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var vertex:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var path:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Polygon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Polygon.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Polygon.as
deleted file mode 100644
index a467204..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Polygon.as
+++ /dev/null
@@ -1,102 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Polygon extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.PolygonOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Polygon(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getEditable():Boolean { return null; }
-
- /**
- * @param draggable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MVCArray|null)}
- */
- public function getPaths():google.maps.MVCArray { return null; }
-
- /**
- * @param visible [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPath(path:Object):Object /* undefined */ { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean { return null; }
-
- /**
- * @param editable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.PolygonOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MVCArray|null)}
- */
- public function getPath():google.maps.MVCArray { return null; }
-
- /**
- * @param paths [(Array|google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPaths(paths:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getDraggable():Boolean { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Polyline.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Polyline.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Polyline.as
deleted file mode 100644
index c63d3ae..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Polyline.as
+++ /dev/null
@@ -1,89 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Polyline extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.PolylineOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Polyline(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getEditable():Boolean { return null; }
-
- /**
- * @param draggable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean { return null; }
-
- /**
- * @param editable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.PolylineOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param visible [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPath(path:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MVCArray|null)}
- */
- public function getPath():google.maps.MVCArray { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getDraggable():Boolean { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Rectangle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Rectangle.as
deleted file mode 100644
index 99e0371..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Rectangle.as
+++ /dev/null
@@ -1,89 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Rectangle extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.RectangleOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Rectangle(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getEditable():Boolean { return null; }
-
- /**
- * @param draggable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean { return null; }
-
- /**
- * @param editable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.RectangleOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param visible [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @param bounds [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getDraggable():Boolean { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ScaleControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ScaleControlStyle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ScaleControlStyle.as
deleted file mode 100644
index 7db4e10..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ScaleControlStyle.as
+++ /dev/null
@@ -1,17 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ScaleControlStyle {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DEFAULT:Number = 0;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Size.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Size.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Size.as
deleted file mode 100644
index 021d67c..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Size.as
+++ /dev/null
@@ -1,45 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class Size {
-
- /**
- * @param width [number]
- * @param height [number]
- * @param opt_widthUnit [(string|undefined)]
- * @param opt_heightUnit [(string|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Size(width:Number, height:Number, opt_widthUnit:String = '', opt_heightUnit:String = '') {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var height:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var width:Number;
-
- /**
- * @param other [(google.maps.Size|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function equals(other:google.maps.Size):Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toString():String { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewCoverageLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewCoverageLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewCoverageLayer.as
deleted file mode 100644
index 2f08eb8..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewCoverageLayer.as
+++ /dev/null
@@ -1,29 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class StreetViewCoverageLayer extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function StreetViewCoverageLayer() {
- super();
- }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPanorama.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPanorama.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPanorama.as
deleted file mode 100644
index 6fe67f7..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPanorama.as
+++ /dev/null
@@ -1,108 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class StreetViewPanorama extends google.maps.MVCObject {
-
- /**
- * @param container [(Node|null)]
- * @param opt_opts [(Object<?,string>|google.maps.StreetViewPanoramaOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function StreetViewPanorama(container:Object, opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see JSType - [(Array((google.maps.MVCArray|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var controls:Array;
-
- /**
- * @param pov [(google.maps.StreetViewPov|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPov(pov:google.maps.StreetViewPov):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.StreetViewPov|null)}
- */
- public function getPov():google.maps.StreetViewPov { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getPano():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.StreetViewPov|null)}
- */
- public function getPhotographerPov():google.maps.StreetViewPov { return null; }
-
- /**
- * @param zoom [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setZoom(zoom:Number):Object /* undefined */ { return null; }
-
- /**
- * @param flag [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(flag:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getZoom():Number { return 0; }
-
- /**
- * @param latLng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPosition(latLng:google.maps.LatLng):Object /* undefined */ { return null; }
-
- /**
- * @param pano [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPano(pano:String):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getPosition():google.maps.LatLng { return null; }
-
- /**
- * @param provider [function (string): (google.maps.StreetViewPanoramaData|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function registerPanoProvider(provider:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Array<(google.maps.StreetViewLink|null)>|null)}
- */
- public function getLinks():Array { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPov.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPov.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPov.as
deleted file mode 100644
index 02d579f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewPov.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class StreetViewPov {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function StreetViewPov() {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var pitch:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var heading:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewService.as
deleted file mode 100644
index ae969f8..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewService.as
+++ /dev/null
@@ -1,33 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class StreetViewService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function StreetViewService() {
- super();
- }
-
- /**
- * @param latlng [(google.maps.LatLng|null)]
- * @param radius [number]
- * @param callback [function ((google.maps.StreetViewPanoramaData|null), (google.maps.StreetViewStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getPanoramaByLocation(latlng:google.maps.LatLng, radius:Number, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param pano [string]
- * @param callback [function ((google.maps.StreetViewPanoramaData|null), (google.maps.StreetViewStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getPanoramaById(pano:String, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewStatus.as
deleted file mode 100644
index 04a9a11..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StreetViewStatus.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class StreetViewStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ZERO_RESULTS:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '2';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StrokePosition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StrokePosition.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StrokePosition.as
deleted file mode 100644
index 14fb79a..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StrokePosition.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class StrokePosition {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INSIDE:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const CENTER:Number = 1;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OUTSIDE:Number = 2;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/StyledMapType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/StyledMapType.as b/frameworks/projects/GoogleMaps/as/src/google/maps/StyledMapType.as
deleted file mode 100644
index f4a420d..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/StyledMapType.as
+++ /dev/null
@@ -1,18 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class StyledMapType extends google.maps.MVCObject {
-
- /**
- * @param styles [(Array<(google.maps.MapTypeStyle|null)>|null)]
- * @param opt_options [(Object<?,string>|google.maps.StyledMapTypeOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function StyledMapType(styles:Array, opt_options:Object = null) {
- super();
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/SymbolPath.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/SymbolPath.as b/frameworks/projects/GoogleMaps/as/src/google/maps/SymbolPath.as
deleted file mode 100644
index 3e7a7dc..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/SymbolPath.as
+++ /dev/null
@@ -1,45 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class SymbolPath {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const FORWARD_OPEN_ARROW:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const CIRCLE:Number = 1;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BACKWARD_OPEN_ARROW:Number = 2;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BACKWARD_CLOSED_ARROW:Number = 3;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const FORWARD_CLOSED_ARROW:Number = 4;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/TrafficLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/TrafficLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/TrafficLayer.as
deleted file mode 100644
index c00139d..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/TrafficLayer.as
+++ /dev/null
@@ -1,29 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class TrafficLayer extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function TrafficLayer() {
- super();
- }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/TransitLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/TransitLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/TransitLayer.as
deleted file mode 100644
index c0a5be2..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/TransitLayer.as
+++ /dev/null
@@ -1,29 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class TransitLayer extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function TransitLayer() {
- super();
- }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/TravelMode.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/TravelMode.as b/frameworks/projects/GoogleMaps/as/src/google/maps/TravelMode.as
deleted file mode 100644
index 2ba3b84..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/TravelMode.as
+++ /dev/null
@@ -1,38 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class TravelMode {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TRANSIT:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DRIVING:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const WALKING:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BICYCLING:String = '1';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/UnitSystem.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/UnitSystem.as b/frameworks/projects/GoogleMaps/as/src/google/maps/UnitSystem.as
deleted file mode 100644
index 3b349c0..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/UnitSystem.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class UnitSystem {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const METRIC:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const IMPERIAL:Number = 1;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ZoomControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ZoomControlStyle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ZoomControlStyle.as
deleted file mode 100644
index 842bd64..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ZoomControlStyle.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ZoomControlStyle {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LARGE:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SMALL:Number = 1;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DEFAULT:Number = 2;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense.as b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense.as
deleted file mode 100644
index 58a178e..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense.as
+++ /dev/null
@@ -1,27 +0,0 @@
-package google.maps {
-
-import google.maps.adsense.AdFormat;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class adsense {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function adsense():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var AdFormat:google.maps.adsense.AdFormat;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function AdUnitOptions():void { }
-
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdFormat.as b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdFormat.as
deleted file mode 100644
index cfb9242..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdFormat.as
+++ /dev/null
@@ -1,136 +0,0 @@
-package google.maps.adsense {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class AdFormat {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const HALF_BANNER:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MEDIUM_VERTICAL_LINK_UNIT:String = '9';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const VERTICAL_BANNER:String = '16';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SMALL_HORIZONTAL_LINK_UNIT:String = '11';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SMALL_SQUARE:String = '13';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const X_LARGE_VERTICAL_LINK_UNIT:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SMALL_RECTANGLE:String = '12';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BUTTON:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MEDIUM_RECTANGLE:String = '8';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BANNER:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LEADERBOARD:String = '7';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LARGE_HORIZONTAL_LINK_UNIT:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const WIDE_SKYSCRAPER:String = '17';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SQUARE:String = '15';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LARGE_RECTANGLE:String = '5';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SMALL_VERTICAL_LINK_UNIT:String = '14';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const SKYSCRAPER:String = '10';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LARGE_VERTICAL_LINK_UNIT:String = '6';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdUnit.as b/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdUnit.as
deleted file mode 100644
index 8cf5742..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/adsense/AdUnit.as
+++ /dev/null
@@ -1,147 +0,0 @@
-package google.maps.adsense {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-import google.maps.ControlPosition;
-import google.pseudo.Node;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class AdUnit extends google.maps.MVCObject {
-
- /**
- * @param container [(Node|null)]
- * @param opts [(Object<?,string>|google.maps.adsense.AdUnitOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public function AdUnit(container:Node, opts:Object) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Node|null)}
- */
- public function getContainer():Node { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getTitleColor():String { return null; }
-
- /**
- * @param channelNumber [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setChannelNumber(channelNumber:String):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getBackgroundColor():String { return null; }
-
- /**
- * @param position [(google.maps.ControlPosition|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPosition(position:google.maps.ControlPosition):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function setBackgroundColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function setBorderColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.ControlPosition|null)}
- */
- public function getPosition():google.maps.ControlPosition { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getUrlColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getBorderColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getPublisherId():String { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
- /**
- * @param format [(google.maps.adsense.AdFormat|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setFormat(format:google.maps.adsense.AdFormat):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getChannelNumber():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.adsense.AdFormat|null)}
- */
- public function getFormat():google.maps.adsense.AdFormat { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function setTitleColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function setTextColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function setUrlColor():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getTextColor():String { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing.as b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing.as
deleted file mode 100644
index 81e538c..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing.as
+++ /dev/null
@@ -1,33 +0,0 @@
-package google.maps {
-
-import google.maps.drawing.OverlayType;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class drawing {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function drawing():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var OverlayType:google.maps.drawing.OverlayType;
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DrawingControlOptions():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DrawingManagerOptions():void { }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/DrawingManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/DrawingManager.as b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/DrawingManager.as
deleted file mode 100644
index 2c42ac2..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/DrawingManager.as
+++ /dev/null
@@ -1,53 +0,0 @@
-package google.maps.drawing {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class DrawingManager extends google.maps.MVCObject {
-
- /**
- * @param opt_options [(Object<?,string>|google.maps.drawing.DrawingManagerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function DrawingManager(opt_options:Object = null) {
- super();
- }
-
- /**
- * @param drawingMode [(google.maps.drawing.OverlayType|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDrawingMode(drawingMode:google.maps.drawing.OverlayType):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.drawing.DrawingManagerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.drawing.OverlayType|null)}
- */
- public function getDrawingMode():google.maps.drawing.OverlayType { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayCompleteEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayCompleteEvent.as b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayCompleteEvent.as
deleted file mode 100644
index cb49e00..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayCompleteEvent.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps.drawing {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class OverlayCompleteEvent {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function OverlayCompleteEvent() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.Circle|google.maps.Marker|google.maps.Polygon|google.maps.Polyline|google.maps.Rectangle|null)]
- * @see [google_maps_api_v3_11]
- */
- public var overlay:Object;
-
- /**
- * @see JSType - [(google.maps.drawing.OverlayType|null)]
- * @see [google_maps_api_v3_11]
- */
- public var type:google.maps.drawing.OverlayType;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayType.as b/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayType.as
deleted file mode 100644
index 0ce18e6..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/drawing/OverlayType.as
+++ /dev/null
@@ -1,45 +0,0 @@
-package google.maps.drawing {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class OverlayType {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const POLYLINE:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const RECTANGLE:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const CIRCLE:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MARKER:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const POLYGON:String = '3';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/event.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/event.as b/frameworks/projects/GoogleMaps/as/src/google/maps/event.as
deleted file mode 100644
index 2a67d02..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/event.as
+++ /dev/null
@@ -1,83 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class event {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function event():void { }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @param var_args [*]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public static function trigger(instance:Object, eventName:String, ...var_args):Object /* undefined */ { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public static function clearInstanceListeners(instance:Object):Object /* undefined */ { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @param handler [Function]
- * @param opt_capture [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapsEventListener|null)}
- */
- public static function addDomListenerOnce(instance:Object, eventName:String, handler:Function /* Function */, opt_capture:Boolean = false):google.maps.MapsEventListener { return null; }
-
- /**
- * @param listener [(google.maps.MapsEventListener|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public static function removeListener(listener:google.maps.MapsEventListener):Object /* undefined */ { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @param handler [Function]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapsEventListener|null)}
- */
- public static function addListener(instance:Object, eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @param handler [Function]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapsEventListener|null)}
- */
- public static function addListenerOnce(instance:Object, eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public static function clearListeners(instance:Object, eventName:String):Object /* undefined */ { return null; }
-
- /**
- * @param instance [(Object|null)]
- * @param eventName [string]
- * @param handler [Function]
- * @param opt_capture [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapsEventListener|null)}
- */
- public static function addDomListener(instance:Object, eventName:String, handler:Function /* Function */, opt_capture:Boolean = false):google.maps.MapsEventListener { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry.as b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry.as
deleted file mode 100644
index 5d72731..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry.as
+++ /dev/null
@@ -1,33 +0,0 @@
-package google.maps {
-
-import google.maps.geometry.spherical;
-import google.maps.geometry.encoding;
-import google.maps.geometry.poly;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class geometry {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function geometry():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var poly:google.maps.geometry.poly;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var encoding:google.maps.geometry.encoding;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var spherical:google.maps.geometry.spherical;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/encoding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/encoding.as b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/encoding.as
deleted file mode 100644
index c88b290..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/encoding.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps.geometry {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class encoding {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function encoding():void { }
-
- /**
- * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public static function encodePath(path:Object):String { return null; }
-
- /**
- * @param encodedPath [string]
- * @see [google_maps_api_v3_11]
- * @returns {(Array<(google.maps.LatLng|null)>|null)}
- */
- public static function decodePath(encodedPath:String):Array { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/poly.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/poly.as b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/poly.as
deleted file mode 100644
index 573db4d..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/poly.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps.geometry {
-
-import google.maps.LatLng;
-import google.maps.Polygon;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class poly {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function poly():void { }
-
- /**
- * @param point [(google.maps.LatLng|null)]
- * @param polygon [(google.maps.Polygon|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public static function containsLocation(point:google.maps.LatLng, polygon:google.maps.Polygon):Boolean { return null; }
-
- /**
- * @param point [(google.maps.LatLng|null)]
- * @param poly [(google.maps.Polygon|google.maps.Polyline|null)]
- * @param opt_tolerance [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public static function isLocationOnEdge(point:google.maps.LatLng, poly:Object, opt_tolerance:Number = 0):Boolean { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/spherical.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/spherical.as b/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/spherical.as
deleted file mode 100644
index 78dbb08..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/geometry/spherical.as
+++ /dev/null
@@ -1,86 +0,0 @@
-package google.maps.geometry {
-
-import google.maps.LatLng;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class spherical {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function spherical():void { }
-
- /**
- * @param from [(google.maps.LatLng|null)]
- * @param distance [number]
- * @param heading [number]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public static function computeOffset(from:google.maps.LatLng, distance:Number, heading:Number, opt_radius:Number = 0):google.maps.LatLng { return null; }
-
- /**
- * @param from [(google.maps.LatLng|null)]
- * @param to [(google.maps.LatLng|null)]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public static function computeDistanceBetween(from:google.maps.LatLng, to:google.maps.LatLng, opt_radius:Number = 0):Number { return 0; }
-
- /**
- * @param to [(google.maps.LatLng|null)]
- * @param distance [number]
- * @param heading [number]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public static function computeOffsetOrigin(to:google.maps.LatLng, distance:Number, heading:Number, opt_radius:Number = 0):google.maps.LatLng { return null; }
-
- /**
- * @param from [(google.maps.LatLng|null)]
- * @param to [(google.maps.LatLng|null)]
- * @param fraction [number]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public static function interpolate(from:google.maps.LatLng, to:google.maps.LatLng, fraction:Number):google.maps.LatLng { return null; }
-
- /**
- * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public static function computeLength(path:Object, opt_radius:Number = 0):Number { return 0; }
-
- /**
- * @param loop [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public static function computeSignedArea(loop:Object, opt_radius:Number = 0):Number { return 0; }
-
- /**
- * @param from [(google.maps.LatLng|null)]
- * @param to [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public static function computeHeading(from:google.maps.LatLng, to:google.maps.LatLng):Number { return 0; }
-
- /**
- * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
- * @param opt_radius [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public static function computeArea(path:Object, opt_radius:Number = 0):Number { return 0; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio.as b/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio.as
deleted file mode 100644
index 25ebe7a..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio.as
+++ /dev/null
@@ -1,30 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class panoramio {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function panoramio():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PanoramioLayerOptions():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PanoramioMouseEvent():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PanoramioFeature():void { }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio/PanoramioLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio/PanoramioLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio/PanoramioLayer.as
deleted file mode 100644
index a6bd5ff..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/panoramio/PanoramioLayer.as
+++ /dev/null
@@ -1,66 +0,0 @@
-package google.maps.panoramio {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class PanoramioLayer extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.panoramio.PanoramioLayerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function PanoramioLayer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @param userId [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setUserId(userId:String):Object /* undefined */ { return null; }
-
- /**
- * @param tag [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setTag(tag:String):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getUserId():String { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.panoramio.PanoramioLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getTag():String { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
[22/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/MapView_original.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/MapView_original.as b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/MapView_original.as
deleted file mode 100644
index d21314e..0000000
--- a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/MapView_original.as
+++ /dev/null
@@ -1,515 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/**
- * NOTE
- *
- * THIS IS THE OLD MapView. The new one is GoogleMapView. This code exists to preserve
- * the AS/HTMLLoader version for use with AIR. Someday we will come back to this and make
- * it work again.
- */
-package org.apache.flex.maps.google.beads
-{
- COMPILE::AS3 {
- import flash.events.Event;
- import flash.html.HTMLLoader;
- import flash.net.URLRequest;
- }
-
- import org.apache.flex.core.BeadViewBase;
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.maps.google.GoogleMap;
- import org.apache.flex.maps.google.models.MapModel;
-
- /**
- * The MapView bead class displays a Google Map using HTMLLoader.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- public class MapView_original extends BeadViewBase implements IBeadView
- {
- public function MapView_original()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- override public function set strand(value:IStrand):void
- {
- super.strand = value;
- _strand = value;
-
- var token:String = (_strand as GoogleMap).token;
- var src:String = 'https://maps.googleapis.com/maps/api/js?v=3.exp';
- if (token)
- src += '&key=' + token;
- src += '&libraries=places&sensor=false&callback=mapInit';
-
- var script:HTMLScriptElement = document.createElement('script') as HTMLScriptElement;
- script.type = 'text/javascript';
- script.src = src;
-
-/** window.mapView = this;
- window['mapInit'] = function() {
- (this.mapView._strand as GoogleMap).finishInitialization();
- }
-**/
- document.head.appendChild(script);
- }
- }
-
- COMPILE::AS3
- public class MapView_original extends BeadViewBase implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function MapView_original()
- {
- }
-
- private var _loader:HTMLLoader;
-
- /**
- * @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;
-
- _loader = new HTMLLoader();
- _loader.x = 0;
- _loader.y = 0;
- _loader.width = UIBase(value).width;
- _loader.height = UIBase(value).height;
-
- IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
- IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);
-
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- model.addEventListener("zoomChanged", handleZoomChange);
- model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
-
- (_strand as UIBase).addChild(_loader);
-
- var token:String = Map(_strand).token;
- if (token)
- page = pageTemplateStart + "&key=" + token + pageTemplateEnd;
- else
- page = pageTemplateStart + pageTemplateEnd;
-
- if (page) {
- _loader.loadString(page);
- _loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
- }
- }
-
- private function completeHandler(event:flash.events.Event):void
- {
- trace("htmlLoader complete");
-
- if (_loader && page) {
- _loader.window.map.center_changed = onMapCentered;
- _loader.window.map.bounds_changed = onMapBoundsChanged;
- _loader.window.map.zoom_changed = onMapZoomChanged;
- _loader.window.map.dragend = onMapDragEnd;
-
- // custom event handlers
- _loader.window.addEventListener("searchResults",onSearchResults);
- _loader.window.addEventListener("markerClicked",onMarkerClicked);
- }
-
- IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
- }
-
- private function handleZoomChange(event:org.apache.flex.events.Event):void
- {
- if (_loader && page) {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- setZoom(model.zoom);
- }
- }
-
- private function handleCurrentLocationChange(event:org.apache.flex.events.Event):void
- {
- if (_loader && page) {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- setCenter(model.currentLocation.location);
- }
- }
-
- private var page:String;
-
- /**
- * Adjusts the map to the given coordinate and zoom level.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function mapit(lat:Number, lng:Number, zoomLevel:Number):void
- {
- if (_loader && page) {
- _loader.window.mapit(lat,lng,zoomLevel);
- }
- }
-
- /**
- * Finds the given address and places a marker on it. This function may be dropped
- * since centerOnAddress + markCurrentLocation does the same thing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function geoCodeAndMarkAddress(address:String):void
- {
- if (_loader && page) {
- _loader.window.codeaddress(address);
- }
- }
-
- /**
- * Centers the map on the address given.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function centerOnAddress(address:String):void
- {
- if (_loader && page) {
- _loader.window.centeronaddress(address);
- }
- }
-
- /**
- * Marks the current center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function markCurrentLocation():void
- {
- if (_loader && page) {
- _loader.window.markcurrentlocation();
- }
- }
-
- /**
- * Performs a search near the center of map. The result is a set of
- * markers displayed on the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function nearbySearch(placeName:String):void
- {
- if (_loader && page) {
- _loader.window.nearbysearch(placeName);
- }
- }
-
- /**
- * Removes all of the markers from the map
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function removeAllMarkers():void
- {
- if (_loader && page) {
- _loader.window.clearmarkers();
- }
- }
-
- /**
- * Sets the zoom factor of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setZoom(zoom:Number):void
- {
- if (_loader && page) {
- _loader.window.map.setZoom(zoom);
- }
- }
-
- /**
- * Sets the center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setCenter( location:LatLng ):void
- {
- if (_loader && page) {
- _loader.window.setCenter(location.lat, location.lng);
- }
- }
-
- /**
- * @private
- */
- private function handleSizeChange(event:org.apache.flex.events.Event):void
- {
- _loader.width = UIBase(_strand).width;
- _loader.height = UIBase(_strand).height;
- }
-
- /**
- * @private
- */
- private function onMapCentered():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered") );
- }
-
- /**
- * @private
- */
- private function onMapBoundsChanged():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged") );
- }
-
- /**
- * @private
- */
- private function onMapZoomChanged():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("zoomChanged") );
- }
-
- /**
- * @private
- */
- private function onMapDragEnd():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
- }
-
- /**
- * @private
- */
- private function onSearchResults(event:*):void
- {
- var results:Array = [];
- for(var i:int=0; i < event.results.length; i++) {
- var result:Place = new Place();
- result.geometry.location.lat = event.results[i].geometry.location.lat();
- result.geometry.location.lng = event.results[i].geometry.location.lng();
- result.icon = event.results[i].icon;
- result.id = event.results[i].id;
- result.name = event.results[i].name;
- result.reference = event.results[i].reference;
- result.vicinity = event.results[i].vicinity;
- results.push(result);
- }
-
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.searchResults = results;
- }
-
- /**
- * @private
- */
- private function onMarkerClicked(event:*):void
- {
- var marker:Marker = new Marker();
- marker.position.lat = event.marker.position.lat();
- marker.position.lng = event.marker.position.lng();
- marker.title = event.marker.title;
- marker.map = Map(_strand);
-
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.selectedMarker = marker;
-
- IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("markerClicked"));
- }
-
- /**
- * @private
- * This page definition is used with HTMLLoader to bring in the Google Maps
- * API (a Google APP token is required).
- */
- private static var pageTemplateStart:String = '<!DOCTYPE html>'+
- '<html>'+
- ' <head>'+
- ' <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />'+
- ' <style type="text/css">'+
- ' html { height: 100% }'+
- ' body { height: 100%; margin: 0; padding: 0 }'+
- ' #map-canvas { height: 100% }'+
- ' </style>'+
- ' <script type="text/javascript"'+
- ' src="https://maps.googleapis.com/maps/api/js?v=3.exp';
-
- private static var pageTemplateEnd:String = '&libraries=places&sensor=false">'+
- ' </script>'+
- ' <script type="text/javascript">'+
- ' var map;'+
- ' var geocoder;'+
- ' var currentCenter;' +
- ' var service;' +
- ' var places;' +
- ' var markers;'+
- ' function mapit(lat, lng, zoomLevel) {' +
- ' currentCenter = new google.maps.LatLng(lat, lng);'+
- ' if (map == null) {' +
- ' var mapOptions = {'+
- ' center: currentCenter,'+
- ' zoom: zoomLevel'+
- ' };'+
- ' map = new google.maps.Map(document.getElementById("map-canvas"),'+
- ' mapOptions);' +
- ' }' +
- ' google.maps.event.addListener(map, "center_changed", function() {' +
- ' currentCenter = map.getCenter();' +
- ' });' +
- ' google.maps.event.addListener(map, "bounds_changed", function() {' +
- ' currentCenter = map.getCenter();' +
- ' });' +
- ' map.setCenter(currentCenter);'+
- ' };' +
- ' function setCenter(lat, lng) {' +
- ' currentCenter = new google.maps.LatLng(lat,lng);' +
- ' map.setCenter(currentCenter);' +
- ' };'+
- ' function codeaddress(address) {'+
- ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
- ' geocoder.geocode( { "address": address}, function(results, status) {'+
- ' if (status == google.maps.GeocoderStatus.OK) {'+
- ' currentCenter = results[0].geometry.location;'+
- ' map.setCenter(currentCenter);'+
- ' var marker = new google.maps.Marker({'+
- ' map: map,'+
- ' position: currentCenter,'+
- ' });'+
- ' } else {'+
- ' alert("Geocode was not successful for the following reason: " + status);'+
- ' }'+
- ' });'+
- ' };'+
- ' function centeronaddress(address) {'+
- ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
- ' geocoder.geocode( { "address": address}, function(results, status) {'+
- ' if (status == google.maps.GeocoderStatus.OK) {'+
- ' currentCenter = results[0].geometry.location;'+
- ' map.setCenter(currentCenter);' +
- ' } else {'+
- ' alert("Geocode was not successful for the following reason: " + status);'+
- ' }'+
- ' });'+
- ' };'+
- ' function markcurrentlocation() {'+
- ' createMarker(currentCenter);'+
- ' };' +
- ' function createMarker(location) {' +
- ' var marker = new google.maps.Marker({'+
- ' map: map,'+
- ' position: location,'+
- ' });' +
- ' google.maps.event.addListener(marker, "click", function() {' +
- ' markerClicked(marker);' +
- ' });'+
- ' return marker;'+
- ' };' +
- ' function clearmarkers() {' +
- ' if (markers) {' +
- ' for(var i=0; i < markers.length; i++) {' +
- ' markers[i].setMap(null);' +
- ' }' +
- ' markers = null;' +
- ' }' +
- ' };'+
- ' function nearbysearch(placename) {' +
- ' if (markers == null) markers = [];' +
- ' service = new google.maps.places.PlacesService(map);'+
- ' service.nearbySearch({"location": currentCenter,' +
- ' "radius": 5000,' +
- ' "name": placename}, function(results, status) {' +
- ' places = results;' +
- ' if (status == google.maps.places.PlacesServiceStatus.OK) {' +
- ' for(var i=0; i < results.length; i++) {' +
- ' var place = results[i];' +
- ' var marker = createMarker(place.geometry.location);' +
- ' marker.title = place.name;' +
- ' markers.push(marker);' +
- ' }' +
- ' var event = document.createEvent("Event");' +
- ' event.results = places;'+
- ' event.initEvent("searchResults", true, true);' +
- ' window.dispatchEvent(event);' +
- ' }' +
- ' });'+
- ' };' +
- ' function markerClicked(marker) {' +
- ' var newEvent = document.createEvent("Event");' +
- ' newEvent.marker = marker;' +
- ' newEvent.initEvent("markerClicked", true, true);' +
- ' window.dispatchEvent(newEvent);' +
- ' };'+
- ' function initialize() {'+
- ' mapit(37.333, -121.900, 12);'+
- ' };'+
- ' google.maps.event.addDomListener(window, "load", initialize);'+
- ' </script>'+
- ' </head>'+
- ' <body>'+
- ' <div id="map-canvas"></div>'+
- ' </body>'+
- '</html>';
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/models/MapModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/models/MapModel.as b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/models/MapModel.as
deleted file mode 100644
index 6184143..0000000
--- a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/models/MapModel.as
+++ /dev/null
@@ -1,165 +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.maps.google.models
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
-
- import google.maps.LatLng;
- import google.maps.Marker;
-
- /**
- * The data model for the Map class, this holds the maps current center
- * location, its current zoom level, the last marker selected, and any
- * search results.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MapModel extends EventDispatcher implements IBeadModel
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function MapModel()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
- }
-
- private var _token:String;
-
- public function get token():String
- {
- return _token;
- }
- public function set token(value:String):void
- {
- _token = value;
- dispatchEvent(new Event("tokenChanged"));
- }
-
- private var _currentCenter:LatLng;
-
- /**
- * The current center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get currentCenter():LatLng
- {
- return _currentCenter;
- }
-
- public function set currentCenter(value:LatLng):void
- {
- _currentCenter = value;
- dispatchEvent( new Event("currentCenterChanged") );
- }
-
- private var _selectedMarker:Marker;
-
- /**
- * The last marker selected, if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedMarker():Marker
- {
- return _selectedMarker;
- }
-
- public function set selectedMarker(value:Marker):void
- {
- _selectedMarker = value;
- dispatchEvent( new Event("selectedMarkerChanged") );
- }
-
- private var _zoom:Number;
-
- /**
- * The current zoom level.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get zoom():Number
- {
- return _zoom;
- }
- public function set zoom(value:Number):void
- {
- if (value != _zoom) {
- _zoom = value;
- dispatchEvent( new Event("zoomChanged") );
- }
- }
-
- private var _searchResults:Array;
-
- /**
- * Results from the last search.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get searchResults():Array
- {
- return _searchResults;
- }
- public function set searchResults(value:Array):void
- {
- _searchResults = value;
- dispatchEvent( new Event("searchResultsChanged") );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/compile-asjs-config.xml b/frameworks/projects/GoogleMaps/compile-asjs-config.xml
deleted file mode 100644
index 52a9e48..0000000
--- a/frameworks/projects/GoogleMaps/compile-asjs-config.xml
+++ /dev/null
@@ -1,75 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>google-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-classes>
- <class>GoogleStubClasses</class>
- <class>GoogleMapsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/google</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/compile-config.xml b/frameworks/projects/GoogleMaps/compile-config.xml
deleted file mode 100644
index 7a80279..0000000
--- a/frameworks/projects/GoogleMaps/compile-config.xml
+++ /dev/null
@@ -1,83 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>google-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>GoogleStubClasses</class>
- <class>GoogleMapsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/google</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/google-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/google-manifest.xml b/frameworks/projects/GoogleMaps/google-manifest.xml
deleted file mode 100644
index f843c0c..0000000
--- a/frameworks/projects/GoogleMaps/google-manifest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
- <component id="Map" class="org.apache.flex.maps.google.GoogleMap" />
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/GoogleMapsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/GoogleMapsClasses.as b/frameworks/projects/GoogleMaps/src/main/flex/GoogleMapsClasses.as
new file mode 100644
index 0000000..6445519
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/GoogleMapsClasses.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class GoogleMapsClasses
+{
+ import org.apache.flex.maps.google.GoogleMap; GoogleMap;
+ import org.apache.flex.maps.google.models.MapModel; MapModel;
+ import org.apache.flex.maps.google.beads.GoogleMapView; GoogleMapView;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as b/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
new file mode 100644
index 0000000..9f6da21
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/GoogleStubClasses.as
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class GoogleStubClasses
+{
+ COMPILE::AS3 {
+ import google.maps.Animation; Animation;
+ import google.maps.LatLng; LatLng;
+ import google.maps.Marker; Marker;
+ import google.maps.Geocoder; Geocoder;
+ import google.maps.Map; Map;
+ import google.maps.places.PlaceResult; PlaceResult;
+ import google.maps.places.PlacesService; PlacesService;
+ }
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Animation.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Animation.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Animation.as
new file mode 100644
index 0000000..8a76edf
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Animation.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class Animation {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BOUNCE:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DROP:Number = 1;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/BicyclingLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/BicyclingLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/BicyclingLayer.as
new file mode 100644
index 0000000..5dab300
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/BicyclingLayer.as
@@ -0,0 +1,29 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class BicyclingLayer extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function BicyclingLayer() {
+ super();
+ }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Circle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Circle.as
new file mode 100644
index 0000000..2d95c54
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Circle.as
@@ -0,0 +1,108 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Circle extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.CircleOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Circle(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getEditable():Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getCenter():google.maps.LatLng { return null; }
+
+ /**
+ * @param draggable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param visible [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getRadius():Number { return 0; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean { return null; }
+
+ /**
+ * @param editable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.CircleOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param radius [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setRadius(radius:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getDraggable():Boolean { return null; }
+
+ /**
+ * @param center [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setCenter(center:google.maps.LatLng):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ControlPosition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ControlPosition.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ControlPosition.as
new file mode 100644
index 0000000..5ef0a2a
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ControlPosition.as
@@ -0,0 +1,94 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ControlPosition {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const RIGHT_TOP:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const RIGHT_BOTTOM:Number = 1;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TOP_RIGHT:Number = 2;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BOTTOM_LEFT:Number = 3;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const RIGHT_CENTER:Number = 4;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BOTTOM_CENTER:Number = 5;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TOP_LEFT:Number = 6;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LEFT_CENTER:Number = 7;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LEFT_BOTTOM:Number = 8;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TOP_CENTER:Number = 9;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BOTTOM_RIGHT:Number = 10;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LEFT_TOP:Number = 11;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsRenderer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsRenderer.as
new file mode 100644
index 0000000..f548646
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsRenderer.as
@@ -0,0 +1,78 @@
+package google.maps {
+
+import google.pseudo.Node;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class DirectionsRenderer extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.DirectionsRendererOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function DirectionsRenderer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getRouteIndex():Number { return 0; }
+
+ /**
+ * @param routeIndex [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setRouteIndex(routeIndex:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param panel [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPanel(panel:Node):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.DirectionsRendererOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param directions [(google.maps.DirectionsResult|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDirections(directions:google.maps.DirectionsResult):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.DirectionsResult|null)}
+ */
+ public function getDirections():google.maps.DirectionsResult { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Node|null)}
+ */
+ public function getPanel():Node { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsService.as
new file mode 100644
index 0000000..3070674
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsService.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DirectionsService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function DirectionsService() {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.DirectionsRequest|null)]
+ * @param callback [function ((google.maps.DirectionsResult|null), (google.maps.DirectionsStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function route(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsStatus.as
new file mode 100644
index 0000000..e34bf53
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DirectionsStatus.as
@@ -0,0 +1,66 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DirectionsStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const NOT_FOUND:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OVER_QUERY_LIMIT:String = '5';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const REQUEST_DENIED:String = '6';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MAX_WAYPOINTS_EXCEEDED:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ZERO_RESULTS:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '7';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixElementStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixElementStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixElementStatus.as
new file mode 100644
index 0000000..510c17f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixElementStatus.as
@@ -0,0 +1,31 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DistanceMatrixElementStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const NOT_FOUND:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ZERO_RESULTS:String = '3';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixService.as
new file mode 100644
index 0000000..035e63d
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixService.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DistanceMatrixService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function DistanceMatrixService() {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.DistanceMatrixRequest|null)]
+ * @param callback [function ((google.maps.DistanceMatrixResponse|null), (google.maps.DistanceMatrixStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getDistanceMatrix(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixStatus.as
new file mode 100644
index 0000000..b168675
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/DistanceMatrixStatus.as
@@ -0,0 +1,59 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DistanceMatrixStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MAX_ELEMENTS_EXCEEDED:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OVER_QUERY_LIMIT:String = '5';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const REQUEST_DENIED:String = '6';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MAX_DIMENSIONS_EXCEEDED:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationService.as
new file mode 100644
index 0000000..261da53
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationService.as
@@ -0,0 +1,32 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ElevationService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function ElevationService() {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.PathElevationRequest|null)]
+ * @param callback [function ((Array<(google.maps.ElevationResult|null)>|null), (google.maps.ElevationStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getElevationAlongPath(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.LocationElevationRequest|null)]
+ * @param callback [function ((Array<(google.maps.ElevationResult|null)>|null), (google.maps.ElevationStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getElevationForLocations(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationStatus.as
new file mode 100644
index 0000000..dfc5e3f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ElevationStatus.as
@@ -0,0 +1,45 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ElevationStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OVER_QUERY_LIMIT:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const REQUEST_DENIED:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesHeatmap.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesHeatmap.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesHeatmap.as
new file mode 100644
index 0000000..28400bc
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesHeatmap.as
@@ -0,0 +1,22 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesHeatmap {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesHeatmap() {
+ super();
+ }
+
+ /**
+ * @see JSType - [boolean]
+ * @see [google_maps_api_v3_11]
+ */
+ public var enabled:Boolean;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesLayer.as
new file mode 100644
index 0000000..f185b75
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesLayer.as
@@ -0,0 +1,37 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class FusionTablesLayer extends google.maps.MVCObject {
+
+ /**
+ * @param options [(Object<?,string>|google.maps.FusionTablesLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesLayer(options:Object) {
+ super();
+ }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.FusionTablesLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesMarkerOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesMarkerOptions.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesMarkerOptions.as
new file mode 100644
index 0000000..dcd8a4b
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesMarkerOptions.as
@@ -0,0 +1,22 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesMarkerOptions {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesMarkerOptions() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var iconName:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolygonOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolygonOptions.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolygonOptions.as
new file mode 100644
index 0000000..2730d85
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolygonOptions.as
@@ -0,0 +1,46 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesPolygonOptions {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesPolygonOptions() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var fillColor:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeColor:String;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeWeight:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeOpacity:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var fillOpacity:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolylineOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolylineOptions.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolylineOptions.as
new file mode 100644
index 0000000..4c0ab0b
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesPolylineOptions.as
@@ -0,0 +1,34 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesPolylineOptions {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesPolylineOptions() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeColor:String;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeWeight:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var strokeOpacity:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesQuery.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesQuery.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesQuery.as
new file mode 100644
index 0000000..83dbe8b
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesQuery.as
@@ -0,0 +1,52 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesQuery {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesQuery() {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var limit:Number;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var orderBy:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var select:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var from:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var where:String;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var offset:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesStyle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesStyle.as
new file mode 100644
index 0000000..2f428c8
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/FusionTablesStyle.as
@@ -0,0 +1,40 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class FusionTablesStyle {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function FusionTablesStyle() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(Object(?,string)|google.maps.FusionTablesPolygonOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var polygonOptions:Object;
+
+ /**
+ * @see JSType - [(Object(?,string)|google.maps.FusionTablesPolylineOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var polylineOptions:Object;
+
+ /**
+ * @see JSType - [(Object(?,string)|google.maps.FusionTablesMarkerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var markerOptions:Object;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var where:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Geocoder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Geocoder.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Geocoder.as
new file mode 100644
index 0000000..f13a2d5
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Geocoder.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class Geocoder {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function Geocoder() {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.GeocoderRequest|null)]
+ * @param callback [function ((Array<(google.maps.GeocoderResult|null)>|null), (google.maps.GeocoderStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function geocode(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderAddressComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderAddressComponent.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderAddressComponent.as
new file mode 100644
index 0000000..60ffa1e
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderAddressComponent.as
@@ -0,0 +1,34 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class GeocoderAddressComponent {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function GeocoderAddressComponent() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var long_name:String;
+
+ /**
+ * @see JSType - [(Array(string)|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var types:Array;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var short_name:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderGeometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderGeometry.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderGeometry.as
new file mode 100644
index 0000000..6ba4aff
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderGeometry.as
@@ -0,0 +1,40 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class GeocoderGeometry {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function GeocoderGeometry() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var bounds:google.maps.LatLngBounds;
+
+ /**
+ * @see JSType - [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var viewport:google.maps.LatLngBounds;
+
+ /**
+ * @see JSType - [(google.maps.GeocoderLocationType|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var location_type:google.maps.GeocoderLocationType;
+
+ /**
+ * @see JSType - [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var location:google.maps.LatLng;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderLocationType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderLocationType.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderLocationType.as
new file mode 100644
index 0000000..f1b6379
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderLocationType.as
@@ -0,0 +1,38 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class GeocoderLocationType {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ROOFTOP:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const RANGE_INTERPOLATED:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const APPROXIMATE:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const GEOMETRIC_CENTER:String = '2';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderResult.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderResult.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderResult.as
new file mode 100644
index 0000000..773e3f5
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderResult.as
@@ -0,0 +1,40 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class GeocoderResult {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function GeocoderResult() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(Array((google.maps.GeocoderAddressComponent|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var address_components:Array;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var formatted_address:String;
+
+ /**
+ * @see JSType - [(Array(string>|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var types:Array;
+
+ /**
+ * @see JSType - [(google.maps.GeocoderGeometry|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var geometry:google.maps.GeocoderGeometry;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderStatus.as
new file mode 100644
index 0000000..07b0817
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GeocoderStatus.as
@@ -0,0 +1,59 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class GeocoderStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OVER_QUERY_LIMIT:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const REQUEST_DENIED:String = '5';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ZERO_RESULTS:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ERROR:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '6';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GroundOverlay.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GroundOverlay.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GroundOverlay.as
new file mode 100644
index 0000000..e82daa6
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/GroundOverlay.as
@@ -0,0 +1,57 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class GroundOverlay extends google.maps.MVCObject {
+
+ /**
+ * @param url [string]
+ * @param bounds [(google.maps.LatLngBounds|null)]
+ * @param opt_opts [(Object<?,string>|google.maps.GroundOverlayOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function GroundOverlay(url:String, bounds:google.maps.LatLngBounds, opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getUrl():String { return null; }
+
+ /**
+ * @param opacity [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOpacity(opacity:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getOpacity():Number { return 0; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ImageMapType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ImageMapType.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ImageMapType.as
new file mode 100644
index 0000000..afd2704
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ImageMapType.as
@@ -0,0 +1,30 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class ImageMapType extends google.maps.MVCObject {
+
+ /**
+ * @param opts [(Object<?,string>|google.maps.ImageMapTypeOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function ImageMapType(opts:Object) {
+ super();
+ }
+
+ /**
+ * @param opacity [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOpacity(opacity:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getOpacity():Number { return 0; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/InfoWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/InfoWindow.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/InfoWindow.as
new file mode 100644
index 0000000..99df034
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/InfoWindow.as
@@ -0,0 +1,77 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class InfoWindow extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.InfoWindowOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function InfoWindow(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @param zIndex [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setZIndex(zIndex:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param opt_map [(google.maps.Map|google.maps.StreetViewPanorama|null|undefined)]
+ * @param opt_anchor [(google.maps.MVCObject|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function open(opt_map:Object = null, opt_anchor:google.maps.MVCObject = null):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Node|null|string)}
+ */
+ public function getContent():Object { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.InfoWindowOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getZIndex():Number { return 0; }
+
+ /**
+ * @param position [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPosition(position:google.maps.LatLng):Object /* undefined */ { return null; }
+
+ /**
+ * @param content [(Node|null|string)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setContent(content:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getPosition():google.maps.LatLng { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function close():Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlAuthor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlAuthor.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlAuthor.as
new file mode 100644
index 0000000..57472e4
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlAuthor.as
@@ -0,0 +1,34 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class KmlAuthor {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function KmlAuthor() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var email:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var name:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var uri:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlFeatureData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlFeatureData.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlFeatureData.as
new file mode 100644
index 0000000..4730d83
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlFeatureData.as
@@ -0,0 +1,52 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class KmlFeatureData {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function KmlFeatureData() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var id:String;
+
+ /**
+ * @see JSType - [(google.maps.KmlAuthor|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var author:google.maps.KmlAuthor;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var description:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var name:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var infoWindowHtml:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var snippet:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayer.as
new file mode 100644
index 0000000..75b4595
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayer.as
@@ -0,0 +1,61 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class KmlLayer extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.KmlLayerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function KmlLayer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.KmlLayerStatus|null)}
+ */
+ public function getStatus():google.maps.KmlLayerStatus { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getUrl():String { return null; }
+
+ /**
+ * @param url [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setUrl(url:String):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getDefaultViewport():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.KmlLayerMetadata|null)}
+ */
+ public function getMetadata():google.maps.KmlLayerMetadata { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerMetadata.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerMetadata.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerMetadata.as
new file mode 100644
index 0000000..c224108
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerMetadata.as
@@ -0,0 +1,40 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class KmlLayerMetadata {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function KmlLayerMetadata() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.KmlAuthor|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var author:google.maps.KmlAuthor;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var description:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var name:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var snippet:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerStatus.as
new file mode 100644
index 0000000..e21bcb9
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlLayerStatus.as
@@ -0,0 +1,73 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class KmlLayerStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '7';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LIMITS_EXCEEDED:String = '6';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '5';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DOCUMENT_NOT_FOUND:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_DOCUMENT:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const FETCH_ERROR:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DOCUMENT_TOO_LARGE:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TIMED_OUT:String = '8';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlMouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlMouseEvent.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlMouseEvent.as
new file mode 100644
index 0000000..2fe0883
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/KmlMouseEvent.as
@@ -0,0 +1,34 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class KmlMouseEvent {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function KmlMouseEvent() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.KmlFeatureData|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var featureData:google.maps.KmlFeatureData;
+
+ /**
+ * @see JSType - [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var latLng:google.maps.LatLng;
+
+ /**
+ * @see JSType - [(google.maps.Size|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var pixelOffset:google.maps.Size;
+
+}
+}
[15/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Flat
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
deleted file mode 100644
index f7357b9..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/DropDownListView.as
+++ /dev/null
@@ -1,309 +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.flat.beads
-{
- import flash.display.DisplayObject;
- import flash.display.DisplayObjectContainer;
- import flash.display.Graphics;
- import flash.display.Shape;
- import flash.display.SimpleButton;
- import flash.display.Sprite;
- import flash.text.TextFieldType;
-
- import org.apache.flex.core.BeadViewBase;
- import org.apache.flex.core.CSSShape;
- import org.apache.flex.core.CSSSprite;
- import org.apache.flex.core.CSSTextField;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.ILayoutChild;
- import org.apache.flex.core.IPopUpHost;
- import org.apache.flex.core.ISelectionModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.html.beads.IDropDownListView;
- import org.apache.flex.utils.CSSUtils;
-
- /**
- * The DropDownListView class is the default view for
- * the org.apache.flex.flat.DropDownList class.
- * It displays a simple text label with what appears to be a
- * down arrow button on the right, but really, the entire
- * view is the button that will display or dismiss the dropdown.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DropDownListView extends BeadViewBase implements IDropDownListView, IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropDownListView()
- {
- upSprite = new CSSSprite();
- upSprite.className = 'dropdown-toggle-open-btn';
- downSprite = new CSSSprite();
- downSprite.className = 'dropdown-toggle-open-btn';
- overSprite = new CSSSprite();
- overSprite.className = 'dropdown-toggle-open-btn';
- overSprite.state = 'hover';
- upTextField = new CSSTextField();
- downTextField = new CSSTextField();
- overTextField = new CSSTextField();
- upSprite.addChild(upTextField);
- overSprite.addChild(overTextField);
- downSprite.addChild(downTextField);
- upTextField.selectable = false;
- upTextField.parentDrawsBackground = true;
- upTextField.parentHandlesPadding = true;
- upTextField.type = TextFieldType.DYNAMIC;
- downTextField.selectable = false;
- downTextField.parentDrawsBackground = true;
- downTextField.parentHandlesPadding = true;
- downTextField.type = TextFieldType.DYNAMIC;
- overTextField.selectable = false;
- overTextField.parentDrawsBackground = true;
- overTextField.parentHandlesPadding = true;
- overTextField.type = TextFieldType.DYNAMIC;
- // auto-size collapses if no text
- //upTextField.autoSize = "left";
- //downTextField.autoSize = "left";
- //overTextField.autoSize = "left";
-
- upArrows = new CSSShape();
- upArrows.className = 'dropdown-caret';
- overArrows = new CSSShape();
- overArrows.className = 'dropdown-caret';
- downArrows = new CSSShape();
- downArrows.className = 'dropdown-caret';
- upSprite.addChild(upArrows);
- overSprite.addChild(overArrows);
- downSprite.addChild(downArrows);
-
- }
-
-
- private var selectionModel:ISelectionModel;
-
- private var shape:Shape;
-
- /**
- * @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;;
- selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
- selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
- selectionModel.addEventListener("dataProviderChanged", selectionChangeHandler);
- shape = new Shape();
- shape.graphics.beginFill(0xCCCCCC);
- shape.graphics.drawRect(0, 0, 10, 10);
- shape.graphics.endFill();
- SimpleButton(value).upState = upSprite;
- SimpleButton(value).downState = downSprite;
- SimpleButton(value).overState = overSprite;
- SimpleButton(value).hitTestState = shape;
- if (selectionModel.selectedIndex !== -1)
- selectionChangeHandler(null);
- else
- text = "^W_";
- upTextField.height = upTextField.textHeight + 4;
- downTextField.height = downTextField.textHeight + 4;
- overTextField.height = overTextField.textHeight + 4;
- if (selectionModel.selectedIndex == -1)
- text = "";
-
- IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
- IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
- changeHandler(null);
- }
-
- private function selectionChangeHandler(event:Event):void
- {
- if (selectionModel.selectedItem == null)
- text = "";
- else if (selectionModel.labelField != null)
- text = selectionModel.selectedItem[selectionModel.labelField].toString();
- else
- text = selectionModel.selectedItem.toString();
- }
-
- private function changeHandler(event:Event):void
- {
- var ww:Number = DisplayObject(_strand).width;
- var hh:Number = DisplayObject(_strand).height;
- var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
- var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-left");
- var paddingRight:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-right");
- var paddingTop:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-top");
- var paddingBottom:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-bottom");
- var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, ww);
- var pr:Number = CSSUtils.getRightValue(paddingRight, padding, ww);
- var pt:Number = CSSUtils.getLeftValue(paddingTop, padding, hh);
- var pb:Number = CSSUtils.getRightValue(paddingBottom, padding, hh);
-
- upArrows.draw(0, 0);
- overArrows.draw(0, 0);
- downArrows.draw(0, 0);
- if (ILayoutChild(_strand).isHeightSizedToContent() && text != "")
- {
- hh = upTextField.textHeight + pt + pb;
- ILayoutChild(_strand).setHeight(hh, true);
- }
- upSprite.draw(ww, hh);
- overSprite.draw(ww, hh);
- downSprite.draw(ww, hh);
-
- upArrows.x = ww - upArrows.width - pr;
- overArrows.x = ww - overArrows.width - pr;
- downArrows.x = ww - downArrows.width - pr;
- upArrows.y = (hh - upArrows.height) / 2;
- overArrows.y = (hh - overArrows.height) / 2;
- downArrows.y = (hh - downArrows.height) / 2;
-
- upTextField.width = upTextField.textWidth + 4;
- downTextField.width = downTextField.textWidth + 4;
- overTextField.width = overTextField.textWidth + 4;
- upTextField.height = upTextField.textHeight + 5;
- downTextField.height = downTextField.textHeight + 5;
- overTextField.height = overTextField.textHeight + 5;
- upTextField.y = (hh - upTextField.height) / 2;
- downTextField.y = (hh - downTextField.height) / 2;
- overTextField.y = (hh - overTextField.height) / 2;
- upTextField.x = pl;
- downTextField.x = pl;
- overTextField.x = pl;
- shape.graphics.clear();
- shape.graphics.beginFill(0xCCCCCC);
- shape.graphics.drawRect(0, 0, ww, hh);
- shape.graphics.endFill();
- }
-
- private var upTextField:CSSTextField;
- private var downTextField:CSSTextField;
- private var overTextField:CSSTextField;
- private var upSprite:CSSSprite;
- private var downSprite:CSSSprite;
- private var overSprite:CSSSprite;
- private var upArrows:CSSShape;
- private var downArrows:CSSShape;
- private var overArrows:CSSShape;
-
- /**
- * The text that is displayed in the view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get text():String
- {
- return upTextField.text;
- }
-
- /**
- * @private
- */
- public function set text(value:String):void
- {
- upTextField.text = value;
- downTextField.text = value;
- overTextField.text = value;
- changeHandler(null);
- }
-
- private var _popUp:IStrand;
-
- /**
- * The dropdown/popup that displays the set of choices.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get popUp():IStrand
- {
- if (!_popUp)
- {
- var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
- _popUp = new popUpClass() as IStrand;
- }
- return _popUp;
- }
-
- private var _popUpVisible:Boolean;
-
- /**
- * A flag that indicates whether the dropdown/popup is
- * visible.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get popUpVisible():Boolean
- {
- return _popUpVisible;
- }
-
- /**
- * @private
- */
- public function set popUpVisible(value:Boolean):void
- {
- if (value != _popUpVisible)
- {
- _popUpVisible = value;
- if (value)
- {
- var root:Object = DisplayObject(_strand).root;
- var host:DisplayObjectContainer = DisplayObject(_strand).parent;
- while (host && !(host is IPopUpHost))
- host = host.parent;
- if (host)
- IPopUpHost(host).addElement(popUp);
- }
- else
- {
- DisplayObject(_popUp).parent.removeChild(_popUp as DisplayObject);
- }
- }
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
deleted file mode 100644
index e6e3ba5..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
+++ /dev/null
@@ -1,47 +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.flat.beads
-{
- /**
- * The RadioCSSContentAndTextToggleButtonView class is the default view for
- * the org.apache.flex.flat.RadioButton class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class RadioCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function RadioCSSContentAndTextToggleButtonView()
- {
- super();
-
- className = "radio-icon";
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListList.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListList.as
deleted file mode 100644
index f423d24..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListList.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.flat.supportClasses
-{
- import org.apache.flex.core.IPopUp;
- import org.apache.flex.html.SimpleList;
- import org.apache.flex.html.beads.SolidBackgroundBead;
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * @copy org.apache.flex.core.ISelectionModel#change
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="change", type="org.apache.flex.events.Event")]
-
- /**
- * The DropDownListList class is the List class used internally
- * by DropDownList as the dropdown/popup.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DropDownListList extends SimpleList implements IPopUp
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropDownListList()
- {
- super();
- className = "dropdown-menu";
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as
deleted file mode 100644
index 3ab6a79..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as
+++ /dev/null
@@ -1,70 +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.flat.supportClasses
-{
- import flash.text.TextFieldAutoSize;
- import flash.text.TextFieldType;
-
- import org.apache.flex.core.CSSTextField;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.ITextItemRenderer;
- import org.apache.flex.html.supportClasses.StringItemRenderer;
-
- /**
- * The DropDownListStringItemRenderer is a StringItemRenderer with a particular
- * className for use in DropDownList.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DropDownListStringItemRenderer extends StringItemRenderer
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropDownListStringItemRenderer()
- {
- super();
-
- className = 'dropdown-menu-item-renderer';
- }
-
- /**
- * @private
- */
- override public function updateRenderer():void
- {
- className = selected ? 'dropdown-menu-item-renderer-selected' : 'dropdown-menu-item-renderer';
- if (selected)
- selectedColor = ValuesManager.valuesImpl.getValue(this, 'background-color');
- if (hovered)
- highlightColor = ValuesManager.valuesImpl.getValue(this, 'background-color', "hover");
- downColor = selectedColor;
- super.updateRenderer();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/compile-asjs-config.xml b/frameworks/projects/Flat/compile-asjs-config.xml
deleted file mode 100644
index a755d5c..0000000
--- a/frameworks/projects/Flat/compile-asjs-config.xml
+++ /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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>flat-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-classes>
- <class>FlatClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/flat</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/compile-config.xml b/frameworks/projects/Flat/compile-config.xml
deleted file mode 100644
index 44c7c9f..0000000
--- a/frameworks/projects/Flat/compile-config.xml
+++ /dev/null
@@ -1,91 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Binding.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/Graphics.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>flat-manifest.xml</manifest>
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>flat-as-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- <!--<path-element>asjs/src</path-element>-->
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>FlatClasses</class>
- <!--<class>FlatASJSClasses</class>-->
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/flat</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/flat-as-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/flat-as-manifest.xml b/frameworks/projects/Flat/flat-as-manifest.xml
deleted file mode 100644
index 6f12083..0000000
--- a/frameworks/projects/Flat/flat-as-manifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="DropDownListList" class="org.apache.flex.flat.supportClasses.DropDownListList" />
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/flat-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/flat-manifest.xml b/frameworks/projects/Flat/flat-manifest.xml
deleted file mode 100644
index 77f5ffc..0000000
--- a/frameworks/projects/Flat/flat-manifest.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Button" class="org.apache.flex.html.Button" lookupOnly="true" />
- <component id="ButtonBar" class="org.apache.flex.html.ButtonBar" lookupOnly="true" />
- <component id="CloseButton" class="org.apache.flex.html.CloseButton" lookupOnly="true" />
- <component id="DropDownList" class="org.apache.flex.flat.DropDownList" />
- <component id="Image" class="org.apache.flex.html.Image" lookupOnly="true" />
- <component id="Label" class="org.apache.flex.html.Label" lookupOnly="true" />
- <component id="MultilineLabel" class="org.apache.flex.html.MultilineLabel" lookupOnly="true" />
- <component id="ImageAndTextButton" class="org.apache.flex.html.ImageAndTextButton" lookupOnly="true" />
- <component id="TextButton" class="org.apache.flex.html.TextButton" lookupOnly="true" />
- <component id="ToggleTextButton" class="org.apache.flex.html.ToggleTextButton" lookupOnly="true" />
- <component id="TextInput" class="org.apache.flex.html.TextInput" lookupOnly="true" />
- <component id="TextArea" class="org.apache.flex.html.TextArea" lookupOnly="true" />
- <component id="List" class="org.apache.flex.html.List" lookupOnly="true" />
- <component id="SimpleList" class="org.apache.flex.html.SimpleList" lookupOnly="true" />
- <component id="CheckBox" class="org.apache.flex.flat.CheckBox" />
- <component id="RadioButton" class="org.apache.flex.flat.RadioButton" />
- <component id="ComboBox" class="org.apache.flex.html.ComboBox" lookupOnly="true" />
- <component id="Container" class="org.apache.flex.html.Container" lookupOnly="true" />
- <component id="HContainer" class="org.apache.flex.html.HContainer" lookupOnly="true" />
- <component id="VContainer" class="org.apache.flex.html.VContainer" lookupOnly="true" />
- <component id="Panel" class="org.apache.flex.html.Panel" lookupOnly="true" />
- <component id="PanelView" class="org.apache.flex.html.beads.PanelView" lookupOnly="true" />
- <component id="PanelWithControlBar" class="org.apache.flex.html.PanelWithControlBar" lookupOnly="true" />
- <component id="ControlBar" class="org.apache.flex.html.ControlBar" lookupOnly="true" />
- <component id="TitleBar" class="org.apache.flex.html.TitleBar" lookupOnly="true" />
- <component id="TitleBarModel" class="org.apache.flex.html.beads.models.TitleBarModel" lookupOnly="true" />
- <component id="ToolTip" class="org.apache.flex.html.ToolTip" lookupOnly="true" />
- <component id="BasicLayout" class="org.apache.flex.html.beads.layouts.BasicLayout" lookupOnly="true" />
- <component id="VerticalLayout" class="org.apache.flex.html.beads.layouts.VerticalLayout" lookupOnly="true" />
- <component id="HorizontalLayout" class="org.apache.flex.html.beads.layouts.HorizontalLayout" lookupOnly="true" />
- <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout" lookupOnly="true" />
- <component id="ListView" class="org.apache.flex.html.beads.ListView" lookupOnly="true" />
- <component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView" lookupOnly="true" />
-
- <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert" lookupOnly="true" />
- <component id="Alert" class="org.apache.flex.html.Alert" lookupOnly="true" />
- <component id="Spinner" class="org.apache.flex.html.Spinner" lookupOnly="true" />
- <component id="Slider" class="org.apache.flex.html.Slider" lookupOnly="true" />
- <component id="SolidBackgroundBead" class="org.apache.flex.html.beads.SolidBackgroundBead" lookupOnly="true" />
- <component id="NumericStepper" class="org.apache.flex.html.NumericStepper" lookupOnly="true" />
- <component id="TextFieldItemRenderer" class="org.apache.flex.html.supportClasses.TextFieldItemRenderer" lookupOnly="true" />
- <component id="StringItemRenderer" class="org.apache.flex.html.supportClasses.StringItemRenderer" lookupOnly="true" />
- <component id="DataItemRenderer" class="org.apache.flex.html.supportClasses.DataItemRenderer" lookupOnly="true" />
- <component id="ButtonBarButtonItemRenderer" class="org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer" lookupOnly="true" />
- <component id="VScrollBar" class="org.apache.flex.html.supportClasses.VScrollBar" lookupOnly="true" />
- <component id="NumericOnlyTextInputBead" class="org.apache.flex.html.accessories.NumericOnlyTextInputBead" lookupOnly="true" />
- <component id="PasswordInputBead" class="org.apache.flex.html.accessories.PasswordInputBead" lookupOnly="true" />
- <component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead" lookupOnly="true" />
- <component id="HRule" class="org.apache.flex.html.HRule" lookupOnly="true" />
- <component id="Spacer" class="org.apache.flex.html.Spacer" lookupOnly="true" />
- <component id="ImageAndTextButtonView" class="org.apache.flex.html.beads.ImageAndTextButtonView" lookupOnly="true" />
- <component id="ScrollingViewport" class="org.apache.flex.html.supportClasses.ScrollingViewport" lookupOnly="true" />
-
- <component id="DataGrid" class="org.apache.flex.html.DataGrid" lookupOnly="true" />
- <component id="DataGridColumn" class="org.apache.flex.html.supportClasses.DataGridColumn" lookupOnly="true" />
-
- <component id="DateChooser" class="org.apache.flex.html.DateChooser" lookupOnly="true" />
- <component id="DateField" class="org.apache.flex.html.DateField" lookupOnly="true" />
- <component id="VerticalColumnLayout" class="org.apache.flex.html.beads.layouts.VerticalColumnLayout" lookupOnly="true" />
-
- <component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" lookupOnly="true" />
-
- <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier" lookupOnly="true" />
- <component id="ImageButton" class="org.apache.flex.html.ImageButton" lookupOnly="true" />
- <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout" lookupOnly="true" />
- <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout" lookupOnly="true" />
- <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout" lookupOnly="true" />
- <component id="MXMLBeadViewBase" class="org.apache.flex.html.MXMLBeadViewBase" lookupOnly="true" />
-
- <component id="Border" class="org.apache.flex.html.supportClasses.Border" lookupOnly="true" />
-
- <component id="ViewBase" class="org.apache.flex.core.ViewBase" lookupOnly="true" />
- <component id="ViewBaseDataBinding" class="org.apache.flex.binding.ViewBaseDataBinding" lookupOnly="true" />
- <component id="State" class="org.apache.flex.states.State" lookupOnly="true" />
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/FlatClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/FlatClasses.as b/frameworks/projects/Flat/src/main/flex/FlatClasses.as
new file mode 100644
index 0000000..29173ef
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/FlatClasses.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class FlatClasses
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.flat.beads.CSSScrollBarView; CSSScrollBarView;
+ import org.apache.flex.flat.beads.CSSScrollBarButtonView; CSSScrollBarButtonView;
+ import org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer; DropDownListStringItemRenderer;
+ import org.apache.flex.flat.supportClasses.DropDownListList; DropDownListList;
+ import org.apache.flex.flat.beads.DropDownListView; DropDownListView;
+ import org.apache.flex.flat.beads.CheckboxCSSContentAndTextToggleButtonView; CheckboxCSSContentAndTextToggleButtonView;
+ import org.apache.flex.flat.beads.RadioCSSContentAndTextToggleButtonView; RadioCSSContentAndTextToggleButtonView;
+
+ }
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
new file mode 100644
index 0000000..466e9b2
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/CheckBox.as
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.flat
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.CheckBox;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ import org.apache.flex.events.Event;
+ }
+
+ /**
+ * The CheckBox class provides a FlatUI-like appearance for
+ * a CheckBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class CheckBox extends org.apache.flex.html.CheckBox
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CheckBox()
+ {
+ super();
+ }
+ }
+
+ COMPILE::JS
+ public class CheckBox extends UIBase
+ {
+
+ private var input:HTMLInputElement;
+ private var checkbox:HTMLSpanElement;
+ private var label:HTMLLabelElement;
+ private var textNode:Text;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion HTMLLabelElement
+ * @flexjsignorecoercion HTMLInputElement
+ * @flexjsignorecoercion HTMLSpanElement
+ * @flexjsignorecoercion Text
+ */
+ override protected function createElement():WrappedHTMLElement
+ {
+ label = document.createElement('label') as HTMLLabelElement;
+ element = label as WrappedHTMLElement;
+
+ input = document.createElement('input') as HTMLInputElement;
+ input.type = 'checkbox';
+ input.className = 'checkbox-input';
+ input.addEventListener('change', selectionChangeHandler, false);
+ label.appendChild(input);
+
+ checkbox = document.createElement('span') as HTMLSpanElement;
+ checkbox.className = 'checkbox-icon';
+ checkbox.addEventListener('mouseover', mouseOverHandler, false);
+ checkbox.addEventListener('mouseout', mouseOutHandler, false);
+ label.appendChild(checkbox);
+
+ textNode = document.createTextNode('') as Text;
+ label.appendChild(textNode);
+ label.className = 'CheckBox';
+ typeNames = 'CheckBox';
+
+ positioner = element;
+ positioner.style.position = 'relative';
+ (input as WrappedHTMLElement).flexjs_wrapper = this;
+ (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
+ element.flexjs_wrapper = this;
+
+ return element;
+ };
+
+
+ /**
+ */
+ private function mouseOverHandler(event:Event):void
+ {
+ checkbox.className = 'checkbox-icon-hover';
+ }
+
+ /**
+ */
+ private function mouseOutHandler(event:Event):void
+ {
+ if (input.checked)
+ checkbox.className = 'checkbox-icon-checked';
+ else
+ checkbox.className = 'checkbox-icon';
+ }
+
+
+ /**
+ */
+ private function selectionChangeHandler(event:Event):void
+ {
+ if (input.checked)
+ checkbox.className = 'checkbox-icon-checked';
+ else
+ checkbox.className = 'checkbox-icon';
+ }
+
+
+ public function get text():String
+ {
+ return textNode.nodeValue;
+ }
+
+ public function set text(value:String):void
+ {
+ textNode.nodeValue = value;
+ }
+
+ public function get selected():Boolean
+ {
+ return input.checked;
+ }
+
+ public function set selected(value:Boolean):void
+ {
+ input.checked = value;
+ if (value)
+ checkbox.className = 'checkbox-icon-checked';
+ else
+ checkbox.className = 'checkbox-icon';
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
new file mode 100644
index 0000000..265f2c7
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/DropDownList.as
@@ -0,0 +1,368 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat
+{
+ import org.apache.flex.core.UIBase;
+
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.DropDownList;
+ }
+ COMPILE::JS
+ {
+ import goog.events;
+ import org.apache.flex.core.ListBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.beads.models.ArraySelectionModel;
+ import org.apache.flex.utils.CSSUtils;
+ }
+
+ /**
+ * The DropDownList class provides a FlatUI-like appearance for
+ * a DropDownList.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class DropDownList extends org.apache.flex.html.DropDownList
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropDownList()
+ {
+ super();
+ }
+ }
+
+ COMPILE::JS
+ public class DropDownList extends ListBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropDownList()
+ {
+ super();
+ model = new ArraySelectionModel();
+ }
+
+ private var label:HTMLSpanElement;
+ private var button:HTMLButtonElement;
+ private var caret:HTMLSpanElement;
+ private var menu:HTMLUListElement;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion HTMLButtonElement
+ * @flexjsignorecoercion HTMLDivElement
+ * @flexjsignorecoercion HTMLSpanElement
+ */
+ override protected function createElement():WrappedHTMLElement
+ {
+ var button:HTMLButtonElement;
+ var outer:HTMLDivElement;
+ var caret:HTMLSpanElement;
+
+ this.element = document.createElement('div') as WrappedHTMLElement;
+ outer = this.element as HTMLDivElement;
+
+ this.button = button = document.createElement('button') as HTMLButtonElement;
+ button.className = 'dropdown-toggle-open-btn';
+ if (this.className)
+ button.className += ' ' + this.className;
+ goog.events.listen(button, 'click', buttonClicked);
+ outer.appendChild(button);
+
+ this.label = document.createElement('span') as HTMLSpanElement;
+ this.label.className = 'dropdown-label';
+ button.appendChild(this.label);
+ this.caret = caret = document.createElement('span') as HTMLSpanElement;
+ button.appendChild(caret);
+ caret.className = 'dropdown-caret';
+
+ this.positioner = this.element;
+ this.positioner.style.position = 'relative';
+
+ // add a click handler so that a click outside of the combo box can
+ // dismiss the pop-up should it be visible.
+ goog.events.listen(document, 'click', dismissPopup);
+
+ (button as WrappedHTMLElement).flexjs_wrapper = this;
+ this.element.flexjs_wrapper = this;
+ (this.label as WrappedHTMLElement).flexjs_wrapper = this;
+ (caret as WrappedHTMLElement).flexjs_wrapper = this;
+
+ return this.element;
+ }
+
+
+ /**
+ * @param event The event.
+ * @flexjsignorecoercion org.apache.flex.core.UIBase
+ */
+ private function selectChanged(event:Event):void
+ {
+ var select:UIBase;
+
+ select = event.target as UIBase;
+
+ this.selectedIndex = parseInt(select.id, 10);
+
+ this.menu.parentNode.removeChild(this.menu);
+ this.menu = null;
+
+ this.dispatchEvent('change');
+ }
+
+
+ /**
+ * @param event The event.
+ */
+ private function dismissPopup(event:Event = null):void
+ {
+ // remove the popup if it already exists
+ if (this.menu)
+ {
+ this.menu.parentNode.removeChild(this.menu);
+ this.menu = null;
+ }
+ }
+
+
+ /**
+ * @param event The event.
+ * @flexjsignorecoercion Array
+ * @flexjsignorecoercion HTMLButtonElement
+ * @flexjsignorecoercion HTMLUListElement
+ * @flexjsignorecoercion HTMLLIElement
+ * @flexjsignorecoercion HTMLAnchorElement
+ */
+ private function buttonClicked(event:Event):void
+ {
+ var dp:Array;
+ var i:int;
+ var button:HTMLButtonElement;
+ var left:Number;
+ var n:int;
+ var opt:HTMLLIElement;
+ var opts:Array;
+ var pn:HTMLDivElement;
+ var select:HTMLUListElement;
+ var top:Number;
+ var width:Number;
+
+ event.stopPropagation();
+
+ if (this.menu)
+ {
+ this.dismissPopup();
+ return;
+ }
+
+ button = this.element.childNodes.item(0) as HTMLButtonElement;
+
+ pn = this.element as HTMLDivElement;
+ top = pn.offsetTop + button.offsetHeight;
+ left = pn.offsetLeft;
+ width = pn.offsetWidth;
+
+ this.menu = select = document.createElement('ul') as HTMLUListElement;
+ var el:Element = element as Element;
+ var cv:Object = getComputedStyle(el);
+ select.style.width = cv.width;
+ goog.events.listen(select, 'click', selectChanged);
+ select.className = 'dropdown-menu';
+
+ var lf:String = this.labelField;
+ dp = dataProvider as Array;
+ n = dp.length;
+ for (i = 0; i < n; i++) {
+ opt = document.createElement('li') as HTMLLIElement;
+ opt.style.backgroundColor = 'transparent';
+ var ir:HTMLAnchorElement = document.createElement('a') as HTMLAnchorElement;
+ if (lf)
+ ir.innerHTML = dp[i][lf];
+ else
+ ir.innerHTML = dp[i];
+ ir.id = i.toString();
+ if (i == this.selectedIndex)
+ ir.className = 'dropdown-menu-item-renderer-selected';
+ else
+ ir.className = 'dropdown-menu-item-renderer';
+ opt.appendChild(ir);
+ select.appendChild(opt);
+ }
+
+ this.element.appendChild(select);
+ };
+
+
+ /**
+ */
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+ var el:Element = button as Element;
+ var cv:Object = getComputedStyle(el);
+ var s:String = cv.paddingLeft;
+ var pl:Number = CSSUtils.toNumber(s);
+ s = cv.paddingRight;
+ var pr:Number = CSSUtils.toNumber(s);
+ s = cv.borderLeftWidth;
+ var bl:Number = CSSUtils.toNumber(s);
+ s = cv.borderRightWidth;
+ var br:Number = CSSUtils.toNumber(s);
+ var caretWidth:Number = this.caret.offsetWidth;
+ // 10 seems to factor spacing between span and extra FF padding?
+ var fluff:Number = pl + pr + bl + br + caretWidth + 1 + 10;
+ var labelWidth:Number = this.width - fluff;
+ var strWidth:String = labelWidth.toString();
+ strWidth += 'px';
+ this.label.style.width = strWidth;
+ }
+
+ override public function set className(value:String):void
+ {
+ super.className = value;
+ if (this.button) {
+ this.button.className = this.typeNames ?
+ value + ' ' + 'dropdown-toggle-open-btn' + ' ' + this.typeNames :
+ value + ' ' + 'dropdown-toggle-open-btn';
+ }
+ }
+
+ /**
+ * The data set to be displayed. Usually a simple
+ * array of strings. A more complex component
+ * would allow more complex data and data sets.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get dataProvider():Object
+ {
+ return ISelectionModel(model).dataProvider;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion HTMLOptionElement
+ * @flexjsignorecoercion HTMLSelectElement
+ */
+ public function set dataProvider(value:Object):void
+ {
+ ISelectionModel(model).dataProvider = value;
+ }
+
+ /**
+ * The name of field within the data used for display. Each item of the
+ * data should have a property with this name.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get labelField():String
+ {
+ return ISelectionModel(model).labelField;
+ }
+ public function set labelField(value:String):void
+ {
+ ISelectionModel(model).labelField = value;
+ }
+
+ [Bindable("change")]
+ /**
+ * @copy org.apache.flex.core.ISelectionModel#selectedIndex
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedIndex():int
+ {
+ return ISelectionModel(model).selectedIndex;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion HTMLSelectElement
+ * @flexjsignorecoercion String
+ */
+ public function set selectedIndex(value:int):void
+ {
+ ISelectionModel(model).selectedIndex = value;
+ var lf:String = this.labelField;
+ if (lf)
+ this.label.innerHTML = this.selectedItem[lf] as String;
+ else
+ this.label.innerHTML = this.selectedItem as String;
+ }
+
+
+ [Bindable("change")]
+ /**
+ * @copy org.apache.flex.core.ISelectionModel#selectedItem
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedItem():Object
+ {
+ return ISelectionModel(model).selectedItem;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion HTMLSelectElement
+ * @flexjsignorecoercion String
+ */
+ public function set selectedItem(value:Object):void
+ {
+ ISelectionModel(model).selectedItem = value;
+ var lf:String = this.labelField;
+ if (lf)
+ this.label.innerHTML = this.selectedItem[lf] as String;
+ else
+ this.label.innerHTML = this.selectedItem as String;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
new file mode 100644
index 0000000..1294a25
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/RadioButton.as
@@ -0,0 +1,245 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.RadioButton;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ /**
+ * The RadioButton class provides a FlatUI-like appearance for
+ * a RadioButton.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class RadioButton extends org.apache.flex.html.RadioButton
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function RadioButton()
+ {
+ super();
+ }
+ }
+
+ COMPILE::JS
+ public class RadioButton extends UIBase
+ {
+ /**
+ * Provides unique name
+ */
+ public static var radioCounter:int = 0;
+
+ private var input:HTMLInputElement;
+ private var radio:HTMLSpanElement;
+ private var textNode:Text;
+ private var labelFor:HTMLLabelElement;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion HTMLInputElement
+ * @flexjsignorecoercion HTMLSpanElement
+ * @flexjsignorecoercion HTMLLabelElement
+ */
+ override protected function createElement():WrappedHTMLElement
+ {
+ // hide this eleement
+ input = document.createElement('input') as HTMLInputElement;
+ input.type = 'radio';
+ input.className = 'radio-input';
+ input.id = '_radio_' + radioCounter++;
+ input.addEventListener('change', selectionChangeHandler, false);
+
+ radio = document.createElement('span') as HTMLSpanElement;
+ radio.className = 'radio-icon';
+ radio.addEventListener('mouseover', mouseOverHandler, false);
+ radio.addEventListener('mouseout', mouseOutHandler, false);
+
+ textNode = document.createTextNode('radio button') as Text;
+
+ labelFor = document.createElement('label') as HTMLLabelElement;
+ labelFor.appendChild(input);
+ labelFor.appendChild(radio);
+ labelFor.appendChild(textNode);
+ labelFor.style.position = 'relative';
+
+ element = labelFor as WrappedHTMLElement;
+ element.className = 'RadioButton';
+ typeNames = 'RadioButton';
+
+ positioner = element;
+ positioner.style.position = 'relative';
+ (input as WrappedHTMLElement).flexjs_wrapper = this;
+ (radio as WrappedHTMLElement).flexjs_wrapper = this;
+ element.flexjs_wrapper = this;
+ (textNode as WrappedHTMLElement).flexjs_wrapper = this;
+
+ return element;
+ }
+
+
+ /**
+ * @param e The event object.
+ */
+ private function mouseOverHandler(e:Event):void
+ {
+ radio.className = 'radio-icon-hover';
+ }
+
+
+ /**
+ * @param e The event object.
+ */
+ private function mouseOutHandler(e:Event):void
+ {
+ if (input.checked)
+ radio.className = 'radio-icon-checked';
+ else
+ radio.className = 'radio-icon';
+ }
+
+
+ /**
+ * @param e The event object.
+ */
+ private function selectionChangeHandler(e:Event):void
+ {
+ // this should reset the icons in the non-selected radio
+ selectedValue = value;
+ }
+
+
+ override public function set id(value:String):void
+ {
+ super.id = value;
+ labelFor.id = value;
+ input.id = value;
+ }
+
+ /**
+ * @flexjsignorecoercion String
+ */
+ public function get groupName():String
+ {
+ return input.name as String;
+ }
+
+ public function set groupName(value:String):void
+ {
+ input.name = value;
+ }
+
+ public function get text():String
+ {
+ return textNode.nodeValue;
+ }
+
+ public function set text(value:String):void
+ {
+ textNode.nodeValue = value;
+ }
+
+ public function get selected():Boolean
+ {
+ return input.checked;
+ }
+
+ public function set selected(value:Boolean):void
+ {
+ input.checked = value;
+ if (input.checked)
+ radio.className = 'radio-icon-checked';
+ else
+ radio.className = 'radio-icon';
+ }
+
+ public function get value():String
+ {
+ return input.value;
+ }
+
+ public function set value(value:String):void
+ {
+ input.value = value;
+ }
+
+ /**
+ * @flexjsignorecoercion Array
+ * @flexjsignorecoercion String
+ */
+ public function get selectedValue():Object
+ {
+ var buttons:Array;
+ var groupName:String;
+ var i:int;
+ var n:int;
+
+ groupName = input.name as String;
+ buttons = document.getElementsByName(groupName) as Array;
+ n = buttons.length;
+
+ for (i = 0; i < n; i++) {
+ if (buttons[i].checked) {
+ return buttons[i].value;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @flexjsignorecoercion Array
+ * @flexjsignorecoercion String
+ */
+ public function set selectedValue(value:Object):void
+ {
+ var buttons:Array;
+ var groupName:String;
+ var i:int;
+ var n:int;
+
+ groupName = input.name as String;
+ buttons = document.getElementsByName(groupName) as Array;
+ n = buttons.length;
+ for (i = 0; i < n; i++) {
+ if (buttons[i].value === value) {
+ buttons[i].checked = true;
+ buttons[i].flexjs_wrapper.selected = true;
+ }
+ else
+ buttons[i].flexjs_wrapper.selected = false;
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
new file mode 100644
index 0000000..aa3e8b5
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
@@ -0,0 +1,304 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat.beads
+{
+ import flash.display.Shape;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.text.TextFieldAutoSize;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.CSSTextField;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IToggleButtonModel;
+ import org.apache.flex.core.StyleableCSSTextField;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.CSSUtils;
+
+ /**
+ * The CSSContentAndTextToggleButtonView class is the default view for
+ * the org.apache.flex.flat.CheckBox and RadioButton classes.
+ * It supports CSS content property for the
+ * icon.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSContentAndTextToggleButtonView extends BeadViewBase implements IBeadView
+ {
+ /**
+ * map of classname suffixes.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ private static var suffixMap:Object = {
+ "upSprite": "",
+ "downSprite": "-checked",
+ "overSprite": "-hover",
+ "upAndSelectedSprite": "-checked",
+ "downAndSelectedSprite": "-checked",
+ "overAndSelectedSprite": "-checked"
+ }
+
+ /**
+ * className to use for styling.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ protected var className:String;
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSContentAndTextToggleButtonView()
+ {
+ }
+
+ private var upSprite:Sprite;
+ private var downSprite:Sprite;
+ private var overSprite:Sprite;
+ private var upAndSelectedSprite:Sprite;
+ private var downAndSelectedSprite:Sprite;
+ private var overAndSelectedSprite:Sprite;
+
+ private var sprites:Array = [];
+
+ private var _toggleButtonModel:IToggleButtonModel;
+
+ // TODO: Can we remove this?
+ private function get toggleButtonModel() : IToggleButtonModel
+ {
+ return _toggleButtonModel;
+ }
+
+ /**
+ * @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;
+
+ for (var p:String in suffixMap)
+ {
+ var s:Sprite = new Sprite();
+ sprites.push(s);
+ this[p] = s;
+
+ var tf:CSSTextField = new CSSTextField();
+ tf.type = TextFieldType.DYNAMIC;
+ tf.autoSize = TextFieldAutoSize.LEFT;
+ tf.name = "textField";
+ tf.parentHandlesPadding = true;
+ var icon:StyleableCSSTextField = new StyleableCSSTextField();
+ icon.name = "icon";
+ icon.className = className + suffixMap[p];
+ s.addChild(icon);
+ s.addChild(tf);
+ }
+
+ _toggleButtonModel = value.getBeadByType(IToggleButtonModel) as IToggleButtonModel;
+ _toggleButtonModel.addEventListener("textChange", textChangeHandler);
+ _toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
+ _toggleButtonModel.addEventListener("selectedChange", selectedChangeHandler);
+ if (_toggleButtonModel.text !== null)
+ text = _toggleButtonModel.text;
+
+ layoutControl();
+
+ var hitArea:Shape = new Shape();
+ hitArea.graphics.beginFill(0x000000);
+ hitArea.graphics.drawRect(0,0,upSprite.width, upSprite.height);
+ hitArea.graphics.endFill();
+
+ SimpleButton(value).upState = upSprite;
+ SimpleButton(value).downState = downSprite;
+ SimpleButton(value).overState = overSprite;
+ SimpleButton(value).hitTestState = hitArea;
+
+ if (toggleButtonModel.text !== null)
+ text = toggleButtonModel.text;
+ if (toggleButtonModel.html !== null)
+ html = toggleButtonModel.html;
+ }
+
+ /**
+ * @copy org.apache.flex.html.Label#text
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get text():String
+ {
+ var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+ return tf.text;
+ }
+
+ /**
+ * @private
+ */
+ public function set text(value:String):void
+ {
+ for each( var s:Sprite in sprites )
+ {
+ var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+ tf.styleParent = _strand;
+ tf.text = value;
+ }
+
+ layoutControl();
+ }
+
+ /**
+ * @copy org.apache.flex.html.Label#html
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get html():String
+ {
+ var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
+ return tf.htmlText;
+ }
+
+ /**
+ * @private
+ */
+ public function set html(value:String):void
+ {
+ for each(var s:Sprite in sprites)
+ {
+ var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
+ tf.htmlText = value;
+ }
+
+ layoutControl();
+ }
+
+ private function textChangeHandler(event:Event):void
+ {
+ text = toggleButtonModel.text;
+ }
+
+ private function htmlChangeHandler(event:Event):void
+ {
+ html = toggleButtonModel.html;
+ }
+
+ private var _selected:Boolean;
+
+ /**
+ * @copy org.apache.flex.core.IToggleButtonModel#selected
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selected():Boolean
+ {
+ return _selected;
+ }
+
+ /**
+ * @private
+ */
+ public function set selected(value:Boolean):void
+ {
+ _selected = value;
+
+ layoutControl();
+
+ if( value ) {
+ SimpleButton(_strand).upState = upAndSelectedSprite;
+ SimpleButton(_strand).downState = downAndSelectedSprite;
+ SimpleButton(_strand).overState = overAndSelectedSprite;
+
+ } else {
+ SimpleButton(_strand).upState = upSprite;
+ SimpleButton(_strand).downState = downSprite;
+ SimpleButton(_strand).overState = overSprite;
+ }
+ }
+
+ private function selectedChangeHandler(event:Event):void
+ {
+ selected = toggleButtonModel.selected;
+ }
+
+ /**
+ * Display the icon and text label
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ protected function layoutControl() : void
+ {
+ // TODO: Layout using descendant selectors (.checkbox .icons)
+ for (var p:String in suffixMap)
+ {
+ var s:Sprite = this[p];
+ var icon:StyleableCSSTextField = s.getChildByName("icon") as StyleableCSSTextField;
+ icon.autoSize = TextFieldAutoSize.LEFT;
+ var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
+
+ icon.CSSParent = _strand;
+ var content:String = ValuesManager.valuesImpl.getValue(icon, "content", "before");
+ if (content != null)
+ icon.text = content;
+ var mh:Number = Math.max(icon.height,tf.height);
+
+ var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
+ var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-left");
+ icon.x = 0;
+ icon.y = (mh - icon.height)/2;
+
+ tf.x = CSSUtils.getLeftValue(paddingLeft, padding, s.width);
+ tf.y = (mh - tf.height)/2;
+ }
+
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
new file mode 100644
index 0000000..09669c4
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
@@ -0,0 +1,178 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat.beads
+{
+ import flash.display.DisplayObject;
+ import flash.display.Loader;
+ import flash.display.Shape;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.net.URLRequest;
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.CSSShape;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.utils.CSSBorderUtils;
+ import org.apache.flex.utils.CSSUtils;
+ import org.apache.flex.utils.StringTrimmer;
+
+ /**
+ * The CSSScrollBarButtonView class is the default view for
+ * the buttons in a org.apache.flex.html.ScrollBar class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSScrollBarButtonView extends BeadViewBase implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSScrollBarButtonView()
+ {
+ upSprite = new Sprite();
+ downSprite = new Sprite();
+ overSprite = new Sprite();
+ upArrowShape = new CSSShape();
+ downArrowShape = new CSSShape();
+ overArrowShape = new CSSShape();
+ overArrowShape.state = "hover";
+ upSprite.addChild(upArrowShape);
+ downSprite.addChild(downArrowShape);
+ overSprite.addChild(overArrowShape);
+ }
+
+ private var textModel:ITextModel;
+
+ private var shape:Shape;
+
+ /**
+ * @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;
+ shape = new Shape();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, 10, 10);
+ shape.graphics.endFill();
+ SimpleButton(value).upState = upSprite;
+ SimpleButton(value).downState = downSprite;
+ SimpleButton(value).overState = overSprite;
+ SimpleButton(value).hitTestState = shape;
+
+ setupBackground(overSprite, overArrowShape, "hover");
+ setupBackground(downSprite, downArrowShape, "active");
+ setupBackground(upSprite, upArrowShape);
+
+ IEventDispatcher(_strand).addEventListener("widthChanged",sizeChangeHandler);
+ IEventDispatcher(_strand).addEventListener("heightChanged",sizeChangeHandler);
+ }
+
+ private function sizeChangeHandler(event:org.apache.flex.events.Event):void
+ {
+ setupSkins();
+ }
+
+ protected function setupSkins():void
+ {
+ setupSkin(overSprite, overArrowShape, "hover");
+ setupSkin(downSprite, downArrowShape, "active");
+ setupSkin(upSprite, upArrowShape);
+ updateHitArea();
+ }
+
+ private function setupSkin(sprite:Sprite, shape:CSSShape, state:String = null):void
+ {
+ var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding", state);
+ var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-left", state);
+ var paddingRight:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-right", state);
+ var paddingTop:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-top", state);
+ var paddingBottom:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-bottom", state);
+ var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, DisplayObject(_strand).width);
+ var pr:Number = CSSUtils.getRightValue(paddingRight, padding, DisplayObject(_strand).width);
+ var pt:Number = CSSUtils.getTopValue(paddingTop, padding, DisplayObject(_strand).height);
+ var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, DisplayObject(_strand).height);
+
+ var w:Object = ValuesManager.valuesImpl.getValue(shape, "width", state);
+ var h:Object = ValuesManager.valuesImpl.getValue(shape, "height", state);
+ shape.draw(Number(w), Number(h));
+
+ CSSBorderUtils.draw(sprite.graphics,
+ shape.width + pl + pr,
+ shape.height + pt + pb,
+ _strand as DisplayObject,
+ state, true);
+ }
+
+ private function setupBackground(sprite:Sprite, shape:CSSShape, state:String = null):void
+ {
+ var backgroundImage:Object = ValuesManager.valuesImpl.getValue(_strand, "background-image", state);
+ if (backgroundImage)
+ {
+ var loader:Loader = new Loader();
+ sprite.addChildAt(loader, 0);
+ var url:String = backgroundImage as String;
+ loader.load(new URLRequest(url));
+ loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, function (e:flash.events.Event):void {
+ setupSkin(sprite, shape, state);
+ updateHitArea();
+ });
+ }
+ else {
+ setupSkin(sprite, shape, state);
+ updateHitArea();
+ }
+ }
+
+ private var upSprite:Sprite;
+ private var downSprite:Sprite;
+ private var overSprite:Sprite;
+ public var upArrowShape:CSSShape;
+ public var downArrowShape:CSSShape;
+ public var overArrowShape:CSSShape;
+
+ private function updateHitArea():void
+ {
+ shape.graphics.clear();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, upSprite.width, upSprite.height);
+ shape.graphics.endFill();
+
+ }
+ }
+}
[38/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder change
Posted by ah...@apache.org.
fix scripts after folder change
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a914a941
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a914a941
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a914a941
Branch: refs/heads/develop
Commit: a914a9418407be6c7c3245f395f6d016db25fe0e
Parents: be9479c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:33:48 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/JQuery/build.xml | 67 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 12 ++--
.../src/main/resources/compile-config.xml | 10 +--
3 files changed, 47 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a914a941/frameworks/projects/JQuery/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/build.xml b/frameworks/projects/JQuery/build.xml
index 409bf47..2787b86 100644
--- a/frameworks/projects/JQuery/build.xml
+++ b/frameworks/projects/JQuery/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="JQuery-${release.version}.swc" />
+ <property name="target.name.no.version" value="JQuery.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of jQuery.swc">
</target>
@@ -41,55 +43,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="jQuery.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/jQuery.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in jQueryClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/jQuery.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling jQuery"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -99,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -112,13 +115,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/jQuery.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -136,9 +140,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/jQuery.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -148,14 +152,15 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
+
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
</target>
-
+
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a914a941/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml b/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
index c5c53a5..cedda1b 100644
--- a/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
@@ -45,11 +45,11 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Binding.swc</path-element>
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/Graphics.swc</path-element>
- <path-element>../../externs/Collections.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Binding.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Graphics.swc</path-element>
+ <path-element>../../../../../externs/Collections.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<namespaces>
@@ -60,7 +60,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a914a941/frameworks/projects/JQuery/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/compile-config.xml b/frameworks/projects/JQuery/src/main/resources/compile-config.xml
index 7c3e1e7..414b151 100644
--- a/frameworks/projects/JQuery/src/main/resources/compile-config.xml
+++ b/frameworks/projects/JQuery/src/main/resources/compile-config.xml
@@ -23,8 +23,8 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -54,7 +54,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -62,11 +62,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[28/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for jquery
Posted by ah...@apache.org.
new folders for jquery
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/be9479c7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/be9479c7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/be9479c7
Branch: refs/heads/develop
Commit: be9479c7b178ac03ef4f6c4bf004f294f4d7621e
Parents: 693d283
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:29:18 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/JQuery/as/defaults.css | 51 ------------
.../projects/JQuery/as/src/JQueryClasses.as | 33 --------
.../src/org/apache/flex/jquery/Application.as | 43 ----------
.../as/src/org/apache/flex/jquery/CheckBox.as | 27 ------
.../src/org/apache/flex/jquery/RadioButton.as | 43 ----------
.../as/src/org/apache/flex/jquery/TextButton.as | 56 -------------
.../org/apache/flex/jquery/ToggleTextButton.as | 42 ----------
.../projects/JQuery/compile-asjs-config.xml | 86 --------------------
frameworks/projects/JQuery/compile-config.xml | 83 -------------------
frameworks/projects/JQuery/jquery-manifest.xml | 30 -------
.../JQuery/src/main/flex/JQueryClasses.as | 33 ++++++++
.../flex/org/apache/flex/jquery/Application.as | 43 ++++++++++
.../flex/org/apache/flex/jquery/CheckBox.as | 27 ++++++
.../flex/org/apache/flex/jquery/RadioButton.as | 43 ++++++++++
.../flex/org/apache/flex/jquery/TextButton.as | 56 +++++++++++++
.../org/apache/flex/jquery/ToggleTextButton.as | 42 ++++++++++
.../src/main/resources/compile-asjs-config.xml | 86 ++++++++++++++++++++
.../src/main/resources/compile-config.xml | 83 +++++++++++++++++++
.../JQuery/src/main/resources/defaults.css | 51 ++++++++++++
.../src/main/resources/jquery-manifest.xml | 30 +++++++
20 files changed, 494 insertions(+), 494 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/defaults.css b/frameworks/projects/JQuery/as/defaults.css
deleted file mode 100644
index 1046b10..0000000
--- a/frameworks/projects/JQuery/as/defaults.css
+++ /dev/null
@@ -1,51 +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.
- *
- */
-@namespace jq "library://ns.apache.org/flexjs/jquery";
-
-@media -flex-flash
-{
-
-jq|TextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
-}
-
-
-jq|ToggleTextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
-}
-
-
-jq|CheckBox
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
-}
-
-jq|RadioButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.RadioButtonView");
-}
-
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/JQueryClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/JQueryClasses.as b/frameworks/projects/JQuery/as/src/JQueryClasses.as
deleted file mode 100644
index 8df1080..0000000
--- a/frameworks/projects/JQuery/as/src/JQueryClasses.as
+++ /dev/null
@@ -1,33 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class JQueryClasses
-{
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as b/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as
deleted file mode 100644
index 0770269..0000000
--- a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/Application.as
+++ /dev/null
@@ -1,43 +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.jquery
-{
- import org.apache.flex.core.Application;
- import org.apache.flex.core.IFlexInfo;
-
-
- public class Application extends org.apache.flex.core.Application implements IFlexInfo
- {
- /**
- * FalconJX will inject html into the index.html file. Surround with
- * "inject_html" tag as follows:
- *
- * <inject_html>
- * <link rel="stylesheet"
- * href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
- * <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- * <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
- * </inject_html>
- */
- public function Application()
- {
- super();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/CheckBox.as b/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/CheckBox.as
deleted file mode 100644
index 0a98dcd..0000000
--- a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/CheckBox.as
+++ /dev/null
@@ -1,27 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.jquery
-{
- import org.apache.flex.html.CheckBox;
-
- public class CheckBox extends org.apache.flex.html.CheckBox
- {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/RadioButton.as b/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/RadioButton.as
deleted file mode 100644
index cc27ad9..0000000
--- a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/RadioButton.as
+++ /dev/null
@@ -1,43 +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.jquery
-{
- import org.apache.flex.html.RadioButton;
-
- COMPILE::AS3
- public class RadioButton extends org.apache.flex.html.RadioButton
- {
-
- }
-
- /**
- * @flexjsignorecoercion HTMLInputElement
- */
- COMPILE::JS
- public class RadioButton extends org.apache.flex.html.RadioButton
- {
- override public function addedToParent():void
- {
- super.addedToParent();
-
- var input:HTMLInputElement = element.childNodes.item(0) as HTMLInputElement;
- $(input).button();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/TextButton.as b/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/TextButton.as
deleted file mode 100644
index a20ef8e..0000000
--- a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/TextButton.as
+++ /dev/null
@@ -1,56 +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.jquery
-{
- import org.apache.flex.html.TextButton;
-
- COMPILE::JS {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- public class TextButton extends org.apache.flex.html.TextButton
- {
- public function TextButton()
- {
- super();
- }
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- element = document.createElement('button') as WrappedHTMLElement;
- element.setAttribute('type', 'button');
-
- positioner = element;
- positioner.style.position = 'relative';
- element.flexjs_wrapper = this;
- return element;
- }
-
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
- $(element).button();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/ToggleTextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/ToggleTextButton.as b/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/ToggleTextButton.as
deleted file mode 100644
index af14a87..0000000
--- a/frameworks/projects/JQuery/as/src/org/apache/flex/jquery/ToggleTextButton.as
+++ /dev/null
@@ -1,42 +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.jquery
-{
- import org.apache.flex.html.ToggleTextButton;
-
- /**
- * The ToggleButton class is a TextButton that supports
- * a selected property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ToggleTextButton extends org.apache.flex.html.ToggleTextButton
- {
-
- COMPILE::JS
- override public function addedToParent():void
- {
- super.addedToParent();
- $(element).button();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/compile-asjs-config.xml b/frameworks/projects/JQuery/compile-asjs-config.xml
deleted file mode 100644
index c5c53a5..0000000
--- a/frameworks/projects/JQuery/compile-asjs-config.xml
+++ /dev/null
@@ -1,86 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Binding.swc</path-element>
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/Graphics.swc</path-element>
- <path-element>../../externs/Collections.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>jquery-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- </include-sources>
-
- <include-classes>
- <class>HTMLClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/jquery</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/compile-config.xml b/frameworks/projects/JQuery/compile-config.xml
deleted file mode 100644
index 7c3e1e7..0000000
--- a/frameworks/projects/JQuery/compile-config.xml
+++ /dev/null
@@ -1,83 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>jquery-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>JQueryClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/jquery</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/jquery-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/jquery-manifest.xml b/frameworks/projects/JQuery/jquery-manifest.xml
deleted file mode 100644
index 78b053d..0000000
--- a/frameworks/projects/JQuery/jquery-manifest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Application" class="org.apache.flex.jquery.Application"/>
- <component id="TextButton" class="org.apache.flex.jquery.TextButton"/>
- <component id="CheckBox" class="org.apache.flex.jquery.CheckBox"/>
- <component id="RadioButton" class="org.apache.flex.jquery.RadioButton"/>
- <component id="ToggleTextButton" class="org.apache.flex.jquery.ToggleTextButton"/>
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/JQueryClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/JQueryClasses.as b/frameworks/projects/JQuery/src/main/flex/JQueryClasses.as
new file mode 100644
index 0000000..8df1080
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/JQueryClasses.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class JQueryClasses
+{
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/Application.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/Application.as
new file mode 100644
index 0000000..0770269
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/Application.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jquery
+{
+ import org.apache.flex.core.Application;
+ import org.apache.flex.core.IFlexInfo;
+
+
+ public class Application extends org.apache.flex.core.Application implements IFlexInfo
+ {
+ /**
+ * FalconJX will inject html into the index.html file. Surround with
+ * "inject_html" tag as follows:
+ *
+ * <inject_html>
+ * <link rel="stylesheet"
+ * href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
+ * <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
+ * <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
+ * </inject_html>
+ */
+ public function Application()
+ {
+ super();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/CheckBox.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/CheckBox.as
new file mode 100644
index 0000000..0a98dcd
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/CheckBox.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jquery
+{
+ import org.apache.flex.html.CheckBox;
+
+ public class CheckBox extends org.apache.flex.html.CheckBox
+ {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
new file mode 100644
index 0000000..cc27ad9
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/RadioButton.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jquery
+{
+ import org.apache.flex.html.RadioButton;
+
+ COMPILE::AS3
+ public class RadioButton extends org.apache.flex.html.RadioButton
+ {
+
+ }
+
+ /**
+ * @flexjsignorecoercion HTMLInputElement
+ */
+ COMPILE::JS
+ public class RadioButton extends org.apache.flex.html.RadioButton
+ {
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ var input:HTMLInputElement = element.childNodes.item(0) as HTMLInputElement;
+ $(input).button();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/TextButton.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/TextButton.as
new file mode 100644
index 0000000..a20ef8e
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/TextButton.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jquery
+{
+ import org.apache.flex.html.TextButton;
+
+ COMPILE::JS {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ public class TextButton extends org.apache.flex.html.TextButton
+ {
+ public function TextButton()
+ {
+ super();
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ element = document.createElement('button') as WrappedHTMLElement;
+ element.setAttribute('type', 'button');
+
+ positioner = element;
+ positioner.style.position = 'relative';
+ element.flexjs_wrapper = this;
+ return element;
+ }
+
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+ $(element).button();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/ToggleTextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/ToggleTextButton.as b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/ToggleTextButton.as
new file mode 100644
index 0000000..af14a87
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/flex/org/apache/flex/jquery/ToggleTextButton.as
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jquery
+{
+ import org.apache.flex.html.ToggleTextButton;
+
+ /**
+ * The ToggleButton class is a TextButton that supports
+ * a selected property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ToggleTextButton extends org.apache.flex.html.ToggleTextButton
+ {
+
+ COMPILE::JS
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+ $(element).button();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml b/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..c5c53a5
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,86 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Binding.swc</path-element>
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/Graphics.swc</path-element>
+ <path-element>../../externs/Collections.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+ <manifest>jquery-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>HTMLClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/compile-config.xml b/frameworks/projects/JQuery/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..7c3e1e7
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+ <manifest>jquery-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>JQueryClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/defaults.css b/frameworks/projects/JQuery/src/main/resources/defaults.css
new file mode 100644
index 0000000..1046b10
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/resources/defaults.css
@@ -0,0 +1,51 @@
+/*
+ *
+ * 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.
+ *
+ */
+@namespace jq "library://ns.apache.org/flexjs/jquery";
+
+@media -flex-flash
+{
+
+jq|TextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
+}
+
+
+jq|ToggleTextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
+}
+
+
+jq|CheckBox
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
+}
+
+jq|RadioButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.RadioButtonView");
+}
+
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/be9479c7/frameworks/projects/JQuery/src/main/resources/jquery-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/src/main/resources/jquery-manifest.xml b/frameworks/projects/JQuery/src/main/resources/jquery-manifest.xml
new file mode 100644
index 0000000..78b053d
--- /dev/null
+++ b/frameworks/projects/JQuery/src/main/resources/jquery-manifest.xml
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Application" class="org.apache.flex.jquery.Application"/>
+ <component id="TextButton" class="org.apache.flex.jquery.TextButton"/>
+ <component id="CheckBox" class="org.apache.flex.jquery.CheckBox"/>
+ <component id="RadioButton" class="org.apache.flex.jquery.RadioButton"/>
+ <component id="ToggleTextButton" class="org.apache.flex.jquery.ToggleTextButton"/>
+
+</componentPackage>
[25/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
new folders for GoogleMaps
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1d75577b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1d75577b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1d75577b
Branch: refs/heads/develop
Commit: 1d75577b9e01a1c97db3702182407a7d9e1006d0
Parents: 84f558f
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:09:19 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:51 2016 -0800
----------------------------------------------------------------------
frameworks/projects/GoogleMaps/as/defaults.css | 29 -
.../GoogleMaps/as/src/GoogleMapsClasses.as | 36 -
.../GoogleMaps/as/src/GoogleStubClasses.as | 42 -
.../GoogleMaps/as/src/google/maps/Animation.as | 24 -
.../as/src/google/maps/BicyclingLayer.as | 29 -
.../GoogleMaps/as/src/google/maps/Circle.as | 108 ---
.../as/src/google/maps/ControlPosition.as | 94 --
.../as/src/google/maps/DirectionsRenderer.as | 78 --
.../as/src/google/maps/DirectionsService.as | 24 -
.../as/src/google/maps/DirectionsStatus.as | 66 --
.../google/maps/DistanceMatrixElementStatus.as | 31 -
.../as/src/google/maps/DistanceMatrixService.as | 24 -
.../as/src/google/maps/DistanceMatrixStatus.as | 59 --
.../as/src/google/maps/ElevationService.as | 32 -
.../as/src/google/maps/ElevationStatus.as | 45 -
.../as/src/google/maps/FusionTablesHeatmap.as | 22 -
.../as/src/google/maps/FusionTablesLayer.as | 37 -
.../google/maps/FusionTablesMarkerOptions.as | 22 -
.../google/maps/FusionTablesPolygonOptions.as | 46 -
.../google/maps/FusionTablesPolylineOptions.as | 34 -
.../as/src/google/maps/FusionTablesQuery.as | 52 --
.../as/src/google/maps/FusionTablesStyle.as | 40 -
.../GoogleMaps/as/src/google/maps/Geocoder.as | 24 -
.../src/google/maps/GeocoderAddressComponent.as | 34 -
.../as/src/google/maps/GeocoderGeometry.as | 40 -
.../as/src/google/maps/GeocoderLocationType.as | 38 -
.../as/src/google/maps/GeocoderResult.as | 40 -
.../as/src/google/maps/GeocoderStatus.as | 59 --
.../as/src/google/maps/GroundOverlay.as | 57 --
.../as/src/google/maps/ImageMapType.as | 30 -
.../GoogleMaps/as/src/google/maps/InfoWindow.as | 77 --
.../GoogleMaps/as/src/google/maps/KmlAuthor.as | 34 -
.../as/src/google/maps/KmlFeatureData.as | 52 --
.../GoogleMaps/as/src/google/maps/KmlLayer.as | 61 --
.../as/src/google/maps/KmlLayerMetadata.as | 40 -
.../as/src/google/maps/KmlLayerStatus.as | 73 --
.../as/src/google/maps/KmlMouseEvent.as | 34 -
.../GoogleMaps/as/src/google/maps/LatLng.as | 78 --
.../as/src/google/maps/LatLngBounds.as | 96 --
.../GoogleMaps/as/src/google/maps/MVCArray.as | 85 --
.../GoogleMaps/as/src/google/maps/MVCObject.as | 103 ---
.../GoogleMaps/as/src/google/maps/Map.as | 168 ----
.../as/src/google/maps/MapCanvasProjection.as | 52 --
.../GoogleMaps/as/src/google/maps/MapPanes.as | 60 --
.../as/src/google/maps/MapTypeControlStyle.as | 31 -
.../GoogleMaps/as/src/google/maps/MapTypeId.as | 38 -
.../as/src/google/maps/MapTypeRegistry.as | 17 -
.../as/src/google/maps/MapsEventListener.as | 16 -
.../GoogleMaps/as/src/google/maps/Marker.as | 299 -------
.../as/src/google/maps/MaxZoomService.as | 24 -
.../as/src/google/maps/MaxZoomStatus.as | 24 -
.../GoogleMaps/as/src/google/maps/MouseEvent.as | 28 -
.../as/src/google/maps/OverlayView.as | 59 --
.../GoogleMaps/as/src/google/maps/Point.as | 43 -
.../as/src/google/maps/PolyMouseEvent.as | 34 -
.../GoogleMaps/as/src/google/maps/Polygon.as | 102 ---
.../GoogleMaps/as/src/google/maps/Polyline.as | 89 --
.../GoogleMaps/as/src/google/maps/Rectangle.as | 89 --
.../as/src/google/maps/ScaleControlStyle.as | 17 -
.../GoogleMaps/as/src/google/maps/Size.as | 45 -
.../src/google/maps/StreetViewCoverageLayer.as | 29 -
.../as/src/google/maps/StreetViewPanorama.as | 108 ---
.../as/src/google/maps/StreetViewPov.as | 28 -
.../as/src/google/maps/StreetViewService.as | 33 -
.../as/src/google/maps/StreetViewStatus.as | 31 -
.../as/src/google/maps/StrokePosition.as | 31 -
.../as/src/google/maps/StyledMapType.as | 18 -
.../GoogleMaps/as/src/google/maps/SymbolPath.as | 45 -
.../as/src/google/maps/TrafficLayer.as | 29 -
.../as/src/google/maps/TransitLayer.as | 29 -
.../GoogleMaps/as/src/google/maps/TravelMode.as | 38 -
.../GoogleMaps/as/src/google/maps/UnitSystem.as | 24 -
.../as/src/google/maps/ZoomControlStyle.as | 31 -
.../GoogleMaps/as/src/google/maps/adsense.as | 27 -
.../as/src/google/maps/adsense/AdFormat.as | 136 ---
.../as/src/google/maps/adsense/AdUnit.as | 147 ----
.../GoogleMaps/as/src/google/maps/drawing.as | 33 -
.../src/google/maps/drawing/DrawingManager.as | 53 --
.../google/maps/drawing/OverlayCompleteEvent.as | 28 -
.../as/src/google/maps/drawing/OverlayType.as | 45 -
.../GoogleMaps/as/src/google/maps/event.as | 83 --
.../GoogleMaps/as/src/google/maps/geometry.as | 33 -
.../as/src/google/maps/geometry/encoding.as | 28 -
.../as/src/google/maps/geometry/poly.as | 34 -
.../as/src/google/maps/geometry/spherical.as | 86 --
.../GoogleMaps/as/src/google/maps/panoramio.as | 30 -
.../src/google/maps/panoramio/PanoramioLayer.as | 66 --
.../GoogleMaps/as/src/google/maps/places.as | 103 ---
.../as/src/google/maps/places/Autocomplete.as | 55 --
.../google/maps/places/AutocompleteService.as | 32 -
.../google/maps/places/ComponentRestrictions.as | 22 -
.../as/src/google/maps/places/PhotoOptions.as | 28 -
.../src/google/maps/places/PlaceAspectRating.as | 28 -
.../as/src/google/maps/places/PlaceGeometry.as | 31 -
.../as/src/google/maps/places/PlaceResult.as | 142 ---
.../as/src/google/maps/places/PlaceReview.as | 40 -
.../google/maps/places/PlaceSearchPagination.as | 28 -
.../as/src/google/maps/places/PlacesService.as | 49 --
.../google/maps/places/PlacesServiceStatus.as | 52 --
.../as/src/google/maps/places/RankBy.as | 24 -
.../as/src/google/maps/places/SearchBox.as | 42 -
.../as/src/google/maps/visualization.as | 74 --
.../maps/visualization/DemographicsLayer.as | 65 --
.../google/maps/visualization/HeatmapLayer.as | 47 -
.../maps/visualization/MapsEngineLayer.as | 91 --
.../maps/visualization/MapsEngineStatus.as | 31 -
.../GoogleMaps/as/src/google/maps/weather.as | 60 --
.../as/src/google/maps/weather/CloudLayer.as | 32 -
.../as/src/google/maps/weather/LabelColor.as | 24 -
.../src/google/maps/weather/TemperatureUnit.as | 24 -
.../as/src/google/maps/weather/WeatherLayer.as | 40 -
.../as/src/google/maps/weather/WindSpeedUnit.as | 31 -
.../org/apache/flex/maps/google/GoogleMap.as | 133 ---
.../flex/maps/google/beads/GoogleMapView.as | 866 -------------------
.../flex/maps/google/beads/MapView_original.as | 515 -----------
.../apache/flex/maps/google/models/MapModel.as | 165 ----
.../projects/GoogleMaps/compile-asjs-config.xml | 75 --
.../projects/GoogleMaps/compile-config.xml | 83 --
.../projects/GoogleMaps/google-manifest.xml | 24 -
.../src/main/flex/GoogleMapsClasses.as | 36 +
.../src/main/flex/GoogleStubClasses.as | 42 +
.../src/main/flex/google/maps/Animation.as | 24 +
.../src/main/flex/google/maps/BicyclingLayer.as | 29 +
.../src/main/flex/google/maps/Circle.as | 108 +++
.../main/flex/google/maps/ControlPosition.as | 94 ++
.../main/flex/google/maps/DirectionsRenderer.as | 78 ++
.../main/flex/google/maps/DirectionsService.as | 24 +
.../main/flex/google/maps/DirectionsStatus.as | 66 ++
.../google/maps/DistanceMatrixElementStatus.as | 31 +
.../flex/google/maps/DistanceMatrixService.as | 24 +
.../flex/google/maps/DistanceMatrixStatus.as | 59 ++
.../main/flex/google/maps/ElevationService.as | 32 +
.../main/flex/google/maps/ElevationStatus.as | 45 +
.../flex/google/maps/FusionTablesHeatmap.as | 22 +
.../main/flex/google/maps/FusionTablesLayer.as | 37 +
.../google/maps/FusionTablesMarkerOptions.as | 22 +
.../google/maps/FusionTablesPolygonOptions.as | 46 +
.../google/maps/FusionTablesPolylineOptions.as | 34 +
.../main/flex/google/maps/FusionTablesQuery.as | 52 ++
.../main/flex/google/maps/FusionTablesStyle.as | 40 +
.../src/main/flex/google/maps/Geocoder.as | 24 +
.../google/maps/GeocoderAddressComponent.as | 34 +
.../main/flex/google/maps/GeocoderGeometry.as | 40 +
.../flex/google/maps/GeocoderLocationType.as | 38 +
.../src/main/flex/google/maps/GeocoderResult.as | 40 +
.../src/main/flex/google/maps/GeocoderStatus.as | 59 ++
.../src/main/flex/google/maps/GroundOverlay.as | 57 ++
.../src/main/flex/google/maps/ImageMapType.as | 30 +
.../src/main/flex/google/maps/InfoWindow.as | 77 ++
.../src/main/flex/google/maps/KmlAuthor.as | 34 +
.../src/main/flex/google/maps/KmlFeatureData.as | 52 ++
.../src/main/flex/google/maps/KmlLayer.as | 61 ++
.../main/flex/google/maps/KmlLayerMetadata.as | 40 +
.../src/main/flex/google/maps/KmlLayerStatus.as | 73 ++
.../src/main/flex/google/maps/KmlMouseEvent.as | 34 +
.../src/main/flex/google/maps/LatLng.as | 78 ++
.../src/main/flex/google/maps/LatLngBounds.as | 96 ++
.../src/main/flex/google/maps/MVCArray.as | 85 ++
.../src/main/flex/google/maps/MVCObject.as | 103 +++
.../GoogleMaps/src/main/flex/google/maps/Map.as | 168 ++++
.../flex/google/maps/MapCanvasProjection.as | 52 ++
.../src/main/flex/google/maps/MapPanes.as | 60 ++
.../flex/google/maps/MapTypeControlStyle.as | 31 +
.../src/main/flex/google/maps/MapTypeId.as | 38 +
.../main/flex/google/maps/MapTypeRegistry.as | 17 +
.../main/flex/google/maps/MapsEventListener.as | 16 +
.../src/main/flex/google/maps/Marker.as | 299 +++++++
.../src/main/flex/google/maps/MaxZoomService.as | 24 +
.../src/main/flex/google/maps/MaxZoomStatus.as | 24 +
.../src/main/flex/google/maps/MouseEvent.as | 28 +
.../src/main/flex/google/maps/OverlayView.as | 59 ++
.../src/main/flex/google/maps/Point.as | 43 +
.../src/main/flex/google/maps/PolyMouseEvent.as | 34 +
.../src/main/flex/google/maps/Polygon.as | 102 +++
.../src/main/flex/google/maps/Polyline.as | 89 ++
.../src/main/flex/google/maps/Rectangle.as | 89 ++
.../main/flex/google/maps/ScaleControlStyle.as | 17 +
.../src/main/flex/google/maps/Size.as | 45 +
.../flex/google/maps/StreetViewCoverageLayer.as | 29 +
.../main/flex/google/maps/StreetViewPanorama.as | 108 +++
.../src/main/flex/google/maps/StreetViewPov.as | 28 +
.../main/flex/google/maps/StreetViewService.as | 33 +
.../main/flex/google/maps/StreetViewStatus.as | 31 +
.../src/main/flex/google/maps/StrokePosition.as | 31 +
.../src/main/flex/google/maps/StyledMapType.as | 18 +
.../src/main/flex/google/maps/SymbolPath.as | 45 +
.../src/main/flex/google/maps/TrafficLayer.as | 29 +
.../src/main/flex/google/maps/TransitLayer.as | 29 +
.../src/main/flex/google/maps/TravelMode.as | 38 +
.../src/main/flex/google/maps/UnitSystem.as | 24 +
.../main/flex/google/maps/ZoomControlStyle.as | 31 +
.../src/main/flex/google/maps/adsense.as | 27 +
.../main/flex/google/maps/adsense/AdFormat.as | 136 +++
.../src/main/flex/google/maps/adsense/AdUnit.as | 147 ++++
.../src/main/flex/google/maps/drawing.as | 33 +
.../flex/google/maps/drawing/DrawingManager.as | 53 ++
.../google/maps/drawing/OverlayCompleteEvent.as | 28 +
.../flex/google/maps/drawing/OverlayType.as | 45 +
.../src/main/flex/google/maps/event.as | 83 ++
.../src/main/flex/google/maps/geometry.as | 33 +
.../main/flex/google/maps/geometry/encoding.as | 28 +
.../src/main/flex/google/maps/geometry/poly.as | 34 +
.../main/flex/google/maps/geometry/spherical.as | 86 ++
.../src/main/flex/google/maps/panoramio.as | 30 +
.../google/maps/panoramio/PanoramioLayer.as | 66 ++
.../src/main/flex/google/maps/places.as | 103 +++
.../flex/google/maps/places/Autocomplete.as | 55 ++
.../google/maps/places/AutocompleteService.as | 32 +
.../google/maps/places/ComponentRestrictions.as | 22 +
.../flex/google/maps/places/PhotoOptions.as | 28 +
.../google/maps/places/PlaceAspectRating.as | 28 +
.../flex/google/maps/places/PlaceGeometry.as | 31 +
.../main/flex/google/maps/places/PlaceResult.as | 142 +++
.../main/flex/google/maps/places/PlaceReview.as | 40 +
.../google/maps/places/PlaceSearchPagination.as | 28 +
.../flex/google/maps/places/PlacesService.as | 49 ++
.../google/maps/places/PlacesServiceStatus.as | 52 ++
.../src/main/flex/google/maps/places/RankBy.as | 24 +
.../main/flex/google/maps/places/SearchBox.as | 42 +
.../src/main/flex/google/maps/visualization.as | 74 ++
.../maps/visualization/DemographicsLayer.as | 65 ++
.../google/maps/visualization/HeatmapLayer.as | 47 +
.../maps/visualization/MapsEngineLayer.as | 91 ++
.../maps/visualization/MapsEngineStatus.as | 31 +
.../src/main/flex/google/maps/weather.as | 60 ++
.../main/flex/google/maps/weather/CloudLayer.as | 32 +
.../main/flex/google/maps/weather/LabelColor.as | 24 +
.../flex/google/maps/weather/TemperatureUnit.as | 24 +
.../flex/google/maps/weather/WeatherLayer.as | 40 +
.../flex/google/maps/weather/WindSpeedUnit.as | 31 +
.../org/apache/flex/maps/google/GoogleMap.as | 133 +++
.../flex/maps/google/beads/GoogleMapView.as | 866 +++++++++++++++++++
.../flex/maps/google/beads/MapView_original.as | 515 +++++++++++
.../apache/flex/maps/google/models/MapModel.as | 165 ++++
.../src/main/resources/compile-asjs-config.xml | 75 ++
.../src/main/resources/compile-config.xml | 83 ++
.../GoogleMaps/src/main/resources/defaults.css | 29 +
.../src/main/resources/google-manifest.xml | 24 +
238 files changed, 7623 insertions(+), 7623 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/defaults.css b/frameworks/projects/GoogleMaps/as/defaults.css
deleted file mode 100644
index 214e84f..0000000
--- a/frameworks/projects/GoogleMaps/as/defaults.css
+++ /dev/null
@@ -1,29 +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.
- *
- */
-
-@namespace g "library://ns.apache.org/flexjs/google";
-
-g|Map
-{
- IBeadView: ClassReference("org.apache.flex.maps.google.beads.GoogleMapView");
- IBeadModel: ClassReference("org.apache.flex.maps.google.models.MapModel");
-}
-
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/GoogleMapsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/GoogleMapsClasses.as b/frameworks/projects/GoogleMaps/as/src/GoogleMapsClasses.as
deleted file mode 100644
index 6445519..0000000
--- a/frameworks/projects/GoogleMaps/as/src/GoogleMapsClasses.as
+++ /dev/null
@@ -1,36 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class GoogleMapsClasses
-{
- import org.apache.flex.maps.google.GoogleMap; GoogleMap;
- import org.apache.flex.maps.google.models.MapModel; MapModel;
- import org.apache.flex.maps.google.beads.GoogleMapView; GoogleMapView;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/GoogleStubClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/GoogleStubClasses.as b/frameworks/projects/GoogleMaps/as/src/GoogleStubClasses.as
deleted file mode 100644
index 9f6da21..0000000
--- a/frameworks/projects/GoogleMaps/as/src/GoogleStubClasses.as
+++ /dev/null
@@ -1,42 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class GoogleStubClasses
-{
- COMPILE::AS3 {
- import google.maps.Animation; Animation;
- import google.maps.LatLng; LatLng;
- import google.maps.Marker; Marker;
- import google.maps.Geocoder; Geocoder;
- import google.maps.Map; Map;
- import google.maps.places.PlaceResult; PlaceResult;
- import google.maps.places.PlacesService; PlacesService;
- }
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Animation.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Animation.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Animation.as
deleted file mode 100644
index 8a76edf..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Animation.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class Animation {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BOUNCE:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DROP:Number = 1;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/BicyclingLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/BicyclingLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/BicyclingLayer.as
deleted file mode 100644
index 5dab300..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/BicyclingLayer.as
+++ /dev/null
@@ -1,29 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class BicyclingLayer extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function BicyclingLayer() {
- super();
- }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Circle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Circle.as
deleted file mode 100644
index 2d95c54..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Circle.as
+++ /dev/null
@@ -1,108 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Circle extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.CircleOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Circle(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getEditable():Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getCenter():google.maps.LatLng { return null; }
-
- /**
- * @param draggable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param visible [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getRadius():Number { return 0; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getVisible():Boolean { return null; }
-
- /**
- * @param editable [boolean]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.CircleOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param radius [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setRadius(radius:Number):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function getDraggable():Boolean { return null; }
-
- /**
- * @param center [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setCenter(center:google.maps.LatLng):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ControlPosition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ControlPosition.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ControlPosition.as
deleted file mode 100644
index 5ef0a2a..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ControlPosition.as
+++ /dev/null
@@ -1,94 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ControlPosition {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const RIGHT_TOP:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const RIGHT_BOTTOM:Number = 1;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TOP_RIGHT:Number = 2;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BOTTOM_LEFT:Number = 3;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const RIGHT_CENTER:Number = 4;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BOTTOM_CENTER:Number = 5;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TOP_LEFT:Number = 6;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LEFT_CENTER:Number = 7;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LEFT_BOTTOM:Number = 8;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TOP_CENTER:Number = 9;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BOTTOM_RIGHT:Number = 10;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LEFT_TOP:Number = 11;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsRenderer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsRenderer.as
deleted file mode 100644
index f548646..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsRenderer.as
+++ /dev/null
@@ -1,78 +0,0 @@
-package google.maps {
-
-import google.pseudo.Node;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class DirectionsRenderer extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.DirectionsRendererOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function DirectionsRenderer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getRouteIndex():Number { return 0; }
-
- /**
- * @param routeIndex [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setRouteIndex(routeIndex:Number):Object /* undefined */ { return null; }
-
- /**
- * @param panel [(Node|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPanel(panel:Node):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.DirectionsRendererOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param directions [(google.maps.DirectionsResult|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setDirections(directions:google.maps.DirectionsResult):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.DirectionsResult|null)}
- */
- public function getDirections():google.maps.DirectionsResult { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Node|null)}
- */
- public function getPanel():Node { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsService.as
deleted file mode 100644
index 3070674..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsService.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DirectionsService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function DirectionsService() {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.DirectionsRequest|null)]
- * @param callback [function ((google.maps.DirectionsResult|null), (google.maps.DirectionsStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function route(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsStatus.as
deleted file mode 100644
index e34bf53..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DirectionsStatus.as
+++ /dev/null
@@ -1,66 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DirectionsStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const NOT_FOUND:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OVER_QUERY_LIMIT:String = '5';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const REQUEST_DENIED:String = '6';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MAX_WAYPOINTS_EXCEEDED:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ZERO_RESULTS:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '7';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixElementStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixElementStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixElementStatus.as
deleted file mode 100644
index 510c17f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixElementStatus.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DistanceMatrixElementStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const NOT_FOUND:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ZERO_RESULTS:String = '3';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixService.as
deleted file mode 100644
index 035e63d..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixService.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DistanceMatrixService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function DistanceMatrixService() {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.DistanceMatrixRequest|null)]
- * @param callback [function ((google.maps.DistanceMatrixResponse|null), (google.maps.DistanceMatrixStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getDistanceMatrix(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixStatus.as
deleted file mode 100644
index b168675..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/DistanceMatrixStatus.as
+++ /dev/null
@@ -1,59 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DistanceMatrixStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MAX_ELEMENTS_EXCEEDED:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OVER_QUERY_LIMIT:String = '5';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const REQUEST_DENIED:String = '6';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MAX_DIMENSIONS_EXCEEDED:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationService.as
deleted file mode 100644
index 261da53..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationService.as
+++ /dev/null
@@ -1,32 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ElevationService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function ElevationService() {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.PathElevationRequest|null)]
- * @param callback [function ((Array<(google.maps.ElevationResult|null)>|null), (google.maps.ElevationStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getElevationAlongPath(request:Object, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param request [(Object<?,string>|google.maps.LocationElevationRequest|null)]
- * @param callback [function ((Array<(google.maps.ElevationResult|null)>|null), (google.maps.ElevationStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getElevationForLocations(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationStatus.as
deleted file mode 100644
index dfc5e3f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ElevationStatus.as
+++ /dev/null
@@ -1,45 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ElevationStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OVER_QUERY_LIMIT:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const REQUEST_DENIED:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesHeatmap.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesHeatmap.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesHeatmap.as
deleted file mode 100644
index 28400bc..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesHeatmap.as
+++ /dev/null
@@ -1,22 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesHeatmap {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesHeatmap() {
- super();
- }
-
- /**
- * @see JSType - [boolean]
- * @see [google_maps_api_v3_11]
- */
- public var enabled:Boolean;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesLayer.as
deleted file mode 100644
index f185b75..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesLayer.as
+++ /dev/null
@@ -1,37 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class FusionTablesLayer extends google.maps.MVCObject {
-
- /**
- * @param options [(Object<?,string>|google.maps.FusionTablesLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesLayer(options:Object) {
- super();
- }
-
- /**
- * @param options [(Object<?,string>|google.maps.FusionTablesLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesMarkerOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesMarkerOptions.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesMarkerOptions.as
deleted file mode 100644
index dcd8a4b..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesMarkerOptions.as
+++ /dev/null
@@ -1,22 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesMarkerOptions {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesMarkerOptions() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var iconName:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolygonOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolygonOptions.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolygonOptions.as
deleted file mode 100644
index 2730d85..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolygonOptions.as
+++ /dev/null
@@ -1,46 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesPolygonOptions {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesPolygonOptions() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var fillColor:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var strokeColor:String;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var strokeWeight:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var strokeOpacity:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var fillOpacity:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolylineOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolylineOptions.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolylineOptions.as
deleted file mode 100644
index 4c0ab0b..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesPolylineOptions.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesPolylineOptions {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesPolylineOptions() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var strokeColor:String;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var strokeWeight:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var strokeOpacity:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesQuery.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesQuery.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesQuery.as
deleted file mode 100644
index 83dbe8b..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesQuery.as
+++ /dev/null
@@ -1,52 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesQuery {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesQuery() {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var limit:Number;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var orderBy:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var select:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var from:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var where:String;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var offset:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesStyle.as b/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesStyle.as
deleted file mode 100644
index 2f428c8..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/FusionTablesStyle.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class FusionTablesStyle {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function FusionTablesStyle() {
- super();
- }
-
- /**
- * @see JSType - [(Object(?,string)|google.maps.FusionTablesPolygonOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public var polygonOptions:Object;
-
- /**
- * @see JSType - [(Object(?,string)|google.maps.FusionTablesPolylineOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public var polylineOptions:Object;
-
- /**
- * @see JSType - [(Object(?,string)|google.maps.FusionTablesMarkerOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public var markerOptions:Object;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var where:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/Geocoder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/Geocoder.as b/frameworks/projects/GoogleMaps/as/src/google/maps/Geocoder.as
deleted file mode 100644
index f13a2d5..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/Geocoder.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class Geocoder {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function Geocoder() {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.GeocoderRequest|null)]
- * @param callback [function ((Array<(google.maps.GeocoderResult|null)>|null), (google.maps.GeocoderStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function geocode(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderAddressComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderAddressComponent.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderAddressComponent.as
deleted file mode 100644
index 60ffa1e..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderAddressComponent.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class GeocoderAddressComponent {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function GeocoderAddressComponent() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var long_name:String;
-
- /**
- * @see JSType - [(Array(string)|null)]
- * @see [google_maps_api_v3_11]
- */
- public var types:Array;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var short_name:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderGeometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderGeometry.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderGeometry.as
deleted file mode 100644
index 6ba4aff..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderGeometry.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class GeocoderGeometry {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function GeocoderGeometry() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- */
- public var bounds:google.maps.LatLngBounds;
-
- /**
- * @see JSType - [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- */
- public var viewport:google.maps.LatLngBounds;
-
- /**
- * @see JSType - [(google.maps.GeocoderLocationType|null)]
- * @see [google_maps_api_v3_11]
- */
- public var location_type:google.maps.GeocoderLocationType;
-
- /**
- * @see JSType - [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- */
- public var location:google.maps.LatLng;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderLocationType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderLocationType.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderLocationType.as
deleted file mode 100644
index f1b6379..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderLocationType.as
+++ /dev/null
@@ -1,38 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class GeocoderLocationType {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ROOFTOP:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const RANGE_INTERPOLATED:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const APPROXIMATE:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const GEOMETRIC_CENTER:String = '2';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderResult.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderResult.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderResult.as
deleted file mode 100644
index 773e3f5..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderResult.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class GeocoderResult {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function GeocoderResult() {
- super();
- }
-
- /**
- * @see JSType - [(Array((google.maps.GeocoderAddressComponent|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var address_components:Array;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var formatted_address:String;
-
- /**
- * @see JSType - [(Array(string>|null)]
- * @see [google_maps_api_v3_11]
- */
- public var types:Array;
-
- /**
- * @see JSType - [(google.maps.GeocoderGeometry|null)]
- * @see [google_maps_api_v3_11]
- */
- public var geometry:google.maps.GeocoderGeometry;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderStatus.as
deleted file mode 100644
index 07b0817..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GeocoderStatus.as
+++ /dev/null
@@ -1,59 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class GeocoderStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OVER_QUERY_LIMIT:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const REQUEST_DENIED:String = '5';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ZERO_RESULTS:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ERROR:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '6';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/GroundOverlay.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/GroundOverlay.as b/frameworks/projects/GoogleMaps/as/src/google/maps/GroundOverlay.as
deleted file mode 100644
index e82daa6..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/GroundOverlay.as
+++ /dev/null
@@ -1,57 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class GroundOverlay extends google.maps.MVCObject {
-
- /**
- * @param url [string]
- * @param bounds [(google.maps.LatLngBounds|null)]
- * @param opt_opts [(Object<?,string>|google.maps.GroundOverlayOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function GroundOverlay(url:String, bounds:google.maps.LatLngBounds, opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getUrl():String { return null; }
-
- /**
- * @param opacity [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOpacity(opacity:Number):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getOpacity():Number { return 0; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/ImageMapType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/ImageMapType.as b/frameworks/projects/GoogleMaps/as/src/google/maps/ImageMapType.as
deleted file mode 100644
index afd2704..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/ImageMapType.as
+++ /dev/null
@@ -1,30 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class ImageMapType extends google.maps.MVCObject {
-
- /**
- * @param opts [(Object<?,string>|google.maps.ImageMapTypeOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public function ImageMapType(opts:Object) {
- super();
- }
-
- /**
- * @param opacity [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOpacity(opacity:Number):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getOpacity():Number { return 0; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/InfoWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/InfoWindow.as b/frameworks/projects/GoogleMaps/as/src/google/maps/InfoWindow.as
deleted file mode 100644
index 99df034..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/InfoWindow.as
+++ /dev/null
@@ -1,77 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class InfoWindow extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.InfoWindowOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function InfoWindow(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @param zIndex [number]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setZIndex(zIndex:Number):Object /* undefined */ { return null; }
-
- /**
- * @param opt_map [(google.maps.Map|google.maps.StreetViewPanorama|null|undefined)]
- * @param opt_anchor [(google.maps.MVCObject|null|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function open(opt_map:Object = null, opt_anchor:google.maps.MVCObject = null):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Node|null|string)}
- */
- public function getContent():Object { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.InfoWindowOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getZIndex():Number { return 0; }
-
- /**
- * @param position [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setPosition(position:google.maps.LatLng):Object /* undefined */ { return null; }
-
- /**
- * @param content [(Node|null|string)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setContent(content:Object):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getPosition():google.maps.LatLng { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function close():Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlAuthor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlAuthor.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlAuthor.as
deleted file mode 100644
index 57472e4..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlAuthor.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class KmlAuthor {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function KmlAuthor() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var email:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var name:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var uri:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlFeatureData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlFeatureData.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlFeatureData.as
deleted file mode 100644
index 4730d83..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlFeatureData.as
+++ /dev/null
@@ -1,52 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class KmlFeatureData {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function KmlFeatureData() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var id:String;
-
- /**
- * @see JSType - [(google.maps.KmlAuthor|null)]
- * @see [google_maps_api_v3_11]
- */
- public var author:google.maps.KmlAuthor;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var description:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var name:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var infoWindowHtml:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var snippet:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayer.as
deleted file mode 100644
index 75b4595..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayer.as
+++ /dev/null
@@ -1,61 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class KmlLayer extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.KmlLayerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function KmlLayer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.KmlLayerStatus|null)}
- */
- public function getStatus():google.maps.KmlLayerStatus { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getUrl():String { return null; }
-
- /**
- * @param url [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setUrl(url:String):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getDefaultViewport():google.maps.LatLngBounds { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.KmlLayerMetadata|null)}
- */
- public function getMetadata():google.maps.KmlLayerMetadata { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerMetadata.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerMetadata.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerMetadata.as
deleted file mode 100644
index c224108..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerMetadata.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class KmlLayerMetadata {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function KmlLayerMetadata() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.KmlAuthor|null)]
- * @see [google_maps_api_v3_11]
- */
- public var author:google.maps.KmlAuthor;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var description:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var name:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var snippet:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerStatus.as
deleted file mode 100644
index e21bcb9..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlLayerStatus.as
+++ /dev/null
@@ -1,73 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class KmlLayerStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '7';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const LIMITS_EXCEEDED:String = '6';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '5';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DOCUMENT_NOT_FOUND:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_DOCUMENT:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const FETCH_ERROR:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DOCUMENT_TOO_LARGE:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const TIMED_OUT:String = '8';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlMouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlMouseEvent.as b/frameworks/projects/GoogleMaps/as/src/google/maps/KmlMouseEvent.as
deleted file mode 100644
index 2fe0883..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/KmlMouseEvent.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class KmlMouseEvent {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function KmlMouseEvent() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.KmlFeatureData|null)]
- * @see [google_maps_api_v3_11]
- */
- public var featureData:google.maps.KmlFeatureData;
-
- /**
- * @see JSType - [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- */
- public var latLng:google.maps.LatLng;
-
- /**
- * @see JSType - [(google.maps.Size|null)]
- * @see [google_maps_api_v3_11]
- */
- public var pixelOffset:google.maps.Size;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/LatLng.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/LatLng.as b/frameworks/projects/GoogleMaps/as/src/google/maps/LatLng.as
deleted file mode 100644
index fbedaea..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/LatLng.as
+++ /dev/null
@@ -1,78 +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 google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class LatLng {
-
- /**
- * @param lat [number]
- * @param lng [number]
- * @param opt_noWrap [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function LatLng(lat:Number, lng:Number, opt_noWrap:Boolean = false) {
- super();
- _lat = lat;
- _lng = lng;
- }
-
- private var _lat:Number;
- private var _lng:Number;
-
- /**
- * @param other [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function equals(other:google.maps.LatLng):Boolean {
- return other.lat() == _lat && other.lng() == _lng;
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toString():String {
- return String(_lat)+", "+String(_lng);
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function lng():Number { return _lng; }
-
- /**
- * @param opt_precision [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toUrlValue(opt_precision:Number = 0):String { return toString(); }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function lat():Number { return _lat; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/LatLngBounds.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/LatLngBounds.as b/frameworks/projects/GoogleMaps/as/src/google/maps/LatLngBounds.as
deleted file mode 100644
index 6384733..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/LatLngBounds.as
+++ /dev/null
@@ -1,96 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class LatLngBounds {
-
- /**
- * @param opt_sw [(google.maps.LatLng|null|undefined)]
- * @param opt_ne [(google.maps.LatLng|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function LatLngBounds(opt_sw:google.maps.LatLng = null, opt_ne:google.maps.LatLng = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getNorthEast():google.maps.LatLng { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function isEmpty():Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function toSpan():google.maps.LatLng { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getCenter():google.maps.LatLng { return null; }
-
- /**
- * @param other [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function equals(other:google.maps.LatLngBounds):Boolean { return null; }
-
- /**
- * @param point [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function extend(point:google.maps.LatLng):google.maps.LatLngBounds { return null; }
-
- /**
- * @param other [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function union(other:google.maps.LatLngBounds):google.maps.LatLngBounds { return null; }
-
- /**
- * @param other [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function intersects(other:google.maps.LatLngBounds):Boolean { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toString():String { return null; }
-
- /**
- * @param latLng [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- * @returns {boolean}
- */
- public function contains(latLng:google.maps.LatLng):Boolean { return null; }
-
- /**
- * @param opt_precision [(number|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function toUrlValue(opt_precision:Number = 0):String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLng|null)}
- */
- public function getSouthWest():google.maps.LatLng { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MVCArray.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MVCArray.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MVCArray.as
deleted file mode 100644
index 356444f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MVCArray.as
+++ /dev/null
@@ -1,85 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class MVCArray extends google.maps.MVCObject {
-
- /**
- * @param opt_array [(Array|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function MVCArray(opt_array:Array = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function clear():Object /* undefined */ { return null; }
-
- /**
- * @param i [number]
- * @see [google_maps_api_v3_11]
- * @returns {*}
- */
- public function removeAt(i:Number):* { return null; }
-
- /**
- * @param i [number]
- * @param elem [*]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function insertAt(i:Number, elem:*):Object /* undefined */ { return null; }
-
- /**
- * @param callback [function (?, number): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function forEach(callback:Function /* function (?, number): ? */):Object /* undefined */ { return null; }
-
- /**
- * @param i [number]
- * @see [google_maps_api_v3_11]
- * @returns {*}
- */
- public function getAt(i:Number):* { return null; }
-
- /**
- * @param i [number]
- * @param elem [*]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setAt(i:Number, elem:*):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {*}
- */
- public function pop():* { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function getLength():Number { return 0; }
-
- /**
- * @param elem [*]
- * @see [google_maps_api_v3_11]
- * @returns {number}
- */
- public function push(elem:*):Number { return 0; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Array|null)}
- */
- public function getArray():Array { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/MVCObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/MVCObject.as b/frameworks/projects/GoogleMaps/as/src/google/maps/MVCObject.as
deleted file mode 100644
index ea9d213..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/MVCObject.as
+++ /dev/null
@@ -1,103 +0,0 @@
-package google.maps {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function MVCObject() {
- super();
- _dictionary = new Object();
- }
-
- private var _dictionary:Object;
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function unbindAll():Object /* undefined */ {
- return undefined;
- }
-
- /**
- * @param key [string]
- * @see [google_maps_api_v3_11]
- * @returns {*}
- */
- public function get(key:String):* {
- if (_dictionary.hasOwnProperty(key)) {
- return _dictionary[key];
- }
- else {
- return undefined;
- }
- }
-
- /**
- * @param values [(Object|null|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setValues(values:Object):Object /* undefined */ {
- for (var id:String in values) {
- _dictionary[id] = values[id];
- }
- return undefined;
- }
-
- /**
- * @param key [string]
- * @param value [?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function set(key:String, value:Object /* ? */):Object /* undefined */ {
- _dictionary[key] = value;
- return undefined;
- }
-
- /**
- * @param key [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function notify(key:String):Object /* undefined */ { return null; }
-
- /**
- * @param key [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function unbind(key:String):Object /* undefined */ { return null; }
-
- /**
- * @param key [string]
- * @param target [(google.maps.MVCObject|null)]
- * @param opt_targetKey [(null|string|undefined)]
- * @param opt_noNotify [(boolean|undefined)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function bindTo(key:String, target:google.maps.MVCObject, opt_targetKey:String = '', opt_noNotify:Boolean = false):Object /* undefined */ { return null; }
-
- /**
- * @param eventName [string]
- * @param handler [Function]
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MapsEventListener|null)}
- */
- public function addListener(eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
-
- /**
- * @param key [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function changed(key:String):Object /* undefined */ { return null; }
-
-}
-}
[48/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2413ead1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2413ead1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2413ead1
Branch: refs/heads/develop
Commit: 2413ead182370f05af73eee19fa4b719a1c2597f
Parents: ce87814
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:42:07 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Mobile/build.xml | 65 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 8 +--
.../src/main/resources/compile-config.xml | 12 ++--
3 files changed, 45 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2413ead1/frameworks/projects/Mobile/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/build.xml b/frameworks/projects/Mobile/build.xml
index 2760554..0cb312a 100644
--- a/frameworks/projects/Mobile/build.xml
+++ b/frameworks/projects/Mobile/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Mobile-${release.version}.swc" />
+ <property name="target.name.no.version" value="Mobile.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Mobile.swc">
</target>
@@ -41,55 +43,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Mobile.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Mobile.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in MobileClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Mobile.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling Mobile"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -99,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -111,13 +114,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Mobile.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -135,9 +139,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Mobile.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -146,11 +150,12 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
+
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2413ead1/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
index ba49185..f23d6d3 100644
--- a/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
@@ -45,9 +45,9 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/Graphics.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Graphics.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<namespaces>
@@ -62,7 +62,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2413ead1/frameworks/projects/Mobile/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/compile-config.xml b/frameworks/projects/Mobile/src/main/resources/compile-config.xml
index 8a4b4ed..3ce0c19 100644
--- a/frameworks/projects/Mobile/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Mobile/src/main/resources/compile-config.xml
@@ -23,9 +23,9 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/Graphics.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Graphics.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -59,7 +59,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -67,11 +67,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[43/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - need
to move these
Posted by ah...@apache.org.
need to move these
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/753ea40e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/753ea40e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/753ea40e
Branch: refs/heads/develop
Commit: 753ea40e12be74783463af586f3cf1d0049c5073
Parents: ea6689b
Author: Alex Harui <ah...@apache.org>
Authored: Wed Feb 3 09:29:22 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
.../org/apache/flex/events/ItemAddedEvent.as | 88 --------------
.../org/apache/flex/events/ItemClickedEvent.as | 115 -------------------
.../org/apache/flex/events/ItemRemovedEvent.as | 88 --------------
.../org/apache/flex/events/ItemAddedEvent.as | 88 ++++++++++++++
.../org/apache/flex/events/ItemClickedEvent.as | 115 +++++++++++++++++++
.../org/apache/flex/events/ItemRemovedEvent.as | 88 ++++++++++++++
6 files changed, 291 insertions(+), 291 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemAddedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemAddedEvent.as b/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemAddedEvent.as
deleted file mode 100644
index 24707c0..0000000
--- a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemAddedEvent.as
+++ /dev/null
@@ -1,88 +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.events
-{
-
- import org.apache.flex.events.CustomEvent;
-
- /**
- * The ItemAddedEvent is dispatched by IItemRendererParent objects whenenver an
- * itemRenderer is added.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ItemAddedEvent extends CustomEvent
- {
-
- //--------------------------------------
- // Constructor
- //--------------------------------------
-
- /**
- * Constructor.
- *
- * @param type The name of the event.
- * @param bubbles Whether the event bubbles.
- * @param cancelable Whether the event can be canceled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ItemAddedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
-
- item = null;
- }
-
- /**
- * The item being added.
- *
- * @export
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var item:Object;
-
- /**
- * @private
- */
- override public function cloneEvent():org.apache.flex.events.Event
- {
- var newEvent:ItemAddedEvent = new ItemAddedEvent(type);
- newEvent.item = item;
- return newEvent;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemClickedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemClickedEvent.as b/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemClickedEvent.as
deleted file mode 100644
index ac943b0..0000000
--- a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemClickedEvent.as
+++ /dev/null
@@ -1,115 +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.events
-{
-
- import org.apache.flex.events.CustomEvent;
-
- /**
- * The ItemClickedEvent is a custom event issued by an itemRenderer to
- * convey information about itself when it has determined that the
- * event(s) happening to it constitute a 'click' on itself.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ItemClickedEvent extends CustomEvent
- {
-
- //--------------------------------------
- // Constructor
- //--------------------------------------
-
- /**
- * Constructor.
- *
- * @param type The name of the event.
- * @param bubbles Whether the event bubbles.
- * @param cancelable Whether the event can be canceled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ItemClickedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
-
- index = -1;
- data = null;
- multipleSelection = false;
- }
-
- /**
- * The index of the item beginning with zero.
- *
- * @export
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var index:Number;
-
- /**
- * The data of the item.
- *
- * @export
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var data:Object;
-
- /**
- * Whether or not this click is part of a multi-selection sequence.
- *
- * @export
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var multipleSelection:Boolean;
-
- /**
- * @private
- */
- override public function cloneEvent():org.apache.flex.events.Event
- {
- var newEvent:ItemClickedEvent = new ItemClickedEvent(type);
- newEvent.index = index;
- newEvent.data = data;
- newEvent.multipleSelection = multipleSelection;
- return newEvent;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemRemovedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemRemovedEvent.as b/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemRemovedEvent.as
deleted file mode 100644
index d638084..0000000
--- a/frameworks/projects/HTML/as/src/org/apache/flex/events/ItemRemovedEvent.as
+++ /dev/null
@@ -1,88 +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.events
-{
-
- import org.apache.flex.events.CustomEvent;
-
- /**
- * The ItemRemovedEvent is dispatched by IItemRendererParent objects whenenver an
- * itemRenderer is removed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ItemRemovedEvent extends CustomEvent
- {
-
- //--------------------------------------
- // Constructor
- //--------------------------------------
-
- /**
- * Constructor.
- *
- * @param type The name of the event.
- * @param bubbles Whether the event bubbles.
- * @param cancelable Whether the event can be canceled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ItemRemovedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
-
- item = null;
- }
-
- /**
- * The item being removed.
- *
- * @export
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var item:Object;
-
- /**
- * @private
- */
- override public function cloneEvent():org.apache.flex.events.Event
- {
- var newEvent:ItemRemovedEvent = new ItemRemovedEvent(type);
- newEvent.item = item;
- return newEvent;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
new file mode 100644
index 0000000..24707c0
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemAddedEvent.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+
+// 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.events
+{
+
+ import org.apache.flex.events.CustomEvent;
+
+ /**
+ * The ItemAddedEvent is dispatched by IItemRendererParent objects whenenver an
+ * itemRenderer is added.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ItemAddedEvent extends CustomEvent
+ {
+
+ //--------------------------------------
+ // Constructor
+ //--------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param type The name of the event.
+ * @param bubbles Whether the event bubbles.
+ * @param cancelable Whether the event can be canceled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ItemAddedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+
+ item = null;
+ }
+
+ /**
+ * The item being added.
+ *
+ * @export
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var item:Object;
+
+ /**
+ * @private
+ */
+ override public function cloneEvent():org.apache.flex.events.Event
+ {
+ var newEvent:ItemAddedEvent = new ItemAddedEvent(type);
+ newEvent.item = item;
+ return newEvent;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
new file mode 100644
index 0000000..ac943b0
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemClickedEvent.as
@@ -0,0 +1,115 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+
+// 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.events
+{
+
+ import org.apache.flex.events.CustomEvent;
+
+ /**
+ * The ItemClickedEvent is a custom event issued by an itemRenderer to
+ * convey information about itself when it has determined that the
+ * event(s) happening to it constitute a 'click' on itself.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ItemClickedEvent extends CustomEvent
+ {
+
+ //--------------------------------------
+ // Constructor
+ //--------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param type The name of the event.
+ * @param bubbles Whether the event bubbles.
+ * @param cancelable Whether the event can be canceled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ItemClickedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+
+ index = -1;
+ data = null;
+ multipleSelection = false;
+ }
+
+ /**
+ * The index of the item beginning with zero.
+ *
+ * @export
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var index:Number;
+
+ /**
+ * The data of the item.
+ *
+ * @export
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var data:Object;
+
+ /**
+ * Whether or not this click is part of a multi-selection sequence.
+ *
+ * @export
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var multipleSelection:Boolean;
+
+ /**
+ * @private
+ */
+ override public function cloneEvent():org.apache.flex.events.Event
+ {
+ var newEvent:ItemClickedEvent = new ItemClickedEvent(type);
+ newEvent.index = index;
+ newEvent.data = data;
+ newEvent.multipleSelection = multipleSelection;
+ return newEvent;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/753ea40e/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
new file mode 100644
index 0000000..d638084
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/events/ItemRemovedEvent.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+
+// 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.events
+{
+
+ import org.apache.flex.events.CustomEvent;
+
+ /**
+ * The ItemRemovedEvent is dispatched by IItemRendererParent objects whenenver an
+ * itemRenderer is removed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ItemRemovedEvent extends CustomEvent
+ {
+
+ //--------------------------------------
+ // Constructor
+ //--------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param type The name of the event.
+ * @param bubbles Whether the event bubbles.
+ * @param cancelable Whether the event can be canceled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ItemRemovedEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+
+ item = null;
+ }
+
+ /**
+ * The item being removed.
+ *
+ * @export
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var item:Object;
+
+ /**
+ * @private
+ */
+ override public function cloneEvent():org.apache.flex.events.Event
+ {
+ var newEvent:ItemRemovedEvent = new ItemRemovedEvent(type);
+ newEvent.item = item;
+ return newEvent;
+ }
+ }
+}
[46/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for mobile
Posted by ah...@apache.org.
new folders for mobile
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ce878142
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ce878142
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ce878142
Branch: refs/heads/develop
Commit: ce87814201cf5c0775d59c88657b5acd869b2b23
Parents: a914a94
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:38:32 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Mobile/as/defaults.css | 33 ---
.../projects/Mobile/as/src/CordovaClasses.as | 36 ---
.../projects/Mobile/as/src/MobileClasses.as | 43 ---
.../as/src/org/apache/cordova/Application.as | 56 ----
.../Mobile/as/src/org/apache/cordova/Weinre.as | 88 -------
.../as/src/org/apache/cordova/camera/Camera.as | 179 -------------
.../as/src/org/apache/flex/mobile/IView.as | 43 ---
.../src/org/apache/flex/mobile/IViewManager.as | 42 ---
.../src/org/apache/flex/mobile/ManagerBase.as | 184 -------------
.../apache/flex/mobile/StackedViewManager.as | 161 ------------
.../org/apache/flex/mobile/TabbedViewManager.as | 85 ------
.../as/src/org/apache/flex/mobile/View.as | 103 --------
.../org/apache/flex/mobile/ViewManagerBase.as | 236 -----------------
.../flex/mobile/beads/StackedViewManagerView.as | 127 ---------
.../flex/mobile/beads/TabbedViewManagerView.as | 139 ----------
.../apache/flex/mobile/beads/ViewManagerView.as | 165 ------------
.../apache/flex/mobile/chrome/NavigationBar.as | 103 --------
.../src/org/apache/flex/mobile/chrome/TabBar.as | 50 ----
.../org/apache/flex/mobile/chrome/ToolBar.as | 80 ------
.../flex/mobile/models/ViewManagerModel.as | 263 -------------------
frameworks/projects/Mobile/basic-manifest.xml | 29 --
.../projects/Mobile/compile-asjs-config.xml | 89 -------
frameworks/projects/Mobile/compile-config.xml | 89 -------
frameworks/projects/Mobile/cordova-manifest.xml | 28 --
.../Mobile/src/main/flex/CordovaClasses.as | 36 +++
.../Mobile/src/main/flex/MobileClasses.as | 43 +++
.../main/flex/org/apache/cordova/Application.as | 56 ++++
.../src/main/flex/org/apache/cordova/Weinre.as | 88 +++++++
.../flex/org/apache/cordova/camera/Camera.as | 179 +++++++++++++
.../main/flex/org/apache/flex/mobile/IView.as | 43 +++
.../flex/org/apache/flex/mobile/IViewManager.as | 42 +++
.../flex/org/apache/flex/mobile/ManagerBase.as | 184 +++++++++++++
.../apache/flex/mobile/StackedViewManager.as | 161 ++++++++++++
.../org/apache/flex/mobile/TabbedViewManager.as | 85 ++++++
.../main/flex/org/apache/flex/mobile/View.as | 103 ++++++++
.../org/apache/flex/mobile/ViewManagerBase.as | 236 +++++++++++++++++
.../flex/mobile/beads/StackedViewManagerView.as | 127 +++++++++
.../flex/mobile/beads/TabbedViewManagerView.as | 139 ++++++++++
.../apache/flex/mobile/beads/ViewManagerView.as | 165 ++++++++++++
.../apache/flex/mobile/chrome/NavigationBar.as | 103 ++++++++
.../org/apache/flex/mobile/chrome/TabBar.as | 50 ++++
.../org/apache/flex/mobile/chrome/ToolBar.as | 80 ++++++
.../flex/mobile/models/ViewManagerModel.as | 263 +++++++++++++++++++
.../src/main/resources/basic-manifest.xml | 29 ++
.../src/main/resources/compile-asjs-config.xml | 89 +++++++
.../src/main/resources/compile-config.xml | 89 +++++++
.../src/main/resources/cordova-manifest.xml | 28 ++
.../Mobile/src/main/resources/defaults.css | 33 +++
48 files changed, 2451 insertions(+), 2451 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/defaults.css b/frameworks/projects/Mobile/as/defaults.css
deleted file mode 100644
index d529595..0000000
--- a/frameworks/projects/Mobile/as/defaults.css
+++ /dev/null
@@ -1,33 +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.
- *
- */
-
-@namespace "library://ns.apache.org/flexjs/basic";
-@namespace svg "library://ns.apache.org/flexjs/svg";
-
-StackedViewManager
-{
- IBeadModel: ClassReference("org.apache.flex.mobile.models.ViewManagerModel");
- IBeadView: ClassReference("org.apache.flex.mobile.beads.StackedViewManagerView");
-}
-
-TabbedViewManager
-{
- IBeadModel: ClassReference("org.apache.flex.mobile.models.ViewManagerModel");
- IBeadView: ClassReference("org.apache.flex.mobile.beads.TabbedViewManagerView");
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/CordovaClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/CordovaClasses.as b/frameworks/projects/Mobile/as/src/CordovaClasses.as
deleted file mode 100644
index 3b9dc98..0000000
--- a/frameworks/projects/Mobile/as/src/CordovaClasses.as
+++ /dev/null
@@ -1,36 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class CordovaClasses
-{
- import org.apache.cordova.camera.Camera; Camera;
- import org.apache.cordova.Application; Application;
- import org.apache.cordova.Weinre; Weinre;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/MobileClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/MobileClasses.as b/frameworks/projects/Mobile/as/src/MobileClasses.as
deleted file mode 100644
index fc933aa..0000000
--- a/frameworks/projects/Mobile/as/src/MobileClasses.as
+++ /dev/null
@@ -1,43 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class MobileClasses
-{
- import org.apache.flex.mobile.ManagerBase; ManagerBase;
-
- import org.apache.flex.mobile.ViewManagerBase; ViewManagerBase;
- import org.apache.flex.mobile.beads.StackedViewManagerView; StackedViewManagerView;
- import org.apache.flex.mobile.beads.TabbedViewManagerView; TabbedViewManagerView;
- import org.apache.flex.mobile.beads.ViewManagerView; ViewManagerView;
- import org.apache.flex.mobile.chrome.NavigationBar; NavigationBar;
- import org.apache.flex.mobile.chrome.TabBar; TabBar;
- import org.apache.flex.mobile.chrome.ToolBar; ToolBar;
- import org.apache.flex.mobile.models.ViewManagerModel; ViewManagerModel;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/cordova/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/cordova/Application.as b/frameworks/projects/Mobile/as/src/org/apache/cordova/Application.as
deleted file mode 100644
index c19f26a..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/cordova/Application.as
+++ /dev/null
@@ -1,56 +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.cordova
-{
- import org.apache.flex.events.Event;
- import org.apache.flex.core.Application;
- import org.apache.flex.core.IFlexInfo;
-
- /**
- * Dispatched at startup after the initial view has been
- * put on the display list.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="deviceready", type="org.apache.flex.events.Event")]
-
- /**
- * A customized Application that dispatches the Cordova deviceReady event
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Application extends org.apache.flex.core.Application implements IFlexInfo
- {
- public function Application()
- {
- addEventListener("applicationComplete", appCompleteHandler);
- }
-
- private function appCompleteHandler(event:Event):void
- {
- dispatchEvent(new Event("deviceready"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/cordova/Weinre.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/cordova/Weinre.as b/frameworks/projects/Mobile/as/src/org/apache/cordova/Weinre.as
deleted file mode 100644
index 2e4b579..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/cordova/Weinre.as
+++ /dev/null
@@ -1,88 +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.cordova
-{
- COMPILE::AS3
- {
- import flash.net.URLRequest;
- import flash.net.navigateToURL;
- }
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IStrand;
-
- /**
- * A class that helps set up to use Weinre for debugging
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Weinre implements IBead
- {
- public function Weinre()
- {
- }
-
- 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;
- }
-
- /**
- * The guid to use at the Weinre server
- * http://debug.phonegap.com
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion HTMLScriptElement
- * @flexjsignorecoercion HTMLHeadElement
- */
- public function set guid(value:String):void
- {
- COMPILE::AS3
- {
- navigateToURL(new URLRequest("http://debug.phonegap.com/client/#" + value), "_blank");
- }
- COMPILE::JS
- {
- var scriptNode:HTMLScriptElement = document.createElement('SCRIPT') as HTMLScriptElement;
- scriptNode.type = 'text/javascript';
- scriptNode.src = 'http://debug.phonegap.com/target/target-script-min.js#' + value;
-
- var headNode:HTMLHeadElement = document.getElementsByTagName('HEAD') as HTMLHeadElement;
- if (headNode[0] != null)
- headNode[0].appendChild(scriptNode);
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/cordova/camera/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/cordova/camera/Camera.as b/frameworks/projects/Mobile/as/src/org/apache/cordova/camera/Camera.as
deleted file mode 100644
index faea7c0..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/cordova/camera/Camera.as
+++ /dev/null
@@ -1,179 +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.cordova.camera
-{
- COMPILE::AS3
- {
- import flash.display.BitmapData;
- import flash.display.DisplayObject;
- import flash.display.DisplayObjectContainer;
- import flash.display.Sprite;
- import flash.events.ActivityEvent;
- import flash.events.KeyboardEvent;
- import flash.events.MouseEvent;
- import flash.filesystem.File;
- import flash.filesystem.FileMode;
- import flash.filesystem.FileStream;
- import flash.geom.Rectangle;
- import flash.media.Camera;
- import flash.media.Video;
- import flash.ui.Keyboard;
- import flash.utils.ByteArray;
-
- import org.apache.flex.utils.PNGEncoder;
- }
-
- [Mixin]
- public class Camera
- {
- public static var DestinationType:Object = {
- DATA_URL : 0, // Return image as base64-encoded string
- FILE_URI : 1, // Return image file URI
- NATIVE_URI : 2 // Return image native URI (e.g., assets-library:// on iOS or content:// on Android)
- };
-
- public static var PictureSourceType:Object = {
- PHOTOLIBRARY : 0,
- CAMERA : 1,
- SAVEDPHOTOALBUM : 2
- };
-
- public static var EncodingType:Object = {
- JPEG : 0, // Return JPEG encoded image
- PNG : 1 // Return PNG encoded image
- };
-
- public static var MediaType:Object = {
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, WILL ALWAYS RETURN FILE_URI
- ALLMEDIA : 2 // allow selection from all media types
- };
-
- public static var Direction:Object = {
- BACK : 0, // Use the back-facing camera
- FRONT : 1 // Use the front-facing camera
- };
-
- COMPILE::AS3
- private static var root:DisplayObjectContainer;
-
- COMPILE::AS3
- public static function init(r:DisplayObjectContainer):void
- {
- root = r;
- }
-
- public function Camera()
- {
- pictureSourceType = org.apache.cordova.camera.Camera.PictureSourceType.PHOTOLIBRARY;
- destinationType = org.apache.cordova.camera.Camera.DestinationType.DATA_URL;
- mediaType = org.apache.cordova.camera.Camera.MediaType.PICTURE;
- encodingType = org.apache.cordova.camera.Camera.EncodingType.JPEG;
- direction = org.apache.cordova.camera.Camera.Direction.BACK;
- }
-
- public var pictureSourceType:int;
- public var destinationType:int;
- public var mediaType:int;
- public var encodingType:int;
- public var direction:int;
-
- private var cameraSuccess:Function;
- private var cameraError:Function;
- COMPILE::AS3
- private var ui:Sprite;
- COMPILE::AS3
- private var camera:flash.media.Camera;
-
- public function getPicture( cameraSuccess:Function, cameraError:Function, cameraOptions:Object ) : void
- {
- COMPILE::AS3
- {
- this.cameraSuccess = cameraSuccess;
- this.cameraError = cameraError;
-
- camera = flash.media.Camera.getCamera();
-
- if (camera != null) {
- ui = new Sprite();
- var video:Video = new Video(camera.width * 2, camera.height * 2);
- video.attachCamera(camera);
- ui.addChild(video);
- root.addChild(ui);
- ui.addEventListener(MouseEvent.CLICK, mouseClickHandler);
- ui.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
- } else {
- trace("You need a camera.");
- }
- }
- COMPILE::JS
- {
- // TODO: (aharui) Cordova externs
- navigator["camera"].getPicture(cameraSuccess, cameraError, cameraOptions);
- }
- }
-
- COMPILE::AS3
- private function mouseClickHandler(event:MouseEvent):void
- {
- savePicture();
- root.removeChild(ui);
- }
-
- COMPILE::AS3
- private function keyDownHandler(event:KeyboardEvent):void
- {
- if (event.keyCode == Keyboard.ESCAPE)
- root.removeChild(ui);
- else if (event.keyCode == Keyboard.ENTER || event.keyCode == Keyboard.SPACE)
- {
- savePicture();
- root.removeChild(ui);
- }
- }
-
- COMPILE::AS3
- private function savePicture():void
- {
- var f:File = File.createTempFile();
- var bd:BitmapData = new BitmapData(camera.width, camera.height, false);
- var pix:ByteArray = new ByteArray();
- var rect:Rectangle = new Rectangle(0, 0, camera.width, camera.height);
- camera.copyToByteArray(rect, pix);
- pix.position = 0;
- bd.setPixels(rect, pix);
- var png:PNGEncoder = new PNGEncoder();
- var ba:ByteArray = png.encode(bd);
- var fs:FileStream = new FileStream();
- fs.open(f, FileMode.WRITE);
- fs.writeBytes(ba);
- fs.close();
- cameraSuccess(f.url);
- }
-
- public function cleanup( cameraSuccess:Function, cameraError:Function ) : void
- {
- // no cleanup required in Flash
- COMPILE::JS
- {
- navigator["camera"].cleanup();
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IView.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IView.as
deleted file mode 100644
index 232d212..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IView.as
+++ /dev/null
@@ -1,43 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- /**
- * The IView interface is implemented by any class that can be managed by
- * an IViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IView
- {
- /**
- * The parent view manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get viewManager():IViewManager;
- function set viewManager(value:IViewManager):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IViewManager.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IViewManager.as
deleted file mode 100644
index 54bb22a..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/IViewManager.as
+++ /dev/null
@@ -1,42 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- /**
- * The IViewManager interface is implemented by classes that manage or control
- * IViews.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IViewManager extends IView
- {
- /**
- * The view that is currently active in the view manager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedView():IView;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ManagerBase.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ManagerBase.as
deleted file mode 100644
index 5c2e149..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ManagerBase.as
+++ /dev/null
@@ -1,184 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- import org.apache.flex.core.IChrome;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- /**
- * The ManagerBase is a base class for mobile display managers such as StackedViewManager
- * and TabbedViewManager. This class encapsulates the features common to all view
- * managers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ManagerBase extends UIBase
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ManagerBase()
- {
- super();
-
- _contentArea = new UIBase();
-
- COMPILE::AS3 {
- addEventListener("initComplete", handleInitComplete);
- addEventListener("sizeChanged", handleInitComplete);
- addEventListener("widthChanged", handleInitComplete);
- addEventListener("heightChanged", handleInitComplete);
- }
-
- COMPILE::JS {
- createElement();
- }
-
- super.addElement(_contentArea,false);
- }
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- COMPILE::JS
- override protected function createElement():WrappedHTMLElement
- {
- super.createElement();
- element.className = 'ManagerBase';
-
- _contentArea.positioner.style['width'] = '100%';
- _contentArea.positioner.style['height'] = '100%';
-
- return element;
- }
-
- private function handleInitComplete(event:Event):void
- {
- _contentArea.setWidthAndHeight(width, height, true);
- // todo: listen for changes to this item
-
- var num:Number = UIBase(_contentArea).numElements;
- for (var i:int = 0; i < num; i++) {
- var child:UIBase = UIBase(_contentArea).getElementAt(i) as UIBase;
- child.setWidthAndHeight(width, height);
- }
- }
-
- private var _contentArea:UIBase;
-
- /**
- * The contentArea of a view manager is where the child elements are placed. Areas outside
- * of the contentArea are chrome (identified by implementing IChrome).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get contentArea():UIBase
- {
- return _contentArea;
- }
-
- /**
- * Adds elements to the view manager. If an element implements IChrome it is placed
- * in the chrome area otherwise it is placed in the contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function addElement(c:Object, dispatchEvent:Boolean=true):void
- {
- if (c is IChrome) {
- super.addElementAt(c,0,dispatchEvent);
- }
- else {
- _contentArea.addElement(c, dispatchEvent);
-// (c as UIBase).setWidthAndHeight(_contentArea.width, _contentArea.height, false);
-// (c as UIBase).width = _contentArea.width;
-// (c as UIBase).height = _contentArea.height;
- }
- }
-
- /**
- * @private.
- */
- override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean=true):void
- {
- if (c is IChrome) {
- super.addElementAt(c, index, dispatchEvent);
- }
- else {
- _contentArea.addElement(c, dispatchEvent);
- }
- }
-
- /**
- * @private
- */
- override public function removeElement(c:Object, dispatchEvent:Boolean=true):void
- {
- if (c is IChrome) {
- super.removeElement(c, dispatchEvent);
- }
- else {
- _contentArea.removeElement(c, dispatchEvent);
- }
- }
-
- /**
- * @private
- */
- override public function getElementAt(index:int):Object
- {
- return _contentArea.getElementAt(index);
- }
-
- /**
- * @private
- */
- override public function getElementIndex(c:Object):int
- {
- return _contentArea.getElementIndex(c);
- }
-
- /**
- * @private
- */
- override public function get numElements():int
- {
- return _contentArea.numElements;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/StackedViewManager.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/StackedViewManager.as
deleted file mode 100644
index 4b29d28..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/StackedViewManager.as
+++ /dev/null
@@ -1,161 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Container;
- import org.apache.flex.mobile.IView;
- import org.apache.flex.mobile.IViewManager;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.ToolBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The StackedViewManager displays a single View at a time from a
- * collection of Views where views[0] is at the bottom and views[n-1]
- * is at the top and displayed.
- *
- * The StackedViewManager has an optional navigation bar at the top
- * and an optional tool bar at the bottom. The views are displayed
- * within the StackedViewManager's content area.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class StackedViewManager extends ViewManagerBase implements IViewManager
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StackedViewManager()
- {
- super();
-
- className = "StackedViewManager";
- }
-
- /**
- * True if this view manager is displaying a ToolBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get hasToolBar():Boolean
- {
- return ViewManagerModel(model).toolBarItems != null;
- }
-
- /**
- * The contents of the ToolBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBarItems():Array
- {
- return ViewManagerModel(model).toolBarItems;
- }
- public function set toolBarItems(value:Array):void
- {
- ViewManagerModel(model).toolBarItems = value;
- }
-
- /**
- * The ToolBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBar():ToolBar
- {
- return ViewManagerModel(model).toolBar;
- }
-
-
- private var _topView:IView;
-
- /**
- * The top-most (current) view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function get selectedView():IView
- {
- return _topView;
- }
-
-
- /**
- * Pushes the next view onto the navigation stack.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function push(nextView:IView):void
- {
- nextView.viewManager = this;
- ViewManagerModel(model).pushView(nextView);
-
- removeElement(_topView);
- _topView = nextView;
- addElement(_topView);
-
- dispatchEvent( new Event("viewChanged") );
- }
-
- /**
- * Pops the top-most view from the navigation stack.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function pop():void
- {
- if (ViewManagerModel(model).views.length > 1) {
- var lastView:Object = ViewManagerModel(model).popView();
- removeElement(_topView);
- addElement(lastView);
- _topView = lastView as IView;
-
- dispatchEvent( new Event("viewChanged") );
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/TabbedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/TabbedViewManager.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/TabbedViewManager.as
deleted file mode 100644
index 43fc6a6..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/TabbedViewManager.as
+++ /dev/null
@@ -1,85 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- import org.apache.flex.html.Container;
- import org.apache.flex.mobile.IView;
- import org.apache.flex.mobile.IViewManager;
- import org.apache.flex.mobile.chrome.TabBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The TabbedViewManager displays a set of views, only one of which is active at
- * a time. The other views are reachable via a set of tab buttons at the bottom of
- * the view manager's space.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TabbedViewManager extends ViewManagerBase implements IViewManager
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function TabbedViewManager()
- {
- super();
-
- className = "TabbedViewManager";
- }
-
- /**
- * The TabBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get tabBar():TabBar
- {
- return ViewManagerModel(model).tabBar;
- }
-
- /**
- * The index (starting at zero) of the currently visible view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedIndex():Number
- {
- return ViewManagerModel(model).selectedIndex;
- }
- public function set selectedIndex(value:Number):void
- {
- ViewManagerModel(model).selectedIndex = value;
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/View.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/View.as
deleted file mode 100644
index 490d8bf..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/View.as
+++ /dev/null
@@ -1,103 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IBeadController;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.html.Container;
-
- /**
- * The View class represents the area for a mobile app's primary
- * interface elements.
- */
- public class View extends Container implements IView
- {
- public function View()
- {
- super();
-
- // views always take up 100% of their space
- percentWidth = 100;
- percentHeight = 100;
- }
-
- private var _title:String;
- public function get title():String
- {
- return _title;
- }
- public function set title(value:String):void
- {
- _title = value;
- }
-
- COMPILE::AS3
- override public function toString():String
- {
- return _title;
- }
-
- COMPILE::JS
- public function toString():String
- {
- return _title;
- }
-
- private var _viewManager:IViewManager;
- public function get viewManager():IViewManager
- {
- return _viewManager;
- }
- public function set viewManager(value:IViewManager):void
- {
- _viewManager = value;
- }
-
- private var _controller:IBeadController;
-
- /**
- * Get the controller for the view.
- *
- * @flexjsignorecoercion Class
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get controller():IBeadController
- {
- if (_controller == null) {
- _controller = getBeadByType(IBeadController) as IBeadController;
- if (_controller == null) {
- var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- _controller = new c() as IBeadController;
- addBead(_controller);
- }
- }
- return _controller;
- }
- public function set controller(value:IBeadController):void
- {
- _controller = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ViewManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ViewManagerBase.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ViewManagerBase.as
deleted file mode 100644
index 0da3f4d..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/ViewManagerBase.as
+++ /dev/null
@@ -1,236 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile
-{
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Container;
- import org.apache.flex.mobile.IView;
- import org.apache.flex.mobile.IViewManager;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
-// import org.apache.flex.html.beads.SolidBackgroundBead;
-// import org.apache.flex.html.beads.SingleLineBorderBead;
-
- /**
- * Event dispatched when the current (selected) view changes.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="viewChanged")]
-
- /**
- * Base class for mobile navigation controls.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ViewManagerBase extends UIBase implements IViewManager
- {
- /**
- * Constructor.
- */
- public function ViewManagerBase()
- {
- super();
-
- // views always fill their space
- percentWidth = 100;
- percentHeight = 100;
-
- model.addEventListener("selectedIndexChanged", changeView);
-
-// addBead(new SolidBackgroundBead());
-// addBead(new SingleLineBorderBead());
- }
-
- /**
- * A title that can be used in the NavigationBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get title():String
- {
- return ViewManagerModel(model).title;
- }
- public function set title(value:String):void
- {
- ViewManagerModel(model).title = value;
- }
-
- COMPILE::AS3
- override public function toString():String
- {
- return ViewManagerModel(model).title;
- }
-
- /**
- * @private
- */
- COMPILE::JS
- public function toString():String
- {
- return ViewManagerModel(model).title;
- }
-
- /**
- * True if this view manager instance is displaying a NavigationBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get hasNavigationBar():Boolean
- {
- return ViewManagerModel(model).navigationBarItems != null;
- }
-
- /**
- * The items that make up the NavigationBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBarItems():Array
- {
- return ViewManagerModel(model).navigationBarItems;
- }
- public function set navigationBarItems(value:Array):void
- {
- ViewManagerModel(model).navigationBarItems = value;
- }
-
- /**
- * The NavigationBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBar():NavigationBar
- {
- return ViewManagerModel(model).navigationBar;
- }
-
- /**
- * The current set of views in the stack. The last entry is
- * the top-most (visible) view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get views():Array
- {
- return ViewManagerModel(model).views;
- }
- public function set views(value:Array):void
- {
- ViewManagerModel(model).views = value;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- var n:int = ViewManagerModel(model).views.length;
- if (n > 0) {
- for (var i:int = 0; i < n; i++)
- {
- var view:IView = ViewManagerModel(model).views[i] as IView;
- view.viewManager = this;
- if (i == 0) {
- addElement(view, true);
- }
- }
- ViewManagerModel(model).selectedIndex = 0;
- }
- }
-
- /**
- * @private
- */
- private function changeView( event:Event ):void
- {
- var index:Number = ViewManagerModel(model).selectedIndex;
- if (_currentView) {
- removeElement(_currentView);
- }
- _currentView = views[index];
- addElement(_currentView);
-
- dispatchEvent( new Event("viewChanged") );
- }
-
- private var _currentView:IView;
-
- /**
- * The currently visible view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedView():IView
- {
- return _currentView;
- }
-
- /**
- * IViewManager
- */
-
- private var _viewManager:IViewManager;
-
- /**
- * This view manager's parent view manager, if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get viewManager():IViewManager
- {
- return _viewManager;
- }
- public function set viewManager(value:IViewManager):void
- {
- _viewManager = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/StackedViewManagerView.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
deleted file mode 100644
index fd1a58b..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/StackedViewManagerView.as
+++ /dev/null
@@ -1,127 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.beads
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IViewportModel;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.ContainerView;
- import org.apache.flex.html.beads.layouts.HorizontalLayout;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.ToolBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The StackedViewManagerView creates the visual elements of the StackedViewManager. This
- * includes a NavigationBar, ToolBar, and contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class StackedViewManagerView extends ViewManagerView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StackedViewManagerView()
- {
- super();
- }
-
- private var _toolBar:ToolBar;
-
- override public function set strand(value:IStrand):void
- {
- var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (model.toolBarItems)
- {
- _toolBar = new ToolBar();
- _toolBar.controls = model.toolBarItems;
- _toolBar.addBead(new HorizontalLayout());
- UIBase(value).addElement(_toolBar,false);
- }
-
- super.strand = value;
- }
- override public function get strand():IStrand
- {
- return super.strand;
- }
-
- /**
- * @private
- */
- override protected function layoutChromeElements():void
- {
- var host:UIBase = strand as UIBase;
- var contentAreaY:Number = 0;
- var contentAreaHeight:Number = host.height;
- var toolbarHeight:Number = _toolBar == null ? 0 : _toolBar.height;
-
- var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (navigationBar)
- {
- navigationBar.x = 0;
- navigationBar.y = 0;
- navigationBar.width = host.width;
-
- contentAreaHeight -= navigationBar.height;
- contentAreaY = navigationBar.height;
-
- model.navigationBar = navigationBar;
- }
-
- if (_toolBar)
- {
- _toolBar.x = 0;
- _toolBar.y = host.height - toolbarHeight;
- _toolBar.width = host.width;
-
- contentAreaHeight -= toolbarHeight;
-
- model.toolBar = _toolBar;
- }
-
- if (contentAreaY < 0) contentAreaY = 0;
- if (contentAreaHeight < 0) contentAreaHeight = 0;
-
- model.contentX = 0;
- model.contentY = contentAreaY;
- model.contentWidth = host.width;
- model.contentHeight = contentAreaHeight;
-
- sizeViewsToFitContentArea();
-
- // notify the views that the content size has changed
- IEventDispatcher(strand).dispatchEvent( new Event("contentSizeChanged") );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
deleted file mode 100644
index be20d2c..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/TabbedViewManagerView.as
+++ /dev/null
@@ -1,139 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.beads
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IViewportModel;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.ContainerView;
- import org.apache.flex.html.beads.layouts.HorizontalLayout;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.TabBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The TabbedViewManagerView constructs the visual elements of the TabbedViewManager. The
- * elements may be a navigation bar, a tab bar, and the contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TabbedViewManagerView extends ViewManagerView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function TabbedViewManagerView()
- {
- super();
- }
-
- private var _tabBar:TabBar;
-
- private var _strand:IStrand;
- override public function get strand():IStrand
- {
- return _strand;
- }
- override public function set strand(value:IStrand):void
- {
- _strand = value;
-
- var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
-
- // TabbedViewManager always has a TabBar
- _tabBar = new TabBar();
- _tabBar.dataProvider = model.views;
- _tabBar.labelField = "title";
- _tabBar.addEventListener("change",handleButtonBarChange);
- UIBase(_strand).addElement(_tabBar, false);
-
- super.strand = value;
- }
-
- /**
- * @private
- */
- private function handleButtonBarChange(event:Event):void
- {
- var newIndex:Number = _tabBar.selectedIndex;
- var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- // doing this will trigger the selectedIndexChanged event which will
- // tell the strand to switch views
- model.selectedIndex = newIndex;
- }
-
- /**
- * @private
- */
- override protected function layoutChromeElements():void
- {
- var host:UIBase = _strand as UIBase;
- var contentAreaY:Number = 0;
- var contentAreaHeight:Number = host.height;
-
- var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (navigationBar)
- {
- navigationBar.x = 0;
- navigationBar.y = 0;
- navigationBar.width = host.width;
-
- contentAreaHeight -= navigationBar.height;
- contentAreaY = navigationBar.height;
-
- model.navigationBar = navigationBar;
- }
-
- if (_tabBar)
- {
- _tabBar.x = 0;
- _tabBar.y = host.height - _tabBar.height;
- _tabBar.width = host.width;
- _tabBar.dispatchEvent(new Event("layoutNeeded"));
-
- contentAreaHeight -= _tabBar.height;
-
- model.tabBar = _tabBar;
- }
-
- model.contentX = 0;
- model.contentY = contentAreaY;
- model.contentWidth = host.width;
- model.contentHeight = contentAreaHeight;
-
- sizeViewsToFitContentArea();
-
- // notify the views that the content size has changed
- IEventDispatcher(strand).dispatchEvent( new Event("contentSizeChanged") );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/ViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/ViewManagerView.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/ViewManagerView.as
deleted file mode 100644
index 59baf94..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/beads/ViewManagerView.as
+++ /dev/null
@@ -1,165 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.beads
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.IViewportModel;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Container;
- import org.apache.flex.html.beads.layouts.HorizontalLayout;
- import org.apache.flex.mobile.IView;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.models.ViewManagerModel;
-
- /**
- * The ViewManagerView creates the visual elements of the StackedViewManager. This
- * includes a NavigationBar, ToolBar, and contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ViewManagerView implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ViewManagerView()
- {
- super();
- }
-
- public function get host():IUIBase
- {
- return _strand as IUIBase;
- }
- public function set host(value:IUIBase):void
- {
- // not implemented; getter only.
- }
-
- private var _navigationBar:NavigationBar;
- public function get navigationBar():NavigationBar
- {
- return _navigationBar;
- }
- public function set navigationBar(value:NavigationBar):void
- {
- // not implemented; getter only.
- }
-
- private var _strand:IStrand;
- public function get strand():IStrand
- {
- return _strand;
- }
- public function set strand(value:IStrand):void
- {
- _strand = value;
- UIBase(_strand).addEventListener("sizeChanged", sizeChangedHandler);
- UIBase(_strand).addEventListener("widthChanged", sizeChangedHandler);
- UIBase(_strand).addEventListener("heightChanged", sizeChangedHandler);
-
- var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
- model.addEventListener("selectedIndexChanged", viewsChangedHandler);
-
- if (model.navigationBarItems)
- {
- _navigationBar = new NavigationBar();
- _navigationBar.controls = model.navigationBarItems;
- _navigationBar.addBead(new HorizontalLayout());
- UIBase(_strand).addElement(_navigationBar, false);
- }
- }
-
- /**
- * @private
- */
- protected function viewsChangedHandler(event:Event):void
- {
- layoutChromeElements();
- }
-
- /**
- * @private
- */
- protected function sizeChangedHandler(event:Event):void
- {
- layoutChromeElements();
- }
-
- /**
- * @private
- */
- protected function layoutChromeElements():void
- {
- var host:UIBase = _strand as UIBase;
- var contentAreaY:Number = 0;
- var contentAreaHeight:Number = host.height;
-
- var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- if (_navigationBar)
- {
- _navigationBar.x = 0;
- _navigationBar.y = 0;
- _navigationBar.width = host.width;
-
- contentAreaHeight -= _navigationBar.height;
- contentAreaY = _navigationBar.height;
-
- model.navigationBar = _navigationBar;
- }
-
- model.contentX = 0;
- model.contentY = contentAreaY;
- model.contentWidth = host.width;
- model.contentHeight = contentAreaHeight;
-
- sizeViewsToFitContentArea();
- }
-
- protected function sizeViewsToFitContentArea():void
- {
- var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
-
- var n:int = ViewManagerModel(model).views.length;
- if (n > 0) {
- for (var i:int = 0; i < n; i++)
- {
- var view:IView = ViewManagerModel(model).views[i] as IView;
- UIBase(view).x = model.contentX;
- UIBase(view).y = model.contentY;
- UIBase(view).setWidthAndHeight(model.contentWidth, model.contentHeight, true);
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/NavigationBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/NavigationBar.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/NavigationBar.as
deleted file mode 100644
index 5e7873e..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/NavigationBar.as
+++ /dev/null
@@ -1,103 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.chrome
-{
- import org.apache.flex.core.IChrome;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.html.Container;
-
- /**
- * The NavigationBar class is part of the mobile view manager's chrome. When present,
- * it provides a place for content at the top of the view, above the contentArea.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class NavigationBar extends Container implements IChrome
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function NavigationBar()
- {
- super();
-
- className = "NavigationBar";
- }
-
- public function hidesBackButton(value:Boolean):void
- {
-
- }
-
- private var _controls:Array;
-
- /**
- * The controls of the NavigationBar (eg, a button to go back and a title).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set controls(value:Array):void
- {
- _controls = value;
- }
- public function get controls():Array
- {
- return _controls;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- for (var i:int=0; i < _controls.length; i++)
- {
- addElement( _controls[i], false );
-
- var ctrl:IEventDispatcher = _controls[i] as IEventDispatcher;
- ctrl.addEventListener("show", handleVisibilityChange);
- ctrl.addEventListener("hide", handleVisibilityChange);
- }
-
- dispatchEvent(new Event("layoutNeeded"));
- }
-
- /**
- * @private
- */
- private function handleVisibilityChange(event:Event):void
- {
- dispatchEvent(new Event("layoutNeeded"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/TabBar.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/TabBar.as
deleted file mode 100644
index 6e54326..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/TabBar.as
+++ /dev/null
@@ -1,50 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.chrome
-{
- import org.apache.flex.core.IChrome;
- import org.apache.flex.html.ButtonBar;
-
- /**
- * The TabBar class displays a set of buttons that can be used to
- * switch between navigation panels.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TabBar extends ButtonBar implements IChrome
- {
- /**
- * Constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function TabBar()
- {
- super();
-
- className = "TabBar";
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/ToolBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/ToolBar.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/ToolBar.as
deleted file mode 100644
index af63d49..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/chrome/ToolBar.as
+++ /dev/null
@@ -1,80 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.chrome
-{
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IChrome;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Container;
-
- /**
- * The ToolBar class provides a space below the contentArea of a view manager which can
- * be used to house controls for the view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ToolBar extends Container implements IChrome
- {
- public function ToolBar()
- {
- super();
-
- className = "ToolBar";
- }
-
- private var _controls:Array;
-
- /**
- * The control components of the ToolBar (eg, a settings button).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set controls(value:Array):void
- {
- _controls = value;
- }
- public function get controls():Array
- {
- return _controls;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
-
- var layout:IBeadLayout = this.getBeadByType(IBeadLayout) as IBeadLayout;
-
- for (var i:int=0; i < _controls.length; i++)
- {
- addElement( _controls[i], false );
- }
-
- dispatchEvent(new Event("layoutNeeded"));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/models/ViewManagerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/models/ViewManagerModel.as b/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/models/ViewManagerModel.as
deleted file mode 100644
index c57cc61..0000000
--- a/frameworks/projects/Mobile/as/src/org/apache/flex/mobile/models/ViewManagerModel.as
+++ /dev/null
@@ -1,263 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.mobile.models
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.mobile.chrome.NavigationBar;
- import org.apache.flex.mobile.chrome.TabBar;
- import org.apache.flex.mobile.chrome.ToolBar;
-
- /**
- * The ViewManagerModel houses properties and values common to the components
- * which make up view managers. These properties include the title, which view
- * is currently active and selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ViewManagerModel extends EventDispatcher implements IBeadModel
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ViewManagerModel()
- {
- super();
-
- _views = new Array();
- }
-
- private var _strand:IStrand;
-
- public function set strand(value:IStrand):void
- {
- _strand = value;
- }
-
- public var contentX:Number = 0;
- public var contentY:Number = 0;
- public var contentWidth:Number = 0;
- public var contentHeight:Number = 0;
-
- private var _views:Array;
-
- /**
- * The array of views displayed in the contentArea of the ViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get views():Array
- {
- return _views;
- }
- public function set views(value:Array):void
- {
- if (value != _views) {
- _views = value;
- _selectedIndex = value.length - 1;
- dispatchEvent(new Event("viewsChanged"));
- }
- }
-
- /**
- * Pushes a view onto the top/end of the stack of views. This view becomes
- * the active view. Mostly used by the StackedViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function pushView(value:Object):void
- {
- _views.push(value);
- _selectedIndex = _views.length - 1;
- dispatchEvent(new Event("viewPushed"));
- }
-
- /**
- * Removes the most recently added view. The next view in the stack becomes the
- * active view. Mostly used by StackedViewManager.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function popView():Object
- {
- if (_views.length > 1) {
- var discard:Object = _views.pop();
- _selectedIndex = _views.length - 1;
- dispatchEvent(new Event("viewPopped"));
- }
- return _views[_views.length-1];
- }
-
- private var _selectedIndex:Number = -1;
-
- /**
- * The index into the views array of the currently active view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedIndex():Number
- {
- return _selectedIndex;
- }
- public function set selectedIndex(value:Number):void
- {
- if (value != _selectedIndex) {
- _selectedIndex = value;
- dispatchEvent(new Event("selectedIndexChanged"));
- }
- }
-
- private var _title:String;
-
- /**
- * The title of the view..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get title():String
- {
- return _title;
- }
- public function set title(value:String):void
- {
- _title = value;
- }
-
- private var _navigationBarItems:Array;
-
- /**
- * The array of controls that make up the NavigationBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBarItems():Array
- {
- return _navigationBarItems;
- }
- public function set navigationBarItems(value:Array):void
- {
- _navigationBarItems = value;
- }
-
- private var _navigationBar:NavigationBar;
-
- /**
- * The NavigationBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get navigationBar():NavigationBar
- {
- return _navigationBar;
- }
- public function set navigationBar(value:NavigationBar):void
- {
- _navigationBar = value;
- }
-
- private var _toolBarItems:Array;
-
- /**
- * The array of controls that make up the ToolBar..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBarItems():Array
- {
- return _toolBarItems;
- }
- public function set toolBarItems(value:Array):void
- {
- _toolBarItems = value;
- }
-
- private var _toolBar:ToolBar;
-
- /**
- * The ToolBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get toolBar():ToolBar
- {
- return _toolBar;
- }
- public function set toolBar(value:ToolBar):void
- {
- _toolBar = value;
- }
-
- private var _tabBar:TabBar;
-
- /**
- * The TabBar (or null if not present).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get tabBar():TabBar
- {
- return _tabBar;
- }
- public function set tabBar(value:TabBar):void
- {
- _tabBar = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/basic-manifest.xml b/frameworks/projects/Mobile/basic-manifest.xml
deleted file mode 100644
index 4f54235..0000000
--- a/frameworks/projects/Mobile/basic-manifest.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
- <component id="StackedViewManager" class="org.apache.flex.mobile.StackedViewManager" />
- <component id="TabbedViewManager" class="org.apache.flex.mobile.TabbedViewManager" />
- <component id="View" class="org.apache.flex.mobile.View" />
- <component id="NavigationBar" class="org.apache.flex.mobile.chrome.NavigationBar" />
- <component id="ToolBar" class="org.apache.flex.mobile.chrome.ToolBar" />
- <component id="TabBar" class="org.apache.flex.mobile.chrome.TabBar" />
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/compile-asjs-config.xml b/frameworks/projects/Mobile/compile-asjs-config.xml
deleted file mode 100644
index ba49185..0000000
--- a/frameworks/projects/Mobile/compile-asjs-config.xml
+++ /dev/null
@@ -1,89 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/Graphics.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>cordova-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- </include-sources>
-
- <include-classes>
- <class>MobileClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <uri>library://ns.apache.org/flexjs/cordova</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
[14/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Flat
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as
new file mode 100644
index 0000000..38583f6
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CSSScrollBarView.as
@@ -0,0 +1,241 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat.beads
+{
+ import flash.display.DisplayObject;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IScrollBarModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.Strand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.Button;
+ import org.apache.flex.html.beads.controllers.ButtonAutoRepeatController;
+ import org.apache.flex.html.beads.IScrollBarView;
+
+ /**
+ * The ScrollBarView class is the default view for
+ * the org.apache.flex.html.supportClasses.ScrollBar class.
+ * It implements the classic desktop-like ScrollBar.
+ * A different view would implement more modern scrollbars that hide themselves
+ * until hovered over with the mouse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSScrollBarView extends Strand implements IBeadView, IStrand, IScrollBarView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSScrollBarView()
+ {
+ }
+
+ private var sbModel:IScrollBarModel;
+
+ private var _strand:IStrand;
+
+ /**
+ * The layout.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ private var layout:IBeadLayout;
+
+ /**
+ * The host component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get host():IUIBase
+ {
+ return _strand as IUIBase;
+ }
+
+ /**
+ * @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;
+
+ for each (var bead:IBead in beads)
+ addBead(bead);
+
+ sbModel = value.getBeadByType(IScrollBarModel) as IScrollBarModel;
+ sbModel = _strand.getBeadByType(IScrollBarModel) as IScrollBarModel;
+ sbModel.addEventListener("maximumChange", changeHandler);
+ sbModel.addEventListener("minimumChange", changeHandler);
+ sbModel.addEventListener("snapIntervalChange", changeHandler);
+ sbModel.addEventListener("stepSizeChange", changeHandler);
+ sbModel.addEventListener("pageSizeChange", changeHandler);
+ sbModel.addEventListener("valueChange", changeHandler);
+
+ // TODO: (aharui) put in values impl
+ _increment = new Button();
+ Button(_increment).className = "vscrollbar-downarrow-btn";
+ var sbView:CSSScrollBarButtonView = new CSSScrollBarButtonView();
+ sbView.upArrowShape.className = "vscrollbar-downarrow";
+ sbView.downArrowShape.className = "vscrollbar-downarrow";
+ sbView.overArrowShape.className = "vscrollbar-downarrow";
+ Button(_increment).addBead(sbView);
+ Button(_increment).addBead(new ButtonAutoRepeatController());
+ _decrement = new Button();
+ Button(_decrement).className = "vscrollbar-uparrow-btn";
+ sbView = new CSSScrollBarButtonView();
+ sbView.upArrowShape.className = "vscrollbar-uparrow";
+ sbView.downArrowShape.className = "vscrollbar-uparrow";
+ sbView.overArrowShape.className = "vscrollbar-uparrow";
+ Button(_decrement).addBead(sbView);
+ Button(_decrement).addBead(new ButtonAutoRepeatController());
+ _track = new Button();
+ Button(_track).className = "vscrollbar-track";
+ _thumb = new Button();
+ Button(_thumb).className = "vscrollbar-thumb";
+
+ UIBase(value).addElement(_decrement);
+ UIBase(value).addElement(_increment);
+ UIBase(value).addElement(_track);
+ UIBase(value).addElement(_thumb);
+
+ IEventDispatcher(_strand).addEventListener("heightChanged", changeHandler);
+
+ if( _strand.getBeadByType(IBeadLayout) == null ) {
+ layout = new (ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout")) as IBeadLayout;
+ _strand.addBead(layout);
+ }
+ layout.layout();
+ }
+
+ private function changeHandler(event:Event):void
+ {
+ layout.layout();
+ }
+
+ private var _decrement:DisplayObject;
+ private var _increment:DisplayObject;
+ private var _track:DisplayObject;
+ private var _thumb:DisplayObject;
+
+ /**
+ * @copy org.apache.flex.html.beads.IScrollBarView#decrement
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get decrement():DisplayObject
+ {
+ return _decrement;
+ }
+
+ /**
+ * @copy org.apache.flex.html.beads.IScrollBarView#increment
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get increment():DisplayObject
+ {
+ return _increment;
+ }
+
+ /**
+ * @copy org.apache.flex.html.beads.IScrollBarView#track
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get track():DisplayObject
+ {
+ return _track;
+ }
+
+ /**
+ * @copy org.apache.flex.html.beads.IScrollBarView#thumb
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get thumb():DisplayObject
+ {
+ return _thumb;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IBeadView#viewHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get viewHeight():Number
+ {
+ // don't want to put $height in an interface
+ return _strand["$height"];
+ }
+
+ /**
+ * @copy org.apache.flex.core.IBeadView#viewWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get viewWidth():Number
+ {
+ // don't want to put $width in an interface
+ return _strand["$width"];
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
new file mode 100644
index 0000000..e52076f
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.flat.beads
+{
+
+ /**
+ * The CheckboxCSSContentAndTextToggleButtonView class is the default view for
+ * the org.apache.flex.flat.Checkbox class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CheckboxCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CheckboxCSSContentAndTextToggleButtonView()
+ {
+ super();
+
+ className = "checkbox-icon";
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as
new file mode 100644
index 0000000..f7357b9
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/DropDownListView.as
@@ -0,0 +1,309 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.flat.beads
+{
+ import flash.display.DisplayObject;
+ import flash.display.DisplayObjectContainer;
+ import flash.display.Graphics;
+ import flash.display.Shape;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.CSSShape;
+ import org.apache.flex.core.CSSSprite;
+ import org.apache.flex.core.CSSTextField;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.ILayoutChild;
+ import org.apache.flex.core.IPopUpHost;
+ import org.apache.flex.core.ISelectionModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.beads.IDropDownListView;
+ import org.apache.flex.utils.CSSUtils;
+
+ /**
+ * The DropDownListView class is the default view for
+ * the org.apache.flex.flat.DropDownList class.
+ * It displays a simple text label with what appears to be a
+ * down arrow button on the right, but really, the entire
+ * view is the button that will display or dismiss the dropdown.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DropDownListView extends BeadViewBase implements IDropDownListView, IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropDownListView()
+ {
+ upSprite = new CSSSprite();
+ upSprite.className = 'dropdown-toggle-open-btn';
+ downSprite = new CSSSprite();
+ downSprite.className = 'dropdown-toggle-open-btn';
+ overSprite = new CSSSprite();
+ overSprite.className = 'dropdown-toggle-open-btn';
+ overSprite.state = 'hover';
+ upTextField = new CSSTextField();
+ downTextField = new CSSTextField();
+ overTextField = new CSSTextField();
+ upSprite.addChild(upTextField);
+ overSprite.addChild(overTextField);
+ downSprite.addChild(downTextField);
+ upTextField.selectable = false;
+ upTextField.parentDrawsBackground = true;
+ upTextField.parentHandlesPadding = true;
+ upTextField.type = TextFieldType.DYNAMIC;
+ downTextField.selectable = false;
+ downTextField.parentDrawsBackground = true;
+ downTextField.parentHandlesPadding = true;
+ downTextField.type = TextFieldType.DYNAMIC;
+ overTextField.selectable = false;
+ overTextField.parentDrawsBackground = true;
+ overTextField.parentHandlesPadding = true;
+ overTextField.type = TextFieldType.DYNAMIC;
+ // auto-size collapses if no text
+ //upTextField.autoSize = "left";
+ //downTextField.autoSize = "left";
+ //overTextField.autoSize = "left";
+
+ upArrows = new CSSShape();
+ upArrows.className = 'dropdown-caret';
+ overArrows = new CSSShape();
+ overArrows.className = 'dropdown-caret';
+ downArrows = new CSSShape();
+ downArrows.className = 'dropdown-caret';
+ upSprite.addChild(upArrows);
+ overSprite.addChild(overArrows);
+ downSprite.addChild(downArrows);
+
+ }
+
+
+ private var selectionModel:ISelectionModel;
+
+ private var shape:Shape;
+
+ /**
+ * @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;;
+ selectionModel = value.getBeadByType(ISelectionModel) as ISelectionModel;
+ selectionModel.addEventListener("selectedIndexChanged", selectionChangeHandler);
+ selectionModel.addEventListener("dataProviderChanged", selectionChangeHandler);
+ shape = new Shape();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, 10, 10);
+ shape.graphics.endFill();
+ SimpleButton(value).upState = upSprite;
+ SimpleButton(value).downState = downSprite;
+ SimpleButton(value).overState = overSprite;
+ SimpleButton(value).hitTestState = shape;
+ if (selectionModel.selectedIndex !== -1)
+ selectionChangeHandler(null);
+ else
+ text = "^W_";
+ upTextField.height = upTextField.textHeight + 4;
+ downTextField.height = downTextField.textHeight + 4;
+ overTextField.height = overTextField.textHeight + 4;
+ if (selectionModel.selectedIndex == -1)
+ text = "";
+
+ IEventDispatcher(value).addEventListener("heightChanged", changeHandler);
+ IEventDispatcher(value).addEventListener("widthChanged", changeHandler);
+ changeHandler(null);
+ }
+
+ private function selectionChangeHandler(event:Event):void
+ {
+ if (selectionModel.selectedItem == null)
+ text = "";
+ else if (selectionModel.labelField != null)
+ text = selectionModel.selectedItem[selectionModel.labelField].toString();
+ else
+ text = selectionModel.selectedItem.toString();
+ }
+
+ private function changeHandler(event:Event):void
+ {
+ var ww:Number = DisplayObject(_strand).width;
+ var hh:Number = DisplayObject(_strand).height;
+ var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
+ var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-left");
+ var paddingRight:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-right");
+ var paddingTop:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-top");
+ var paddingBottom:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-bottom");
+ var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, ww);
+ var pr:Number = CSSUtils.getRightValue(paddingRight, padding, ww);
+ var pt:Number = CSSUtils.getLeftValue(paddingTop, padding, hh);
+ var pb:Number = CSSUtils.getRightValue(paddingBottom, padding, hh);
+
+ upArrows.draw(0, 0);
+ overArrows.draw(0, 0);
+ downArrows.draw(0, 0);
+ if (ILayoutChild(_strand).isHeightSizedToContent() && text != "")
+ {
+ hh = upTextField.textHeight + pt + pb;
+ ILayoutChild(_strand).setHeight(hh, true);
+ }
+ upSprite.draw(ww, hh);
+ overSprite.draw(ww, hh);
+ downSprite.draw(ww, hh);
+
+ upArrows.x = ww - upArrows.width - pr;
+ overArrows.x = ww - overArrows.width - pr;
+ downArrows.x = ww - downArrows.width - pr;
+ upArrows.y = (hh - upArrows.height) / 2;
+ overArrows.y = (hh - overArrows.height) / 2;
+ downArrows.y = (hh - downArrows.height) / 2;
+
+ upTextField.width = upTextField.textWidth + 4;
+ downTextField.width = downTextField.textWidth + 4;
+ overTextField.width = overTextField.textWidth + 4;
+ upTextField.height = upTextField.textHeight + 5;
+ downTextField.height = downTextField.textHeight + 5;
+ overTextField.height = overTextField.textHeight + 5;
+ upTextField.y = (hh - upTextField.height) / 2;
+ downTextField.y = (hh - downTextField.height) / 2;
+ overTextField.y = (hh - overTextField.height) / 2;
+ upTextField.x = pl;
+ downTextField.x = pl;
+ overTextField.x = pl;
+ shape.graphics.clear();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, ww, hh);
+ shape.graphics.endFill();
+ }
+
+ private var upTextField:CSSTextField;
+ private var downTextField:CSSTextField;
+ private var overTextField:CSSTextField;
+ private var upSprite:CSSSprite;
+ private var downSprite:CSSSprite;
+ private var overSprite:CSSSprite;
+ private var upArrows:CSSShape;
+ private var downArrows:CSSShape;
+ private var overArrows:CSSShape;
+
+ /**
+ * The text that is displayed in the view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get text():String
+ {
+ return upTextField.text;
+ }
+
+ /**
+ * @private
+ */
+ public function set text(value:String):void
+ {
+ upTextField.text = value;
+ downTextField.text = value;
+ overTextField.text = value;
+ changeHandler(null);
+ }
+
+ private var _popUp:IStrand;
+
+ /**
+ * The dropdown/popup that displays the set of choices.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get popUp():IStrand
+ {
+ if (!_popUp)
+ {
+ var popUpClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iPopUp") as Class;
+ _popUp = new popUpClass() as IStrand;
+ }
+ return _popUp;
+ }
+
+ private var _popUpVisible:Boolean;
+
+ /**
+ * A flag that indicates whether the dropdown/popup is
+ * visible.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get popUpVisible():Boolean
+ {
+ return _popUpVisible;
+ }
+
+ /**
+ * @private
+ */
+ public function set popUpVisible(value:Boolean):void
+ {
+ if (value != _popUpVisible)
+ {
+ _popUpVisible = value;
+ if (value)
+ {
+ var root:Object = DisplayObject(_strand).root;
+ var host:DisplayObjectContainer = DisplayObject(_strand).parent;
+ while (host && !(host is IPopUpHost))
+ host = host.parent;
+ if (host)
+ IPopUpHost(host).addElement(popUp);
+ }
+ else
+ {
+ DisplayObject(_popUp).parent.removeChild(_popUp as DisplayObject);
+ }
+ }
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
new file mode 100644
index 0000000..e6e3ba5
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/beads/RadioCSSContentAndTextToggleButtonView.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.flat.beads
+{
+ /**
+ * The RadioCSSContentAndTextToggleButtonView class is the default view for
+ * the org.apache.flex.flat.RadioButton class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class RadioCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function RadioCSSContentAndTextToggleButtonView()
+ {
+ super();
+
+ className = "radio-icon";
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.as
new file mode 100644
index 0000000..f423d24
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListList.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.flat.supportClasses
+{
+ import org.apache.flex.core.IPopUp;
+ import org.apache.flex.html.SimpleList;
+ import org.apache.flex.html.beads.SolidBackgroundBead;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * @copy org.apache.flex.core.ISelectionModel#change
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="change", type="org.apache.flex.events.Event")]
+
+ /**
+ * The DropDownListList class is the List class used internally
+ * by DropDownList as the dropdown/popup.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DropDownListList extends SimpleList implements IPopUp
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropDownListList()
+ {
+ super();
+ className = "dropdown-menu";
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.as
new file mode 100644
index 0000000..3ab6a79
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/flex/org/apache/flex/flat/supportClasses/DropDownListStringItemRenderer.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.flat.supportClasses
+{
+ import flash.text.TextFieldAutoSize;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.CSSTextField;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.beads.ITextItemRenderer;
+ import org.apache.flex.html.supportClasses.StringItemRenderer;
+
+ /**
+ * The DropDownListStringItemRenderer is a StringItemRenderer with a particular
+ * className for use in DropDownList.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DropDownListStringItemRenderer extends StringItemRenderer
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DropDownListStringItemRenderer()
+ {
+ super();
+
+ className = 'dropdown-menu-item-renderer';
+ }
+
+ /**
+ * @private
+ */
+ override public function updateRenderer():void
+ {
+ className = selected ? 'dropdown-menu-item-renderer-selected' : 'dropdown-menu-item-renderer';
+ if (selected)
+ selectedColor = ValuesManager.valuesImpl.getValue(this, 'background-color');
+ if (hovered)
+ highlightColor = ValuesManager.valuesImpl.getValue(this, 'background-color', "hover");
+ downColor = selectedColor;
+ super.updateRenderer();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..a755d5c
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/resources/compile-asjs-config.xml
@@ -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.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+ <manifest>flat-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-classes>
+ <class>FlatClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/compile-config.xml b/frameworks/projects/Flat/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..44c7c9f
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/resources/compile-config.xml
@@ -0,0 +1,91 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Binding.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/Graphics.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+ <manifest>flat-manifest.xml</manifest>
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+ <manifest>flat-as-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ <!--<path-element>asjs/src</path-element>-->
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>FlatClasses</class>
+ <!--<class>FlatASJSClasses</class>-->
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/defaults.css b/frameworks/projects/Flat/src/main/resources/defaults.css
new file mode 100644
index 0000000..53a91f1
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/resources/defaults.css
@@ -0,0 +1,842 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace "library://ns.apache.org/flexjs/flat";
+
+@font-face {
+ font-family: 'Flat-UI-Icons';
+
+ src: url('fonts/flat-ui-icons-regular.eot');
+ src: url('fonts/flat-ui-icons-regular.eot?#iefix') format('embedded-opentype'), url('fonts/flat-ui-icons-regular.woff') format('woff'), url('fonts/flat-ui-icons-regular.ttf') format('truetype'), url('fonts/flat-ui-icons-regular.svg#flat-ui-icons-regular') format('svg');
+}
+
+/* Global style declaration */
+*
+{
+ font-family: "Arial";
+ font-size: 12px;
+ color: #34495e;
+}
+
+.flexjs *, . flexjs *:before, . flexjs *:after {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+Button
+{
+ color: #fff;
+ background-color: #1abc9c;
+ padding: 10px 15px;
+ font-size: 15px;
+ font-weight: normal;
+ line-height: 1.4;
+ border: none;
+ border-radius: 4px;
+ -webkit-transition: border .25s linear, color .25s linear, background-color .25s linear;
+ transition: border .25s linear, color .25s linear, background-color .25s linear;
+
+ -webkit-font-smoothing: subpixel-antialiased;
+}
+
+Button:hover
+{
+ border: none;
+ color: #fff;
+ background-color: #48c9b0;
+ border-color: #48c9b0;
+ padding: 10px 15px;
+}
+
+Button:active
+{
+ border: none;
+ padding: 10px 15px;
+ outline: none;
+ box-shadow: none;
+}
+
+ButtonBar
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ButtonBarView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer");
+
+ border-style: none;
+}
+
+ButtonBarButtonItemRenderer
+{
+ width: 80;
+ height: 30;
+}
+
+.checkbox-icon,
+.checkbox-icon-hover,
+.checkbox-icon-checked
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 20px;
+ height: 20px;
+ font-size: 20px;
+ line-height: 20px;
+ color: #bdc3c7;
+ text-align: center;
+ cursor: pointer;
+
+ /* .radio .icon-checked:before */
+ /* .radio .icon-unchecked:before */
+ font-family: 'Flat-UI-Icons';
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+ font-size: 20px;
+ line-height: 20px;
+}
+
+.checkbox-icon:before
+{
+ content: "\e60d";
+}
+
+.checkbox-icon-hover:before
+{
+ content: "\e60e";
+}
+
+.checkbox-icon-checked:before
+{
+ content: "\e60e";
+}
+
+.checkbox-icon-checked
+{
+ color: #1abc9c;
+}
+
+.checkbox-input
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 20px;
+ height: 20px;
+ padding: 0;
+ margin: 0;
+ outline: none !important;
+ opacity: 0;
+}
+
+CheckBox
+{
+ /* .checkbox */
+ position: relative;
+ padding-left: 32px;
+ margin-bottom: 12px;
+ font-size: 14px;
+ line-height: 1.5;
+ -webkit-transition: color .25s linear;
+ transition: color .25s linear;
+}
+
+Container
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
+}
+
+ControlBar
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
+
+ background-color: #CECECE;
+ border-style: solid;
+ border-color: #000000;
+ border-width: 1px;
+}
+
+/* ASJS */
+DataGrid
+{
+ IDataGridPresentationModel: ClassReference("org.apache.flex.html.beads.models.DataGridPresentationModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.DataGridView");
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataGridModel");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
+
+ background-color: #FFFFFF;
+ border-style: solid;
+ border-color: #222222;
+ border-width: 1px;
+}
+
+DateChooser {
+ IBeadView: ClassReference("org.apache.flex.html.beads.DateChooserView");
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateChooserMouseController");
+ width: 280px;
+ height: 240px;
+}
+
+DateField {
+ IBeadView: ClassReference("org.apache.flex.html.beads.DateFieldView");
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateFieldMouseController");
+ IFormatBead: ClassReference("org.apache.flex.html.accessories.DateFormatMMDDYYYYBead");
+}
+
+.dropdown-menu {
+ position: absolute;
+ z-index: 1000;
+ padding: 0;
+ margin-top: 9px;
+ font-size: 14px;
+ background-color: #f3f4f5;
+ border: none;
+ border-radius: 4px;
+ box-shadow: none;
+ list-style: none;
+ }
+.dropdown-menu-divider {
+ height: 2px;
+ margin: 3px 0;
+ overflow: hidden;
+ background-color: rgba(202, 206, 209, .5);
+ }
+.dropdown-menu-item-renderer {
+ padding: 3px 16px;
+ line-height: 1.429;
+ display: block;
+ width: 100%;
+ font-size: inherit;
+ color: #606d7a;
+ background-color: transparent;
+}
+.dropdown-menu-item-renderer-selected {
+ padding: 3px 16px;
+ line-height: 1.875;
+ font-size: inherit;
+ display: block;
+ width: 100%;
+ color: #fff;
+ background-color: #1abc9c;
+}
+.dropdown-menu-item-renderer:hover {
+ font-size: inherit;
+ color: #55606c;
+ background-color: rgba(202, 206, 209, .5);
+}
+
+.dropdown-toggle-open-btn {
+ border-radius: 4px;
+ font-size: 14px;
+ color: #fff;
+ background-color: #1abc9c;
+ border-color: #1abc9c;
+ }
+
+.dropdown-toggle-open-btn:hover {
+ border-radius: 4px;
+ font-size: 14px;
+ color: #fff;
+ background-color: #48c9b0;
+ border-color: #48c9b0;
+ }
+
+.dropdown-caret {
+ display: inline-block;
+ color: inherit;
+ background-color: inherit;
+ width: 0;
+ height: 0;
+ margin-left: 5px;
+ vertical-align: middle;
+ border-top: 8px solid;
+ border-right: 6px solid transparent;
+ border-left: 6px solid transparent;
+ -webkit-transition: border-color .25s, color .25s;
+ transition: border-color .25s, color .25s;
+ }
+
+.dropdown-label {
+ color: inherit;
+ background-color: inherit;
+ font: inherit;
+ text-align: left;
+ display: inline-block;
+ }
+
+HContainer
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.HorizontalLayout");
+}
+
+ImageButton
+{
+ border-style: none;
+}
+
+VContainer
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
+}
+
+List
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
+ IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport");
+ border-style: solid;
+ border-color: #222222;
+}
+
+Panel
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.PanelView");
+
+ background-color: #FFFFFF;
+ border-radius: 6px;
+ border-color: #1abc9c;
+ border-style: solid;
+ border-width: 2px;
+ padding: 2px;
+}
+
+PanelWithControlBar
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.PanelWithControlBarView");
+
+ background-color: #FFFFFF;
+ border-radius: 6px;
+ border-color: #1abc9c;
+ border-style: solid;
+ border-width: 2px;
+ padding: 2px;
+}
+
+.radio-icon,
+.radio-icon-hover,
+.radio-icon-checked
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ display: block;
+ width: 20px;
+ height: 20px;
+ font-size: 20px;
+ line-height: 20px;
+ color: #bdc3c7;
+ text-align: center;
+ cursor: pointer;
+
+ /* .radio .icon-checked:before */
+ /* .radio .icon-unchecked:before */
+ font-family: 'Flat-UI-Icons';
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+ font-size: 20px;
+ line-height: 20px;
+}
+
+.radio-icon:before
+{
+ content: "\e60b";
+}
+
+.radio-icon-hover:before
+{
+ content: "\e60c";
+}
+
+.radio-icon-checked:before
+{
+ content: "\e60c";
+}
+
+.radio-icon-checked
+{
+ color: #1abc9c;
+}
+
+.radio-input
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 20px;
+ height: 20px;
+ padding: 0;
+ margin: 0;
+ outline: none !important;
+ opacity: 0;
+}
+
+RadioButton
+{
+ /* .radio */
+ position: relative;
+ padding-left: 32px;
+ margin-bottom: 12px;
+ font-size: 14px;
+ line-height: 1.5;
+ -webkit-transition: color .25s linear;
+ transition: color .25s linear;
+}
+
+SimpleList
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
+ IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
+ IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport");
+}
+
+StringItemRenderer
+{
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
+ height: 16;
+}
+
+TextArea
+{
+ padding: 6px 10px;
+ font-size: 13px;
+ border-radius: 6px;
+ border-width: 2px;
+ border: 2px solid #1abc9c;
+}
+
+TextInput
+{
+ background-color: #ffffff;
+ height: 35px;
+ padding: 6px 10px;
+ font-size: 13px;
+ line-height: 1.462;
+ border-radius: 6px;
+ border-width: 2px;
+ border: 2px solid #1abc9c;
+}
+
+#titleLabel {
+ color: #fff;
+ font-size: 15px;
+}
+
+TitleBar
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
+ iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead");
+ color: #fff;
+ background-color: #1abc9c;
+ font-size: 15px;
+ border-style: none;
+ border-radius: 4px;
+}
+
+ToolTip
+{
+ background-color: #FFFFCC;
+}
+
+ViewBase
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
+}
+
+
+/* Global Style Declaration */
+global
+{
+ IStatesImpl: ClassReference("org.apache.flex.core.SimpleStatesImpl");
+ IEffectTimer: ClassReference("org.apache.flex.utils.EffectTimer");
+ effectTimerInterval: 10;
+}
+
+@media -flex-flash
+{
+
+Alert
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.AlertView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+
+ background-color: #FFFFFF;
+ border-style: solid;
+ border-color: #000000;
+ border-width: 1px;
+}
+
+Border
+{
+ border-radius: inherit;
+ border: inherit;
+}
+
+Button
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.CSSButtonView");
+}
+
+CheckBox
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.flat.beads.CheckboxCSSContentAndTextToggleButtonView");
+}
+
+CloseButton
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.CloseButtonView");
+}
+
+ComboBox
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ComboBoxModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ComboBoxView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ComboBoxController");
+ IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
+}
+
+Container
+{
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+}
+
+ControlBar
+{
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
+ iMeasurementBead: ClassReference("org.apache.flex.html.beads.ControlBarMeasurementBead");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+}
+
+DropDownList
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IBeadView: ClassReference("org.apache.flex.flat.beads.DropDownListView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DropDownListController");
+ IPopUp: ClassReference("org.apache.flex.flat.supportClasses.DropDownListList");
+}
+
+DropDownListList
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
+ IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+ IItemRenderer: ClassReference("org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer");
+ iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
+ border-style: none;
+ border-radius: 4px;
+ border-color: #000000;
+ border-width: 1px;
+ background-color: #FFFFFF;
+}
+
+Image
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.ImageView");
+}
+
+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");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextFieldView");
+ iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextFieldLabelMeasurementBead");
+}
+
+List
+{
+ iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
+ 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");
+ IBeadView: ClassReference("org.apache.flex.html.beads.NumericStepperView");
+
+ padding: 0px;
+ border-style: solid;
+ border-color: #000000;
+ border-width: 1px;
+ background-color: #FFFFFF;
+ iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
+ iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
+}
+
+Panel
+{
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+}
+
+PanelWithControlBar
+{
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+}
+
+RadioButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.flat.beads.RadioCSSContentAndTextToggleButtonView");
+}
+
+.vscrollbar-uparrow {
+ padding: 0px;
+ display: inline-block;
+ border-color: #16a085;
+ border-radius: initial;
+ background-color: transparent;
+ width: 0;
+ height: 0;
+ margin-left: 5px;
+ vertical-align: middle;
+ border-bottom: 8px solid;
+ border-right: 6px solid transparent;
+ border-left: 6px solid transparent;
+ -webkit-transition: border-color .25s, color .25s;
+ transition: border-color .25s, color .25s;
+ }
+.vscrollbar-downarrow-btn {
+ padding: 2px;
+ display: inline-block;
+ border-style: none;
+ border-radius: initial;
+ background-color: transparent;
+ width: 12;
+ height: 12;
+ margin-left: 5px;
+ vertical-align: middle;
+ }
+.vscrollbar-uparrow-btn {
+ padding: 2px;
+ display: inline-block;
+ border-style: none;
+ border-radius: initial;
+ background-color: transparent;
+ width: 12;
+ height: 12;
+ margin-left: 5px;
+ vertical-align: middle;
+ }
+.vscrollbar-downarrow {
+ padding: 0px;
+ display: inline-block;
+ border-color: #16a085;
+ border-radius: initial;
+ background-color: transparent;
+ width: 0;
+ height: 0;
+ margin-left: 5px;
+ vertical-align: middle;
+ border-top: 8px solid;
+ border-right: 6px solid transparent;
+ border-left: 6px solid transparent;
+ -webkit-transition: border-color .25s, color .25s;
+ transition: border-color .25s, color .25s;
+ }
+.vscrollbar-track {
+ padding: 0px;
+ position: relative;
+ width: 8px;
+ height: 8px;
+ /*margin-bottom: 20px;*/
+ cursor: pointer;
+ background-color: #ebedef;
+ border-radius: 4px;
+ /*border-radius: 32px;*/
+ box-shadow: none;
+ }
+.vscrollbar-thumb {
+ padding: 0px;
+ position: absolute;
+ z-index: 2;
+ width: 12px;
+ height: 12px;
+ cursor: pointer;
+ background-color: #16a085;
+ border-radius: 6px;
+ -webkit-transition: background .25s;
+ transition: background .25s;
+ }
+.vscrollbar-thumb:hover {
+ background-color: #48c9b0;
+ outline: none;
+ }
+.vscrollbar-thumb:active {
+ background-color: #16a085;
+ }
+
+VScrollBar
+{
+ IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VScrollBarLayout");
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ScrollBarModel");
+ IBeadView: ClassReference("org.apache.flex.flat.beads.CSSScrollBarView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.VScrollBarMouseController");
+}
+
+SimpleAlert
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.SimpleAlertView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController");
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+
+ background-color: #FFFFFF;
+ border-style: solid;
+ border-color: #000000;
+ border-width: 1px;
+}
+
+Slider
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
+ iBeadView: ClassReference("org.apache.flex.html.beads.SliderView");
+ iBeadController: ClassReference("org.apache.flex.html.beads.controllers.SliderMouseController");
+ iThumbView: ClassReference("org.apache.flex.html.beads.SliderThumbView");
+ iTrackView: ClassReference("org.apache.flex.html.beads.SliderTrackView");
+}
+
+Spinner
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.SpinnerView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.SpinnerMouseController");
+}
+
+TextArea
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextAreaView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController");
+ iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
+ iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel');
+}
+
+TextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
+ iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextButtonMeasurementBead");
+}
+
+TextFieldItemRenderer
+{
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
+ height: 16;
+}
+
+TextInput
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextInputWithBorderView");
+ IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController");
+ iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+}
+
+TitleBar
+{
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+}
+
+ToggleTextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
+}
+
+ViewBase
+{
+ iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
+ iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
+}
+
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml b/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml
new file mode 100644
index 0000000..6f12083
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/resources/flat-as-manifest.xml
@@ -0,0 +1,26 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="DropDownListList" class="org.apache.flex.flat.supportClasses.DropDownListList" />
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/src/main/resources/flat-manifest.xml b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
new file mode 100644
index 0000000..77f5ffc
--- /dev/null
+++ b/frameworks/projects/Flat/src/main/resources/flat-manifest.xml
@@ -0,0 +1,99 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Button" class="org.apache.flex.html.Button" lookupOnly="true" />
+ <component id="ButtonBar" class="org.apache.flex.html.ButtonBar" lookupOnly="true" />
+ <component id="CloseButton" class="org.apache.flex.html.CloseButton" lookupOnly="true" />
+ <component id="DropDownList" class="org.apache.flex.flat.DropDownList" />
+ <component id="Image" class="org.apache.flex.html.Image" lookupOnly="true" />
+ <component id="Label" class="org.apache.flex.html.Label" lookupOnly="true" />
+ <component id="MultilineLabel" class="org.apache.flex.html.MultilineLabel" lookupOnly="true" />
+ <component id="ImageAndTextButton" class="org.apache.flex.html.ImageAndTextButton" lookupOnly="true" />
+ <component id="TextButton" class="org.apache.flex.html.TextButton" lookupOnly="true" />
+ <component id="ToggleTextButton" class="org.apache.flex.html.ToggleTextButton" lookupOnly="true" />
+ <component id="TextInput" class="org.apache.flex.html.TextInput" lookupOnly="true" />
+ <component id="TextArea" class="org.apache.flex.html.TextArea" lookupOnly="true" />
+ <component id="List" class="org.apache.flex.html.List" lookupOnly="true" />
+ <component id="SimpleList" class="org.apache.flex.html.SimpleList" lookupOnly="true" />
+ <component id="CheckBox" class="org.apache.flex.flat.CheckBox" />
+ <component id="RadioButton" class="org.apache.flex.flat.RadioButton" />
+ <component id="ComboBox" class="org.apache.flex.html.ComboBox" lookupOnly="true" />
+ <component id="Container" class="org.apache.flex.html.Container" lookupOnly="true" />
+ <component id="HContainer" class="org.apache.flex.html.HContainer" lookupOnly="true" />
+ <component id="VContainer" class="org.apache.flex.html.VContainer" lookupOnly="true" />
+ <component id="Panel" class="org.apache.flex.html.Panel" lookupOnly="true" />
+ <component id="PanelView" class="org.apache.flex.html.beads.PanelView" lookupOnly="true" />
+ <component id="PanelWithControlBar" class="org.apache.flex.html.PanelWithControlBar" lookupOnly="true" />
+ <component id="ControlBar" class="org.apache.flex.html.ControlBar" lookupOnly="true" />
+ <component id="TitleBar" class="org.apache.flex.html.TitleBar" lookupOnly="true" />
+ <component id="TitleBarModel" class="org.apache.flex.html.beads.models.TitleBarModel" lookupOnly="true" />
+ <component id="ToolTip" class="org.apache.flex.html.ToolTip" lookupOnly="true" />
+ <component id="BasicLayout" class="org.apache.flex.html.beads.layouts.BasicLayout" lookupOnly="true" />
+ <component id="VerticalLayout" class="org.apache.flex.html.beads.layouts.VerticalLayout" lookupOnly="true" />
+ <component id="HorizontalLayout" class="org.apache.flex.html.beads.layouts.HorizontalLayout" lookupOnly="true" />
+ <component id="TileLayout" class="org.apache.flex.html.beads.layouts.TileLayout" lookupOnly="true" />
+ <component id="ListView" class="org.apache.flex.html.beads.ListView" lookupOnly="true" />
+ <component id="MultilineTextFieldView" class="org.apache.flex.html.beads.MultilineTextFieldView" lookupOnly="true" />
+
+ <component id="SimpleAlert" class="org.apache.flex.html.SimpleAlert" lookupOnly="true" />
+ <component id="Alert" class="org.apache.flex.html.Alert" lookupOnly="true" />
+ <component id="Spinner" class="org.apache.flex.html.Spinner" lookupOnly="true" />
+ <component id="Slider" class="org.apache.flex.html.Slider" lookupOnly="true" />
+ <component id="SolidBackgroundBead" class="org.apache.flex.html.beads.SolidBackgroundBead" lookupOnly="true" />
+ <component id="NumericStepper" class="org.apache.flex.html.NumericStepper" lookupOnly="true" />
+ <component id="TextFieldItemRenderer" class="org.apache.flex.html.supportClasses.TextFieldItemRenderer" lookupOnly="true" />
+ <component id="StringItemRenderer" class="org.apache.flex.html.supportClasses.StringItemRenderer" lookupOnly="true" />
+ <component id="DataItemRenderer" class="org.apache.flex.html.supportClasses.DataItemRenderer" lookupOnly="true" />
+ <component id="ButtonBarButtonItemRenderer" class="org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer" lookupOnly="true" />
+ <component id="VScrollBar" class="org.apache.flex.html.supportClasses.VScrollBar" lookupOnly="true" />
+ <component id="NumericOnlyTextInputBead" class="org.apache.flex.html.accessories.NumericOnlyTextInputBead" lookupOnly="true" />
+ <component id="PasswordInputBead" class="org.apache.flex.html.accessories.PasswordInputBead" lookupOnly="true" />
+ <component id="TextPromptBead" class="org.apache.flex.html.accessories.TextPromptBead" lookupOnly="true" />
+ <component id="HRule" class="org.apache.flex.html.HRule" lookupOnly="true" />
+ <component id="Spacer" class="org.apache.flex.html.Spacer" lookupOnly="true" />
+ <component id="ImageAndTextButtonView" class="org.apache.flex.html.beads.ImageAndTextButtonView" lookupOnly="true" />
+ <component id="ScrollingViewport" class="org.apache.flex.html.supportClasses.ScrollingViewport" lookupOnly="true" />
+
+ <component id="DataGrid" class="org.apache.flex.html.DataGrid" lookupOnly="true" />
+ <component id="DataGridColumn" class="org.apache.flex.html.supportClasses.DataGridColumn" lookupOnly="true" />
+
+ <component id="DateChooser" class="org.apache.flex.html.DateChooser" lookupOnly="true" />
+ <component id="DateField" class="org.apache.flex.html.DateField" lookupOnly="true" />
+ <component id="VerticalColumnLayout" class="org.apache.flex.html.beads.layouts.VerticalColumnLayout" lookupOnly="true" />
+
+ <component id="ToolTipBead" class="org.apache.flex.html.accessories.ToolTipBead" lookupOnly="true" />
+
+ <component id="LayoutChangeNotifier" class="org.apache.flex.html.beads.layouts.LayoutChangeNotifier" lookupOnly="true" />
+ <component id="ImageButton" class="org.apache.flex.html.ImageButton" lookupOnly="true" />
+ <component id="FlexibleFirstChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout" lookupOnly="true" />
+ <component id="OneFlexibleChildVerticalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildVerticalLayout" lookupOnly="true" />
+ <component id="OneFlexibleChildHorizontalLayout" class="org.apache.flex.html.beads.layouts.OneFlexibleChildHorizontalLayout" lookupOnly="true" />
+ <component id="MXMLBeadViewBase" class="org.apache.flex.html.MXMLBeadViewBase" lookupOnly="true" />
+
+ <component id="Border" class="org.apache.flex.html.supportClasses.Border" lookupOnly="true" />
+
+ <component id="ViewBase" class="org.apache.flex.core.ViewBase" lookupOnly="true" />
+ <component id="ViewBaseDataBinding" class="org.apache.flex.binding.ViewBaseDataBinding" lookupOnly="true" />
+ <component id="State" class="org.apache.flex.states.State" lookupOnly="true" />
+
+</componentPackage>
[32/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
new file mode 100644
index 0000000..7b1916b
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/CompoundTransform.as
@@ -0,0 +1,777 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics.utils
+{
+ import flash.geom.Matrix;
+ import flash.geom.Matrix3D;
+ import flash.geom.Vector3D;
+
+ import __AS3__.vec.Vector;
+
+ /**
+ * A CompoundTransform represents a 2D or 3D matrix transform. A compound transform represents a matrix that can be queried or set either as a 2D matrix,
+ * a 3D matrix, or as individual convenience transform properties such as x, y, scaleX, rotationZ, etc.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public class CompoundTransform
+ {
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function CompoundTransform()
+ {
+ }
+
+
+
+ /**
+ * @private
+ * storage for transform properties. These values are concatenated together with the layout properties to
+ * form the actual computed matrix used to render the object.
+ */
+ private var _rotationX:Number = 0;
+ private var _rotationY:Number = 0;
+ private var _rotationZ:Number = 0;
+ private var _scaleX:Number = 1;
+ private var _scaleY:Number = 1;
+ private var _scaleZ:Number = 1;
+ private var _x:Number = 0;
+ private var _y:Number = 0;
+ private var _z:Number = 0;
+
+ private var _transformX:Number = 0;
+ private var _transformY:Number = 0;
+ private var _transformZ:Number = 0;
+
+
+ /**
+ * @private
+ * slots for the 2D and 3D matrix transforms. Note that
+ * these are only allocated and computed on demand -- many component instances will never use a 3D
+ * matrix, for example.
+ */
+ private var _matrix:Matrix;
+ private var _matrix3D:Matrix3D;
+
+
+ /**
+ * @private
+ * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
+ * and the 3D matrices. Since developers can set any of the three programmatically, the last one set
+ * will always be valid, and the others will be invalid until validated on demand.
+ */
+ private static const MATRIX_VALID:uint = 0x20;
+ private static const MATRIX3D_VALID:uint = 0x40;
+ private static const PROPERTIES_VALID:uint = 0x80;
+
+
+ /**
+ * @private
+ * flags for tracking whether the transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
+ */
+ private static const IS_3D:uint = 0x200;
+ private static const M3D_FLAGS_VALID:uint = 0x400;
+
+ /**
+ * @private
+ * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
+ * 'the source of truth.'
+ */
+ public static const SOURCE_PROPERTIES:uint = 1;
+ /**
+ * @private
+ * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
+ * 'the source of truth.'
+ */
+ public static const SOURCE_MATRIX:uint = 2;
+ /**
+ * @private
+ * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
+ * 'the source of truth.'
+ */
+ public static const SOURCE_MATRIX3D:uint = 3;
+
+ /**
+ * @private
+ * indicates the 'source of truth' for the transform.
+ */
+ public var sourceOfTruth:uint = SOURCE_PROPERTIES;
+
+ /**
+ * @private
+ * general storage for all of ur flags.
+ */
+ private var _flags:uint = PROPERTIES_VALID;
+
+ /**
+ * @private
+ * flags that get passed to the invalidate method indicating why the invalidation is happening.
+ */
+ private static const INVALIDATE_FROM_NONE:uint = 0;
+ private static const INVALIDATE_FROM_PROPERTY:uint = 4;
+ private static const INVALIDATE_FROM_MATRIX:uint = 5;
+ private static const INVALIDATE_FROM_MATRIX3D:uint = 6;
+
+ /**
+ * @private
+ * static data used by utility methods below
+ */
+ private static var decomposition:Vector.<Number> = new Vector.<Number>();
+ decomposition.push(0);
+ decomposition.push(0);
+ decomposition.push(0);
+ decomposition.push(0);
+ decomposition.push(0);
+
+ private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+
+ //----------------------------------------------------------------------------
+
+ /**
+ * The x value of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set x(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _x)
+ return;
+ translateBy(value-_x,0,0);
+ invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+ }
+ /**
+ * @private
+ */
+ public function get x():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _x;
+ }
+
+ /**
+ * The y value of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set y(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _y)
+ return;
+ translateBy(0,value-_y,0);
+ invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get y():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _y;
+ }
+
+ /**
+ * The z value of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set z(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _z)
+ return;
+ translateBy(0,0,value-_z);
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get z():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _z;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * The rotationX, in degrees, of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationX(value:Number):void
+ {
+ // clamp the rotation value between -180 and 180. This is what
+ // the Flash player does, so let's mimic it here too.
+ value = MatrixUtil.clampRotation(value);
+
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _rotationX)
+ return;
+ _rotationX = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationX():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _rotationX;
+ }
+
+ /**
+ * The rotationY, in degrees, of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationY(value:Number):void
+ {
+ // clamp the rotation value between -180 and 180. This is what
+ // the Flash player does, so let's mimic it here too.
+ value = MatrixUtil.clampRotation(value);
+
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _rotationY)
+ return;
+ _rotationY = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationY():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _rotationY;
+ }
+
+ /**
+ * The rotationZ, in degrees, of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationZ(value:Number):void
+ {
+ // clamp the rotation value between -180 and 180. This is what
+ // the Flash player does, so let's mimic it here too.
+ value = MatrixUtil.clampRotation(value);
+
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _rotationZ)
+ return;
+ _rotationZ = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationZ():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _rotationZ;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * The scaleX of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleX(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _scaleX)
+ return;
+ _scaleX = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleX():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _scaleX;
+ }
+
+ /**
+ * The scaleY of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleY(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _scaleY)
+ return;
+ _scaleY = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleY():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _scaleY;
+ }
+
+
+ /**
+ * The scaleZ of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleZ(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _scaleZ)
+ return;
+ _scaleZ = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleZ():Number
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ return _scaleZ;
+ }
+
+
+ /**
+ * @private
+ * returns true if the transform has 3D values.
+ */
+ public function get is3D():Boolean
+ {
+ if ((_flags & M3D_FLAGS_VALID) == 0)
+ update3DFlags();
+ return ((_flags & IS_3D) != 0);
+ }
+
+ //------------------------------------------------------------------------------
+ /**
+ * The x value of the transform center. The transform center is kept fixed as rotation and scale are applied.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set transformX(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _transformX)
+ return;
+ _transformX = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get transformX():Number
+ {
+ return _transformX;
+ }
+
+ //------------------------------------------------------------------------------
+ /**
+ * The y value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set transformY(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _transformY)
+ return;
+ _transformY = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get transformY():Number
+ {
+ return _transformY;
+ }
+ //------------------------------------------------------------------------------
+ /**
+ * The z value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set transformZ(value:Number):void
+ {
+ if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
+ if (value == _transformZ)
+ return;
+ _transformZ = value;
+ invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ */
+ public function get transformZ():Number
+ {
+ return _transformZ;
+ }
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * @private
+ * invalidates our various cached values. Any change to the CompoundTransform object that affects
+ * the various transforms should call this function.
+ * @param reason - the code indicating what changes to cause the invalidation.
+ * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
+ * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
+ * have been modified.
+ */
+ private function invalidate(reason:uint, affects3D:Boolean):void
+ {
+ //race("invalidating: " + reason);
+ switch(reason)
+ {
+ case INVALIDATE_FROM_PROPERTY:
+ sourceOfTruth = SOURCE_PROPERTIES;
+ _flags |= PROPERTIES_VALID;
+ _flags &= ~MATRIX_VALID;
+ _flags &= ~MATRIX3D_VALID;
+ break;
+ case INVALIDATE_FROM_MATRIX:
+ sourceOfTruth = SOURCE_MATRIX;
+ _flags |= MATRIX_VALID;
+ _flags &= ~PROPERTIES_VALID;
+ _flags &= ~MATRIX3D_VALID;
+ break;
+ case INVALIDATE_FROM_MATRIX3D:
+ sourceOfTruth = SOURCE_MATRIX3D;
+ _flags |= MATRIX3D_VALID;
+ _flags &= ~PROPERTIES_VALID;
+ _flags &= ~MATRIX_VALID;
+ break;
+ }
+ if (affects3D)
+ _flags &= ~M3D_FLAGS_VALID;
+
+ }
+
+ private static const EPSILON:Number = .001;
+ /**
+ * @private
+ * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
+ * Since the user can set either the individual transform properties or the matrices directly, we compute these
+ * flags based on what the current 'source of truth' is for each of these values.
+ */
+ private function update3DFlags():void
+ {
+ if ((_flags & M3D_FLAGS_VALID) == 0)
+ {
+ var matrixIs3D:Boolean = false;
+
+ switch(sourceOfTruth)
+ {
+ case SOURCE_PROPERTIES:
+ matrixIs3D = ( // note that rotationZ is the same as rotation, and not a 3D affecting
+ (Math.abs(_scaleZ-1) > EPSILON) || // property.
+ ((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
+ ((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
+ Math.abs(_z) > EPSILON
+ );
+ break;
+ case SOURCE_MATRIX:
+ matrixIs3D = false;
+ break;
+ case SOURCE_MATRIX3D:
+ var rawData:Vector.<Number> = _matrix3D.rawData;
+ matrixIs3D = (rawData[2] != 0 || // rotation y
+ rawData[6] != 0 || // rotation x
+ rawData[8] !=0 || // rotation y
+ rawData[10] != 1 || // scalez / rotation x / rotation y
+ rawData[14] != 0); // translation z
+ break;
+ }
+
+ if (matrixIs3D)
+ _flags |= IS_3D;
+ else
+ _flags &= ~IS_3D;
+
+ _flags |= M3D_FLAGS_VALID;
+ }
+ }
+
+
+ /**
+ * Applies the delta to the transform's translation component. Unlike setting the x, y, or z properties directly,
+ * this method can be safely called without changing the transform's concept of 'the source of truth'.
+ *
+ * @param x The x value of the transform.
+ *
+ * @param y The y value of the transform.
+ *
+ * @param z The z value of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function translateBy(x:Number,y:Number,z:Number = 0):void
+ {
+ if (_flags & MATRIX_VALID)
+ {
+ _matrix.tx += x;
+ _matrix.ty += y;
+ }
+ if (_flags & PROPERTIES_VALID)
+ {
+ _x += x;
+ _y += y;
+ _z += z;
+ }
+ if (_flags & MATRIX3D_VALID)
+ {
+ var data:Vector.<Number> = _matrix3D.rawData;
+ data[12] += x;
+ data[13] += y;
+ data[14] += z;
+ _matrix3D.rawData = data;
+ }
+ invalidate(INVALIDATE_FROM_NONE, z != 0 /*affects3D*/);
+ }
+
+
+ /**
+ * The 2D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
+ * and translation, in that order.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get matrix():Matrix
+ {
+
+ if (_flags & MATRIX_VALID)
+ return _matrix;
+
+ if ((_flags & PROPERTIES_VALID) == false)
+ validatePropertiesFromMatrix();
+
+ var m:Matrix = _matrix;
+ if (m == null)
+ m = _matrix = new Matrix();
+ else
+ m.identity();
+
+ AdvancedLayoutFeatures.build2DMatrix(m,_transformX,_transformY,
+ _scaleX,_scaleY,
+ _rotationZ,
+ _x,_y);
+ _flags |= MATRIX_VALID;
+ return m;
+ }
+
+ /**
+ * @private
+ */
+ public function set matrix(v:Matrix):void
+ {
+ if (_matrix== null)
+ {
+ _matrix = v.clone();
+ }
+ else
+ {
+ _matrix.identity();
+ _matrix.concat(v);
+ }
+
+ // affects3D is true since setting matrix changes the transform to 2D
+ invalidate(INVALIDATE_FROM_MATRIX, true /*affects3D*/);
+ }
+
+ /**
+ * @private
+ * decomposes the offset transform matrices down into the convenience offset properties. Note that this is not
+ * a bi-directional transformation -- it is possible to create a matrix that can't be fully represented in the
+ * convenience properties. This function will pull from the matrix or matrix3D values, depending on which was most
+ * recently set
+ */
+ private function validatePropertiesFromMatrix():void
+ {
+ if (sourceOfTruth == SOURCE_MATRIX3D)
+ {
+ var result:Vector.<Vector3D> = _matrix3D.decompose();
+ _rotationX = result[1].x / RADIANS_PER_DEGREES;
+ _rotationY = result[1].y / RADIANS_PER_DEGREES;
+ _rotationZ = result[1].z / RADIANS_PER_DEGREES;
+ _scaleX = result[2].x;
+ _scaleY = result[2].y;
+ _scaleZ = result[2].z;
+
+ if (_transformX != 0 || _transformY != 0 || _transformZ != 0)
+ {
+ var postTransformTCenter:Vector3D = _matrix3D.transformVector(new Vector3D(_transformX,_transformY,_transformZ));
+ _x = postTransformTCenter.x - _transformX;
+ _y = postTransformTCenter.y - _transformY;
+ _z = postTransformTCenter.z - _transformZ;
+ }
+ else
+ {
+ _x = result[0].x;
+ _y = result[0].y;
+ _z = result[0].z;
+ }
+ }
+ else if (sourceOfTruth == SOURCE_MATRIX)
+ {
+ MatrixUtil.decomposeMatrix(decomposition,_matrix,_transformX,_transformY);
+ _x = decomposition[0];
+ _y = decomposition[1];
+ _z = 0;
+ _rotationX = 0;
+ _rotationY = 0;
+ _rotationZ = decomposition[2];
+ _scaleX = decomposition[3];
+ _scaleY = decomposition[4];
+ _scaleZ = 1;
+ }
+ _flags |= PROPERTIES_VALID;
+
+ }
+
+
+
+ /**
+ * The 3D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
+ * and translation, in that order.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get matrix3D():Matrix3D
+ {
+ if (_flags & MATRIX3D_VALID)
+ return _matrix3D;
+
+ if ((_flags & PROPERTIES_VALID) == false)
+ validatePropertiesFromMatrix();
+
+ var m:Matrix3D = _matrix3D;
+ if (m == null)
+ m = _matrix3D = new Matrix3D();
+ else
+ m.identity();
+
+ AdvancedLayoutFeatures.build3DMatrix(m,transformX,transformY,transformZ,
+ _scaleX,_scaleY,_scaleZ,
+ _rotationX,_rotationY,_rotationZ,
+ _x,_y,_z);
+ _flags |= MATRIX3D_VALID;
+ return m;
+
+ }
+
+ /**
+ * @private
+ */
+ public function set matrix3D(v:Matrix3D):void
+ {
+ if (_matrix3D == null)
+ {
+ _matrix3D = v.clone();
+ }
+ else
+ {
+ _matrix3D.identity();
+ if (v)
+ _matrix3D.append(v);
+ }
+ invalidate(INVALIDATE_FROM_MATRIX3D, true /*affects3D*/);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
new file mode 100644
index 0000000..1e36b60
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
@@ -0,0 +1,371 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics.utils
+{
+ import flash.geom.Matrix;
+ import flash.geom.Matrix3D;
+
+
+ /**
+ * The IAssetLayoutFeatures interface defines the minimum properties and methods
+ * required for an Object to support advanced transforms in embedded assets.
+ *
+ * @see mx.core.AdvancedLayoutFeatures
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ public interface IAssetLayoutFeatures
+ {
+
+ /**
+ * Layout transform convenience property. Represents the x value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutX(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutX():Number;
+
+ /**
+ * Layout transform convenience property. Represents the y value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutY(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutY():Number;
+
+ /**
+ * Layout transform convenience property. Represents the z value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutZ(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutZ():Number;
+
+ /**
+ * Used by the mirroring transform. See the mirror property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get layoutWidth():Number;
+
+ /**
+ * @private
+ */
+ function set layoutWidth(value:Number):void;
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * The x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set transformX(value:Number):void;
+ /**
+ * @private
+ */
+ function get transformX():Number;
+
+ /**
+ * The y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set transformY(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get transformY():Number;
+
+ /**
+ * The z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set transformZ(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get transformZ():Number;
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * Layout transform convenience property. Represents the rotation around the X axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutRotationX(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutRotationX():Number;
+
+ /**
+ * Layout transform convenience property. Represents the rotation around the Y axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutRotationY(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutRotationY():Number;
+
+ /**
+ * Layout transform convenience property. Represents the rotation around the Z axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutRotationZ(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutRotationZ():Number;
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * Layout transform convenience property. Represents the scale along the X axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutScaleX(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutScaleX():Number;
+
+ /**
+ * Layout transform convenience property. Represents the scale along the Y axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutScaleY(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutScaleY():Number;
+
+ /**
+ * Layout transform convenience property. Represents the scale along the Z axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutScaleZ(value:Number):void;
+
+ /**
+ * @private
+ */
+ function get layoutScaleZ():Number;
+
+ /**
+ * The 2D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutMatrix(value:Matrix):void;
+
+ /**
+ * @private
+ */
+ function get layoutMatrix():Matrix;
+
+ /**
+ * The 3D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function set layoutMatrix3D(value:Matrix3D):void;
+
+ /**
+ * @private
+ */
+ function get layoutMatrix3D():Matrix3D;
+
+ /**
+ * True if the computed transform has 3D values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get is3D():Boolean;
+
+ /**
+ * True if the layout transform has 3D values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get layoutIs3D():Boolean;
+
+ /**
+ * If true the X axis is scaled by -1 and the x coordinate of the origin
+ * is translated by the component's width.
+ *
+ * The net effect of this "mirror" transform is to flip the direction
+ * that the X axis increases in without changing the layout element's
+ * location relative to the parent's origin.
+ *
+ * @default false
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get mirror():Boolean;
+
+ /**
+ * @private
+ */
+ function set mirror(value:Boolean):void;
+
+
+ /**
+ * The stretchY is the horizontal component of the stretch scale factor which
+ * is applied before any other transformation property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get stretchX():Number;
+
+ /**
+ * @private
+ */
+ function set stretchX(value:Number):void;
+
+ /**
+ * The stretchY is the vertical component of the stretch scale factor which
+ * is applied before any other transformation property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get stretchY():Number;
+
+ /**
+ * @private
+ */
+ function set stretchY(value:Number):void;
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * The computed matrix, calculated by combining the layout matrix and any offsets provided.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get computedMatrix():Matrix;
+
+ /**
+ * The computed 3D matrix, calculated by combining the 3D layout matrix and any offsets provided.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4.1
+ */
+ function get computedMatrix3D():Matrix3D;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/MatrixUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/MatrixUtil.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/MatrixUtil.as
new file mode 100644
index 0000000..04c2c13
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/MatrixUtil.as
@@ -0,0 +1,1605 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.graphics.utils
+{
+
+ import flash.display.DisplayObject;
+ import flash.geom.Matrix;
+ import flash.geom.Matrix3D;
+ import flash.geom.PerspectiveProjection;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ import flash.geom.Utils3D;
+ import flash.geom.Vector3D;
+ import flash.system.ApplicationDomain;
+
+ /**
+ * @private
+ * The MatrixUtil class is for internal use only.
+ * Class for matrix and geometric related math routines.
+ */
+ public final class MatrixUtil
+ {
+
+ private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+ private static var SOLUTION_TOLERANCE:Number = 0.1;
+ private static var MIN_MAX_TOLERANCE:Number = 0.1;
+
+ private static var staticPoint:Point = new Point();
+
+ // For use in getConcatenatedMatrix function
+ private static var fakeDollarParent:QName;
+ private static var uiComponentClass:Class;
+ private static var uiMovieClipClass:Class;
+ private static var usesMarshalling:Object;
+ private static var lastModuleFactory:Object;
+ private static var computedMatrixProperty:QName;
+ private static var $transformProperty:QName;
+
+ //--------------------------------------------------------------------------
+ //
+ // Class methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Returns rotation value clamped between -180 and 180 degreeds.
+ * This mimicks the Flash player behavior.
+ */
+ public static function clampRotation(value:Number):Number
+ {
+ // Flash player doesn't handle values larger than 2^15 - 1 (FP-749).
+ if (value > 180 || value < -180)
+ {
+ value = value % 360;
+
+ if (value > 180)
+ value = value - 360;
+ else if (value < -180)
+ value = value + 360;
+ }
+ return value;
+ }
+
+ /**
+ * Returns a static Point object with the result.
+ * If matrix is null, point is untransformed.
+ */
+ public static function transformPoint(x:Number, y:Number, m:Matrix):Point
+ {
+ if (!m)
+ {
+ staticPoint.x = x;
+ staticPoint.y = y;
+ return staticPoint;
+ }
+
+ staticPoint.x = m.a * x + m.c * y + m.tx;
+ staticPoint.y = m.b * x + m.d * y + m.ty;
+ return staticPoint;
+ }
+
+ public static function composeMatrix(x:Number = 0,
+ y:Number = 0,
+ scaleX:Number = 1,
+ scaleY:Number = 1,
+ rotation:Number = 0,
+ transformX:Number = 0,
+ transformY:Number = 0):Matrix
+ {
+ var m:Matrix = new Matrix();
+ m.translate(-transformX, -transformY);
+ m.scale(scaleX, scaleY);
+ if (rotation != 0)
+ m.rotate(rotation / 180 * Math.PI);
+ m.translate(transformX + x, transformY + y);
+ return m;
+ }
+
+ /**
+ * Decompose a matrix into its component scale, rotation, and translation parts.
+ * The Vector of Numbers passed in the components parameter will be
+ * populated by this function with the component parts.
+ *
+ * @param components Vector which holds the component scale, rotation
+ * and translation values.
+ * x = components[0]
+ * y = components[1]
+ * rotation = components[2]
+ * scaleX = components[3]
+ * scaleY = components[4]
+ *
+ * @param matrix The matrix to decompose
+ * @param transformX The x value of the transform center
+ * @param transformY The y value of the transform center
+ */
+ public static function decomposeMatrix(components:Vector.<Number>,
+ matrix:Matrix,
+ transformX:Number = 0,
+ transformY:Number = 0):void
+ {
+ // else decompose matrix. Don't use MatrixDecompose(), it can return erronous values
+ // when negative scales (and therefore skews) are in use.
+ var Ux:Number;
+ var Uy:Number;
+ var Vx:Number;
+ var Vy:Number;
+
+ Ux = matrix.a;
+ Uy = matrix.b;
+ components[3] = Math.sqrt(Ux*Ux + Uy*Uy);
+
+ Vx = matrix.c;
+ Vy = matrix.d;
+ components[4] = Math.sqrt(Vx*Vx + Vy*Vy );
+
+ // sign of the matrix determinant will tell us if the space is inverted by a 180 degree skew or not.
+ var determinant:Number = Ux*Vy - Uy*Vx;
+ if (determinant < 0) // if so, choose y-axis scale as the skewed one. Unfortunately, its impossible to tell if it originally was the y or x axis that had the negative scale/skew.
+ {
+ components[4] = -(components[4]);
+ Vx = -Vx;
+ Vy = -Vy;
+ }
+
+ components[2] = Math.atan2( Uy, Ux ) / RADIANS_PER_DEGREES;
+
+ if (transformX != 0 || transformY != 0)
+ {
+ var postTransformCenter:Point = matrix.transformPoint(new Point(transformX,transformY));
+ components[0] = postTransformCenter.x - transformX;
+ components[1] = postTransformCenter.y - transformY;
+ }
+ else
+ {
+ components[0] = matrix.tx;
+ components[1] = matrix.ty;
+ }
+ }
+
+ /**
+ * @return Returns the union of <code>rect</code> and
+ * <code>Rectangle(left, top, right - left, bottom - top)</code>.
+ * Note that if rect is non-null, it will be updated to reflect the return value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function rectUnion(left:Number, top:Number, right:Number, bottom:Number,
+ rect:Rectangle):Rectangle
+ {
+ if (!rect)
+ return new Rectangle(left, top, right - left, bottom - top);
+
+ var minX:Number = Math.min(rect.left, left);
+ var minY:Number = Math.min(rect.top, top);
+ var maxX:Number = Math.max(rect.right, right);
+ var maxY:Number = Math.max(rect.bottom, bottom);
+
+ rect.x = minX;
+ rect.y = minY;
+ rect.width = maxX - minX;
+ rect.height = maxY - minY;
+ return rect;
+ }
+
+ /**
+ * Calculates the bounding box of a post-transformed ellipse.
+ *
+ * @param cx The x coordinate of the ellipse's center
+ * @param cy The y coordinate of the ellipse's center
+ * @param rx The horizontal radius of the ellipse
+ * @param ry The vertical radius of the ellipse
+ * @param matrix The transformation matrix.
+ * @param rect If non-null, rect will be updated to the union of rect and
+ * the segment bounding box.
+ * @return Returns the union of the passed in rect with the
+ * bounding box of the the post-transformed ellipse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function getEllipseBoundingBox(cx:Number, cy:Number,
+ rx:Number, ry:Number,
+ matrix:Matrix,
+ rect:Rectangle = null):Rectangle
+ {
+ var a:Number = matrix.a;
+ var b:Number = matrix.b;
+ var c:Number = matrix.c;
+ var d:Number = matrix.d;
+
+ // Ellipse can be represented by the following parametric equations:
+ //
+ // (1) x = cx + rx * cos(t)
+ // (2) y = cy + ry * sin(t)
+ //
+ // After applying transformation with matrix m(a, c, b, d) we get:
+ //
+ // (3) x = a * cx + a * cos(t) * rx + c * cy + c * sin(t) * ry + m.tx
+ // (4) y = b * cx + b * cos(t) * rx + d * cy + d * sin(t) * ry + m.ty
+ //
+ // In (3) and (4) x and y are functions of a parameter t. To find the extremums we need
+ // to find where dx/dt and dy/dt reach zero:
+ //
+ // (5) dx/dt = - a * sin(t) * rx + c * cos(t) * ry
+ // (6) dy/dt = - b * sin(t) * rx + d * cos(t) * ry
+ // (7) dx/dt = 0 <=> sin(t) / cos(t) = (c * ry) / (a * rx);
+ // (8) dy/dt = 0 <=> sin(t) / cos(t) = (d * ry) / (b * rx);
+
+ if (rx == 0 && ry == 0)
+ {
+ var pt:Point = new Point(cx, cy);
+ pt = matrix.transformPoint(pt);
+ return rectUnion(pt.x, pt.y, pt.x, pt.y, rect);
+ }
+
+ var t:Number;
+ var t1:Number;
+
+ if (a * rx == 0)
+ t = Math.PI / 2;
+ else
+ t = Math.atan((c * ry) / (a * rx));
+
+ if (b * rx == 0)
+ t1 = Math.PI / 2;
+ else
+ t1 = Math.atan((d * ry) / (b * rx));
+
+ var x1:Number = a * Math.cos(t) * rx + c * Math.sin(t) * ry;
+ var x2:Number = -x1;
+ x1 += a * cx + c * cy + matrix.tx;
+ x2 += a * cx + c * cy + matrix.tx;
+
+ var y1:Number = b * Math.cos(t1) * rx + d * Math.sin(t1) * ry;
+ var y2:Number = -y1;
+ y1 += b * cx + d * cy + matrix.ty;
+ y2 += b * cx + d * cy + matrix.ty;
+
+ return rectUnion(Math.min(x1, x2), Math.min(y1, y2), Math.max(x1, x2), Math.max(y1, y2), rect);
+ }
+
+ /**
+ * @param x0 x coordinate of the first control point
+ * @param y0 y coordinate of the first control point
+ * @param x1 x coordinate of the second control point
+ * @param y1 y coordinate of the second control point
+ * @param x2 x coordinate of the third control point
+ * @param y2 y coordinate of the third control point
+ * @param sx The pre-transform scale factor for x coordinates.
+ * @param sy The pre-transform scale factor for y coordinates.
+ * @param matrix The transformation matrix. Can be null for identity transformation.
+ * @param rect If non-null, rect will be updated to the union of rect and
+ * the segment bounding box.
+ * @return Returns the union of the post-transformed quadratic
+ * bezier segment's axis aligned bounding box and the passed in rect.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static public function getQBezierSegmentBBox(x0:Number, y0:Number,
+ x1:Number, y1:Number,
+ x2:Number, y2:Number,
+ sx:Number, sy:Number,
+ matrix:Matrix,
+ rect:Rectangle):Rectangle
+ {
+ var pt:Point;
+ pt = MatrixUtil.transformPoint(x0 * sx, y0 * sy, matrix);
+ x0 = pt.x;
+ y0 = pt.y;
+
+ pt = MatrixUtil.transformPoint(x1 * sx, y1 * sy, matrix);
+ x1 = pt.x;
+ y1 = pt.y;
+
+ pt = MatrixUtil.transformPoint(x2 * sx, y2 * sy, matrix);
+ x2 = pt.x;
+ y2 = pt.y;
+
+ var minX:Number = Math.min(x0, x2);
+ var maxX:Number = Math.max(x0, x2);
+
+ var minY:Number = Math.min(y0, y2);
+ var maxY:Number = Math.max(y0, y2);
+
+ var txDiv:Number = x0 - 2 * x1 + x2;
+ if (txDiv != 0)
+ {
+ var tx:Number = (x0 - x1) / txDiv;
+ if (0 <= tx && tx <= 1)
+ {
+ var x:Number = (1 - tx) * (1 - tx) * x0 + 2 * tx * (1 - tx) * x1 + tx * tx * x2;
+ minX = Math.min(x, minX);
+ maxX = Math.max(x, maxX);
+ }
+ }
+
+ var tyDiv:Number = y0 - 2 * y1 + y2;
+ if (tyDiv != 0)
+ {
+ var ty:Number = (y0 - y1) / tyDiv;
+ if (0 <= ty && ty <= 1)
+ {
+ var y:Number = (1 - ty) * (1 - ty) * y0 + 2 * ty * (1 - ty) * y1 + ty * ty * y2;
+ minY = Math.min(y, minY);
+ maxY = Math.max(y, maxY);
+ }
+ }
+
+ return rectUnion(minX, minY, maxX, maxY, rect);
+ }
+
+ /**
+ * @param width The width of the bounds to be transformed.
+ * @param height The height of the bounds to be transformed.
+ * @param matrix The transfomration matrix.
+ *
+ * @param vec If vec is non-null it will be set to the vector from the
+ * transformed bounds top left to the untransformed bounds top left
+ * in the coordinate space defined by <code>matrix</code>.
+ * This is useful if you want to align the transformed bounds to x,y
+ * by modifying the object's position. Moving the object by
+ * <code>x + vec.x</code> and <code>y + vec.y</code> respectively
+ * will offset the transformed bounds top left corner by x,y.
+ *
+ * @return Returns the transformed bounds. Note that the Point object returned will be reused
+ * by other MatrixUtil methods.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function transformSize(width:Number, height:Number, matrix:Matrix):Point
+ {
+ const a:Number = matrix.a;
+ const b:Number = matrix.b;
+ const c:Number = matrix.c;
+ const d:Number = matrix.d;
+
+ // transform point (0,0)
+ var x1:Number = 0;
+ var y1:Number = 0;
+
+ // transform point (width, 0)
+ var x2:Number = width * a;
+ var y2:Number = width * b;
+
+ // transform point (0, height)
+ var x3:Number = height * c;
+ var y3:Number = height * d;
+
+ // transform point (width, height)
+ var x4:Number = x2 + x3;
+ var y4:Number = y2 + y3;
+
+ var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
+ var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
+ var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
+ var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));
+
+ staticPoint.x = maxX - minX;
+ staticPoint.y = maxY - minY;
+ return staticPoint;
+ }
+
+ /**
+ * @param width The width of the bounds to be transformed.
+ * @param height The height of the bounds to be transformed.
+ * @param matrix The transfomration matrix.
+ *
+ * @param topleft If topLeft is non-null it will be used as the origin of the bounds
+ * rectangle to be transformed. On return, it will be set to the top left of the rectangle
+ * after transformation.
+ *
+ * @return Returns the transformed width and height. Note that the Point object returned will be reused
+ * by other MatrixUtil methods.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function transformBounds(width:Number, height:Number, matrix:Matrix, topLeft:Point = null):Point
+ {
+ const a:Number = matrix.a;
+ const b:Number = matrix.b;
+ const c:Number = matrix.c;
+ const d:Number = matrix.d;
+
+ // transform point (0,0)
+ var x1:Number = 0;
+ var y1:Number = 0;
+
+ // transform point (width, 0)
+ var x2:Number = width * a;
+ var y2:Number = width * b;
+
+ // transform point (0, height)
+ var x3:Number = height * c;
+ var y3:Number = height * d;
+
+ // transform point (width, height)
+ var x4:Number = x2 + x3;
+ var y4:Number = y2 + y3;
+
+ var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
+ var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
+ var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
+ var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));
+
+ staticPoint.x = maxX - minX;
+ staticPoint.y = maxY - minY;
+
+ if (topLeft)
+ {
+ const tx:Number = matrix.tx;
+ const ty:Number = matrix.ty;
+ const x:Number = topLeft.x;
+ const y:Number = topLeft.y;
+
+ topLeft.x = minX + a * x + b * y + tx;
+ topLeft.y = minY + c * x + d * y + ty;
+ }
+ return staticPoint;
+ }
+
+ /**
+ * Returns the axis aligned bounding box <code>bounds</code> transformed
+ * with <code>matrix</code> and then projected with <code>projection</code>.
+ *
+ * @param bounds The bounds, in child coordinates, to be transformed and projected.
+ * @param matrix <p>The transformation matrix. Note that the method will clobber the
+ * original matrix values.</p>
+ * @param projection The projection.
+ * @return Returns the <code>bounds</code> parameter that has been updated with the
+ * transformed and projected bounds.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function projectBounds(bounds:Rectangle,
+ matrix:Matrix3D,
+ projection:PerspectiveProjection):Rectangle
+ {
+ // Setup the matrix
+ var centerX:Number = projection.projectionCenter.x;
+ var centerY:Number = projection.projectionCenter.y;
+ matrix.appendTranslation(-centerX, -centerY, projection.focalLength);
+ matrix.append(projection.toMatrix3D());
+
+ // Project the corner points
+ var pt1:Vector3D = new Vector3D(bounds.left, bounds.top, 0);
+ var pt2:Vector3D = new Vector3D(bounds.right, bounds.top, 0)
+ var pt3:Vector3D = new Vector3D(bounds.left, bounds.bottom, 0);
+ var pt4:Vector3D = new Vector3D(bounds.right, bounds.bottom, 0);
+ pt1 = Utils3D.projectVector(matrix, pt1);
+ pt2 = Utils3D.projectVector(matrix, pt2);
+ pt3 = Utils3D.projectVector(matrix, pt3);
+ pt4 = Utils3D.projectVector(matrix, pt4);
+
+ // Find the bounding box in 2D
+ var maxX:Number = Math.max(Math.max(pt1.x, pt2.x), Math.max(pt3.x, pt4.x));
+ var minX:Number = Math.min(Math.min(pt1.x, pt2.x), Math.min(pt3.x, pt4.x));
+ var maxY:Number = Math.max(Math.max(pt1.y, pt2.y), Math.max(pt3.y, pt4.y));
+ var minY:Number = Math.min(Math.min(pt1.y, pt2.y), Math.min(pt3.y, pt4.y));
+
+ // Add back the projection center
+ bounds.x = minX + centerX;
+ bounds.y = minY + centerY;
+ bounds.width = maxX - minX;
+ bounds.height = maxY - minY;
+ return bounds;
+ }
+
+ /**
+ * @param matrix
+ * @return Returns true when <code>pt == matrix.DeltaTransformPoint(pt)</code>
+ * for any <code>pt:Point</code> (<code>matrix</code> is identity matrix,
+ * when disregarding the translation part).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function isDeltaIdentity(matrix:Matrix):Boolean
+ {
+ return (matrix.a == 1 && matrix.d == 1 &&
+ matrix.b == 0 && matrix.c == 0);
+ }
+
+ /**
+ * <code>fitBounds</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
+ * such that the bounding box transformed with <code>matrix</code> will fit
+ * into (0,0,width,height).
+ *
+ * @param width This is the width of the bounding box that calculated size
+ * needs to fit in.
+ *
+ * @param height This is the height of the bounding box that the calculated
+ * size needs to fit in.
+ *
+ * @param matrix This defines the transformations that the function will take
+ * into account when calculating the size. The bounding box (0,0,x,y) of the
+ * calculated size (x,y) transformed with <code>matrix</code> will fit in the
+ * specified <code>width</code> and <code>height</code>.
+ *
+ * @param explicitWidth Explicit width for the calculated size. The function
+ * will first try to find a solution using this width.
+ *
+ * @param explicitHeight Preferred height for the calculated size. The function
+ * will first try to find a solution using this height.
+ *
+ * @param preferredWidth Preferred width for the calculated size. If possible
+ * the function will set the calculated size width to this value.
+ *
+ * @param preferredHeight Preferred height for the calculated size. If possible
+ * the function will set the calculated size height to this value.
+ *
+ * @param minWidth The minimum allowed value for the calculated size width.
+ *
+ * @param minHeight The minimum allowed value for the calculated size height.
+ *
+ * @param maxWidth The maximum allowed value for the calculated size width.
+ *
+ * @param maxHeight The maximum allowed value for the calculated size height.
+ *
+ * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
+ * fit into (0,0,width,height) after transformation with <code>matrix</code>.
+ * Returns null if there is no possible solution.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function fitBounds(width:Number, height:Number, matrix:Matrix,
+ explicitWidth:Number, explicitHeight:Number,
+ preferredWidth:Number, preferredHeight:Number,
+ minWidth:Number, minHeight:Number,
+ maxWidth:Number, maxHeight:Number):Point
+ {
+ if (isNaN(width) && isNaN(height))
+ return new Point(preferredWidth, preferredHeight);
+
+ // Allow for precision errors by including tolerance for certain values.
+ const newMinWidth:Number = (minWidth < MIN_MAX_TOLERANCE) ? 0 : minWidth - MIN_MAX_TOLERANCE;
+ const newMinHeight:Number = (minHeight < MIN_MAX_TOLERANCE) ? 0 : minHeight - MIN_MAX_TOLERANCE;
+ const newMaxWidth:Number = maxWidth + MIN_MAX_TOLERANCE;
+ const newMaxHeight:Number = maxHeight + MIN_MAX_TOLERANCE;
+
+ var actualSize:Point;
+
+ if (!isNaN(width) && !isNaN(height))
+ {
+ actualSize = calcUBoundsToFitTBounds(width, height, matrix,
+ newMinWidth, newMinHeight,
+ newMaxWidth, newMaxHeight);
+
+ // If we couldn't fit in both dimensions, try to fit only one and
+ // don't stick out of the other
+ if (!actualSize)
+ {
+ var actualSize1:Point;
+ actualSize1 = fitTBoundsWidth(width, matrix,
+ explicitWidth, explicitHeight,
+ preferredWidth, preferredHeight,
+ newMinWidth, newMinHeight,
+ newMaxWidth, newMaxHeight);
+
+ // If we fit the width, but not the height.
+ if (actualSize1)
+ {
+ var fitHeight:Number = transformSize(actualSize1.x, actualSize1.y, matrix).y;
+ if (fitHeight - SOLUTION_TOLERANCE > height)
+ actualSize1 = null;
+ }
+
+ var actualSize2:Point
+ actualSize2 = fitTBoundsHeight(height, matrix,
+ explicitWidth, explicitHeight,
+ preferredWidth, preferredHeight,
+ newMinWidth, newMinHeight,
+ newMaxWidth, newMaxHeight);
+
+ // If we fit the height, but not the width
+ if (actualSize2)
+ {
+ var fitWidth:Number = transformSize(actualSize2.x, actualSize2.y, matrix).x;
+ if (fitWidth - SOLUTION_TOLERANCE > width)
+ actualSize2 = null;
+ }
+
+ if (actualSize1 && actualSize2)
+ {
+ // Pick a solution
+ actualSize = ((actualSize1.x * actualSize1.y) > (actualSize2.x * actualSize2.y)) ? actualSize1 : actualSize2;
+ }
+ else if (actualSize1)
+ {
+ actualSize = actualSize1;
+ }
+ else
+ {
+ actualSize = actualSize2;
+ }
+ }
+ return actualSize;
+ }
+ else if (!isNaN(width))
+ {
+ return fitTBoundsWidth(width, matrix,
+ explicitWidth, explicitHeight,
+ preferredWidth, preferredHeight,
+ newMinWidth, newMinHeight,
+ newMaxWidth, newMaxHeight);
+ }
+ else
+ {
+ return fitTBoundsHeight(height, matrix,
+ explicitWidth, explicitHeight,
+ preferredWidth, preferredHeight,
+ newMinWidth, newMinHeight,
+ newMaxWidth, newMaxHeight);
+ }
+ }
+
+ /**
+ * @private
+ *
+ * <code>fitTBoundsWidth</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
+ * such that the bounding box transformed with <code>matrix</code> will fit
+ * into the specified width.
+ *
+ * @param width This is the width of the bounding box that calculated size
+ * needs to fit in.
+ *
+ * @param matrix This defines the transformations that the function will take
+ * into account when calculating the size. The bounding box (0,0,x,y) of the
+ * calculated size (x,y) transformed with <code>matrix</code> will fit in the
+ * specified <code>width</code> and <code>height</code>.
+ *
+ * @param explicitWidth Explicit width for the calculated size. The function
+ * will first try to find a solution using this width.
+ *
+ * @param explicitHeight Preferred height for the calculated size. The function
+ * will first try to find a solution using this height.
+ *
+ * @param preferredWidth Preferred width for the calculated size. If possible
+ * the function will set the calculated size width to this value.
+ *
+ * @param preferredHeight Preferred height for the calculated size. If possible
+ * the function will set the calculated size height to this value.
+ *
+ * @param minWidth The minimum allowed value for the calculated size width.
+ *
+ * @param minHeight The minimum allowed value for the calculated size height.
+ *
+ * @param maxWidth The maximum allowed value for the calculated size width.
+ *
+ * @param maxHeight The maximum allowed value for the calculated size height.
+ *
+ * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
+ * fit into (0,0,width,height) after transformation with <code>matrix</code>.
+ * Returns null if there is no possible solution.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ private static function fitTBoundsWidth(width:Number, matrix:Matrix,
+ explicitWidth:Number, explicitHeight:Number,
+ preferredWidth:Number, preferredHeight:Number,
+ minWidth:Number, minHeight:Number,
+ maxWidth:Number, maxHeight:Number):Point
+ {
+ var actualSize:Point;
+
+ // cases 1 and 2: only explicit width or explicit height is specified,
+ // so we try to find a solution with that hard constraint.
+ if (!isNaN(explicitWidth) && isNaN(explicitHeight))
+ {
+ actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
+ explicitWidth, preferredHeight,
+ explicitWidth, minHeight,
+ explicitWidth, maxHeight);
+
+ if (actualSize)
+ return actualSize;
+ }
+ else if (isNaN(explicitWidth) && !isNaN(explicitHeight))
+ {
+ actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
+ preferredWidth, explicitHeight,
+ minWidth, explicitHeight,
+ maxWidth, explicitHeight);
+ if (actualSize)
+ return actualSize;
+ }
+
+ // case 3: default case. When explicitWidth, explicitHeight are both set
+ // or not set, we use the preferred size since calcUBoundsToFitTBoundsWidth
+ // will just pick one.
+ actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
+ preferredWidth, preferredHeight,
+ minWidth, minHeight,
+ maxWidth, maxHeight);
+
+ return actualSize;
+ }
+
+ /**
+ * @private
+ *
+ * <code>fitTBoundsWidth</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
+ * such that the bounding box transformed with <code>matrix</code> will fit
+ * into the specified height.
+ *
+ * @param height This is the height of the bounding box that the calculated
+ * size needs to fit in.
+ *
+ * @param matrix This defines the transformations that the function will take
+ * into account when calculating the size. The bounding box (0,0,x,y) of the
+ * calculated size (x,y) transformed with <code>matrix</code> will fit in the
+ * specified <code>width</code> and <code>height</code>.
+ *
+ * @param explicitWidth Explicit width for the calculated size. The function
+ * will first try to find a solution using this width.
+ *
+ * @param explicitHeight Preferred height for the calculated size. The function
+ * will first try to find a solution using this height.
+ *
+ * @param preferredWidth Preferred width for the calculated size. If possible
+ * the function will set the calculated size width to this value.
+ *
+ * @param preferredHeight Preferred height for the calculated size. If possible
+ * the function will set the calculated size height to this value.
+ *
+ * @param minWidth The minimum allowed value for the calculated size width.
+ *
+ * @param minHeight The minimum allowed value for the calculated size height.
+ *
+ * @param maxWidth The maximum allowed value for the calculated size width.
+ *
+ * @param maxHeight The maximum allowed value for the calculated size height.
+ *
+ * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
+ * fit into (0,0,width,height) after transformation with <code>matrix</code>.
+ * Returns null if there is no possible solution.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ private static function fitTBoundsHeight(height:Number, matrix:Matrix,
+ explicitWidth:Number, explicitHeight:Number,
+ preferredWidth:Number, preferredHeight:Number,
+ minWidth:Number, minHeight:Number,
+ maxWidth:Number, maxHeight:Number):Point
+ {
+ var actualSize:Point;
+
+ // cases 1 and 2: only explicit width or explicit height is specified,
+ // so we try to find a solution with that hard constraint.
+ if (!isNaN(explicitWidth) && isNaN(explicitHeight))
+ {
+ actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
+ explicitWidth, preferredHeight,
+ explicitWidth, minHeight,
+ explicitWidth, maxHeight);
+
+ if (actualSize)
+ return actualSize;
+ }
+ else if (isNaN(explicitWidth) && !isNaN(explicitHeight))
+ {
+ actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
+ preferredWidth, explicitHeight,
+ minWidth, explicitHeight,
+ maxWidth, explicitHeight);
+ if (actualSize)
+ return actualSize;
+ }
+
+ // case 3: default case. When explicitWidth, explicitHeight are both set
+ // or not set, we use the preferred size since calcUBoundsToFitTBoundsWidth
+ // will just pick one.
+ actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
+ preferredWidth, preferredHeight,
+ minWidth, minHeight,
+ maxWidth, maxHeight);
+
+ return actualSize;
+ }
+
+ /**
+ * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
+ * with <code>matrix</code> will have bounding box with
+ * height equal to <code>h</code>.
+ * x and y are restricted by <code>minX</code>, <code>maxX</code> and
+ * <code>minY</code>, <code>maxY</code>.
+ *
+ * If possible x will be set to <code>preferredX</code> or
+ * y will be set to <code>preferredY</code>.
+ *
+ * When there are multiple solutions, the function picks the one that
+ * minimizes the bounding box area of transformed (0,0,x,y).
+ *
+ * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
+ * (solution components x and y are non-negative).
+ *
+ * @return Returns Point(x,y) or null if no solution exists.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static public function calcUBoundsToFitTBoundsHeight(h:Number,
+ matrix:Matrix,
+ preferredX:Number,
+ preferredY:Number,
+ minX:Number,
+ minY:Number,
+ maxX:Number,
+ maxY:Number):Point
+ {
+ // Untransformed bounds size is (x,y). The corners of the untransformed
+ // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
+ // Matrix is | a c tx |
+ // | b d ty |
+ //
+ // After transfomation with the matrix those four points are:
+ // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
+ // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
+ // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
+ // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
+ //
+ // The transformed bounds bounding box dimensions are (w,h):
+ // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
+ // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
+ //
+ // Looking at all the possible cases for min and max functions above,
+ // we can construct and solve simple linear systems for x and y.
+ // For example in the case of
+ // t1.x <= t2.x <= t3.x <= t4.x
+ // our first equation is
+ // (1) w = t4.x - t1.x <==> w = ax + cy
+ //
+ // To minimize the cases we're looking at we can take advantage of
+ // the limits we have: x >= 0, y >= 0;
+ // Taking into account these limits we deduce that:
+ // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
+ // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
+ // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
+ // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
+ //
+ // If we do a substitution such that
+ // c1 = a*c >= 0 ? c : -c
+ // d1 = b*d >= 0 ? d : -d
+ // we get the following linear system:
+ // (1) w = abs( ax + c1y )
+ // (2) h = abs( bx + d1y )
+ //
+ // Since we're matching height we only care about (2)
+
+ var b:Number = matrix.b;
+ var d:Number = matrix.d;
+
+ // If components are very close to zero, zero them out to handle the special cases
+ if (-1.0e-9 < b && b < +1.0e-9)
+ b = 0;
+ if (-1.0e-9 < d && d < +1.0e-9)
+ d = 0;
+
+ if (b == 0 && d == 0)
+ return null; // No solution
+
+ // Handle special cases first
+ if (b == 0 && d == 0)
+ return null; // No solution
+
+ if (b == 0)
+ return new Point( preferredX, h / Math.abs(d) );
+ else if (d == 0)
+ return new Point( h / Math.abs(b), preferredY );
+
+ const d1:Number = (b*d >= 0) ? d : -d;
+ // Now we have the following linear sytesm:
+ // (1) x = preferredX or y = preferredY
+ // (2) h = abs( bx + d1y )
+
+ var s:Point;
+ var x:Number;
+ var y:Number;
+
+ if (d1 != 0 && preferredX > 0)
+ {
+ const invD1:Number = 1 / d1;
+ preferredX = Math.max(minX, Math.min(maxX, preferredX));
+ x = preferredX;
+
+ // Case1:
+ // bx + d1y >= 0
+ // x = preferredX
+ y = (h - b * x) * invD1;
+ if (minY <= y && y <= maxY &&
+ b * x + d1 * y >= 0 ) // Satisfy Case1
+ {
+ s = new Point(x, y);
+ }
+
+ // Case2:
+ // bx + d1y < 0
+ // x = preferredX
+ y = (-h - b * x) * invD1;
+ if (minY <= y && y <= maxY &&
+ b * x + d1 * y < 0 ) // Satisfy Case2
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
+ s = new Point(x, y);
+ }
+ }
+
+ if (b != 0 && preferredY > 0)
+ {
+ const invB:Number = 1 / b;
+ preferredY = Math.max(minY, Math.min(maxY, preferredY));
+ y = preferredY;
+
+ // Case3:
+ // bx + d1y >= 0
+ // y = preferredY
+ x = ( h - d1 * y ) * invB;
+ if (minX <= x && x <= maxX &&
+ b * x + d1 * y >= 0) // Satisfy Case3
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
+ s = new Point(x, y);
+ }
+
+ // Case4:
+ // bx + d1y < 0
+ // y = preferredY
+ x = ( -h - d1 * y ) * invB;
+ if (minX <= x && x <= maxX &&
+ b * x + d1 * y < 0) // Satisfy Case4
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
+ s = new Point(x, y);
+ }
+ }
+
+ // If there's already a solution that matches preferred dimention, return
+ if (s)
+ return s;
+
+ // Find a solution that matches the width and minimizes the height:
+ const a:Number = matrix.a;
+ const c:Number = matrix.c;
+ const c1:Number = ( a*c >= 0 ) ? c : -c;
+ return solveEquation(b, d1, h, minX, minY, maxX, maxY, a, c1);
+ }
+
+ /**
+ * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
+ * with <code>matrix</code> will have bounding box with
+ * width equal to <code>w</code>.
+ * x and y are restricted by <code>minX</code>, <code>maxX</code> and
+ * <code>minY</code>, <code>maxY</code>.
+ *
+ * If possible x will be set to <code>preferredX</code> or
+ * y will be set to <code>preferredY</code>.
+ *
+ * When there are multiple solutions, the function picks the one that
+ * minimizes the bounding box area of transformed (0,0,x,y).
+ *
+ * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
+ * (solution components x and y are non-negative).
+ *
+ * @return Returns Point(x,y) or null if no solution exists.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static public function calcUBoundsToFitTBoundsWidth(w:Number,
+ matrix:Matrix,
+ preferredX:Number,
+ preferredY:Number,
+ minX:Number,
+ minY:Number,
+ maxX:Number,
+ maxY:Number):Point
+ {
+ // Untransformed bounds size is (x,y). The corners of the untransformed
+ // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
+ // Matrix is | a c tx |
+ // | b d ty |
+ //
+ // After transfomation with the matrix those four points are:
+ // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
+ // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
+ // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
+ // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
+ //
+ // The transformed bounds bounding box dimensions are (w,h):
+ // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
+ // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
+ //
+ // Looking at all the possible cases for min and max functions above,
+ // we can construct and solve simple linear systems for x and y.
+ // For example in the case of
+ // t1.x <= t2.x <= t3.x <= t4.x
+ // our first equation is
+ // (1) w = t4.x - t1.x <==> w = ax + cy
+ //
+ // To minimize the cases we're looking at we can take advantage of
+ // the limits we have: x >= 0, y >= 0;
+ // Taking into account these limits we deduce that:
+ // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
+ // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
+ // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
+ // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
+ //
+ // If we do a substitution such that
+ // c1 = a*c >= 0 ? c : -c
+ // d1 = b*d >= 0 ? d : -d
+ // we get the following linear system:
+ // (1) w = abs( ax + c1y )
+ // (2) h = abs( bx + d1y )
+ //
+ // Since we're matching width we only care about (1)
+
+ var a:Number = matrix.a;
+ var c:Number = matrix.c;
+
+ // If components are very close to zero, zero them out to handle the special cases
+ if (-1.0e-9 < a && a < +1.0e-9)
+ a = 0;
+ if (-1.0e-9 < c && c < +1.0e-9)
+ c = 0;
+
+ // Handle special cases first
+ if (a == 0 && c == 0)
+ return null; // No solution
+
+ if (a == 0)
+ return new Point( preferredX, w / Math.abs(c) );
+ else if (c == 0)
+ return new Point( w / Math.abs(a), preferredY );
+
+ const c1:Number = ( a*c >= 0 ) ? c : -c;
+ // Now we have the following linear sytesm:
+ // (1) w = abs( ax + c1y )
+ // (2) x = preferredX or y = preferredY
+
+ var s:Point;
+ var x:Number;
+ var y:Number;
+
+ if (c1 != 0 && preferredX > 0)
+ {
+ const invC1:Number = 1 / c1;
+ preferredX = Math.max(minX, Math.min(maxX, preferredX));
+ x = preferredX;
+
+ // Case1:
+ // a * x + c1 * y >= 0
+ // x = preferredX
+ y = (w - a * x) * invC1;
+ if (minY <= y && y <= maxY &&
+ a * x + c1 * y >= 0 ) // Satisfy Case1
+ {
+ s = new Point(x, y);
+ }
+
+ // Case2:
+ // a * x + c1 * y < 0
+ // x = preferredX
+ y = (-w - a * x) * invC1;
+ if (minY <= y && y <= maxY &&
+ a * x + c1 * y < 0 ) // Satisfy Case2
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
+ s = new Point(x, y);
+ }
+ }
+
+ if (a != 0 && preferredY > 0)
+ {
+ const invA:Number = 1 / a;
+ preferredY = Math.max(minY, Math.min(maxY, preferredY));
+ y = preferredY;
+
+ // Case3:
+ // a * x + c1 * y >= 0
+ // y = preferredY
+ x = (w - c1 * y ) * invA;
+ if (minX <= x && x <= maxX &&
+ a * x + c1 * y >= 0) // Satisfy Case3
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
+ s = new Point(x, y);
+ }
+
+ // Case4:
+ // a * x + c1 * y < 0
+ // y = preferredY
+ x = (-w - c1 * y ) * invA;
+ if (minX <= x && x <= maxX &&
+ a * x + c1 * y < 0) // Satisfy Case4
+ {
+ // If there is no solution, or the new solution yields smaller value, pick the new solution.
+ if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
+ s = new Point(x, y);
+ }
+ }
+
+ // If there's already a solution that matches preferred dimention, return
+ if (s)
+ return s;
+
+ // Find a solution that matches the width and minimizes the height:
+ const b:Number = matrix.b;
+ const d:Number = matrix.d;
+ const d1:Number = (b*d >= 0) ? d : -d;
+ return solveEquation(a, c1, w, minX, minY, maxX, maxY, b, d1);
+ }
+
+ /**
+ * Finds a solution (x,y) for the equation abs(a*x + c*y) = w such that
+ * abs(b*x +d*y) is minimized.
+ * If there is infinite number of solutions, x and y are picked to be
+ * as close as possible.
+ *
+ * Doesn't handle cases where <code>a</code> or <code>c</code> are zero.
+ *
+ * @return Returns Point(x,y)
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static private function solveEquation(a:Number,
+ c:Number,
+ w:Number,
+ minX:Number,
+ minY:Number,
+ maxX:Number,
+ maxY:Number,
+ b:Number,
+ d:Number):Point
+ {
+ if (a == 0 || c == 0)
+ return null; // x and y are not co-dependent
+
+ // (1) w = abs( ax + cy )
+ // Find the range of solutsion for y and pick:
+ var x:Number;
+ var y:Number;
+ var s:Point;
+
+ // Case1: ax + cy >= 0, from (1) above we get:
+ // (1) x = (w - cy) / a
+ //
+ // Lets find the possible range of values for y:
+ // We know that
+ // (3) minX <= x <= maxX
+ //
+ // Substitute x with (w - cy)/a in (3):
+ // (3) minX - w/a <= -cy/a <= maxX - w/a
+ // (3) min( A, B ) <= y <= max( A, B ), where
+ // A = (minX - w/a) * (-a/c)
+ // B = (maxX - w/a) * (-a/c)
+
+ var A:Number = (w - minX * a) / c;
+ var B:Number = (w - maxX * a) / c;
+ var rangeMinY:Number = Math.max(minY, Math.min(A, B));
+ var rangeMaxY:Number = Math.min(maxY, Math.max(A, B));
+ const det:Number = (b * c - a * d);
+
+ // We have a possible solution for Case1 if the range for y is valid
+ if (rangeMinY <= rangeMaxY)
+ {
+ // Now that we have a valid range for y, we need to pick a value within
+ // that range.
+ //
+ // We calculate the value based on a custom condition.
+ //
+ // The custom condition that we use could be anything that defines
+ // another equation for x and y. Some examples are:
+ // "make x and y as close as possible": y = w / ( a + c );
+ // "minimize abs(bx + dy)": y = b * w / det
+ // "preserve aspect ratio": y = w / ( a * preferredX / preferredY + c );
+ if (Math.abs(det) < 1.0e-9)
+ {
+ // There is infinite number of solutions, lets pick x == y
+ y = w / ( a + c );
+ }
+ else
+ {
+ // Minimize abs(bx + dy) - we need to solve:
+ // abs( b * ( w - c * y ) / a + d * y ) = 0
+ // which gives us:
+ y = b * w / det;
+ }
+
+ // Now that we have the y value calculated from the custom condition,
+ // we clamp with the range. This gives us a solution with
+ // values as close as possible to satisfy our custom condition when
+ // the condition is a linear function of x and y (in our case it is).
+ y = Math.max(rangeMinY, Math.min(y, rangeMaxY));
+
+ x = (w - c * y) / a;
+ return new Point(x, y);
+ }
+
+ // Case2: ax + cy < 0, from (1) above we get:
+ // (1) x = (-w - cy) / a
+ //
+ // Lets find the possible range of values for y:
+ // We know that
+ // (3) minX <= x <= maxX
+ //
+ // Substitute x with (-w - cy)/a in (3):
+ // (3) minX + w/a <= -cy/a <= maxX + w/a
+ // (3) min( A, B ) <= y <= max( A, B ), where
+ // A = (minX + w/a) * (-a/c)
+ // B = (maxX + w/a) * (-a/c)
+
+ A = -(minX * a + w) / c;
+ B = -(maxX * a + w) / c;
+ rangeMinY = Math.max(minY, Math.min(A, B));
+ rangeMaxY = Math.min(maxY, Math.max(A, B));
+
+ // We have a possible solution for Case2 if the range for y is valid
+ if (rangeMinY <= rangeMaxY)
+ {
+ // Now that we have a valid range for y, we need to pick a value within
+ // that range.
+ //
+ // We calculate the value based on a custom condition.
+ //
+ // The custom condition that we use could be anything that defines
+ // another equation for x and y. Some examples are:
+ // "make x and y as close as possible": y = -w / ( a + c );
+ // "minimize abs(bx + dy)": y = -b * w / det
+ // "preserve aspect ratio": y = w / ( a * preferredX / preferredY + c );
+ if (Math.abs(det) < 1.0e-9)
+ {
+ // There is infinite number of solutions, lets pick x == y
+ y = -w / ( a + c );
+ }
+ else
+ {
+ // Minimize abs(bx + dy) - we need to solve:
+ // abs( b * ( -w - c * y ) / a + d * y ) = 0
+ // which gives us:
+ y = -b * w / det;
+ }
+
+ // Now that we have the y value calculated from the custom condition,
+ // we clamp with the range. This gives us a solution with
+ // values as close as possible to satisfy our custom condition when
+ // the condition is a linear function of x and y (in our case it is).
+ y = Math.max(rangeMinY, Math.min(y, rangeMaxY));
+ x = (-w - c * y) / a;
+ return new Point(x, y);
+
+ }
+ return null; // No solution
+ }
+
+ /**
+ * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
+ * with <code>matrix</code> will have bounding box (0,0,w,h).
+ * x and y are restricted by <code>minX</code>, <code>maxX</code> and
+ * <code>minY</code>, <code>maxY</code>.
+ *
+ * When there is infinite number of solutions, the function will
+ * calculate x and y to be as close as possible.
+ *
+ * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
+ * (solution components x and y are non-negative).
+ *
+ * @return Point(x,y) or null if no solution exists.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static public function calcUBoundsToFitTBounds(w:Number,
+ h:Number,
+ matrix:Matrix,
+ minX:Number,
+ minY:Number,
+ maxX:Number,
+ maxY:Number):Point
+ {
+ // Untransformed bounds size is (x,y). The corners of the untransformed
+ // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
+ // Matrix is | a c tx |
+ // | b d ty |
+ //
+ // After transfomation with the matrix those four points are:
+ // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
+ // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
+ // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
+ // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
+ //
+ // The transformed bounds bounding box dimensions are (w,h):
+ // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
+ // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
+ //
+ // Looking at all the possible cases for min and max functions above,
+ // we can construct and solve simple linear systems for x and y.
+ // For example in the case of
+ // t1.x <= t2.x <= t3.x <= t4.x
+ // our first equation is
+ // (1) w = t4.x - t1.x <==> w = ax + cy
+ //
+ // To minimize the cases we're looking at we can take advantage of
+ // the limits we have: x >= 0, y >= 0;
+ // Taking into account these limits we deduce that:
+ // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
+ // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
+ // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
+ // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
+ //
+ // If we do a substitution such that
+ // c1 = a*c >= 0 ? c : -c
+ // d1 = b*d >= 0 ? d : -d
+ // we get the following linear system:
+ // (1) w = abs( ax + c1y )
+ // (2) h = abs( bx + d1y )
+ //
+
+ var a:Number = matrix.a;
+ var b:Number = matrix.b;
+ var c:Number = matrix.c;
+ var d:Number = matrix.d;
+
+ // If components are very close to zero, zero them out to handle the special cases
+ if (-1.0e-9 < a && a < +1.0e-9)
+ a = 0;
+ if (-1.0e-9 < b && b < +1.0e-9)
+ b = 0;
+ if (-1.0e-9 < c && c < +1.0e-9)
+ c = 0;
+ if (-1.0e-9 < d && d < +1.0e-9)
+ d = 0;
+
+ // Handle special cases.
+ if (b == 0 && c == 0)
+ {
+ // No solution in the following cases since the matrix collapses
+ // all points into a line.
+ if (a == 0 || d == 0)
+ return null;
+
+ // (1) w = abs( ax + cy ) <=> w = abs( ax ) <=> w = abs(a)x
+ // (2) h = abs( bx + dy ) <=> h = abs( dy ) <=> h = abs(d)y
+ return new Point(w / Math.abs(a), h / Math.abs(d));
+ }
+
+ if (a == 0 && d == 0)
+ {
+ // No solution in the following cases since the matrix collapses
+ // all points into a line.
+ if (b == 0 || c == 0)
+ return null;
+
+ // (1) w = abs( ax + cy ) <=> w = abs( cy ) <=> w = abs(c)y
+ // (2) h = abs( bx + dy ) <=> h = abs( bx ) <=> h = abs(b)x
+ return new Point(h / Math.abs(b), w / Math.abs(c));
+ }
+
+ // Handle general cases.
+ const c1:Number = ( a*c >= 0 ) ? c : -c;
+ const d1:Number = ( b*d >= 0 ) ? d : -d;
+ // we get the following linear system:
+ // (1) w = abs( ax + c1y )
+ // (2) h = abs( bx + d1y )
+
+ // Calculate the determinant of the system
+ const det:Number = a * d1 - b * c1;
+ if (Math.abs(det) < 1.0e-9)
+ {
+ // No solution in these cases since the matrix
+ // collapses all points into a line.
+ if (c1 == 0 || a == 0 || a == -c1)
+ return null;
+
+ if (Math.abs(a * h - b * w) > 1.0e-9)
+ return null; // No solution in this case
+
+ // Determinant is zero, the equations (1) & (2) are equivalent and
+ // we have only one equation:
+ // (1) w = abs( ax + c1y )
+ //
+ // Solve it finding x and y as close as possible:
+ return solveEquation(a, c1, w, minX, minX, maxX, maxY, b, d1);
+ }
+
+ // Pre-multiply w & h by the inverse dteterminant
+ const invDet:Number = 1 / det;
+ w *= invDet;
+ h *= invDet;
+
+ // Case 1:
+ // a * x + c1 * y >= 0
+ // b * x + d1 * y >= 0
+ var s:Point;
+ s = solveSystem(a, c1, b, d1, w, h);
+ if (s &&
+ minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
+ a * s.x + c1 * s.x >= 0 &&
+ b * s.x + d1 * s.y >= 0)
+ return s;
+
+ // Case 2:
+ // a * x + c1 * y >= 0
+ // b * x + d1 * y < 0
+ s = solveSystem( a, c1, b, d1, w, -h);
+ if (s &&
+ minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
+ a * s.x + c1 * s.x >= 0 &&
+ b * s.x + d1 * s.y < 0)
+ return s;
+
+ // Case 3:
+ // a * x + c1 * y < 0
+ // b * x + d1 * y >= 0
+ s = solveSystem( a, c1, b, d1, -w, h);
+ if (s &&
+ minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
+ a * s.x + c1 * s.x < 0 &&
+ b * s.x + d1 * s.y >= 0)
+ return s;
+
+ // Case 4:
+ // a * x + c1 * y < 0
+ // b * x + d1 * y < 0
+ s = solveSystem( a, c1, b, d1, -w, -h);
+ if (s &&
+ minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
+ a * s.x + c1 * s.x < 0 &&
+ b * s.x + d1 * s.y < 0)
+ return s;
+
+ return null; // No solution.
+ }
+
+ /**
+ * Determine if two Matrix instances are equal.
+ *
+ * @return true if the matrices are equal.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function isEqual(m1:Matrix, m2:Matrix):Boolean
+ {
+ return ((m1 && m2 &&
+ m1.a == m2.a &&
+ m1.b == m2.b &&
+ m1.c == m2.c &&
+ m1.d == m2.d &&
+ m1.tx == m2.tx &&
+ m1.ty == m2.ty) ||
+ (!m1 && !m2));
+ }
+
+ /**
+ * Determine if two Matrix3D instances are equal.
+ *
+ * @return true if the matrices are equal.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static function isEqual3D(m1:Matrix3D, m2:Matrix3D):Boolean
+ {
+ if (m1 && m2 && m1.rawData.length == m2.rawData.length)
+ {
+ var r1:Vector.<Number> = m1.rawData;
+ var r2:Vector.<Number> = m2.rawData;
+
+ return (r1[0] == r2[0] &&
+ r1[1] == r2[1] &&
+ r1[2] == r2[2] &&
+ r1[3] == r2[3] &&
+ r1[4] == r2[4] &&
+ r1[5] == r2[5] &&
+ r1[6] == r2[6] &&
+ r1[7] == r2[7] &&
+ r1[8] == r2[8] &&
+ r1[9] == r2[9] &&
+ r1[10] == r2[10] &&
+ r1[11] == r2[11] &&
+ r1[12] == r2[12] &&
+ r1[13] == r2[13] &&
+ r1[14] == r2[14] &&
+ r1[15] == r2[15]);
+ }
+
+ return (!m1 && !m2);
+ }
+
+ /**
+ * Calculates (x,y) such as to satisfy the linear system:
+ * | a * x + c * y = m
+ * | b * x + d * y = n
+ *
+ * @param mOverDet <code>mOverDet must be equal to m / (a*d - b*c)</code>
+ * @param nOverDet <code>mOverDet must be equal to n / (a*d - b*c)</code>
+ *
+ * @return returns Point(x,y)
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ static private function solveSystem(a:Number,
+ c:Number,
+ b:Number,
+ d:Number,
+ mOverDet:Number,
+ nOverDet:Number):Point
+ {
+ return new Point(d * mOverDet - c * nOverDet,
+ a * nOverDet - b * mOverDet);
+ }
+
+ }
+
+}
+
[49/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix up
config files
Posted by ah...@apache.org.
fix up config files
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7e719720
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7e719720
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7e719720
Branch: refs/heads/develop
Commit: 7e7197205cad1cce8bfbe6fc511f2af8d4b01b40
Parents: 753ea40
Author: Alex Harui <ah...@apache.org>
Authored: Wed Feb 3 09:30:08 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:54 2016 -0800
----------------------------------------------------------------------
frameworks/air-config-template.xml | 30 +++++++++++++++---------------
frameworks/air-config.xml | 30 +++++++++++++++---------------
frameworks/flex-config-template.xml | 30 +++++++++++++++---------------
frameworks/flex-config.xml | 30 +++++++++++++++---------------
4 files changed, 60 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e719720/frameworks/air-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/air-config-template.xml b/frameworks/air-config-template.xml
index eb3c3d3..698d99b 100644
--- a/frameworks/air-config-template.xml
+++ b/frameworks/air-config-template.xml
@@ -106,19 +106,19 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Binding/basic-manifest.xml</manifest>
+ <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Charts/basic-manifest.xml</manifest>
+ <manifest>projects/Charts/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Collections/basic-manifest.xml</manifest>
+ <manifest>projects/Collections/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -130,25 +130,25 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+ <manifest>projects/DragDrop/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Effects/basic-manifest.xml</manifest>
+ <manifest>projects/Effects/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Formatters/basic-manifest.xml</manifest>
+ <manifest>projects/Formatters/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Graphics/basic-manifest.xml</manifest>
+ <manifest>projects/Graphics/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -160,49 +160,49 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Mobile/basic-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Network/basic-manifest.xml</manifest>
+ <manifest>projects/Network/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
+ <manifest>projects/HTML5/src/main/resources/html5-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>projects/Flat/flat-manifest.xml</manifest>
+ <manifest>projects/Flat/src/main/resources/flat-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+ <manifest>projects/JQuery/src/main/resources/jquery-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+ <manifest>projects/GoogleMaps/src/main/resources/google-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/cordova-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+ <manifest>projects/CreateJS/src/main/resources/createjs-manifest.xml</manifest>
</namespace>
</namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e719720/frameworks/air-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/air-config.xml b/frameworks/air-config.xml
index 6b7a441..9d4a2ed 100644
--- a/frameworks/air-config.xml
+++ b/frameworks/air-config.xml
@@ -106,19 +106,19 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Binding/basic-manifest.xml</manifest>
+ <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Charts/basic-manifest.xml</manifest>
+ <manifest>projects/Charts/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Collections/basic-manifest.xml</manifest>
+ <manifest>projects/Collections/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -130,25 +130,25 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+ <manifest>projects/DragDrop/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Effects/basic-manifest.xml</manifest>
+ <manifest>projects/Effects/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Formatters/basic-manifest.xml</manifest>
+ <manifest>projects/Formatters/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Graphics/basic-manifest.xml</manifest>
+ <manifest>projects/Graphics/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -160,49 +160,49 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Mobile/basic-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Network/basic-manifest.xml</manifest>
+ <manifest>projects/Network/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
+ <manifest>projects/HTML5/src/main/resources/html5-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>projects/Flat/flat-manifest.xml</manifest>
+ <manifest>projects/Flat/src/main/resources/flat-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+ <manifest>projects/JQuery/src/main/resources/jquery-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+ <manifest>projects/GoogleMaps/src/main/resources/google-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/cordova-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+ <manifest>projects/CreateJS/src/main/resources/createjs-manifest.xml</manifest>
</namespace>
</namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e719720/frameworks/flex-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/flex-config-template.xml b/frameworks/flex-config-template.xml
index a36a269..8b8b0ba 100644
--- a/frameworks/flex-config-template.xml
+++ b/frameworks/flex-config-template.xml
@@ -109,19 +109,19 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Binding/basic-manifest.xml</manifest>
+ <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Charts/basic-manifest.xml</manifest>
+ <manifest>projects/Charts/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Collections/basic-manifest.xml</manifest>
+ <manifest>projects/Collections/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -133,25 +133,25 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+ <manifest>projects/DragDrop/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Effects/basic-manifest.xml</manifest>
+ <manifest>projects/Effects/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Formatters/basic-manifest.xml</manifest>
+ <manifest>projects/Formatters/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Graphics/basic-manifest.xml</manifest>
+ <manifest>projects/Graphics/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -163,49 +163,49 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Mobile/basic-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Network/basic-manifest.xml</manifest>
+ <manifest>projects/Network/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
+ <manifest>projects/HTML5/src/main/resources/html5-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>projects/Flat/flat-manifest.xml</manifest>
+ <manifest>projects/Flat/src/main/resources/flat-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+ <manifest>projects/JQuery/src/main/resources/jquery-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+ <manifest>projects/GoogleMaps/src/main/resources/google-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/cordova-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+ <manifest>projects/CreateJS/src/main/resources/createjs-manifest.xml</manifest>
</namespace>
</namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7e719720/frameworks/flex-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/flex-config.xml b/frameworks/flex-config.xml
index 4662442..97cddd8 100644
--- a/frameworks/flex-config.xml
+++ b/frameworks/flex-config.xml
@@ -109,19 +109,19 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Binding/basic-manifest.xml</manifest>
+ <manifest>projects/Binding/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Charts/basic-manifest.xml</manifest>
+ <manifest>projects/Charts/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Collections/basic-manifest.xml</manifest>
+ <manifest>projects/Collections/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -133,25 +133,25 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+ <manifest>projects/DragDrop/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Effects/basic-manifest.xml</manifest>
+ <manifest>projects/Effects/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Formatters/basic-manifest.xml</manifest>
+ <manifest>projects/Formatters/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Graphics/basic-manifest.xml</manifest>
+ <manifest>projects/Graphics/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
@@ -163,49 +163,49 @@
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Mobile/basic-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Network/basic-manifest.xml</manifest>
+ <manifest>projects/Network/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
+ <manifest>projects/HTML5/src/main/resources/html5-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/flat</uri>
- <manifest>projects/Flat/flat-manifest.xml</manifest>
+ <manifest>projects/Flat/src/main/resources/flat-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/jquery</uri>
- <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+ <manifest>projects/JQuery/src/main/resources/jquery-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/google</uri>
- <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+ <manifest>projects/GoogleMaps/src/main/resources/google-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+ <manifest>projects/Mobile/src/main/resources/cordova-manifest.xml</manifest>
</namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+ <manifest>projects/CreateJS/src/main/resources/createjs-manifest.xml</manifest>
</namespace>
</namespaces>
[39/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cfe7d2c5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cfe7d2c5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cfe7d2c5
Branch: refs/heads/develop
Commit: cfe7d2c55730658261eff58524308e7064737fdb
Parents: c470528
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:48:05 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Network/build.xml | 70 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 4 +-
.../src/main/resources/compile-config.xml | 6 +-
3 files changed, 43 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cfe7d2c5/frameworks/projects/Network/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/build.xml b/frameworks/projects/Network/build.xml
index c3a38ea..e971317 100644
--- a/frameworks/projects/Network/build.xml
+++ b/frameworks/projects/Network/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Network-${release.version}.swc" />
+ <property name="target.name.no.version" value="Network.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile" description="Full build of Network.swc">
</target>
@@ -47,53 +49,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Network.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Network.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
-
+ <!-- make JS output folder now so include-file doesn't error -->
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in NetworkClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Network.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling Network"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -103,8 +108,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -115,13 +120,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Network.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -139,9 +145,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Network.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -150,13 +156,13 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
-
- <target name="copy-js" >
+
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cfe7d2c5/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
index a61da6f..6c727b1 100644
--- a/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
@@ -45,7 +45,7 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<namespaces>
@@ -56,7 +56,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cfe7d2c5/frameworks/projects/Network/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/resources/compile-config.xml b/frameworks/projects/Network/src/main/resources/compile-config.xml
index ed9e3e8..f61f1e5 100644
--- a/frameworks/projects/Network/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Network/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,7 +61,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[06/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fd70a2c5
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fd70a2c5
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fd70a2c5
Branch: refs/heads/develop
Commit: fd70a2c5d777966cbef508c7fef9b3b6abcd855e
Parents: 24e71c9
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:31:12 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Collections/build.xml | 55 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 6 +--
.../src/main/resources/compile-config.xml | 6 +--
3 files changed, 36 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd70a2c5/frameworks/projects/Collections/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/build.xml b/frameworks/projects/Collections/build.xml
index 8206623..48e298b 100644
--- a/frameworks/projects/Collections/build.xml
+++ b/frameworks/projects/Collections/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Collections-${release.version}.swc" />
+ <property name="target.name.no.version" value="Collections.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Collections.swc">
</target>
@@ -41,11 +43,11 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Collections.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
@@ -56,40 +58,41 @@
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Collections.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in CollectionsClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Collections.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
<target name="compile-asjs">
- <echo message="Cross-compiling Collections"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -99,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -113,11 +116,12 @@
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Collections.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -135,9 +139,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Collections.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -146,11 +150,12 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd70a2c5/frameworks/projects/Collections/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Collections/src/main/resources/compile-asjs-config.xml
index f5e728e..a69e491 100644
--- a/frameworks/projects/Collections/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Collections/src/main/resources/compile-asjs-config.xml
@@ -45,18 +45,18 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
</compiler>
<include-sources>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</include-sources>
<include-namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd70a2c5/frameworks/projects/Collections/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/src/main/resources/compile-config.xml b/frameworks/projects/Collections/src/main/resources/compile-config.xml
index 22daebd..1a1fc84 100644
--- a/frameworks/projects/Collections/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Collections/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,7 +61,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[11/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/447b2d8c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/447b2d8c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/447b2d8c
Branch: refs/heads/develop
Commit: 447b2d8c618c97bfc7d5129930bfa29944329b68
Parents: b2e35b8
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:42:08 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
frameworks/projects/CreateJS/build.xml | 61 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 6 +-
.../src/main/resources/compile-config.xml | 10 ++--
3 files changed, 42 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/447b2d8c/frameworks/projects/CreateJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/build.xml b/frameworks/projects/CreateJS/build.xml
index b121239..eb84ec2 100644
--- a/frameworks/projects/CreateJS/build.xml
+++ b/frameworks/projects/CreateJS/build.xml
@@ -31,6 +31,8 @@
<condition property="no.lint" value="true">
<os family="windows"/>
</condition>
+ <property name="target.name" value="CreateJS-${release.version}.swc" />
+ <property name="target.name.no.version" value="CreateJS.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of CreateJS.swc">
</target>
@@ -50,11 +52,11 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="CreateJS.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
@@ -65,38 +67,41 @@
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/CreateJS.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
-
+ <!-- make JS output folder now so include-file doesn't error -->
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in CreateJSClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/CreateJS.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
- <target name="compile-asjs" >
- <echo message="Cross-compiling CreateJS"/>
+ <target name="compile-asjs">
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -106,8 +111,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -121,11 +126,12 @@
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/CreateJS.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -143,9 +149,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/CreateJS.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -155,12 +161,13 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
- <target name="copy-js" >
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/447b2d8c/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
index 35c65b3..cd48012 100644
--- a/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
@@ -52,12 +52,12 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<library-path>
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/447b2d8c/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
index 3aecfb2..46f455d 100644
--- a/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
@@ -23,8 +23,8 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -54,7 +54,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -62,11 +62,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[04/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7fee2a2b
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7fee2a2b
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7fee2a2b
Branch: refs/heads/develop
Commit: 7fee2a2b700a3d36e5aa8627a77a369d94c7f4d5
Parents: 51c4ffe
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:53:53 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
frameworks/projects/DragDrop/build.xml | 64 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 4 +-
.../src/main/resources/compile-config.xml | 6 +-
3 files changed, 40 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7fee2a2b/frameworks/projects/DragDrop/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/build.xml b/frameworks/projects/DragDrop/build.xml
index 6736a35..1f42c0c 100644
--- a/frameworks/projects/DragDrop/build.xml
+++ b/frameworks/projects/DragDrop/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="DragDrop-${release.version}.swc" />
+ <property name="target.name.no.version" value="DragDrop.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,compile" description="Full build of DragDrop.swc">
</target>
@@ -48,55 +50,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="DragDrop.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
-
+
<path id="lib.path">
<fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/DragDrop.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in DragDropClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/DragDrop.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
<target name="compile-asjs">
- <echo message="Cross-compiling DragDrop"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -106,8 +109,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -120,11 +123,12 @@
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/DragDrop.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -133,7 +137,7 @@
Link in the classes (and their dependencies) for the MXML tags
listed in this project's manifest.xml.
Also link the additional classes (and their dependencies)
- listed in DragDropClasses.as,
+ listed in CoreClasses.as,
because these aren't referenced by the manifest classes.
Keep the standard metadata when compiling.
Include the appropriate CSS files and assets in the SWC.
@@ -142,9 +146,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/DragDrop.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -153,14 +157,16 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
- <target name="copy-js" >
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
+
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7fee2a2b/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml b/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
index 1ad65d7..a4561e7 100644
--- a/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
@@ -45,7 +45,7 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<namespaces>
@@ -56,7 +56,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7fee2a2b/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/compile-config.xml b/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
index f8d1526..d5c9769 100644
--- a/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
+++ b/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,7 +61,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[45/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for mobile
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/compile-config.xml b/frameworks/projects/Mobile/compile-config.xml
deleted file mode 100644
index 8a4b4ed..0000000
--- a/frameworks/projects/Mobile/compile-config.xml
+++ /dev/null
@@ -1,89 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/Graphics.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/cordova</uri>
- <manifest>cordova-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>MobileClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <uri>library://ns.apache.org/flexjs/cordova</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/cordova-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/cordova-manifest.xml b/frameworks/projects/Mobile/cordova-manifest.xml
deleted file mode 100644
index 002eed1..0000000
--- a/frameworks/projects/Mobile/cordova-manifest.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Application" class="org.apache.cordova.Application"/>
- <component id="Camera" class="org.apache.cordova.camera.Camera"/>
- <component id="Weinre" class="org.apache.cordova.Weinre"/>
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/CordovaClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/CordovaClasses.as b/frameworks/projects/Mobile/src/main/flex/CordovaClasses.as
new file mode 100644
index 0000000..3b9dc98
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/CordovaClasses.as
@@ -0,0 +1,36 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class CordovaClasses
+{
+ import org.apache.cordova.camera.Camera; Camera;
+ import org.apache.cordova.Application; Application;
+ import org.apache.cordova.Weinre; Weinre;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/MobileClasses.as b/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
new file mode 100644
index 0000000..fc933aa
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/MobileClasses.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class MobileClasses
+{
+ import org.apache.flex.mobile.ManagerBase; ManagerBase;
+
+ import org.apache.flex.mobile.ViewManagerBase; ViewManagerBase;
+ import org.apache.flex.mobile.beads.StackedViewManagerView; StackedViewManagerView;
+ import org.apache.flex.mobile.beads.TabbedViewManagerView; TabbedViewManagerView;
+ import org.apache.flex.mobile.beads.ViewManagerView; ViewManagerView;
+ import org.apache.flex.mobile.chrome.NavigationBar; NavigationBar;
+ import org.apache.flex.mobile.chrome.TabBar; TabBar;
+ import org.apache.flex.mobile.chrome.ToolBar; ToolBar;
+ import org.apache.flex.mobile.models.ViewManagerModel; ViewManagerModel;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
new file mode 100644
index 0000000..c19f26a
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Application.as
@@ -0,0 +1,56 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.cordova
+{
+ import org.apache.flex.events.Event;
+ import org.apache.flex.core.Application;
+ import org.apache.flex.core.IFlexInfo;
+
+ /**
+ * Dispatched at startup after the initial view has been
+ * put on the display list.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="deviceready", type="org.apache.flex.events.Event")]
+
+ /**
+ * A customized Application that dispatches the Cordova deviceReady event
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Application extends org.apache.flex.core.Application implements IFlexInfo
+ {
+ public function Application()
+ {
+ addEventListener("applicationComplete", appCompleteHandler);
+ }
+
+ private function appCompleteHandler(event:Event):void
+ {
+ dispatchEvent(new Event("deviceready"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
new file mode 100644
index 0000000..2e4b579
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/Weinre.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.cordova
+{
+ COMPILE::AS3
+ {
+ import flash.net.URLRequest;
+ import flash.net.navigateToURL;
+ }
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+
+ /**
+ * A class that helps set up to use Weinre for debugging
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Weinre implements IBead
+ {
+ public function Weinre()
+ {
+ }
+
+ 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;
+ }
+
+ /**
+ * The guid to use at the Weinre server
+ * http://debug.phonegap.com
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion HTMLScriptElement
+ * @flexjsignorecoercion HTMLHeadElement
+ */
+ public function set guid(value:String):void
+ {
+ COMPILE::AS3
+ {
+ navigateToURL(new URLRequest("http://debug.phonegap.com/client/#" + value), "_blank");
+ }
+ COMPILE::JS
+ {
+ var scriptNode:HTMLScriptElement = document.createElement('SCRIPT') as HTMLScriptElement;
+ scriptNode.type = 'text/javascript';
+ scriptNode.src = 'http://debug.phonegap.com/target/target-script-min.js#' + value;
+
+ var headNode:HTMLHeadElement = document.getElementsByTagName('HEAD') as HTMLHeadElement;
+ if (headNode[0] != null)
+ headNode[0].appendChild(scriptNode);
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
new file mode 100644
index 0000000..faea7c0
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/cordova/camera/Camera.as
@@ -0,0 +1,179 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.cordova.camera
+{
+ COMPILE::AS3
+ {
+ import flash.display.BitmapData;
+ import flash.display.DisplayObject;
+ import flash.display.DisplayObjectContainer;
+ import flash.display.Sprite;
+ import flash.events.ActivityEvent;
+ import flash.events.KeyboardEvent;
+ import flash.events.MouseEvent;
+ import flash.filesystem.File;
+ import flash.filesystem.FileMode;
+ import flash.filesystem.FileStream;
+ import flash.geom.Rectangle;
+ import flash.media.Camera;
+ import flash.media.Video;
+ import flash.ui.Keyboard;
+ import flash.utils.ByteArray;
+
+ import org.apache.flex.utils.PNGEncoder;
+ }
+
+ [Mixin]
+ public class Camera
+ {
+ public static var DestinationType:Object = {
+ DATA_URL : 0, // Return image as base64-encoded string
+ FILE_URI : 1, // Return image file URI
+ NATIVE_URI : 2 // Return image native URI (e.g., assets-library:// on iOS or content:// on Android)
+ };
+
+ public static var PictureSourceType:Object = {
+ PHOTOLIBRARY : 0,
+ CAMERA : 1,
+ SAVEDPHOTOALBUM : 2
+ };
+
+ public static var EncodingType:Object = {
+ JPEG : 0, // Return JPEG encoded image
+ PNG : 1 // Return PNG encoded image
+ };
+
+ public static var MediaType:Object = {
+ PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
+ VIDEO: 1, // allow selection of video only, WILL ALWAYS RETURN FILE_URI
+ ALLMEDIA : 2 // allow selection from all media types
+ };
+
+ public static var Direction:Object = {
+ BACK : 0, // Use the back-facing camera
+ FRONT : 1 // Use the front-facing camera
+ };
+
+ COMPILE::AS3
+ private static var root:DisplayObjectContainer;
+
+ COMPILE::AS3
+ public static function init(r:DisplayObjectContainer):void
+ {
+ root = r;
+ }
+
+ public function Camera()
+ {
+ pictureSourceType = org.apache.cordova.camera.Camera.PictureSourceType.PHOTOLIBRARY;
+ destinationType = org.apache.cordova.camera.Camera.DestinationType.DATA_URL;
+ mediaType = org.apache.cordova.camera.Camera.MediaType.PICTURE;
+ encodingType = org.apache.cordova.camera.Camera.EncodingType.JPEG;
+ direction = org.apache.cordova.camera.Camera.Direction.BACK;
+ }
+
+ public var pictureSourceType:int;
+ public var destinationType:int;
+ public var mediaType:int;
+ public var encodingType:int;
+ public var direction:int;
+
+ private var cameraSuccess:Function;
+ private var cameraError:Function;
+ COMPILE::AS3
+ private var ui:Sprite;
+ COMPILE::AS3
+ private var camera:flash.media.Camera;
+
+ public function getPicture( cameraSuccess:Function, cameraError:Function, cameraOptions:Object ) : void
+ {
+ COMPILE::AS3
+ {
+ this.cameraSuccess = cameraSuccess;
+ this.cameraError = cameraError;
+
+ camera = flash.media.Camera.getCamera();
+
+ if (camera != null) {
+ ui = new Sprite();
+ var video:Video = new Video(camera.width * 2, camera.height * 2);
+ video.attachCamera(camera);
+ ui.addChild(video);
+ root.addChild(ui);
+ ui.addEventListener(MouseEvent.CLICK, mouseClickHandler);
+ ui.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
+ } else {
+ trace("You need a camera.");
+ }
+ }
+ COMPILE::JS
+ {
+ // TODO: (aharui) Cordova externs
+ navigator["camera"].getPicture(cameraSuccess, cameraError, cameraOptions);
+ }
+ }
+
+ COMPILE::AS3
+ private function mouseClickHandler(event:MouseEvent):void
+ {
+ savePicture();
+ root.removeChild(ui);
+ }
+
+ COMPILE::AS3
+ private function keyDownHandler(event:KeyboardEvent):void
+ {
+ if (event.keyCode == Keyboard.ESCAPE)
+ root.removeChild(ui);
+ else if (event.keyCode == Keyboard.ENTER || event.keyCode == Keyboard.SPACE)
+ {
+ savePicture();
+ root.removeChild(ui);
+ }
+ }
+
+ COMPILE::AS3
+ private function savePicture():void
+ {
+ var f:File = File.createTempFile();
+ var bd:BitmapData = new BitmapData(camera.width, camera.height, false);
+ var pix:ByteArray = new ByteArray();
+ var rect:Rectangle = new Rectangle(0, 0, camera.width, camera.height);
+ camera.copyToByteArray(rect, pix);
+ pix.position = 0;
+ bd.setPixels(rect, pix);
+ var png:PNGEncoder = new PNGEncoder();
+ var ba:ByteArray = png.encode(bd);
+ var fs:FileStream = new FileStream();
+ fs.open(f, FileMode.WRITE);
+ fs.writeBytes(ba);
+ fs.close();
+ cameraSuccess(f.url);
+ }
+
+ public function cleanup( cameraSuccess:Function, cameraError:Function ) : void
+ {
+ // no cleanup required in Flash
+ COMPILE::JS
+ {
+ navigator["camera"].cleanup();
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
new file mode 100644
index 0000000..232d212
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IView.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ /**
+ * The IView interface is implemented by any class that can be managed by
+ * an IViewManager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IView
+ {
+ /**
+ * The parent view manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get viewManager():IViewManager;
+ function set viewManager(value:IViewManager):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
new file mode 100644
index 0000000..54bb22a
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/IViewManager.as
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ /**
+ * The IViewManager interface is implemented by classes that manage or control
+ * IViews.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IViewManager extends IView
+ {
+ /**
+ * The view that is currently active in the view manager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedView():IView;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
new file mode 100644
index 0000000..5c2e149
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ManagerBase.as
@@ -0,0 +1,184 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ import org.apache.flex.core.IChrome;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ /**
+ * The ManagerBase is a base class for mobile display managers such as StackedViewManager
+ * and TabbedViewManager. This class encapsulates the features common to all view
+ * managers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ManagerBase extends UIBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ManagerBase()
+ {
+ super();
+
+ _contentArea = new UIBase();
+
+ COMPILE::AS3 {
+ addEventListener("initComplete", handleInitComplete);
+ addEventListener("sizeChanged", handleInitComplete);
+ addEventListener("widthChanged", handleInitComplete);
+ addEventListener("heightChanged", handleInitComplete);
+ }
+
+ COMPILE::JS {
+ createElement();
+ }
+
+ super.addElement(_contentArea,false);
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ override protected function createElement():WrappedHTMLElement
+ {
+ super.createElement();
+ element.className = 'ManagerBase';
+
+ _contentArea.positioner.style['width'] = '100%';
+ _contentArea.positioner.style['height'] = '100%';
+
+ return element;
+ }
+
+ private function handleInitComplete(event:Event):void
+ {
+ _contentArea.setWidthAndHeight(width, height, true);
+ // todo: listen for changes to this item
+
+ var num:Number = UIBase(_contentArea).numElements;
+ for (var i:int = 0; i < num; i++) {
+ var child:UIBase = UIBase(_contentArea).getElementAt(i) as UIBase;
+ child.setWidthAndHeight(width, height);
+ }
+ }
+
+ private var _contentArea:UIBase;
+
+ /**
+ * The contentArea of a view manager is where the child elements are placed. Areas outside
+ * of the contentArea are chrome (identified by implementing IChrome).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get contentArea():UIBase
+ {
+ return _contentArea;
+ }
+
+ /**
+ * Adds elements to the view manager. If an element implements IChrome it is placed
+ * in the chrome area otherwise it is placed in the contentArea.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function addElement(c:Object, dispatchEvent:Boolean=true):void
+ {
+ if (c is IChrome) {
+ super.addElementAt(c,0,dispatchEvent);
+ }
+ else {
+ _contentArea.addElement(c, dispatchEvent);
+// (c as UIBase).setWidthAndHeight(_contentArea.width, _contentArea.height, false);
+// (c as UIBase).width = _contentArea.width;
+// (c as UIBase).height = _contentArea.height;
+ }
+ }
+
+ /**
+ * @private.
+ */
+ override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean=true):void
+ {
+ if (c is IChrome) {
+ super.addElementAt(c, index, dispatchEvent);
+ }
+ else {
+ _contentArea.addElement(c, dispatchEvent);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function removeElement(c:Object, dispatchEvent:Boolean=true):void
+ {
+ if (c is IChrome) {
+ super.removeElement(c, dispatchEvent);
+ }
+ else {
+ _contentArea.removeElement(c, dispatchEvent);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function getElementAt(index:int):Object
+ {
+ return _contentArea.getElementAt(index);
+ }
+
+ /**
+ * @private
+ */
+ override public function getElementIndex(c:Object):int
+ {
+ return _contentArea.getElementIndex(c);
+ }
+
+ /**
+ * @private
+ */
+ override public function get numElements():int
+ {
+ return _contentArea.numElements;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
new file mode 100644
index 0000000..4b29d28
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/StackedViewManager.as
@@ -0,0 +1,161 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.Container;
+ import org.apache.flex.mobile.IView;
+ import org.apache.flex.mobile.IViewManager;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.chrome.ToolBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+ /**
+ * The StackedViewManager displays a single View at a time from a
+ * collection of Views where views[0] is at the bottom and views[n-1]
+ * is at the top and displayed.
+ *
+ * The StackedViewManager has an optional navigation bar at the top
+ * and an optional tool bar at the bottom. The views are displayed
+ * within the StackedViewManager's content area.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class StackedViewManager extends ViewManagerBase implements IViewManager
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StackedViewManager()
+ {
+ super();
+
+ className = "StackedViewManager";
+ }
+
+ /**
+ * True if this view manager is displaying a ToolBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get hasToolBar():Boolean
+ {
+ return ViewManagerModel(model).toolBarItems != null;
+ }
+
+ /**
+ * The contents of the ToolBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get toolBarItems():Array
+ {
+ return ViewManagerModel(model).toolBarItems;
+ }
+ public function set toolBarItems(value:Array):void
+ {
+ ViewManagerModel(model).toolBarItems = value;
+ }
+
+ /**
+ * The ToolBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get toolBar():ToolBar
+ {
+ return ViewManagerModel(model).toolBar;
+ }
+
+
+ private var _topView:IView;
+
+ /**
+ * The top-most (current) view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function get selectedView():IView
+ {
+ return _topView;
+ }
+
+
+ /**
+ * Pushes the next view onto the navigation stack.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function push(nextView:IView):void
+ {
+ nextView.viewManager = this;
+ ViewManagerModel(model).pushView(nextView);
+
+ removeElement(_topView);
+ _topView = nextView;
+ addElement(_topView);
+
+ dispatchEvent( new Event("viewChanged") );
+ }
+
+ /**
+ * Pops the top-most view from the navigation stack.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function pop():void
+ {
+ if (ViewManagerModel(model).views.length > 1) {
+ var lastView:Object = ViewManagerModel(model).popView();
+ removeElement(_topView);
+ addElement(lastView);
+ _topView = lastView as IView;
+
+ dispatchEvent( new Event("viewChanged") );
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
new file mode 100644
index 0000000..43fc6a6
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/TabbedViewManager.as
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ import org.apache.flex.html.Container;
+ import org.apache.flex.mobile.IView;
+ import org.apache.flex.mobile.IViewManager;
+ import org.apache.flex.mobile.chrome.TabBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+ /**
+ * The TabbedViewManager displays a set of views, only one of which is active at
+ * a time. The other views are reachable via a set of tab buttons at the bottom of
+ * the view manager's space.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class TabbedViewManager extends ViewManagerBase implements IViewManager
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function TabbedViewManager()
+ {
+ super();
+
+ className = "TabbedViewManager";
+ }
+
+ /**
+ * The TabBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get tabBar():TabBar
+ {
+ return ViewManagerModel(model).tabBar;
+ }
+
+ /**
+ * The index (starting at zero) of the currently visible view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedIndex():Number
+ {
+ return ViewManagerModel(model).selectedIndex;
+ }
+ public function set selectedIndex(value:Number):void
+ {
+ ViewManagerModel(model).selectedIndex = value;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.as
new file mode 100644
index 0000000..490d8bf
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/View.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.mobile
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IBeadController;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.html.Container;
+
+ /**
+ * The View class represents the area for a mobile app's primary
+ * interface elements.
+ */
+ public class View extends Container implements IView
+ {
+ public function View()
+ {
+ super();
+
+ // views always take up 100% of their space
+ percentWidth = 100;
+ percentHeight = 100;
+ }
+
+ private var _title:String;
+ public function get title():String
+ {
+ return _title;
+ }
+ public function set title(value:String):void
+ {
+ _title = value;
+ }
+
+ COMPILE::AS3
+ override public function toString():String
+ {
+ return _title;
+ }
+
+ COMPILE::JS
+ public function toString():String
+ {
+ return _title;
+ }
+
+ private var _viewManager:IViewManager;
+ public function get viewManager():IViewManager
+ {
+ return _viewManager;
+ }
+ public function set viewManager(value:IViewManager):void
+ {
+ _viewManager = value;
+ }
+
+ private var _controller:IBeadController;
+
+ /**
+ * Get the controller for the view.
+ *
+ * @flexjsignorecoercion Class
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get controller():IBeadController
+ {
+ if (_controller == null) {
+ _controller = getBeadByType(IBeadController) as IBeadController;
+ if (_controller == null) {
+ var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
+ _controller = new c() as IBeadController;
+ addBead(_controller);
+ }
+ }
+ return _controller;
+ }
+ public function set controller(value:IBeadController):void
+ {
+ _controller = value;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
new file mode 100644
index 0000000..0da3f4d
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/ViewManagerBase.as
@@ -0,0 +1,236 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile
+{
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.Container;
+ import org.apache.flex.mobile.IView;
+ import org.apache.flex.mobile.IViewManager;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+// import org.apache.flex.html.beads.SolidBackgroundBead;
+// import org.apache.flex.html.beads.SingleLineBorderBead;
+
+ /**
+ * Event dispatched when the current (selected) view changes.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="viewChanged")]
+
+ /**
+ * Base class for mobile navigation controls.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ViewManagerBase extends UIBase implements IViewManager
+ {
+ /**
+ * Constructor.
+ */
+ public function ViewManagerBase()
+ {
+ super();
+
+ // views always fill their space
+ percentWidth = 100;
+ percentHeight = 100;
+
+ model.addEventListener("selectedIndexChanged", changeView);
+
+// addBead(new SolidBackgroundBead());
+// addBead(new SingleLineBorderBead());
+ }
+
+ /**
+ * A title that can be used in the NavigationBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get title():String
+ {
+ return ViewManagerModel(model).title;
+ }
+ public function set title(value:String):void
+ {
+ ViewManagerModel(model).title = value;
+ }
+
+ COMPILE::AS3
+ override public function toString():String
+ {
+ return ViewManagerModel(model).title;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::JS
+ public function toString():String
+ {
+ return ViewManagerModel(model).title;
+ }
+
+ /**
+ * True if this view manager instance is displaying a NavigationBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get hasNavigationBar():Boolean
+ {
+ return ViewManagerModel(model).navigationBarItems != null;
+ }
+
+ /**
+ * The items that make up the NavigationBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get navigationBarItems():Array
+ {
+ return ViewManagerModel(model).navigationBarItems;
+ }
+ public function set navigationBarItems(value:Array):void
+ {
+ ViewManagerModel(model).navigationBarItems = value;
+ }
+
+ /**
+ * The NavigationBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get navigationBar():NavigationBar
+ {
+ return ViewManagerModel(model).navigationBar;
+ }
+
+ /**
+ * The current set of views in the stack. The last entry is
+ * the top-most (visible) view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get views():Array
+ {
+ return ViewManagerModel(model).views;
+ }
+ public function set views(value:Array):void
+ {
+ ViewManagerModel(model).views = value;
+ }
+
+ /**
+ * @private
+ */
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ var n:int = ViewManagerModel(model).views.length;
+ if (n > 0) {
+ for (var i:int = 0; i < n; i++)
+ {
+ var view:IView = ViewManagerModel(model).views[i] as IView;
+ view.viewManager = this;
+ if (i == 0) {
+ addElement(view, true);
+ }
+ }
+ ViewManagerModel(model).selectedIndex = 0;
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function changeView( event:Event ):void
+ {
+ var index:Number = ViewManagerModel(model).selectedIndex;
+ if (_currentView) {
+ removeElement(_currentView);
+ }
+ _currentView = views[index];
+ addElement(_currentView);
+
+ dispatchEvent( new Event("viewChanged") );
+ }
+
+ private var _currentView:IView;
+
+ /**
+ * The currently visible view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedView():IView
+ {
+ return _currentView;
+ }
+
+ /**
+ * IViewManager
+ */
+
+ private var _viewManager:IViewManager;
+
+ /**
+ * This view manager's parent view manager, if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get viewManager():IViewManager
+ {
+ return _viewManager;
+ }
+ public function set viewManager(value:IViewManager):void
+ {
+ _viewManager = value;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
new file mode 100644
index 0000000..fd1a58b
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/StackedViewManagerView.as
@@ -0,0 +1,127 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile.beads
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IViewportModel;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.beads.ContainerView;
+ import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.chrome.ToolBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+ /**
+ * The StackedViewManagerView creates the visual elements of the StackedViewManager. This
+ * includes a NavigationBar, ToolBar, and contentArea.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class StackedViewManagerView extends ViewManagerView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StackedViewManagerView()
+ {
+ super();
+ }
+
+ private var _toolBar:ToolBar;
+
+ override public function set strand(value:IStrand):void
+ {
+ var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ if (model.toolBarItems)
+ {
+ _toolBar = new ToolBar();
+ _toolBar.controls = model.toolBarItems;
+ _toolBar.addBead(new HorizontalLayout());
+ UIBase(value).addElement(_toolBar,false);
+ }
+
+ super.strand = value;
+ }
+ override public function get strand():IStrand
+ {
+ return super.strand;
+ }
+
+ /**
+ * @private
+ */
+ override protected function layoutChromeElements():void
+ {
+ var host:UIBase = strand as UIBase;
+ var contentAreaY:Number = 0;
+ var contentAreaHeight:Number = host.height;
+ var toolbarHeight:Number = _toolBar == null ? 0 : _toolBar.height;
+
+ var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ if (navigationBar)
+ {
+ navigationBar.x = 0;
+ navigationBar.y = 0;
+ navigationBar.width = host.width;
+
+ contentAreaHeight -= navigationBar.height;
+ contentAreaY = navigationBar.height;
+
+ model.navigationBar = navigationBar;
+ }
+
+ if (_toolBar)
+ {
+ _toolBar.x = 0;
+ _toolBar.y = host.height - toolbarHeight;
+ _toolBar.width = host.width;
+
+ contentAreaHeight -= toolbarHeight;
+
+ model.toolBar = _toolBar;
+ }
+
+ if (contentAreaY < 0) contentAreaY = 0;
+ if (contentAreaHeight < 0) contentAreaHeight = 0;
+
+ model.contentX = 0;
+ model.contentY = contentAreaY;
+ model.contentWidth = host.width;
+ model.contentHeight = contentAreaHeight;
+
+ sizeViewsToFitContentArea();
+
+ // notify the views that the content size has changed
+ IEventDispatcher(strand).dispatchEvent( new Event("contentSizeChanged") );
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
new file mode 100644
index 0000000..be20d2c
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/TabbedViewManagerView.as
@@ -0,0 +1,139 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile.beads
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IViewportModel;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.beads.ContainerView;
+ import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.chrome.TabBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+ /**
+ * The TabbedViewManagerView constructs the visual elements of the TabbedViewManager. The
+ * elements may be a navigation bar, a tab bar, and the contentArea.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class TabbedViewManagerView extends ViewManagerView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function TabbedViewManagerView()
+ {
+ super();
+ }
+
+ private var _tabBar:TabBar;
+
+ private var _strand:IStrand;
+ override public function get strand():IStrand
+ {
+ return _strand;
+ }
+ override public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ // TabbedViewManager always has a TabBar
+ _tabBar = new TabBar();
+ _tabBar.dataProvider = model.views;
+ _tabBar.labelField = "title";
+ _tabBar.addEventListener("change",handleButtonBarChange);
+ UIBase(_strand).addElement(_tabBar, false);
+
+ super.strand = value;
+ }
+
+ /**
+ * @private
+ */
+ private function handleButtonBarChange(event:Event):void
+ {
+ var newIndex:Number = _tabBar.selectedIndex;
+ var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ // doing this will trigger the selectedIndexChanged event which will
+ // tell the strand to switch views
+ model.selectedIndex = newIndex;
+ }
+
+ /**
+ * @private
+ */
+ override protected function layoutChromeElements():void
+ {
+ var host:UIBase = _strand as UIBase;
+ var contentAreaY:Number = 0;
+ var contentAreaHeight:Number = host.height;
+
+ var model:ViewManagerModel = strand.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ if (navigationBar)
+ {
+ navigationBar.x = 0;
+ navigationBar.y = 0;
+ navigationBar.width = host.width;
+
+ contentAreaHeight -= navigationBar.height;
+ contentAreaY = navigationBar.height;
+
+ model.navigationBar = navigationBar;
+ }
+
+ if (_tabBar)
+ {
+ _tabBar.x = 0;
+ _tabBar.y = host.height - _tabBar.height;
+ _tabBar.width = host.width;
+ _tabBar.dispatchEvent(new Event("layoutNeeded"));
+
+ contentAreaHeight -= _tabBar.height;
+
+ model.tabBar = _tabBar;
+ }
+
+ model.contentX = 0;
+ model.contentY = contentAreaY;
+ model.contentWidth = host.width;
+ model.contentHeight = contentAreaHeight;
+
+ sizeViewsToFitContentArea();
+
+ // notify the views that the content size has changed
+ IEventDispatcher(strand).dispatchEvent( new Event("contentSizeChanged") );
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
new file mode 100644
index 0000000..59baf94
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/beads/ViewManagerView.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile.beads
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.IViewportModel;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.Container;
+ import org.apache.flex.html.beads.layouts.HorizontalLayout;
+ import org.apache.flex.mobile.IView;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.models.ViewManagerModel;
+
+ /**
+ * The ViewManagerView creates the visual elements of the StackedViewManager. This
+ * includes a NavigationBar, ToolBar, and contentArea.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ViewManagerView implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ViewManagerView()
+ {
+ super();
+ }
+
+ public function get host():IUIBase
+ {
+ return _strand as IUIBase;
+ }
+ public function set host(value:IUIBase):void
+ {
+ // not implemented; getter only.
+ }
+
+ private var _navigationBar:NavigationBar;
+ public function get navigationBar():NavigationBar
+ {
+ return _navigationBar;
+ }
+ public function set navigationBar(value:NavigationBar):void
+ {
+ // not implemented; getter only.
+ }
+
+ private var _strand:IStrand;
+ public function get strand():IStrand
+ {
+ return _strand;
+ }
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ UIBase(_strand).addEventListener("sizeChanged", sizeChangedHandler);
+ UIBase(_strand).addEventListener("widthChanged", sizeChangedHandler);
+ UIBase(_strand).addEventListener("heightChanged", sizeChangedHandler);
+
+ var model:ViewManagerModel = value.getBeadByType(IBeadModel) as ViewManagerModel;
+ model.addEventListener("selectedIndexChanged", viewsChangedHandler);
+
+ if (model.navigationBarItems)
+ {
+ _navigationBar = new NavigationBar();
+ _navigationBar.controls = model.navigationBarItems;
+ _navigationBar.addBead(new HorizontalLayout());
+ UIBase(_strand).addElement(_navigationBar, false);
+ }
+ }
+
+ /**
+ * @private
+ */
+ protected function viewsChangedHandler(event:Event):void
+ {
+ layoutChromeElements();
+ }
+
+ /**
+ * @private
+ */
+ protected function sizeChangedHandler(event:Event):void
+ {
+ layoutChromeElements();
+ }
+
+ /**
+ * @private
+ */
+ protected function layoutChromeElements():void
+ {
+ var host:UIBase = _strand as UIBase;
+ var contentAreaY:Number = 0;
+ var contentAreaHeight:Number = host.height;
+
+ var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ if (_navigationBar)
+ {
+ _navigationBar.x = 0;
+ _navigationBar.y = 0;
+ _navigationBar.width = host.width;
+
+ contentAreaHeight -= _navigationBar.height;
+ contentAreaY = _navigationBar.height;
+
+ model.navigationBar = _navigationBar;
+ }
+
+ model.contentX = 0;
+ model.contentY = contentAreaY;
+ model.contentWidth = host.width;
+ model.contentHeight = contentAreaHeight;
+
+ sizeViewsToFitContentArea();
+ }
+
+ protected function sizeViewsToFitContentArea():void
+ {
+ var model:ViewManagerModel = _strand.getBeadByType(IBeadModel) as ViewManagerModel;
+
+ var n:int = ViewManagerModel(model).views.length;
+ if (n > 0) {
+ for (var i:int = 0; i < n; i++)
+ {
+ var view:IView = ViewManagerModel(model).views[i] as IView;
+ UIBase(view).x = model.contentX;
+ UIBase(view).y = model.contentY;
+ UIBase(view).setWidthAndHeight(model.contentWidth, model.contentHeight, true);
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.as
new file mode 100644
index 0000000..5e7873e
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/NavigationBar.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.mobile.chrome
+{
+ import org.apache.flex.core.IChrome;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.html.Container;
+
+ /**
+ * The NavigationBar class is part of the mobile view manager's chrome. When present,
+ * it provides a place for content at the top of the view, above the contentArea.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class NavigationBar extends Container implements IChrome
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function NavigationBar()
+ {
+ super();
+
+ className = "NavigationBar";
+ }
+
+ public function hidesBackButton(value:Boolean):void
+ {
+
+ }
+
+ private var _controls:Array;
+
+ /**
+ * The controls of the NavigationBar (eg, a button to go back and a title).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set controls(value:Array):void
+ {
+ _controls = value;
+ }
+ public function get controls():Array
+ {
+ return _controls;
+ }
+
+ /**
+ * @private
+ */
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ for (var i:int=0; i < _controls.length; i++)
+ {
+ addElement( _controls[i], false );
+
+ var ctrl:IEventDispatcher = _controls[i] as IEventDispatcher;
+ ctrl.addEventListener("show", handleVisibilityChange);
+ ctrl.addEventListener("hide", handleVisibilityChange);
+ }
+
+ dispatchEvent(new Event("layoutNeeded"));
+ }
+
+ /**
+ * @private
+ */
+ private function handleVisibilityChange(event:Event):void
+ {
+ dispatchEvent(new Event("layoutNeeded"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
new file mode 100644
index 0000000..6e54326
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/TabBar.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile.chrome
+{
+ import org.apache.flex.core.IChrome;
+ import org.apache.flex.html.ButtonBar;
+
+ /**
+ * The TabBar class displays a set of buttons that can be used to
+ * switch between navigation panels.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class TabBar extends ButtonBar implements IChrome
+ {
+ /**
+ * Constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function TabBar()
+ {
+ super();
+
+ className = "TabBar";
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.as
new file mode 100644
index 0000000..af63d49
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/chrome/ToolBar.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.mobile.chrome
+{
+ import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IChrome;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.html.Container;
+
+ /**
+ * The ToolBar class provides a space below the contentArea of a view manager which can
+ * be used to house controls for the view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ToolBar extends Container implements IChrome
+ {
+ public function ToolBar()
+ {
+ super();
+
+ className = "ToolBar";
+ }
+
+ private var _controls:Array;
+
+ /**
+ * The control components of the ToolBar (eg, a settings button).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set controls(value:Array):void
+ {
+ _controls = value;
+ }
+ public function get controls():Array
+ {
+ return _controls;
+ }
+
+ /**
+ * @private
+ */
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+
+ var layout:IBeadLayout = this.getBeadByType(IBeadLayout) as IBeadLayout;
+
+ for (var i:int=0; i < _controls.length; i++)
+ {
+ addElement( _controls[i], false );
+ }
+
+ dispatchEvent(new Event("layoutNeeded"));
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
new file mode 100644
index 0000000..c57cc61
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/mobile/models/ViewManagerModel.as
@@ -0,0 +1,263 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.mobile.models
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.mobile.chrome.NavigationBar;
+ import org.apache.flex.mobile.chrome.TabBar;
+ import org.apache.flex.mobile.chrome.ToolBar;
+
+ /**
+ * The ViewManagerModel houses properties and values common to the components
+ * which make up view managers. These properties include the title, which view
+ * is currently active and selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ViewManagerModel extends EventDispatcher implements IBeadModel
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ViewManagerModel()
+ {
+ super();
+
+ _views = new Array();
+ }
+
+ private var _strand:IStrand;
+
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ }
+
+ public var contentX:Number = 0;
+ public var contentY:Number = 0;
+ public var contentWidth:Number = 0;
+ public var contentHeight:Number = 0;
+
+ private var _views:Array;
+
+ /**
+ * The array of views displayed in the contentArea of the ViewManager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get views():Array
+ {
+ return _views;
+ }
+ public function set views(value:Array):void
+ {
+ if (value != _views) {
+ _views = value;
+ _selectedIndex = value.length - 1;
+ dispatchEvent(new Event("viewsChanged"));
+ }
+ }
+
+ /**
+ * Pushes a view onto the top/end of the stack of views. This view becomes
+ * the active view. Mostly used by the StackedViewManager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function pushView(value:Object):void
+ {
+ _views.push(value);
+ _selectedIndex = _views.length - 1;
+ dispatchEvent(new Event("viewPushed"));
+ }
+
+ /**
+ * Removes the most recently added view. The next view in the stack becomes the
+ * active view. Mostly used by StackedViewManager.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function popView():Object
+ {
+ if (_views.length > 1) {
+ var discard:Object = _views.pop();
+ _selectedIndex = _views.length - 1;
+ dispatchEvent(new Event("viewPopped"));
+ }
+ return _views[_views.length-1];
+ }
+
+ private var _selectedIndex:Number = -1;
+
+ /**
+ * The index into the views array of the currently active view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedIndex():Number
+ {
+ return _selectedIndex;
+ }
+ public function set selectedIndex(value:Number):void
+ {
+ if (value != _selectedIndex) {
+ _selectedIndex = value;
+ dispatchEvent(new Event("selectedIndexChanged"));
+ }
+ }
+
+ private var _title:String;
+
+ /**
+ * The title of the view..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get title():String
+ {
+ return _title;
+ }
+ public function set title(value:String):void
+ {
+ _title = value;
+ }
+
+ private var _navigationBarItems:Array;
+
+ /**
+ * The array of controls that make up the NavigationBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get navigationBarItems():Array
+ {
+ return _navigationBarItems;
+ }
+ public function set navigationBarItems(value:Array):void
+ {
+ _navigationBarItems = value;
+ }
+
+ private var _navigationBar:NavigationBar;
+
+ /**
+ * The NavigationBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get navigationBar():NavigationBar
+ {
+ return _navigationBar;
+ }
+ public function set navigationBar(value:NavigationBar):void
+ {
+ _navigationBar = value;
+ }
+
+ private var _toolBarItems:Array;
+
+ /**
+ * The array of controls that make up the ToolBar..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get toolBarItems():Array
+ {
+ return _toolBarItems;
+ }
+ public function set toolBarItems(value:Array):void
+ {
+ _toolBarItems = value;
+ }
+
+ private var _toolBar:ToolBar;
+
+ /**
+ * The ToolBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get toolBar():ToolBar
+ {
+ return _toolBar;
+ }
+ public function set toolBar(value:ToolBar):void
+ {
+ _toolBar = value;
+ }
+
+ private var _tabBar:TabBar;
+
+ /**
+ * The TabBar (or null if not present).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get tabBar():TabBar
+ {
+ return _tabBar;
+ }
+ public function set tabBar(value:TabBar):void
+ {
+ _tabBar = value;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..4f54235
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/resources/basic-manifest.xml
@@ -0,0 +1,29 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+ <component id="StackedViewManager" class="org.apache.flex.mobile.StackedViewManager" />
+ <component id="TabbedViewManager" class="org.apache.flex.mobile.TabbedViewManager" />
+ <component id="View" class="org.apache.flex.mobile.View" />
+ <component id="NavigationBar" class="org.apache.flex.mobile.chrome.NavigationBar" />
+ <component id="ToolBar" class="org.apache.flex.mobile.chrome.ToolBar" />
+ <component id="TabBar" class="org.apache.flex.mobile.chrome.TabBar" />
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ce878142/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..ba49185
--- /dev/null
+++ b/frameworks/projects/Mobile/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,89 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/Graphics.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+ <manifest>cordova-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>MobileClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[33/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
new file mode 100644
index 0000000..7e0391e
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicShape.as
@@ -0,0 +1,213 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ import org.apache.flex.core.UIBase;
+
+ public class GraphicShape extends UIBase
+ {
+ private var _fill:IFill;
+ private var _stroke:IStroke;
+
+ public function get stroke():IStroke
+ {
+ return _stroke;
+ }
+
+ /**
+ * A solid color fill.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.0
+ */
+ public function set stroke(value:IStroke):void
+ {
+ _stroke = value;
+ }
+
+ public function get fill():IFill
+ {
+ return _fill;
+ }
+ /**
+ * A solid color fill.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.0
+ */
+ public function set fill(value:IFill):void
+ {
+ _fill = value;
+ }
+
+ /**
+ * Constructor
+ *
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function GraphicShape()
+ {
+ COMPILE::JS
+ {
+ element = document.createElementNS('http://www.w3.org/2000/svg', 'svg') as WrappedHTMLElement;
+ element.flexjs_wrapper = this;
+ element.style.left = 0;
+ element.style.top = 0;
+ //element.offsetParent = null;
+ positioner = element;
+ positioner.style.position = 'relative';
+ }
+ }
+
+ COMPILE::AS3
+ protected function applyStroke():void
+ {
+ if(stroke)
+ {
+ stroke.apply(this);
+ }
+ }
+
+ COMPILE::AS3
+ protected function beginFill(targetBounds:Rectangle,targetOrigin:Point):void
+ {
+ if(fill)
+ {
+ fill.begin(this, targetBounds,targetOrigin);
+ }
+ }
+
+ COMPILE::AS3
+ protected function endFill():void
+ {
+ if(fill)
+ {
+ fill.end(this);
+ }
+ }
+
+ /**
+ * This is where the drawing methods get called from
+ */
+ protected function draw():void
+ {
+ //Overwrite in subclass
+ }
+
+ override public function addedToParent():void
+ {
+ COMPILE::AS3
+ {
+ super.addedToParent();
+ }
+ draw();
+ COMPILE::JS
+ {
+ element.style.overflow = 'visible';
+ }
+ }
+
+ /**
+ * @return {string} The style attribute.
+ */
+ COMPILE::JS
+ public function getStyleStr():String
+ {
+ var fillStr:String;
+ if (fill)
+ {
+ fillStr = fill.addFillAttrib(this);
+ }
+ else
+ {
+ fillStr = 'fill:none';
+ }
+
+ var strokeStr:String;
+ if (stroke)
+ {
+ strokeStr = stroke.addStrokeAttrib(this);
+ }
+ else
+ {
+ strokeStr = 'stroke:none';
+ }
+
+
+ return fillStr + ';' + strokeStr;
+ }
+
+
+ /**
+ * @param x X position.
+ * @param y Y position.
+ * @param bbox The bounding box of the svg element.
+ */
+ COMPILE::JS
+ public function resize(x:Number, y:Number, bbox:SVGRect):void
+ {
+ var useWidth:Number = Math.max(this.width, bbox.width);
+ var useHeight:Number = Math.max(this.height, bbox.height);
+
+ element.style.position = 'absolute';
+ if (!isNaN(x)) element.style.top = String(x) + 'px';
+ if (!isNaN(y)) element.style.left = String(y) + 'px';
+ element.style.width = String(useWidth) + 'px';
+ element.style.height = String(useHeight) + 'px';
+ element.style.left = x;
+ element.style.top = y;
+ }
+
+ COMPILE::JS
+ private var _x:Number;
+ COMPILE::JS
+ private var _y:Number;
+ COMPILE::JS
+ private var _xOffset:Number;
+ COMPILE::JS
+ private var _yOffset:Number;
+
+ /**
+ * @param x X position.
+ * @param y Y position.
+ * @param xOffset offset from x position.
+ * @param yOffset offset from y position.
+ */
+ COMPILE::JS
+ public function setPosition(x:Number, y:Number, xOffset:Number, yOffset:Number):void
+ {
+ _x = x;
+ _y = y;
+ _xOffset = xOffset;
+ _yOffset = yOffset;
+ element.style.left = xOffset;
+ element.style.top = yOffset;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
new file mode 100644
index 0000000..4927eb9
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
@@ -0,0 +1,302 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.display.GraphicsPath;
+ import flash.display.Shape;
+ import flash.display.Sprite;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.CSSTextField;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+ import org.apache.flex.core.graphics.utils.PathHelper;
+
+ /**
+ * GraphicsContainer is a surface on which you can
+ * draw various graphic elements such as Rect, Circle,
+ * Ellipse, Path etc.
+ * Use this class if you want to draw multiple graphic
+ * shapes on a single container.
+ *
+ */
+ public class GraphicsContainer extends GraphicShape
+ {
+ /**
+ * Removes all of the drawn elements of the container.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0.3
+ */
+ public function removeAllElements():void
+ {
+ COMPILE::AS3
+ {
+ graphics.clear();
+ }
+ COMPILE::JS
+ {
+ var svg:HTMLElement = element;
+ while (svg.lastChild) {
+ svg.removeChild(svg.lastChild);
+ }
+ }
+ }
+
+ /**
+ * Draw the rectangle.
+ * @param x The x position of the top-left corner of the rectangle.
+ * @param y The y position of the top-left corner.
+ * @param width The width of the rectangle.
+ * @param height The height of the rectangle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0.3
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawRect(x:Number, y:Number, width:Number, height:Number):void
+ {
+ COMPILE::AS3
+ {
+ applyStroke();
+ beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
+ graphics.drawRect(x, y, width, height);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
+ rect.flexjs_wrapper = this;
+ rect.style.left = x;
+ rect.style.top = y;
+ rect.setAttribute('style', style);
+ rect.setAttribute('x', String(x) + 'px');
+ rect.setAttribute('y', String(y) + 'px');
+ rect.setAttribute('width', String(width) + 'px');
+ rect.setAttribute('height', String(height) + 'px');
+ element.appendChild(rect);
+ }
+ }
+
+ COMPILE::AS3
+ public function createRect(x:Number, y:Number, width:Number, height:Number):void
+ {
+ var color:uint = (fill as SolidColor).color;
+ var alpha:uint = (fill as SolidColor).alpha;
+
+ var shape:Sprite = new Sprite();
+ shape.graphics.beginFill(color,alpha);
+ shape.graphics.drawRect(0, 0, width, height);
+ shape.graphics.endFill();
+ shape.x = x;
+ shape.y = y;
+ addChild(shape);
+ }
+
+ /**
+ * Draw the ellipse.
+ * @param x The x position of the top-left corner of the bounding box of the ellipse.
+ * @param y The y position of the top-left corner of the bounding box of the ellipse.
+ * @param width The width of the ellipse.
+ * @param height The height of the ellipse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0.3
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void
+ {
+ COMPILE::AS3
+ {
+ applyStroke();
+ beginFill(new Rectangle(x,y,width,height), new Point(x,y));
+ graphics.drawEllipse(x,y,width,height);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var ellipse:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
+ ellipse.flexjs_wrapper = this;
+ ellipse.style.left = x;
+ ellipse.style.top = y;
+ ellipse.setAttribute('style', style);
+ ellipse.setAttribute('cx', String(x + width / 2));
+ ellipse.setAttribute('cy', String(y + height / 2));
+ ellipse.setAttribute('rx', String(width / 2));
+ ellipse.setAttribute('ry', String(height / 2));
+ element.appendChild(ellipse);
+ }
+ }
+
+ /**
+ * Draw the circle.
+ * @param x The x location of the center of the circle
+ * @param y The y location of the center of the circle.
+ * @param radius The radius of the circle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawCircle(x:Number, y:Number, radius:Number):void
+ {
+ COMPILE::AS3
+ {
+ applyStroke();
+ beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
+ graphics.drawCircle(x,y,radius);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var circle:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
+ circle.flexjs_wrapper = this;
+ circle.style.left = x;
+ circle.style.top = y;
+ circle.setAttribute('style', style);
+ circle.setAttribute('cx', String(x));
+ circle.setAttribute('cy', String(y));
+ circle.setAttribute('rx', String(radius));
+ circle.setAttribute('ry', String(radius));
+ element.appendChild(circle);
+
+ }
+ }
+
+ /**
+ * Draw the path.
+ * @param data A string containing a compact represention of the path segments.
+ * The value is a space-delimited string describing each path segment. Each
+ * segment entry has a single character which denotes the segment type and
+ * two or more segment parameters.
+ *
+ * If the segment command is upper-case, the parameters are absolute values.
+ * If the segment command is lower-case, the parameters are relative values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawPath(data:String):void
+ {
+ COMPILE::AS3
+ {
+ applyStroke();
+ var bounds:Rectangle = PathHelper.getBounds(data);
+ beginFill(bounds,bounds.topLeft);
+ var graphicsPath:GraphicsPath = PathHelper.getSegments(data);
+ graphics.drawPath(graphicsPath.commands, graphicsPath.data);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var path:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'path') as WrappedHTMLElement;
+ path.flexjs_wrapper = this;
+ path.style.left = 0;
+ path.style.top = 0;
+ path.setAttribute('style', style);
+ path.setAttribute('d', data);
+ element.appendChild(path);
+ }
+ }
+
+ public function drawLine():void
+ {
+
+ }
+
+ public function drawPolygon():void
+ {
+
+ }
+
+ /**
+ * Draw a string of characters.
+ * @param value The string to draw.
+ * @param x The x location of the center of the circle
+ * @param y The y location of the center of the circle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion Text
+ * @flexjsignorecoercion Node
+ */
+ public function drawText(value:String, x:Number, y:Number):Object
+ {
+ COMPILE::AS3
+ {
+ var textField:CSSTextField = new CSSTextField();
+ addChild(textField);
+
+ textField.selectable = false;
+ textField.type = TextFieldType.DYNAMIC;
+ textField.mouseEnabled = false;
+ textField.autoSize = "left";
+ textField.text = value;
+
+ var lineColor:SolidColorStroke = stroke as SolidColorStroke;
+ if (lineColor) {
+ textField.textColor = lineColor.color;
+ textField.alpha = lineColor.alpha;
+ }
+
+ textField.x = x;
+ textField.y = y + textField.textHeight/4;
+
+ return textField;
+
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var text:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'text') as WrappedHTMLElement;
+ text.flexjs_wrapper = this;
+ text.style.left = x;
+ text.style.top = y;
+ text.setAttribute('style', style);
+ text.setAttribute('x', String(x) + 'px');
+ text.setAttribute('y', String(y + 15) + 'px');
+ var textNode:Text = document.createTextNode(value) as Text;
+ text.appendChild(textNode as Node);
+ element.appendChild(text);
+ return text;
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
new file mode 100644
index 0000000..f0101ab
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IFill.as
@@ -0,0 +1,32 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+
+ public interface IFill
+ {
+ COMPILE::AS3
+ function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void;
+ COMPILE::AS3
+ function end(s:GraphicShape):void;
+ COMPILE::JS
+ function addFillAttrib(s:GraphicShape):String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
new file mode 100644
index 0000000..be3f022
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/IStroke.as
@@ -0,0 +1,29 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ public interface IStroke
+ {
+ COMPILE::AS3
+ function apply(s:GraphicShape):void;
+
+ COMPILE::JS
+ function get weight():Number;
+
+ COMPILE::JS
+ function addStrokeAttrib(s:GraphicShape):String;
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
new file mode 100644
index 0000000..c36a37b
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/LinearGradient.as
@@ -0,0 +1,123 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.display.GradientType;
+ import flash.display.InterpolationMethod;
+ import flash.display.SpreadMethod;
+ import flash.geom.Matrix;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+
+ public class LinearGradient extends GradientBase implements IFill
+ {
+ COMPILE::AS3
+ private static var commonMatrix:Matrix = new Matrix();
+
+ private var _scaleX:Number;
+
+ /**
+ * The horizontal scale of the gradient transform, which defines the width of the (unrotated) gradient
+ */
+ public function get scaleX():Number
+ {
+ return _scaleX;
+ }
+
+ public function set scaleX(value:Number):void
+ {
+ _scaleX = value;
+ }
+
+ COMPILE::AS3
+ public function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void
+ {
+ commonMatrix.identity();
+ commonMatrix.createGradientBox(targetBounds.width,targetBounds.height,toRad(this.rotation),targetOrigin.x, targetOrigin.y);
+
+ s.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios,
+ commonMatrix, SpreadMethod.PAD, InterpolationMethod.RGB);
+
+ }
+
+ COMPILE::AS3
+ public function end(s:GraphicShape):void
+ {
+ s.graphics.endFill();
+ }
+
+ /**
+ * addFillAttrib()
+ *
+ * @param value The GraphicShape object on which the fill must be added.
+ * @return {string}
+ * @flexjsignorecoercion Node
+ */
+ COMPILE::JS
+ public function addFillAttrib(value:GraphicShape):String
+ {
+ //Create and add a linear gradient def
+ var svgNS:String = value.element.namespaceURI;
+ var grad:HTMLElement = document.createElementNS(svgNS, 'linearGradient') as HTMLElement;
+ var gradientId:String = this.newId;
+ grad.setAttribute('id', gradientId);
+
+ //Set x1, y1, x2, y2 of gradient
+ grad.setAttribute('x1', '0%');
+ grad.setAttribute('y1', '0%');
+ grad.setAttribute('x2', '100%');
+ grad.setAttribute('y2', '0%');
+
+ //Apply rotation to the gradient if rotation is a number
+ if (rotation)
+ {
+ grad.setAttribute('gradientTransform', 'rotate(' + rotation + ' 0.5 0.5)');
+ }
+
+ //Process gradient entries and create a stop for each entry
+ var entries:Array = this.entries;
+ for (var i:int = 0; i < entries.length; i++)
+ {
+ var gradientEntry:GradientEntry = entries[i];
+ var stop:HTMLElement = document.createElementNS(svgNS, 'stop') as HTMLElement;
+ //Set Offset
+ stop.setAttribute('offset', String(gradientEntry.ratio * 100) + '%');
+ //Set Color
+ var color:String = Number(gradientEntry.color).toString(16);
+ if (color.length == 1) color = '00' + color;
+ if (color.length == 2) color = '00' + color;
+ if (color.length == 4) color = '00' + color;
+ stop.setAttribute('stop-color', '#' + String(color));
+ //Set Alpha
+ stop.setAttribute('stop-opacity', String(gradientEntry.alpha));
+
+ grad.appendChild(stop);
+ }
+
+ //Add defs element if not available already
+ //Add newly created gradient to defs element
+ var defs:Node = value.element.querySelector('defs') ||
+ value.element.insertBefore(document.createElementNS(svgNS, 'defs'), value.element.firstChild);
+ defs.appendChild(grad);
+
+ //Return the fill attribute
+ return 'fill:url(#' + gradientId + ')';
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
new file mode 100644
index 0000000..2d69364
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Path.as
@@ -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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.display.GraphicsPath;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ import org.apache.flex.core.graphics.utils.PathHelper;
+
+ public class Path extends GraphicShape
+ {
+
+ private var _data:String;
+
+ public function get data():String
+ {
+ return _data;
+ }
+
+ public function set data(value:String):void
+ {
+ _data = value;
+ }
+
+ /**
+ * Draw the path.
+ * @param data A string containing a compact represention of the path segments.
+ * The value is a space-delimited string describing each path segment. Each
+ * segment entry has a single character which denotes the segment type and
+ * two or more segment parameters.
+ *
+ * If the segment command is upper-case, the parameters are absolute values.
+ * If the segment command is lower-case, the parameters are relative values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawPath(x:Number,y:Number,data:String):void
+ {
+ COMPILE::AS3
+ {
+ graphics.clear();
+ applyStroke();
+ var bounds:Rectangle = PathHelper.getBounds(data);
+ this.width = bounds.width;
+ this.height = bounds.height;
+ beginFill(bounds,new Point(bounds.left + x, bounds.top + y) );
+ var graphicsPath:GraphicsPath = PathHelper.getSegments(data,x,y);
+ graphics.drawPath(graphicsPath.commands, graphicsPath.data);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ if (data == null || data.length === 0) return;
+ var style:String = getStyleStr();
+ var path:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'path') as WrappedHTMLElement;
+ path.flexjs_wrapper = this;
+ path.setAttribute('style', style);
+ path.setAttribute('d', data);
+ element.appendChild(path);
+ if (stroke)
+ {
+ setPosition(x, y, stroke.weight, stroke.weight);
+ }
+ else
+ {
+ setPosition(x, y, 0, 0);
+ }
+
+ resize(x, y, path['getBBox']());
+
+ }
+ }
+
+ override protected function draw():void
+ {
+ drawPath(0, 0, data);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
new file mode 100644
index 0000000..fd1daa8
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Rect.as
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.display.CapsStyle;
+ import flash.display.JointStyle;
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ public class Rect extends GraphicShape
+ {
+
+ /**
+ * Draw the rectangle.
+ * @param x The x position of the top-left corner of the rectangle.
+ * @param y The y position of the top-left corner.
+ * @param width The width of the rectangle.
+ * @param height The height of the rectangle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function drawRect(x:Number, y:Number, width:Number, height:Number):void
+ {
+ COMPILE::AS3
+ {
+ graphics.clear();
+ applyStroke();
+ beginFill(new Rectangle(x, y, width, height), new Point(x,y));
+ graphics.drawRect(x, y, width, height);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = this.getStyleStr();
+ var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
+ rect.flexjs_wrapper = this;
+ rect.setAttribute('style', style);
+ if (stroke)
+ {
+ rect.setAttribute('x', String(stroke.weight / 2) + 'px');
+ rect.setAttribute('y', String(stroke.weight / 2) + 'px');
+ setPosition(x, y, stroke.weight, stroke.weight);
+ }
+ else
+ {
+ rect.setAttribute('x', '0' + 'px');
+ rect.setAttribute('y', '0' + 'px');
+ setPosition(x, y, 0, 0);
+ }
+ rect.setAttribute('width', String(width) + 'px');
+ rect.setAttribute('height', String(height) + 'px');
+ element.appendChild(rect);
+
+ resize(x, y, rect['getBBox']());
+ }
+ }
+
+ override protected function draw():void
+ {
+ drawRect(0,0,width,height);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
new file mode 100644
index 0000000..73e99b0
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColor.as
@@ -0,0 +1,112 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+
+ public class SolidColor implements IFill
+ {
+
+ //----------------------------------
+ // alpha
+ //----------------------------------
+
+ private var _alpha:Number = 1.0;
+ //----------------------------------
+ // color
+ //----------------------------------
+
+ private var _color:uint = 0x000000;
+
+ /**
+ * The transparency of a color.
+ * Possible values are 0.0 (invisible) through 1.0 (opaque).
+ *
+ * @default 1.0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.3
+ */
+ public function get alpha():Number
+ {
+ return _alpha;
+ }
+
+ public function set alpha(value:Number):void
+ {
+ var oldValue:Number = _alpha;
+ if (value != oldValue)
+ {
+ _alpha = value;
+ }
+ }
+
+ /**
+ * A color value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.3
+ */
+ public function get color():uint
+ {
+ return _color;
+ }
+
+ public function set color(value:uint):void
+ {
+ var oldValue:uint = _color;
+ if (value != oldValue)
+ {
+ _color = value;
+ }
+ }
+
+ COMPILE::AS3
+ public function begin(s:GraphicShape,targetBounds:Rectangle,targetOrigin:Point):void
+ {
+ s.graphics.beginFill(color,alpha);
+ }
+
+ COMPILE::AS3
+ public function end(s:GraphicShape):void
+ {
+ s.graphics.endFill();
+ }
+
+ /**
+ * addFillAttrib()
+ *
+ * @param value The GraphicShape object on which the fill must be added.
+ * @return {string}
+ */
+ COMPILE::JS
+ public function addFillAttrib(value:GraphicShape):String
+ {
+ var color:String = Number(this.color).toString(16);
+ if (color.length == 1) color = '00' + color;
+ if (color.length == 2) color = '00' + color;
+ if (color.length == 4) color = '00' + color;
+ return 'fill:#' + String(color) + ';fill-opacity:' + String(alpha);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
new file mode 100644
index 0000000..9535cdc
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/SolidColorStroke.as
@@ -0,0 +1,130 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.display.CapsStyle;
+ import flash.display.JointStyle;
+ }
+
+ public class SolidColorStroke implements IStroke
+ {
+
+ //----------------------------------
+ // alpha
+ //----------------------------------
+ private var _alpha:Number = 1.0;
+
+ //----------------------------------
+ // color
+ //----------------------------------
+ private var _color:uint = 0x000000;
+
+ //----------------------------------
+ // weight
+ //----------------------------------
+ private var _weight:Number = 1;
+
+ /**
+ * The transparency of a color.
+ * Possible values are 0.0 (invisible) through 1.0 (opaque).
+ *
+ * @default 1.0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.3
+ */
+ public function get alpha():Number
+ {
+ return _alpha;
+ }
+
+ public function set alpha(value:Number):void
+ {
+ var oldValue:Number = _alpha;
+ if (value != oldValue)
+ {
+ _alpha = value;
+ }
+ }
+
+ /**
+ * A color value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.3
+ */
+ public function get color():uint
+ {
+ return _color;
+ }
+
+ public function set color(value:uint):void
+ {
+ var oldValue:uint = _color;
+ if (value != oldValue)
+ {
+ _color = value;
+ }
+ }
+
+ public function get weight():Number
+ {
+ return _weight;
+ }
+
+ /**
+ * A color value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.3
+ */
+ public function set weight(value:Number):void
+ {
+ _weight = value;
+ }
+
+ COMPILE::AS3
+ public function apply(s:GraphicShape):void
+ {
+ s.graphics.lineStyle(weight,color,alpha,false,"normal",CapsStyle.SQUARE,JointStyle.MITER);
+ }
+
+ /**
+ * addStrokeAttrib()
+ *
+ * @param value The GraphicShape object on which the stroke must be added.
+ * @return {string}
+ */
+ COMPILE::JS
+ public function addStrokeAttrib(value:GraphicShape):String
+ {
+ var strokeColor:String = Number(color).toString(16);
+ if (strokeColor.length == 1) strokeColor = '00' + strokeColor;
+ if (strokeColor.length == 2) strokeColor = '00' + strokeColor;
+ if (strokeColor.length == 4) strokeColor = '00' + strokeColor;
+ return 'stroke:#' + String(strokeColor) + ';stroke-width:' +
+ String(weight) + ';stroke-opacity:' + String(alpha);
+ };
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
new file mode 100644
index 0000000..24dd840
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Text.as
@@ -0,0 +1,140 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.text.TextFieldType;
+ import org.apache.flex.core.CSSTextField;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ /**
+ * Draws a string of characters at a specific location using the stroke
+ * value of color and alpha.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * // TODO (aharui) ignore imports of external linkage interfaces?
+ * @flexjsignoreimport SVGLocatable
+ */
+ public class Text extends GraphicShape
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Text()
+ {
+ super();
+
+ COMPILE::AS3
+ {
+ _textField = new CSSTextField();
+ addChild(_textField);
+ }
+ }
+
+
+ COMPILE::AS3
+ private var _textField:CSSTextField;
+
+ /**
+ * @copy org.apache.flex.core.ITextModel#textField
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function get textField() : CSSTextField
+ {
+ return _textField;
+ }
+
+ /**
+ * Draws text at the given point.
+ * @param value The string to draw.
+ * @param x The x position of the top-left corner of the rectangle.
+ * @param y The y position of the top-left corner.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion Text
+ * @flexjsignorecoercion Node
+ * @flexjsignorecoercion SVGLocatable
+ */
+ public function drawText(value:String, x:Number, y:Number):void
+ {
+ COMPILE::AS3
+ {
+ textField.selectable = false;
+ textField.type = TextFieldType.DYNAMIC;
+ textField.mouseEnabled = false;
+ textField.autoSize = "left";
+ textField.text = value;
+
+ var color:SolidColorStroke = stroke as SolidColorStroke;
+ if (color) {
+ textField.textColor = color.color;
+ textField.alpha = color.alpha;
+ }
+
+ textField.x = x;
+ textField.y = y;
+ }
+ COMPILE::JS
+ {
+ var style:String = this.getStyleStr();
+ var text:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'text') as WrappedHTMLElement;
+ text.flexjs_wrapper = this;
+ text.setAttribute('style', style);
+ text.setAttribute('x', String(x) + 'px');
+ text.setAttribute('y', String(y) + 'px');
+ setPosition(x, y, 0, 0);
+ var textNode:Text = document.createTextNode(value) as Text;
+ text.appendChild(textNode as Node);
+ element.appendChild(text);
+
+ resize(x, y, (text as SVGLocatable).getBBox());
+
+ }
+ }
+
+ COMPILE::JS
+ override protected function draw():void
+ {
+
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
new file mode 100644
index 0000000..14cc5af
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
@@ -0,0 +1,1140 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics.utils
+{
+ import flash.events.Event;
+ import flash.geom.Matrix;
+ import flash.geom.Matrix3D;
+ import flash.geom.Point;
+ import flash.geom.Vector3D;
+ import flash.system.Capabilities;
+
+ import org.apache.flex.core.graphics.utils.IAssetLayoutFeatures;
+
+
+ /**
+ * @private
+ * Transform Offsets can be assigned to any Component or GraphicElement to modify the transform
+ * of the object beyond where its parent layout places it.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public class AdvancedLayoutFeatures implements IAssetLayoutFeatures
+ {
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function AdvancedLayoutFeatures()
+ {
+ layout = new CompoundTransform();
+ }
+
+
+
+ /**
+ * @private
+ * a flag for use by the owning object indicating whether the owning object has a pending update
+ * to the computed matrix. it is the owner's responsibility to set this flag.
+ */
+ public var updatePending:Boolean = false;
+
+ /**
+ * storage for the depth value. Layering is considered 'advanced' layout behavior, and not something
+ * that gets used by the majority of the components out there. So if a component has a non-zero depth,
+ * it will allocate a AdvancedLayoutFeatures object and store the value here.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var depth:Number = 0;
+
+ /**
+ * @private
+ * slots for the various 2D and 3D matrices for layout, offset, and computed transforms. Note that
+ * these are only allocated and computed on demand -- many component instances will never use a 3D
+ * matrix, for example.
+ */
+ protected var _computedMatrix:Matrix;
+ protected var _computedMatrix3D:Matrix3D;
+
+ /**
+ * @private
+ * the layout visible transform as defined by the user and parent layout.
+ */
+ protected var layout:CompoundTransform;
+
+ /**
+ * @private
+ * offset values applied by the user
+ */
+ private var _postLayoutTransformOffsets:TransformOffsets;
+
+ /**
+ * @private
+ * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
+ * and the 3D matrices. Since developers can set any of the three programmatically, the last one set
+ * will always be valid, and the others will be invalid until validated on demand.
+ */
+ private static const COMPUTED_MATRIX_VALID:uint = 0x1;
+ private static const COMPUTED_MATRIX3D_VALID:uint = 0x2;
+
+ /**
+ * @private
+ * general storage for all of our flags.
+ */
+ private var _flags:uint = 0;
+
+ /**
+ * @private
+ * static data used by utility methods below
+ */
+ private static var reVT:Vector3D = new Vector3D(0,0,0);
+ private static var reVR:Vector3D = new Vector3D(0,0,0);
+ private static var reVS:Vector3D = new Vector3D(1,1,1);
+
+ private static var reV:Vector.<Vector3D> = new Vector.<Vector3D>();
+ reV.push(reVT);
+ reV.push(reVR);
+ reV.push(reVS);
+
+
+ private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
+
+ private static const ZERO_REPLACEMENT_IN_3D:Number = .00000000000001;
+
+ private static var tempLocalPosition:Vector3D;
+
+ /**
+ * @private
+ * a pointer to the function we use to transform vectors, to work around a bug
+ * in early versions of the flash player.
+ */
+ private static var transformVector:Function = initTransformVectorFunction;
+
+ /**
+ * @private
+ * an actionscript implementation to transform a vector by a matrix. Bugs in early versions of
+ * flash 10's implementation of Matrix.transformVector force us to do it ourselves in actionscript.
+ */
+ private static function pre10_0_22_87_transformVector(m:Matrix3D,v:Vector3D):Vector3D
+ {
+ var r:Vector.<Number> = m.rawData;
+ return new Vector3D(
+ r[0] * v.x + r[4] * v.y + r[8] * v.z + r[12],
+ r[1] * v.x + r[5] * v.y + r[9] * v.z + r[13],
+ r[2] * v.x + r[6] * v.y + r[10] * v.z + r[14],
+ 1);
+ }
+
+ /**
+ * @private
+ * a function to transform vectors using the built in player API, if we're in a late enough player version
+ * that we won't run into bugs.s
+ */
+ private static function nativeTransformVector(m:Matrix3D,v:Vector3D):Vector3D
+ {
+ return m.transformVector(v);
+ }
+
+ /**
+ * @private
+ * the first time someone calls transformVector, they'll get this function. It checks the player version,
+ * and if decides which implementation to use based on whether a bug is present or not.
+ */
+ private static function initTransformVectorFunction(m:Matrix3D,v:Vector3D):Vector3D
+ {
+ var canUseNative:Boolean = false;
+ var version:Array = Capabilities.version.split(' ')[1].split(',');
+ if (parseFloat(version[0]) > 10)
+ canUseNative = true;
+ else if (parseFloat(version[1]) > 0)
+ canUseNative = true;
+ else if (parseFloat(version[2]) > 22)
+ canUseNative = true;
+ else if (parseFloat(version[3]) >= 87)
+ canUseNative = true;
+ if (canUseNative)
+ transformVector = nativeTransformVector;
+ else
+ transformVector = pre10_0_22_87_transformVector;
+
+ return transformVector(m,v);
+ }
+
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * layout transform convenience property. Represents the x value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutX(value:Number):void
+ {
+ layout.x = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutX():Number
+ {
+ return layout.x;
+ }
+ /**
+ * layout transform convenience property. Represents the y value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutY(value:Number):void
+ {
+ layout.y = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutY():Number
+ {
+ return layout.y;
+ }
+
+ /**
+ * layout transform convenience property. Represents the z value of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutZ(value:Number):void
+ {
+ layout.z = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutZ():Number
+ {
+ return layout.z;
+ }
+
+ //----------------------------------
+ // layoutWidth
+ //----------------------------------
+
+ private var _layoutWidth:Number = 0;
+
+ /**
+ * Used by the mirroring transform. See the mirror property.
+ * @default 0
+ */
+ public function get layoutWidth():Number
+ {
+ return _layoutWidth;
+ }
+
+ /**
+ * @private
+ */
+ public function set layoutWidth(value:Number):void
+ {
+ if (value == _layoutWidth)
+ return;
+ _layoutWidth = value;
+ invalidate();
+ }
+
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * @private
+ * the x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ */
+ public function set transformX(value:Number):void
+ {
+ layout.transformX = value;
+ invalidate();
+ }
+ /**
+ * @private
+ */
+ public function get transformX():Number
+ {
+ return layout.transformX;
+ }
+
+ /**
+ * @private
+ * the y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ */
+ public function set transformY(value:Number):void
+ {
+ layout.transformY = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get transformY():Number
+ {
+ return layout.transformY;
+ }
+
+ /**
+ * @private
+ * the z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
+ */
+ public function set transformZ(value:Number):void
+ {
+ layout.transformZ = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get transformZ():Number
+ {
+ return layout.transformZ;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * layout transform convenience property. Represents the rotation around the X axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutRotationX(value:Number):void
+ {
+ layout.rotationX= value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutRotationX():Number
+ {
+ return layout.rotationX;
+ }
+
+ /**
+ * layout transform convenience property. Represents the rotation around the Y axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutRotationY(value:Number):void
+ {
+ layout.rotationY= value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutRotationY():Number
+ {
+ return layout.rotationY;
+ }
+
+ /**
+ * layout transform convenience property. Represents the rotation around the Z axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutRotationZ(value:Number):void
+ {
+ layout.rotationZ= value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutRotationZ():Number
+ {
+ return layout.rotationZ;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * layout transform convenience property. Represents the scale along the X axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutScaleX(value:Number):void
+ {
+ layout.scaleX = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutScaleX():Number
+ {
+ return layout.scaleX;
+ }
+
+ /**
+ * layout transform convenience property. Represents the scale along the Y axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutScaleY(value:Number):void
+ {
+ layout.scaleY= value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutScaleY():Number
+ {
+ return layout.scaleY;
+ }
+
+
+ /**
+ * layout transform convenience property. Represents the scale along the Z axis of the layout matrix used in layout and in
+ * the computed transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set layoutScaleZ(value:Number):void
+ {
+ layout.scaleZ= value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutScaleZ():Number
+ {
+ return layout.scaleZ;
+ }
+
+ /**
+ * @private
+ * The 2D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+ * If the convenience properties are set, this matrix is built from those properties.
+ * If the matrix is set directly, the convenience properties will be updated to values derived from this matrix.
+ * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
+ * offsets are provided, the decomposed layout properties will be used instead.
+ */
+ public function set layoutMatrix(value:Matrix):void
+ {
+ layout.matrix = value;
+ invalidate();
+ }
+
+
+ /**
+ * @private
+ */
+ public function get layoutMatrix():Matrix
+ {
+ return layout.matrix;
+
+ }
+
+
+ /**
+ * @private
+ * The 3D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
+ * This matrix is only used by parents that respect 3D layoyut.
+ * If the convenience properties are set, this matrix is built from those properties.
+ * If the matrix is set directly, the convenience properties will be updated to values derived from this matrix.
+ * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
+ * offsets are provided, the decomposed layout properties will be used instead.
+ */
+ public function set layoutMatrix3D(value:Matrix3D):void
+ {
+ layout.matrix3D = value;
+ invalidate();
+ }
+
+ /**
+ * @private
+ */
+ public function get layoutMatrix3D():Matrix3D
+ {
+ return layout.matrix3D;
+ }
+
+ /**
+ * true if the computed transform has 3D values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get is3D():Boolean
+ {
+ return (layout.is3D || (postLayoutTransformOffsets != null && postLayoutTransformOffsets.is3D));
+ }
+
+ /**
+ * true if the layout transform has 3D values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get layoutIs3D():Boolean
+ {
+ return layout.is3D;
+ }
+
+ //------------------------------------------------------------------------------
+
+ /** offsets to the transform convenience properties that are applied when a component is rendered. If this
+ * property is set, its values will be added to the layout transform properties to determine the true matrix used to render
+ * the component
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set postLayoutTransformOffsets(value:TransformOffsets):void
+ {
+ if (_postLayoutTransformOffsets != null)
+ {
+ _postLayoutTransformOffsets.removeEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
+ _postLayoutTransformOffsets.owner = null;
+ }
+ _postLayoutTransformOffsets = value;
+ if (_postLayoutTransformOffsets != null)
+ {
+ _postLayoutTransformOffsets.addEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
+ _postLayoutTransformOffsets.owner = this;
+ }
+ invalidate();
+ }
+
+ public function get postLayoutTransformOffsets():TransformOffsets
+ {
+ return _postLayoutTransformOffsets;
+ }
+
+ private function postLayoutTransformOffsetsChangedHandler(e:Event):void
+ {
+ invalidate();
+ }
+
+ //----------------------------------
+ // mirror
+ //----------------------------------
+
+ private var _mirror:Boolean = false;
+
+ /**
+ * If true the X axis is scaled by -1 and the x coordinate of the origin
+ * is translated by the component's width.
+ *
+ * The net effect of this "mirror" transform is to flip the direction
+ * that the X axis increases in without changing the layout element's
+ * location relative to the parent's origin.
+ *
+ * @default false
+ */
+ public function get mirror():Boolean
+ {
+ return _mirror;
+ }
+
+ /**
+ * @private
+ */
+ public function set mirror(value:Boolean):void
+ {
+ _mirror = value;
+ invalidate();
+ }
+
+
+ //----------------------------------
+ // stretchX
+ //----------------------------------
+
+ private var _stretchX:Number = 1;
+
+ /**
+ * The stretchY is the horizontal component of the stretch scale factor which
+ * is applied before any other transformation property.
+ * @default 1
+ */
+ public function get stretchX():Number
+ {
+ return _stretchX;
+ }
+
+ /**
+ * @private
+ */
+ public function set stretchX(value:Number):void
+ {
+ if (value == _stretchX)
+ return;
+ _stretchX = value;
+ invalidate();
+ }
+
+ //----------------------------------
+ // stretchY
+ //----------------------------------
+
+ private var _stretchY:Number = 1;
+
+ /**
+ * The stretchY is the vertical component of the stretch scale factor which
+ * is applied before any other transformation property.
+ * @default 1
+ */
+ public function get stretchY():Number
+ {
+ return _stretchY;
+ }
+
+ /**
+ * @private
+ */
+ public function set stretchY(value:Number):void
+ {
+ if (value == _stretchY)
+ return;
+ _stretchY = value;
+ invalidate();
+ }
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * @private
+ * invalidates our various cached values. Any change to the AdvancedLayoutFeatures object that affects
+ * the various transforms should call this function.
+ * @param reason - the code indicating what changes to cause the invalidation.
+ * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
+ * @param dispatchChangeEvent - if true, the AdvancedLayoutFeatures will dispatch a change indicating that its underlying transforms
+ * have been modified.
+ */
+ private function invalidate():void
+ {
+ _flags &= ~COMPUTED_MATRIX_VALID;
+ _flags &= ~COMPUTED_MATRIX3D_VALID;
+ }
+
+
+ /**
+ * the computed matrix, calculated by combining the layout matrix and and any offsets provided..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get computedMatrix():Matrix
+ {
+ if (_flags & COMPUTED_MATRIX_VALID)
+ return _computedMatrix;
+
+ if (!postLayoutTransformOffsets && !mirror && stretchX == 1 && stretchY == 1)
+ {
+ return layout.matrix;
+ }
+
+ var m:Matrix = _computedMatrix;
+ if (m == null)
+ m = _computedMatrix = new Matrix();
+ else
+ m.identity();
+
+ var tx:Number = layout.transformX;
+ var ty:Number = layout.transformY;
+ var sx:Number = layout.scaleX;
+ var sy:Number = layout.scaleY;
+ var rz:Number = layout.rotationZ;
+ var x:Number = layout.x;
+ var y:Number = layout.y;
+
+ if (mirror)
+ {
+ sx *= -1;
+ x += layoutWidth;
+ }
+
+ if (postLayoutTransformOffsets)
+ {
+ sx *= postLayoutTransformOffsets.scaleX;
+ sy *= postLayoutTransformOffsets.scaleY;
+ rz += postLayoutTransformOffsets.rotationZ;
+ x += postLayoutTransformOffsets.x;
+ y += postLayoutTransformOffsets.y;
+ }
+
+ if (stretchX != 1 || stretchY != 1)
+ m.scale(stretchX, stretchY);
+ build2DMatrix(m, tx, ty, sx, sy, rz, x, y);
+
+ _flags |= COMPUTED_MATRIX_VALID;
+ return m;
+ }
+
+ /**
+ * the computed 3D matrix, calculated by combining the 3D layout matrix and and any offsets provided..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get computedMatrix3D():Matrix3D
+ {
+ if (_flags & COMPUTED_MATRIX3D_VALID)
+ return _computedMatrix3D;
+
+
+ if (!postLayoutTransformOffsets && !mirror && stretchX == 1 && stretchY == 1)
+ {
+ return layout.matrix3D;
+ }
+
+ var m:Matrix3D = _computedMatrix3D;
+ if (m == null)
+ m = _computedMatrix3D = new Matrix3D();
+ else
+ m.identity();
+
+ var tx:Number = layout.transformX;
+ var ty:Number = layout.transformY;
+ var tz:Number = layout.transformZ;
+ var sx:Number = layout.scaleX;
+ var sy:Number = layout.scaleY;
+ var sz:Number = layout.scaleZ;
+ var rx:Number = layout.rotationX;
+ var ry:Number = layout.rotationY;
+ var rz:Number = layout.rotationZ;
+ var x:Number = layout.x;
+ var y:Number = layout.y;
+ var z:Number = layout.z;
+
+ if (mirror)
+ {
+ sx *= -1;
+ x += layoutWidth;
+ }
+
+ if (postLayoutTransformOffsets)
+ {
+ sx *= postLayoutTransformOffsets.scaleX;
+ sy *= postLayoutTransformOffsets.scaleY;
+ sz *= postLayoutTransformOffsets.scaleZ;
+ rx += postLayoutTransformOffsets.rotationX;
+ ry += postLayoutTransformOffsets.rotationY;
+ rz += postLayoutTransformOffsets.rotationZ;
+ x += postLayoutTransformOffsets.x;
+ y += postLayoutTransformOffsets.y;
+ z += postLayoutTransformOffsets.z;
+ }
+
+ build3DMatrix(m, tx, ty, tz, sx, sy, sz, rx, ry, rz, x, y, z);
+ // Always prepend last
+ if (stretchX != 1 || stretchY != 1)
+ m.prependScale(stretchX, stretchY, 1);
+
+ _flags |= COMPUTED_MATRIX3D_VALID;
+ return m;
+ }
+
+
+ /**
+ * @private
+ * convenience function for building a 2D matrix from the convenience properties
+ */
+ public static function build2DMatrix(m:Matrix,
+ tx:Number,ty:Number,
+ sx:Number,sy:Number,
+ rz:Number,
+ x:Number,y:Number):void
+ {
+ m.translate(-tx,-ty);
+ m.scale(sx,sy);
+ m.rotate(rz* RADIANS_PER_DEGREES);
+ m.translate(x+tx,y+ty);
+ }
+
+
+ /**
+ * @private
+ * convenience function for building a 3D matrix from the convenience properties
+ */
+ public static function build3DMatrix(m:Matrix3D,
+ tx:Number,ty:Number,tz:Number,
+ sx:Number,sy:Number,sz:Number,
+ rx:Number,ry:Number,rz:Number,
+ x:Number,y:Number,z:Number):void
+ {
+ reVR.x = rx * RADIANS_PER_DEGREES;
+ reVR.y = ry * RADIANS_PER_DEGREES;
+ reVR.z = rz * RADIANS_PER_DEGREES;
+ m.recompose(reV);
+ if (sx == 0)
+ sx = ZERO_REPLACEMENT_IN_3D;
+ if (sy == 0)
+ sy = ZERO_REPLACEMENT_IN_3D;
+ if (sz == 0)
+ sz = ZERO_REPLACEMENT_IN_3D;
+ m.prependScale(sx,sy,sz);
+ m.prependTranslation(-tx,-ty,-tz);
+ m.appendTranslation(tx+x,ty+y,tz+z);
+ }
+
+
+ /**
+ * A utility method to transform a point specified in the local
+ * coordinates of this object to its location in the object's parent's
+ * coordinates. The pre-layout and post-layout result will be set on
+ * the <code>position</code> and <code>postLayoutPosition</code>
+ * parameters, if they are non-null.
+ *
+ * @param propertyIs3D A boolean reflecting whether the calculation needs
+ * to take into account the 3D matrix of the object.
+ * @param localPoint The point to be transformed, specified in the
+ * local coordinates of the object.
+ * @position A Vector3D point that will hold the pre-layout
+ * result. If null, the parameter is ignored.
+ * @postLayoutPosition A Vector3D point that will hold the post-layout
+ * result. If null, the parameter is ignored.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function transformPointToParent(propertyIs3D:Boolean,
+ localPosition:Vector3D, position:Vector3D,
+ postLayoutPosition:Vector3D):void
+ {
+ var transformedV:Vector3D;
+ var transformedP:Point;
+ tempLocalPosition =
+ localPosition ?
+ localPosition.clone() :
+ new Vector3D();
+
+ if (is3D || propertyIs3D)
+ {
+ if (position != null)
+ {
+ transformedV = transformVector(layoutMatrix3D, tempLocalPosition);
+ position.x = transformedV.x;
+ position.y = transformedV.y;
+ position.z = transformedV.z;
+ }
+
+ if (postLayoutPosition != null)
+ {
+ // computedMatrix factor in stretchXY, so divide it out of position first
+ tempLocalPosition.x /= stretchX;
+ tempLocalPosition.y /= stretchY;
+ transformedV = transformVector(computedMatrix3D, tempLocalPosition);
+ postLayoutPosition.x = transformedV.x;
+ postLayoutPosition.y = transformedV.y;
+ postLayoutPosition.z = transformedV.z;
+ }
+ }
+ else
+ {
+ var localP:Point = new Point(tempLocalPosition.x,
+ tempLocalPosition.y);
+ if (position != null)
+ {
+ transformedP = layoutMatrix.transformPoint(localP);
+ position.x = transformedP.x;
+ position.y = transformedP.y;
+ position.z = 0;
+ }
+
+ if (postLayoutPosition != null)
+ {
+ // computedMatrix factor in stretchXY, so divide it out of position first
+ localP.x /= stretchX;
+ localP.y /= stretchY;
+ transformedP = computedMatrix.transformPoint(localP);
+ postLayoutPosition.x = transformedP.x;
+ postLayoutPosition.y = transformedP.y;
+ postLayoutPosition.z = 0;
+ }
+ }
+ }
+
+ /**
+ * @private
+ * call when you've changed the inputs to the computed transform to make
+ * any adjustments to keep a particular point fixed in parent coordinates.
+ */
+ private function completeTransformCenterAdjustment(changeIs3D:Boolean,
+ transformCenter:Vector3D, targetPosition:Vector3D,
+ targetPostLayoutPosition:Vector3D):void
+ {
+ // TODO (chaase): optimize for transformCenter == (0,0,0)
+ if (is3D || changeIs3D)
+ {
+ if (targetPosition != null)
+ {
+ var adjustedLayoutCenterV:Vector3D = transformVector(layoutMatrix3D, transformCenter);
+ if (adjustedLayoutCenterV.equals(targetPosition) == false)
+ {
+ layout.translateBy(targetPosition.x - adjustedLayoutCenterV.x,
+ targetPosition.y - adjustedLayoutCenterV.y,
+ targetPosition.z - adjustedLayoutCenterV.z);
+ invalidate();
+ }
+ }
+ if (targetPostLayoutPosition != null && _postLayoutTransformOffsets != null)
+ {
+ // computedMatrix factor in stretchXY, so divide it out of transform center first
+ var tmpPos:Vector3D = new Vector3D(transformCenter.x, transformCenter.y, transformCenter.z);
+ tmpPos.x /= stretchX;
+ tmpPos.y /= stretchY;
+ var adjustedComputedCenterV:Vector3D = transformVector(computedMatrix3D, tmpPos);
+ if (adjustedComputedCenterV.equals(targetPostLayoutPosition) == false)
+ {
+ postLayoutTransformOffsets.x +=targetPostLayoutPosition.x - adjustedComputedCenterV.x;
+ postLayoutTransformOffsets.y += targetPostLayoutPosition.y - adjustedComputedCenterV.y;
+ postLayoutTransformOffsets.z += targetPostLayoutPosition.z - adjustedComputedCenterV.z;
+ invalidate();
+ }
+ }
+ }
+ else
+ {
+ var transformCenterP:Point = new Point(transformCenter.x,transformCenter.y);
+ if (targetPosition != null)
+ {
+ var currentPositionP:Point = layoutMatrix.transformPoint(transformCenterP);
+ if (currentPositionP.x != targetPosition.x ||
+ currentPositionP.y != targetPosition.y)
+ {
+ layout.translateBy(targetPosition.x - currentPositionP.x,
+ targetPosition.y - currentPositionP.y, 0);
+ invalidate();
+ }
+ }
+
+ if (targetPostLayoutPosition != null && _postLayoutTransformOffsets != null)
+ {
+ // computedMatrix factor in stretchXY, so divide it out of transform center first
+ transformCenterP.x /= stretchX;
+ transformCenterP.y /= stretchY;
+ var currentPostLayoutPosition:Point =
+ computedMatrix.transformPoint(transformCenterP);
+ if (currentPostLayoutPosition.x != targetPostLayoutPosition.x ||
+ currentPostLayoutPosition.y != targetPostLayoutPosition.y)
+ {
+ _postLayoutTransformOffsets.x += targetPostLayoutPosition.x - currentPostLayoutPosition.x;
+ _postLayoutTransformOffsets.y += targetPostLayoutPosition.y - currentPostLayoutPosition.y;
+ invalidate();
+ }
+ }
+ }
+ }
+
+ private static var staticTranslation:Vector3D = new Vector3D();
+ private static var staticOffsetTranslation:Vector3D = new Vector3D();
+
+ /**
+ * A utility method to update the rotation and scale of the transform
+ * while keeping a particular point, specified in the component's own
+ * coordinate space, fixed in the parent's coordinate space. This
+ * function will assign the rotation and scale values provided, then
+ * update the x/y/z properties as necessary to keep tx/ty/tz fixed.
+ * @param transformCenter the point, in the component's own coordinates,
+ * to keep fixed relative to its parent.
+ * @param rotation the new values for the rotation of the transform
+ * @param scale the new values for the scale of the transform
+ * @param translation the new values for the translation of the transform
+ */
+ public function transformAround(transformCenter:Vector3D,
+ scale:Vector3D,
+ rotation:Vector3D,
+ transformCenterPosition:Vector3D,
+ postLayoutScale:Vector3D = null,
+ postLayoutRotation:Vector3D = null,
+ postLayoutTransformCenterPosition:Vector3D = null):void
+ {
+ var is3D:Boolean = (scale != null && scale.z != 1) ||
+ (rotation != null && ((rotation.x != 0 ) || (rotation.y != 0))) ||
+ (transformCenterPosition != null && transformCenterPosition.z != 0) ||
+ (postLayoutScale != null && postLayoutScale.z != 1) ||
+ (postLayoutRotation != null &&
+ (postLayoutRotation.x != 0 || postLayoutRotation.y != 0)) ||
+ (postLayoutTransformCenterPosition != null && postLayoutTransformCenterPosition.z != 0);
+
+ var needOffsets:Boolean = _postLayoutTransformOffsets == null &&
+ (postLayoutScale != null || postLayoutRotation != null ||
+ postLayoutTransformCenterPosition != null);
+ if (needOffsets)
+ _postLayoutTransformOffsets = new TransformOffsets();
+
+ // now if they gave us a non-trivial transform center, and didn't tell us where they want it,
+ // we need to calculate where it is so that we can make sure we keep it there.
+ if (transformCenter != null &&
+ (transformCenterPosition == null || postLayoutTransformCenterPosition == null))
+ {
+ transformPointToParent(is3D, transformCenter, staticTranslation,
+ staticOffsetTranslation);
+ if (postLayoutTransformCenterPosition == null && transformCenterPosition != null)
+ {
+ staticOffsetTranslation.x = transformCenterPosition.x + staticOffsetTranslation.x - staticTranslation.x;
+ staticOffsetTranslation.y = transformCenterPosition.y + staticOffsetTranslation.y - staticTranslation.y;
+ staticOffsetTranslation.z = transformCenterPosition.z + staticOffsetTranslation.z - staticTranslation.z;
+ }
+
+ }
+ // if targetPosition/postLayoutTargetPosition is null here, it might be because the caller passed in
+ // requested values, so we haven't calculated it yet. So that means our target position is the values
+ // they passed in.
+ var targetPosition:Vector3D = (transformCenterPosition == null)? staticTranslation:transformCenterPosition;
+ var postLayoutTargetPosition:Vector3D = (postLayoutTransformCenterPosition == null)? staticOffsetTranslation:postLayoutTransformCenterPosition;
+
+ // now update our transform values.
+ if (rotation != null)
+ {
+ if (!isNaN(rotation.x))
+ layout.rotationX = rotation.x;
+ if (!isNaN(rotation.y))
+ layout.rotationY = rotation.y;
+ if (!isNaN(rotation.z))
+ layout.rotationZ = rotation.z;
+ }
+ if (scale != null)
+ {
+ if (!isNaN(scale.x))
+ layout.scaleX = scale.x;
+ if (!isNaN(scale.y))
+ layout.scaleY = scale.y;
+ if (!isNaN(scale.z))
+ layout.scaleZ = scale.z;
+ }
+
+ if (postLayoutRotation != null)
+ {
+ _postLayoutTransformOffsets.rotationX = postLayoutRotation.x;
+ _postLayoutTransformOffsets.rotationY = postLayoutRotation.y;
+ _postLayoutTransformOffsets.rotationZ = postLayoutRotation.z;
+ }
+ if (postLayoutScale != null)
+ {
+ _postLayoutTransformOffsets.scaleX = postLayoutScale.x;
+ _postLayoutTransformOffsets.scaleY = postLayoutScale.y;
+ _postLayoutTransformOffsets.scaleZ = postLayoutScale.z;
+ }
+
+ // if they didn't pass us a transform center,
+ // then we assume it's the origin. In that case, it's trivially easy
+ // to make sure the origin is at a particular point...we simply set
+ // the transformCenterPosition portion of our transforms to that point.
+ if (transformCenter == null)
+ {
+ if (transformCenterPosition != null)
+ {
+ layout.x = transformCenterPosition.x;
+ layout.y = transformCenterPosition.y;
+ layout.z = transformCenterPosition.z;
+ }
+ if (postLayoutTransformCenterPosition != null)
+ {
+ _postLayoutTransformOffsets.x = postLayoutTransformCenterPosition.x - layout.x;
+ _postLayoutTransformOffsets.y = postLayoutTransformCenterPosition.y - layout.y;
+ _postLayoutTransformOffsets.z = postLayoutTransformCenterPosition.z - layout.z;
+ }
+ }
+ invalidate();
+
+ // if they did pass in a transform center, go do the adjustments necessary to keep it fixed in place.
+ if (transformCenter != null)
+ completeTransformCenterAdjustment(is3D, transformCenter,
+ targetPosition, postLayoutTargetPosition);
+
+
+ }
+
+ }
+}
+
[21/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLng.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLng.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLng.as
new file mode 100644
index 0000000..fbedaea
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLng.as
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class LatLng {
+
+ /**
+ * @param lat [number]
+ * @param lng [number]
+ * @param opt_noWrap [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function LatLng(lat:Number, lng:Number, opt_noWrap:Boolean = false) {
+ super();
+ _lat = lat;
+ _lng = lng;
+ }
+
+ private var _lat:Number;
+ private var _lng:Number;
+
+ /**
+ * @param other [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function equals(other:google.maps.LatLng):Boolean {
+ return other.lat() == _lat && other.lng() == _lng;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toString():String {
+ return String(_lat)+", "+String(_lng);
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function lng():Number { return _lng; }
+
+ /**
+ * @param opt_precision [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toUrlValue(opt_precision:Number = 0):String { return toString(); }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function lat():Number { return _lat; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLngBounds.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLngBounds.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLngBounds.as
new file mode 100644
index 0000000..6384733
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/LatLngBounds.as
@@ -0,0 +1,96 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class LatLngBounds {
+
+ /**
+ * @param opt_sw [(google.maps.LatLng|null|undefined)]
+ * @param opt_ne [(google.maps.LatLng|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function LatLngBounds(opt_sw:google.maps.LatLng = null, opt_ne:google.maps.LatLng = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getNorthEast():google.maps.LatLng { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function isEmpty():Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function toSpan():google.maps.LatLng { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getCenter():google.maps.LatLng { return null; }
+
+ /**
+ * @param other [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function equals(other:google.maps.LatLngBounds):Boolean { return null; }
+
+ /**
+ * @param point [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function extend(point:google.maps.LatLng):google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param other [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function union(other:google.maps.LatLngBounds):google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param other [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function intersects(other:google.maps.LatLngBounds):Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toString():String { return null; }
+
+ /**
+ * @param latLng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function contains(latLng:google.maps.LatLng):Boolean { return null; }
+
+ /**
+ * @param opt_precision [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toUrlValue(opt_precision:Number = 0):String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getSouthWest():google.maps.LatLng { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCArray.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCArray.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCArray.as
new file mode 100644
index 0000000..356444f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCArray.as
@@ -0,0 +1,85 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class MVCArray extends google.maps.MVCObject {
+
+ /**
+ * @param opt_array [(Array|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function MVCArray(opt_array:Array = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function clear():Object /* undefined */ { return null; }
+
+ /**
+ * @param i [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {*}
+ */
+ public function removeAt(i:Number):* { return null; }
+
+ /**
+ * @param i [number]
+ * @param elem [*]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function insertAt(i:Number, elem:*):Object /* undefined */ { return null; }
+
+ /**
+ * @param callback [function (?, number): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function forEach(callback:Function /* function (?, number): ? */):Object /* undefined */ { return null; }
+
+ /**
+ * @param i [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {*}
+ */
+ public function getAt(i:Number):* { return null; }
+
+ /**
+ * @param i [number]
+ * @param elem [*]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setAt(i:Number, elem:*):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {*}
+ */
+ public function pop():* { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getLength():Number { return 0; }
+
+ /**
+ * @param elem [*]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function push(elem:*):Number { return 0; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Array|null)}
+ */
+ public function getArray():Array { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCObject.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCObject.as
new file mode 100644
index 0000000..ea9d213
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MVCObject.as
@@ -0,0 +1,103 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MVCObject() {
+ super();
+ _dictionary = new Object();
+ }
+
+ private var _dictionary:Object;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function unbindAll():Object /* undefined */ {
+ return undefined;
+ }
+
+ /**
+ * @param key [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {*}
+ */
+ public function get(key:String):* {
+ if (_dictionary.hasOwnProperty(key)) {
+ return _dictionary[key];
+ }
+ else {
+ return undefined;
+ }
+ }
+
+ /**
+ * @param values [(Object|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setValues(values:Object):Object /* undefined */ {
+ for (var id:String in values) {
+ _dictionary[id] = values[id];
+ }
+ return undefined;
+ }
+
+ /**
+ * @param key [string]
+ * @param value [?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function set(key:String, value:Object /* ? */):Object /* undefined */ {
+ _dictionary[key] = value;
+ return undefined;
+ }
+
+ /**
+ * @param key [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function notify(key:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param key [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function unbind(key:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param key [string]
+ * @param target [(google.maps.MVCObject|null)]
+ * @param opt_targetKey [(null|string|undefined)]
+ * @param opt_noNotify [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function bindTo(key:String, target:google.maps.MVCObject, opt_targetKey:String = '', opt_noNotify:Boolean = false):Object /* undefined */ { return null; }
+
+ /**
+ * @param eventName [string]
+ * @param handler [Function]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapsEventListener|null)}
+ */
+ public function addListener(eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
+
+ /**
+ * @param key [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function changed(key:String):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Map.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Map.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Map.as
new file mode 100644
index 0000000..43ce77b
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Map.as
@@ -0,0 +1,168 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Map extends google.maps.MVCObject {
+
+ /**
+ * @param mapDiv [(Node|null)]
+ * @param opt_opts [(Object<?,string>|google.maps.MapOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Map(mapDiv:Object, opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see JSType - [(Array((google.maps.MVCArray|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var controls:Array;
+
+ /**
+ * @see JSType - [(google.maps.MapTypeRegistry|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var mapTypes:google.maps.MapTypeRegistry;
+
+ /**
+ * @see JSType - [(google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlayMapTypes:google.maps.MVCArray;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getCenter():google.maps.LatLng { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getTilt():Number { return 0; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Node|null)}
+ */
+ public function getDiv():Object { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Projection|null)}
+ */
+ public function getProjection():Object { return null; } //google.maps.Projection { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getHeading():Number { return 0; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapTypeId|null|string)}
+ */
+ public function getMapTypeId():Object { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.StreetViewPanorama|null)}
+ */
+ public function getStreetView():google.maps.StreetViewPanorama { return null; }
+
+ /**
+ * @param x [number]
+ * @param y [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function panBy(x:Number, y:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param panorama [(google.maps.StreetViewPanorama|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setStreetView(panorama:google.maps.StreetViewPanorama):Object /* undefined */ { return null; }
+
+ /**
+ * @param bounds [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function fitBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.MapOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param zoom [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setZoom(zoom:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param tilt [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setTilt(tilt:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param mapTypeId [(google.maps.MapTypeId|null|string)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMapTypeId(mapTypeId:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getZoom():Number { return 0; }
+
+ /**
+ * @param latLng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function panTo(latLng:google.maps.LatLng):Object /* undefined */ { return null; }
+
+ /**
+ * @param latLngBounds [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function panToBounds(latLngBounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
+
+ /**
+ * @param heading [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setHeading(heading:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param latlng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setCenter(latlng:google.maps.LatLng):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapCanvasProjection.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapCanvasProjection.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapCanvasProjection.as
new file mode 100644
index 0000000..c63c20f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapCanvasProjection.as
@@ -0,0 +1,52 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class MapCanvasProjection extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MapCanvasProjection() {
+ super();
+ }
+
+ /**
+ * @param latLng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Point|null)}
+ */
+ public function fromLatLngToDivPixel(latLng:google.maps.LatLng):google.maps.Point { return null; }
+
+ /**
+ * @param pixel [(google.maps.Point|null)]
+ * @param opt_nowrap [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function fromContainerPixelToLatLng(pixel:google.maps.Point, opt_nowrap:Boolean = false):google.maps.LatLng { return null; }
+
+ /**
+ * @param latLng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Point|null)}
+ */
+ public function fromLatLngToContainerPixel(latLng:google.maps.LatLng):google.maps.Point { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getWorldWidth():Number { return 0; }
+
+ /**
+ * @param pixel [(google.maps.Point|null)]
+ * @param opt_nowrap [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function fromDivPixelToLatLng(pixel:google.maps.Point, opt_nowrap:Boolean = false):google.maps.LatLng { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapPanes.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapPanes.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapPanes.as
new file mode 100644
index 0000000..7ad8104
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapPanes.as
@@ -0,0 +1,60 @@
+package google.maps {
+
+import google.pseudo.Node;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MapPanes {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MapPanes() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var floatShadow:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlayImage:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var floatPane:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlayMouseTarget:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var mapPane:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlayShadow:Node;
+
+ /**
+ * @see JSType - [(Node|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlayLayer:Node;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeControlStyle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeControlStyle.as
new file mode 100644
index 0000000..8bb2221
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeControlStyle.as
@@ -0,0 +1,31 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MapTypeControlStyle {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DROPDOWN_MENU:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const HORIZONTAL_BAR:Number = 1;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DEFAULT:Number = 2;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeId.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeId.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeId.as
new file mode 100644
index 0000000..b73a3c2
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeId.as
@@ -0,0 +1,38 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MapTypeId {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SATELLITE:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ROADMAP:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const HYBRID:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TERRAIN:String = '4';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeRegistry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeRegistry.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeRegistry.as
new file mode 100644
index 0000000..4352140
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapTypeRegistry.as
@@ -0,0 +1,17 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class MapTypeRegistry extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MapTypeRegistry() {
+ super();
+ }
+
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapsEventListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapsEventListener.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapsEventListener.as
new file mode 100644
index 0000000..fae3495
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MapsEventListener.as
@@ -0,0 +1,16 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MapsEventListener {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MapsEventListener() {
+ super();
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Marker.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Marker.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Marker.as
new file mode 100644
index 0000000..1d48f65
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Marker.as
@@ -0,0 +1,299 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Marker extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.MarkerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Marker(opt_opts:Object = null) {
+ super();
+
+ _options = opt_opts;
+ }
+
+ private var _options:Object;
+ private var _animation:Animation;
+ private var _position:LatLng;
+ private var _icon:Object;
+ private var _shape:Object;
+ private var _shadow:Object;
+ private var _title:String;
+ private var _draggable:Boolean;
+ private var _zIndex:Number;
+ private var _visible:Boolean;
+ private var _cursor:String;
+ private var _flat:Boolean;
+ private var _map:Object;
+ private var _clickable:Boolean;
+
+ /**
+ * @see JSType - [(number|string)]
+ * @see [google_maps_api_v3_11]
+ */
+ public static var MAX_ZINDEX:Object;
+
+ /**
+ * @param animation [(google.maps.Animation|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setAnimation(animation:google.maps.Animation):Object /* undefined */ {
+ _animation:animation;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getPosition():google.maps.LatLng {
+ return _position;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Icon|google.maps.Symbol|null|string)}
+ */
+ public function getIcon():Object {
+ return _icon;
+ }
+
+ /**
+ * @param shape [(google.maps.MarkerShape|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setShape(shape:Object):Object /* undefined */ {
+ _shape = shape;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Icon|google.maps.Symbol|null|string)}
+ */
+ public function getShadow():Object {
+ return _shadow;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getTitle():String {
+ return _title;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getDraggable():Boolean {
+ return _draggable;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MarkerShape|null)}
+ */
+ public function getShape():Object {
+ return _shape;
+ }
+
+ /**
+ * @param zIndex [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setZIndex(zIndex:Number):Object /* undefined */ {
+ _zIndex = zIndex;
+ return undefined;
+ }
+
+ /**
+ * @param flag [(boolean|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDraggable(flag:Boolean):Object /* undefined */ {
+ _draggable = flag;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Animation|null)}
+ */
+ public function getAnimation():google.maps.Animation {
+ return _animation;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getZIndex():Number {
+ return _zIndex;
+ }
+
+ /**
+ * @param visible [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(visible:Boolean):Object /* undefined */ {
+ _visible = visible;
+ return undefined;
+ }
+
+ /**
+ * @param cursor [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setCursor(cursor:String):Object /* undefined */ {
+ _cursor = cursor;
+ return undefined;
+ }
+
+ /**
+ * @param latlng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPosition(latlng:google.maps.LatLng):Object /* undefined */ {
+ _position = latlng;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getFlat():Boolean {
+ return _flat;
+ }
+
+ /**
+ * @param map [(google.maps.Map|google.maps.StreetViewPanorama|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:Object):Object /* undefined */ {
+ _map = map;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|google.maps.StreetViewPanorama|null)}
+ */
+ public function getMap():Object {
+ return _map;
+ }
+
+ /**
+ * @param flag [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setClickable(flag:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean {
+ return _visible;
+ }
+
+ /**
+ * @param shadow [(google.maps.Icon|google.maps.Symbol|null|string)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setShadow(shadow:Object):Object /* undefined */ {
+ _shadow = shadow;
+ return undefined;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getCursor():String {
+ return _cursor;
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getClickable():Boolean {
+ return _clickable;
+ }
+
+ /**
+ * @param flag [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setFlat(flag:Boolean):Object /* undefined */ {
+ _flat = flag;
+ return undefined;
+ }
+
+ /**
+ * @param title [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setTitle(title:String):Object /* undefined */ {
+ _title = title;
+ return undefined;
+ }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.MarkerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ {
+ _options = options;
+ return undefined;
+ }
+
+ /**
+ * @param icon [(google.maps.Icon|google.maps.Symbol|null|string)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setIcon(icon:Object):Object /* undefined */ {
+ _icon = icon;
+ return undefined;
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomService.as
new file mode 100644
index 0000000..17bb027
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomService.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MaxZoomService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MaxZoomService() {
+ super();
+ }
+
+ /**
+ * @param latlng [(google.maps.LatLng|null)]
+ * @param callback [function ((google.maps.MaxZoomResult|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getMaxZoomAtLatLng(latlng:google.maps.LatLng, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomStatus.as
new file mode 100644
index 0000000..d5ffa09
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MaxZoomStatus.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MaxZoomStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ERROR:String = '1';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MouseEvent.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MouseEvent.as
new file mode 100644
index 0000000..f06d7c5
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/MouseEvent.as
@@ -0,0 +1,28 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MouseEvent {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function MouseEvent() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var latLng:google.maps.LatLng;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function stop():Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/OverlayView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/OverlayView.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/OverlayView.as
new file mode 100644
index 0000000..a01a0aa
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/OverlayView.as
@@ -0,0 +1,59 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class OverlayView extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function OverlayView() {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function draw():Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function onRemove():Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function onAdd():Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapPanes|null)}
+ */
+ public function getPanes():google.maps.MapPanes { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapCanvasProjection|null)}
+ */
+ public function getProjection():google.maps.MapCanvasProjection { return null; }
+
+ /**
+ * @param map [(google.maps.Map|google.maps.StreetViewPanorama|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|google.maps.StreetViewPanorama|null)}
+ */
+ public function getMap():Object { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Point.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Point.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Point.as
new file mode 100644
index 0000000..0bd9f35
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Point.as
@@ -0,0 +1,43 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class Point {
+
+ /**
+ * @param x [number]
+ * @param y [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Point(x:Number, y:Number) {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var y:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var x:Number;
+
+ /**
+ * @param other [(google.maps.Point|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function equals(other:google.maps.Point):Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toString():String { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/PolyMouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/PolyMouseEvent.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/PolyMouseEvent.as
new file mode 100644
index 0000000..b31af4e
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/PolyMouseEvent.as
@@ -0,0 +1,34 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MouseEvent */
+public class PolyMouseEvent extends google.maps.MouseEvent {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PolyMouseEvent() {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var edge:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var vertex:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var path:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polygon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polygon.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polygon.as
new file mode 100644
index 0000000..a467204
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polygon.as
@@ -0,0 +1,102 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Polygon extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.PolygonOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Polygon(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getEditable():Boolean { return null; }
+
+ /**
+ * @param draggable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MVCArray|null)}
+ */
+ public function getPaths():google.maps.MVCArray { return null; }
+
+ /**
+ * @param visible [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPath(path:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean { return null; }
+
+ /**
+ * @param editable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.PolygonOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MVCArray|null)}
+ */
+ public function getPath():google.maps.MVCArray { return null; }
+
+ /**
+ * @param paths [(Array|google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPaths(paths:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getDraggable():Boolean { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polyline.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polyline.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polyline.as
new file mode 100644
index 0000000..c63d3ae
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Polyline.as
@@ -0,0 +1,89 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Polyline extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.PolylineOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Polyline(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getEditable():Boolean { return null; }
+
+ /**
+ * @param draggable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean { return null; }
+
+ /**
+ * @param editable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.PolylineOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param visible [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPath(path:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MVCArray|null)}
+ */
+ public function getPath():google.maps.MVCArray { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getDraggable():Boolean { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Rectangle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Rectangle.as
new file mode 100644
index 0000000..99e0371
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Rectangle.as
@@ -0,0 +1,89 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Rectangle extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.RectangleOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Rectangle(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getEditable():Boolean { return null; }
+
+ /**
+ * @param draggable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDraggable(draggable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean { return null; }
+
+ /**
+ * @param editable [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setEditable(editable:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.RectangleOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param visible [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(visible:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param bounds [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getDraggable():Boolean { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ScaleControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ScaleControlStyle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ScaleControlStyle.as
new file mode 100644
index 0000000..7db4e10
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ScaleControlStyle.as
@@ -0,0 +1,17 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ScaleControlStyle {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DEFAULT:Number = 0;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Size.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Size.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Size.as
new file mode 100644
index 0000000..021d67c
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/Size.as
@@ -0,0 +1,45 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class Size {
+
+ /**
+ * @param width [number]
+ * @param height [number]
+ * @param opt_widthUnit [(string|undefined)]
+ * @param opt_heightUnit [(string|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Size(width:Number, height:Number, opt_widthUnit:String = '', opt_heightUnit:String = '') {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var height:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var width:Number;
+
+ /**
+ * @param other [(google.maps.Size|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function equals(other:google.maps.Size):Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function toString():String { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewCoverageLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewCoverageLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewCoverageLayer.as
new file mode 100644
index 0000000..2f08eb8
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewCoverageLayer.as
@@ -0,0 +1,29 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class StreetViewCoverageLayer extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function StreetViewCoverageLayer() {
+ super();
+ }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPanorama.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPanorama.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPanorama.as
new file mode 100644
index 0000000..6fe67f7
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPanorama.as
@@ -0,0 +1,108 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class StreetViewPanorama extends google.maps.MVCObject {
+
+ /**
+ * @param container [(Node|null)]
+ * @param opt_opts [(Object<?,string>|google.maps.StreetViewPanoramaOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function StreetViewPanorama(container:Object, opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see JSType - [(Array((google.maps.MVCArray|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var controls:Array;
+
+ /**
+ * @param pov [(google.maps.StreetViewPov|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPov(pov:google.maps.StreetViewPov):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.StreetViewPov|null)}
+ */
+ public function getPov():google.maps.StreetViewPov { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public function getVisible():Boolean { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getPano():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.StreetViewPov|null)}
+ */
+ public function getPhotographerPov():google.maps.StreetViewPov { return null; }
+
+ /**
+ * @param zoom [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setZoom(zoom:Number):Object /* undefined */ { return null; }
+
+ /**
+ * @param flag [boolean]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setVisible(flag:Boolean):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public function getZoom():Number { return 0; }
+
+ /**
+ * @param latLng [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPosition(latLng:google.maps.LatLng):Object /* undefined */ { return null; }
+
+ /**
+ * @param pano [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPano(pano:String):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public function getPosition():google.maps.LatLng { return null; }
+
+ /**
+ * @param provider [function (string): (google.maps.StreetViewPanoramaData|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function registerPanoProvider(provider:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Array<(google.maps.StreetViewLink|null)>|null)}
+ */
+ public function getLinks():Array { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPov.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPov.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPov.as
new file mode 100644
index 0000000..02d579f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewPov.as
@@ -0,0 +1,28 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class StreetViewPov {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function StreetViewPov() {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var pitch:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var heading:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewService.as
new file mode 100644
index 0000000..ae969f8
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewService.as
@@ -0,0 +1,33 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class StreetViewService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function StreetViewService() {
+ super();
+ }
+
+ /**
+ * @param latlng [(google.maps.LatLng|null)]
+ * @param radius [number]
+ * @param callback [function ((google.maps.StreetViewPanoramaData|null), (google.maps.StreetViewStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getPanoramaByLocation(latlng:google.maps.LatLng, radius:Number, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param pano [string]
+ * @param callback [function ((google.maps.StreetViewPanoramaData|null), (google.maps.StreetViewStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getPanoramaById(pano:String, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewStatus.as
new file mode 100644
index 0000000..04a9a11
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StreetViewStatus.as
@@ -0,0 +1,31 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class StreetViewStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ZERO_RESULTS:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '2';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StrokePosition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StrokePosition.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StrokePosition.as
new file mode 100644
index 0000000..14fb79a
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StrokePosition.as
@@ -0,0 +1,31 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class StrokePosition {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INSIDE:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const CENTER:Number = 1;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OUTSIDE:Number = 2;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StyledMapType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StyledMapType.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StyledMapType.as
new file mode 100644
index 0000000..f4a420d
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/StyledMapType.as
@@ -0,0 +1,18 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class StyledMapType extends google.maps.MVCObject {
+
+ /**
+ * @param styles [(Array<(google.maps.MapTypeStyle|null)>|null)]
+ * @param opt_options [(Object<?,string>|google.maps.StyledMapTypeOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function StyledMapType(styles:Array, opt_options:Object = null) {
+ super();
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/SymbolPath.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/SymbolPath.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/SymbolPath.as
new file mode 100644
index 0000000..3e7a7dc
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/SymbolPath.as
@@ -0,0 +1,45 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class SymbolPath {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const FORWARD_OPEN_ARROW:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const CIRCLE:Number = 1;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BACKWARD_OPEN_ARROW:Number = 2;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BACKWARD_CLOSED_ARROW:Number = 3;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const FORWARD_CLOSED_ARROW:Number = 4;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TrafficLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TrafficLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TrafficLayer.as
new file mode 100644
index 0000000..c00139d
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TrafficLayer.as
@@ -0,0 +1,29 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class TrafficLayer extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function TrafficLayer() {
+ super();
+ }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TransitLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TransitLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TransitLayer.as
new file mode 100644
index 0000000..c0a5be2
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TransitLayer.as
@@ -0,0 +1,29 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class TransitLayer extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function TransitLayer() {
+ super();
+ }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TravelMode.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TravelMode.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TravelMode.as
new file mode 100644
index 0000000..2ba3b84
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/TravelMode.as
@@ -0,0 +1,38 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class TravelMode {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const TRANSIT:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DRIVING:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const WALKING:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BICYCLING:String = '1';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/UnitSystem.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/UnitSystem.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/UnitSystem.as
new file mode 100644
index 0000000..3b349c0
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/UnitSystem.as
@@ -0,0 +1,24 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class UnitSystem {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const METRIC:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const IMPERIAL:Number = 1;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ZoomControlStyle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ZoomControlStyle.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ZoomControlStyle.as
new file mode 100644
index 0000000..842bd64
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/ZoomControlStyle.as
@@ -0,0 +1,31 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ZoomControlStyle {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LARGE:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SMALL:Number = 1;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DEFAULT:Number = 2;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense.as
new file mode 100644
index 0000000..58a178e
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense.as
@@ -0,0 +1,27 @@
+package google.maps {
+
+import google.maps.adsense.AdFormat;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class adsense {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function adsense():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var AdFormat:google.maps.adsense.AdFormat;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function AdUnitOptions():void { }
+
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdFormat.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdFormat.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdFormat.as
new file mode 100644
index 0000000..cfb9242
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdFormat.as
@@ -0,0 +1,136 @@
+package google.maps.adsense {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class AdFormat {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const HALF_BANNER:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MEDIUM_VERTICAL_LINK_UNIT:String = '9';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const VERTICAL_BANNER:String = '16';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SMALL_HORIZONTAL_LINK_UNIT:String = '11';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SMALL_SQUARE:String = '13';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const X_LARGE_VERTICAL_LINK_UNIT:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SMALL_RECTANGLE:String = '12';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BUTTON:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MEDIUM_RECTANGLE:String = '8';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BANNER:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LEADERBOARD:String = '7';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LARGE_HORIZONTAL_LINK_UNIT:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const WIDE_SKYSCRAPER:String = '17';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SQUARE:String = '15';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LARGE_RECTANGLE:String = '5';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SMALL_VERTICAL_LINK_UNIT:String = '14';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const SKYSCRAPER:String = '10';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const LARGE_VERTICAL_LINK_UNIT:String = '6';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdUnit.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdUnit.as
new file mode 100644
index 0000000..8cf5742
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/adsense/AdUnit.as
@@ -0,0 +1,147 @@
+package google.maps.adsense {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+import google.maps.ControlPosition;
+import google.pseudo.Node;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class AdUnit extends google.maps.MVCObject {
+
+ /**
+ * @param container [(Node|null)]
+ * @param opts [(Object<?,string>|google.maps.adsense.AdUnitOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function AdUnit(container:Node, opts:Object) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Node|null)}
+ */
+ public function getContainer():Node { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getTitleColor():String { return null; }
+
+ /**
+ * @param channelNumber [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setChannelNumber(channelNumber:String):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getBackgroundColor():String { return null; }
+
+ /**
+ * @param position [(google.maps.ControlPosition|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setPosition(position:google.maps.ControlPosition):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function setBackgroundColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function setBorderColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.ControlPosition|null)}
+ */
+ public function getPosition():google.maps.ControlPosition { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getUrlColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getBorderColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getPublisherId():String { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+ /**
+ * @param format [(google.maps.adsense.AdFormat|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setFormat(format:google.maps.adsense.AdFormat):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getChannelNumber():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.adsense.AdFormat|null)}
+ */
+ public function getFormat():google.maps.adsense.AdFormat { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function setTitleColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function setTextColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function setUrlColor():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getTextColor():String { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing.as
new file mode 100644
index 0000000..81e538c
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing.as
@@ -0,0 +1,33 @@
+package google.maps {
+
+import google.maps.drawing.OverlayType;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class drawing {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function drawing():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var OverlayType:google.maps.drawing.OverlayType;
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DrawingControlOptions():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DrawingManagerOptions():void { }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/DrawingManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/DrawingManager.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/DrawingManager.as
new file mode 100644
index 0000000..2c42ac2
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/DrawingManager.as
@@ -0,0 +1,53 @@
+package google.maps.drawing {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class DrawingManager extends google.maps.MVCObject {
+
+ /**
+ * @param opt_options [(Object<?,string>|google.maps.drawing.DrawingManagerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function DrawingManager(opt_options:Object = null) {
+ super();
+ }
+
+ /**
+ * @param drawingMode [(google.maps.drawing.OverlayType|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setDrawingMode(drawingMode:google.maps.drawing.OverlayType):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.drawing.DrawingManagerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.drawing.OverlayType|null)}
+ */
+ public function getDrawingMode():google.maps.drawing.OverlayType { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayCompleteEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayCompleteEvent.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayCompleteEvent.as
new file mode 100644
index 0000000..cb49e00
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayCompleteEvent.as
@@ -0,0 +1,28 @@
+package google.maps.drawing {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class OverlayCompleteEvent {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function OverlayCompleteEvent() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.Circle|google.maps.Marker|google.maps.Polygon|google.maps.Polyline|google.maps.Rectangle|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var overlay:Object;
+
+ /**
+ * @see JSType - [(google.maps.drawing.OverlayType|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var type:google.maps.drawing.OverlayType;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayType.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayType.as
new file mode 100644
index 0000000..0ce18e6
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/drawing/OverlayType.as
@@ -0,0 +1,45 @@
+package google.maps.drawing {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class OverlayType {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const POLYLINE:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const RECTANGLE:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const CIRCLE:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MARKER:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const POLYGON:String = '3';
+
+}
+}
[30/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ae593ef3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ae593ef3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ae593ef3
Branch: refs/heads/develop
Commit: ae593ef39620e0e6a3b786663ae7400331943a79
Parents: 1d75577
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:15:06 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/GoogleMaps/build.xml | 60 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 4 +-
.../src/main/resources/compile-config.xml | 8 +--
3 files changed, 38 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ae593ef3/frameworks/projects/GoogleMaps/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/build.xml b/frameworks/projects/GoogleMaps/build.xml
index f3b90c9..ca36195 100644
--- a/frameworks/projects/GoogleMaps/build.xml
+++ b/frameworks/projects/GoogleMaps/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="GoogleMaps-${release.version}.swc" />
+ <property name="target.name.no.version" value="GoogleMaps.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of GoogleMaps.swc">
</target>
@@ -41,56 +43,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="GoogleMaps.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
-
+
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/GoogleMaps.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in GoogleMapsClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/GoogleMaps.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
- <!--arg value="-external-library-path+=${FALCONJX_HOME}/../externs/google_maps/out/bin/google_maps.swc" /-->
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
<target name="compile-asjs">
- <echo message="Cross-compiling GoogleMaps"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -100,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -115,11 +117,12 @@
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/GoogleMaps.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -137,9 +140,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/GoogleMaps.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -149,11 +152,12 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ae593ef3/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml b/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
index 52a9e48..22fc5d9 100644
--- a/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
@@ -43,7 +43,7 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<namespaces>
@@ -54,7 +54,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ae593ef3/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml b/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
index 7a80279..9e2abd6 100644
--- a/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
+++ b/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,11 +61,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[35/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/MatrixUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/MatrixUtil.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/MatrixUtil.as
deleted file mode 100644
index 04c2c13..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/MatrixUtil.as
+++ /dev/null
@@ -1,1605 +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.graphics.utils
-{
-
- import flash.display.DisplayObject;
- import flash.geom.Matrix;
- import flash.geom.Matrix3D;
- import flash.geom.PerspectiveProjection;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.geom.Utils3D;
- import flash.geom.Vector3D;
- import flash.system.ApplicationDomain;
-
- /**
- * @private
- * The MatrixUtil class is for internal use only.
- * Class for matrix and geometric related math routines.
- */
- public final class MatrixUtil
- {
-
- private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
- private static var SOLUTION_TOLERANCE:Number = 0.1;
- private static var MIN_MAX_TOLERANCE:Number = 0.1;
-
- private static var staticPoint:Point = new Point();
-
- // For use in getConcatenatedMatrix function
- private static var fakeDollarParent:QName;
- private static var uiComponentClass:Class;
- private static var uiMovieClipClass:Class;
- private static var usesMarshalling:Object;
- private static var lastModuleFactory:Object;
- private static var computedMatrixProperty:QName;
- private static var $transformProperty:QName;
-
- //--------------------------------------------------------------------------
- //
- // Class methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * Returns rotation value clamped between -180 and 180 degreeds.
- * This mimicks the Flash player behavior.
- */
- public static function clampRotation(value:Number):Number
- {
- // Flash player doesn't handle values larger than 2^15 - 1 (FP-749).
- if (value > 180 || value < -180)
- {
- value = value % 360;
-
- if (value > 180)
- value = value - 360;
- else if (value < -180)
- value = value + 360;
- }
- return value;
- }
-
- /**
- * Returns a static Point object with the result.
- * If matrix is null, point is untransformed.
- */
- public static function transformPoint(x:Number, y:Number, m:Matrix):Point
- {
- if (!m)
- {
- staticPoint.x = x;
- staticPoint.y = y;
- return staticPoint;
- }
-
- staticPoint.x = m.a * x + m.c * y + m.tx;
- staticPoint.y = m.b * x + m.d * y + m.ty;
- return staticPoint;
- }
-
- public static function composeMatrix(x:Number = 0,
- y:Number = 0,
- scaleX:Number = 1,
- scaleY:Number = 1,
- rotation:Number = 0,
- transformX:Number = 0,
- transformY:Number = 0):Matrix
- {
- var m:Matrix = new Matrix();
- m.translate(-transformX, -transformY);
- m.scale(scaleX, scaleY);
- if (rotation != 0)
- m.rotate(rotation / 180 * Math.PI);
- m.translate(transformX + x, transformY + y);
- return m;
- }
-
- /**
- * Decompose a matrix into its component scale, rotation, and translation parts.
- * The Vector of Numbers passed in the components parameter will be
- * populated by this function with the component parts.
- *
- * @param components Vector which holds the component scale, rotation
- * and translation values.
- * x = components[0]
- * y = components[1]
- * rotation = components[2]
- * scaleX = components[3]
- * scaleY = components[4]
- *
- * @param matrix The matrix to decompose
- * @param transformX The x value of the transform center
- * @param transformY The y value of the transform center
- */
- public static function decomposeMatrix(components:Vector.<Number>,
- matrix:Matrix,
- transformX:Number = 0,
- transformY:Number = 0):void
- {
- // else decompose matrix. Don't use MatrixDecompose(), it can return erronous values
- // when negative scales (and therefore skews) are in use.
- var Ux:Number;
- var Uy:Number;
- var Vx:Number;
- var Vy:Number;
-
- Ux = matrix.a;
- Uy = matrix.b;
- components[3] = Math.sqrt(Ux*Ux + Uy*Uy);
-
- Vx = matrix.c;
- Vy = matrix.d;
- components[4] = Math.sqrt(Vx*Vx + Vy*Vy );
-
- // sign of the matrix determinant will tell us if the space is inverted by a 180 degree skew or not.
- var determinant:Number = Ux*Vy - Uy*Vx;
- if (determinant < 0) // if so, choose y-axis scale as the skewed one. Unfortunately, its impossible to tell if it originally was the y or x axis that had the negative scale/skew.
- {
- components[4] = -(components[4]);
- Vx = -Vx;
- Vy = -Vy;
- }
-
- components[2] = Math.atan2( Uy, Ux ) / RADIANS_PER_DEGREES;
-
- if (transformX != 0 || transformY != 0)
- {
- var postTransformCenter:Point = matrix.transformPoint(new Point(transformX,transformY));
- components[0] = postTransformCenter.x - transformX;
- components[1] = postTransformCenter.y - transformY;
- }
- else
- {
- components[0] = matrix.tx;
- components[1] = matrix.ty;
- }
- }
-
- /**
- * @return Returns the union of <code>rect</code> and
- * <code>Rectangle(left, top, right - left, bottom - top)</code>.
- * Note that if rect is non-null, it will be updated to reflect the return value.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function rectUnion(left:Number, top:Number, right:Number, bottom:Number,
- rect:Rectangle):Rectangle
- {
- if (!rect)
- return new Rectangle(left, top, right - left, bottom - top);
-
- var minX:Number = Math.min(rect.left, left);
- var minY:Number = Math.min(rect.top, top);
- var maxX:Number = Math.max(rect.right, right);
- var maxY:Number = Math.max(rect.bottom, bottom);
-
- rect.x = minX;
- rect.y = minY;
- rect.width = maxX - minX;
- rect.height = maxY - minY;
- return rect;
- }
-
- /**
- * Calculates the bounding box of a post-transformed ellipse.
- *
- * @param cx The x coordinate of the ellipse's center
- * @param cy The y coordinate of the ellipse's center
- * @param rx The horizontal radius of the ellipse
- * @param ry The vertical radius of the ellipse
- * @param matrix The transformation matrix.
- * @param rect If non-null, rect will be updated to the union of rect and
- * the segment bounding box.
- * @return Returns the union of the passed in rect with the
- * bounding box of the the post-transformed ellipse.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function getEllipseBoundingBox(cx:Number, cy:Number,
- rx:Number, ry:Number,
- matrix:Matrix,
- rect:Rectangle = null):Rectangle
- {
- var a:Number = matrix.a;
- var b:Number = matrix.b;
- var c:Number = matrix.c;
- var d:Number = matrix.d;
-
- // Ellipse can be represented by the following parametric equations:
- //
- // (1) x = cx + rx * cos(t)
- // (2) y = cy + ry * sin(t)
- //
- // After applying transformation with matrix m(a, c, b, d) we get:
- //
- // (3) x = a * cx + a * cos(t) * rx + c * cy + c * sin(t) * ry + m.tx
- // (4) y = b * cx + b * cos(t) * rx + d * cy + d * sin(t) * ry + m.ty
- //
- // In (3) and (4) x and y are functions of a parameter t. To find the extremums we need
- // to find where dx/dt and dy/dt reach zero:
- //
- // (5) dx/dt = - a * sin(t) * rx + c * cos(t) * ry
- // (6) dy/dt = - b * sin(t) * rx + d * cos(t) * ry
- // (7) dx/dt = 0 <=> sin(t) / cos(t) = (c * ry) / (a * rx);
- // (8) dy/dt = 0 <=> sin(t) / cos(t) = (d * ry) / (b * rx);
-
- if (rx == 0 && ry == 0)
- {
- var pt:Point = new Point(cx, cy);
- pt = matrix.transformPoint(pt);
- return rectUnion(pt.x, pt.y, pt.x, pt.y, rect);
- }
-
- var t:Number;
- var t1:Number;
-
- if (a * rx == 0)
- t = Math.PI / 2;
- else
- t = Math.atan((c * ry) / (a * rx));
-
- if (b * rx == 0)
- t1 = Math.PI / 2;
- else
- t1 = Math.atan((d * ry) / (b * rx));
-
- var x1:Number = a * Math.cos(t) * rx + c * Math.sin(t) * ry;
- var x2:Number = -x1;
- x1 += a * cx + c * cy + matrix.tx;
- x2 += a * cx + c * cy + matrix.tx;
-
- var y1:Number = b * Math.cos(t1) * rx + d * Math.sin(t1) * ry;
- var y2:Number = -y1;
- y1 += b * cx + d * cy + matrix.ty;
- y2 += b * cx + d * cy + matrix.ty;
-
- return rectUnion(Math.min(x1, x2), Math.min(y1, y2), Math.max(x1, x2), Math.max(y1, y2), rect);
- }
-
- /**
- * @param x0 x coordinate of the first control point
- * @param y0 y coordinate of the first control point
- * @param x1 x coordinate of the second control point
- * @param y1 y coordinate of the second control point
- * @param x2 x coordinate of the third control point
- * @param y2 y coordinate of the third control point
- * @param sx The pre-transform scale factor for x coordinates.
- * @param sy The pre-transform scale factor for y coordinates.
- * @param matrix The transformation matrix. Can be null for identity transformation.
- * @param rect If non-null, rect will be updated to the union of rect and
- * the segment bounding box.
- * @return Returns the union of the post-transformed quadratic
- * bezier segment's axis aligned bounding box and the passed in rect.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static public function getQBezierSegmentBBox(x0:Number, y0:Number,
- x1:Number, y1:Number,
- x2:Number, y2:Number,
- sx:Number, sy:Number,
- matrix:Matrix,
- rect:Rectangle):Rectangle
- {
- var pt:Point;
- pt = MatrixUtil.transformPoint(x0 * sx, y0 * sy, matrix);
- x0 = pt.x;
- y0 = pt.y;
-
- pt = MatrixUtil.transformPoint(x1 * sx, y1 * sy, matrix);
- x1 = pt.x;
- y1 = pt.y;
-
- pt = MatrixUtil.transformPoint(x2 * sx, y2 * sy, matrix);
- x2 = pt.x;
- y2 = pt.y;
-
- var minX:Number = Math.min(x0, x2);
- var maxX:Number = Math.max(x0, x2);
-
- var minY:Number = Math.min(y0, y2);
- var maxY:Number = Math.max(y0, y2);
-
- var txDiv:Number = x0 - 2 * x1 + x2;
- if (txDiv != 0)
- {
- var tx:Number = (x0 - x1) / txDiv;
- if (0 <= tx && tx <= 1)
- {
- var x:Number = (1 - tx) * (1 - tx) * x0 + 2 * tx * (1 - tx) * x1 + tx * tx * x2;
- minX = Math.min(x, minX);
- maxX = Math.max(x, maxX);
- }
- }
-
- var tyDiv:Number = y0 - 2 * y1 + y2;
- if (tyDiv != 0)
- {
- var ty:Number = (y0 - y1) / tyDiv;
- if (0 <= ty && ty <= 1)
- {
- var y:Number = (1 - ty) * (1 - ty) * y0 + 2 * ty * (1 - ty) * y1 + ty * ty * y2;
- minY = Math.min(y, minY);
- maxY = Math.max(y, maxY);
- }
- }
-
- return rectUnion(minX, minY, maxX, maxY, rect);
- }
-
- /**
- * @param width The width of the bounds to be transformed.
- * @param height The height of the bounds to be transformed.
- * @param matrix The transfomration matrix.
- *
- * @param vec If vec is non-null it will be set to the vector from the
- * transformed bounds top left to the untransformed bounds top left
- * in the coordinate space defined by <code>matrix</code>.
- * This is useful if you want to align the transformed bounds to x,y
- * by modifying the object's position. Moving the object by
- * <code>x + vec.x</code> and <code>y + vec.y</code> respectively
- * will offset the transformed bounds top left corner by x,y.
- *
- * @return Returns the transformed bounds. Note that the Point object returned will be reused
- * by other MatrixUtil methods.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function transformSize(width:Number, height:Number, matrix:Matrix):Point
- {
- const a:Number = matrix.a;
- const b:Number = matrix.b;
- const c:Number = matrix.c;
- const d:Number = matrix.d;
-
- // transform point (0,0)
- var x1:Number = 0;
- var y1:Number = 0;
-
- // transform point (width, 0)
- var x2:Number = width * a;
- var y2:Number = width * b;
-
- // transform point (0, height)
- var x3:Number = height * c;
- var y3:Number = height * d;
-
- // transform point (width, height)
- var x4:Number = x2 + x3;
- var y4:Number = y2 + y3;
-
- var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
- var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
- var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
- var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));
-
- staticPoint.x = maxX - minX;
- staticPoint.y = maxY - minY;
- return staticPoint;
- }
-
- /**
- * @param width The width of the bounds to be transformed.
- * @param height The height of the bounds to be transformed.
- * @param matrix The transfomration matrix.
- *
- * @param topleft If topLeft is non-null it will be used as the origin of the bounds
- * rectangle to be transformed. On return, it will be set to the top left of the rectangle
- * after transformation.
- *
- * @return Returns the transformed width and height. Note that the Point object returned will be reused
- * by other MatrixUtil methods.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function transformBounds(width:Number, height:Number, matrix:Matrix, topLeft:Point = null):Point
- {
- const a:Number = matrix.a;
- const b:Number = matrix.b;
- const c:Number = matrix.c;
- const d:Number = matrix.d;
-
- // transform point (0,0)
- var x1:Number = 0;
- var y1:Number = 0;
-
- // transform point (width, 0)
- var x2:Number = width * a;
- var y2:Number = width * b;
-
- // transform point (0, height)
- var x3:Number = height * c;
- var y3:Number = height * d;
-
- // transform point (width, height)
- var x4:Number = x2 + x3;
- var y4:Number = y2 + y3;
-
- var minX:Number = Math.min(Math.min(x1, x2), Math.min(x3, x4));
- var maxX:Number = Math.max(Math.max(x1, x2), Math.max(x3, x4));
- var minY:Number = Math.min(Math.min(y1, y2), Math.min(y3, y4));
- var maxY:Number = Math.max(Math.max(y1, y2), Math.max(y3, y4));
-
- staticPoint.x = maxX - minX;
- staticPoint.y = maxY - minY;
-
- if (topLeft)
- {
- const tx:Number = matrix.tx;
- const ty:Number = matrix.ty;
- const x:Number = topLeft.x;
- const y:Number = topLeft.y;
-
- topLeft.x = minX + a * x + b * y + tx;
- topLeft.y = minY + c * x + d * y + ty;
- }
- return staticPoint;
- }
-
- /**
- * Returns the axis aligned bounding box <code>bounds</code> transformed
- * with <code>matrix</code> and then projected with <code>projection</code>.
- *
- * @param bounds The bounds, in child coordinates, to be transformed and projected.
- * @param matrix <p>The transformation matrix. Note that the method will clobber the
- * original matrix values.</p>
- * @param projection The projection.
- * @return Returns the <code>bounds</code> parameter that has been updated with the
- * transformed and projected bounds.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function projectBounds(bounds:Rectangle,
- matrix:Matrix3D,
- projection:PerspectiveProjection):Rectangle
- {
- // Setup the matrix
- var centerX:Number = projection.projectionCenter.x;
- var centerY:Number = projection.projectionCenter.y;
- matrix.appendTranslation(-centerX, -centerY, projection.focalLength);
- matrix.append(projection.toMatrix3D());
-
- // Project the corner points
- var pt1:Vector3D = new Vector3D(bounds.left, bounds.top, 0);
- var pt2:Vector3D = new Vector3D(bounds.right, bounds.top, 0)
- var pt3:Vector3D = new Vector3D(bounds.left, bounds.bottom, 0);
- var pt4:Vector3D = new Vector3D(bounds.right, bounds.bottom, 0);
- pt1 = Utils3D.projectVector(matrix, pt1);
- pt2 = Utils3D.projectVector(matrix, pt2);
- pt3 = Utils3D.projectVector(matrix, pt3);
- pt4 = Utils3D.projectVector(matrix, pt4);
-
- // Find the bounding box in 2D
- var maxX:Number = Math.max(Math.max(pt1.x, pt2.x), Math.max(pt3.x, pt4.x));
- var minX:Number = Math.min(Math.min(pt1.x, pt2.x), Math.min(pt3.x, pt4.x));
- var maxY:Number = Math.max(Math.max(pt1.y, pt2.y), Math.max(pt3.y, pt4.y));
- var minY:Number = Math.min(Math.min(pt1.y, pt2.y), Math.min(pt3.y, pt4.y));
-
- // Add back the projection center
- bounds.x = minX + centerX;
- bounds.y = minY + centerY;
- bounds.width = maxX - minX;
- bounds.height = maxY - minY;
- return bounds;
- }
-
- /**
- * @param matrix
- * @return Returns true when <code>pt == matrix.DeltaTransformPoint(pt)</code>
- * for any <code>pt:Point</code> (<code>matrix</code> is identity matrix,
- * when disregarding the translation part).
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function isDeltaIdentity(matrix:Matrix):Boolean
- {
- return (matrix.a == 1 && matrix.d == 1 &&
- matrix.b == 0 && matrix.c == 0);
- }
-
- /**
- * <code>fitBounds</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
- * such that the bounding box transformed with <code>matrix</code> will fit
- * into (0,0,width,height).
- *
- * @param width This is the width of the bounding box that calculated size
- * needs to fit in.
- *
- * @param height This is the height of the bounding box that the calculated
- * size needs to fit in.
- *
- * @param matrix This defines the transformations that the function will take
- * into account when calculating the size. The bounding box (0,0,x,y) of the
- * calculated size (x,y) transformed with <code>matrix</code> will fit in the
- * specified <code>width</code> and <code>height</code>.
- *
- * @param explicitWidth Explicit width for the calculated size. The function
- * will first try to find a solution using this width.
- *
- * @param explicitHeight Preferred height for the calculated size. The function
- * will first try to find a solution using this height.
- *
- * @param preferredWidth Preferred width for the calculated size. If possible
- * the function will set the calculated size width to this value.
- *
- * @param preferredHeight Preferred height for the calculated size. If possible
- * the function will set the calculated size height to this value.
- *
- * @param minWidth The minimum allowed value for the calculated size width.
- *
- * @param minHeight The minimum allowed value for the calculated size height.
- *
- * @param maxWidth The maximum allowed value for the calculated size width.
- *
- * @param maxHeight The maximum allowed value for the calculated size height.
- *
- * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
- * fit into (0,0,width,height) after transformation with <code>matrix</code>.
- * Returns null if there is no possible solution.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function fitBounds(width:Number, height:Number, matrix:Matrix,
- explicitWidth:Number, explicitHeight:Number,
- preferredWidth:Number, preferredHeight:Number,
- minWidth:Number, minHeight:Number,
- maxWidth:Number, maxHeight:Number):Point
- {
- if (isNaN(width) && isNaN(height))
- return new Point(preferredWidth, preferredHeight);
-
- // Allow for precision errors by including tolerance for certain values.
- const newMinWidth:Number = (minWidth < MIN_MAX_TOLERANCE) ? 0 : minWidth - MIN_MAX_TOLERANCE;
- const newMinHeight:Number = (minHeight < MIN_MAX_TOLERANCE) ? 0 : minHeight - MIN_MAX_TOLERANCE;
- const newMaxWidth:Number = maxWidth + MIN_MAX_TOLERANCE;
- const newMaxHeight:Number = maxHeight + MIN_MAX_TOLERANCE;
-
- var actualSize:Point;
-
- if (!isNaN(width) && !isNaN(height))
- {
- actualSize = calcUBoundsToFitTBounds(width, height, matrix,
- newMinWidth, newMinHeight,
- newMaxWidth, newMaxHeight);
-
- // If we couldn't fit in both dimensions, try to fit only one and
- // don't stick out of the other
- if (!actualSize)
- {
- var actualSize1:Point;
- actualSize1 = fitTBoundsWidth(width, matrix,
- explicitWidth, explicitHeight,
- preferredWidth, preferredHeight,
- newMinWidth, newMinHeight,
- newMaxWidth, newMaxHeight);
-
- // If we fit the width, but not the height.
- if (actualSize1)
- {
- var fitHeight:Number = transformSize(actualSize1.x, actualSize1.y, matrix).y;
- if (fitHeight - SOLUTION_TOLERANCE > height)
- actualSize1 = null;
- }
-
- var actualSize2:Point
- actualSize2 = fitTBoundsHeight(height, matrix,
- explicitWidth, explicitHeight,
- preferredWidth, preferredHeight,
- newMinWidth, newMinHeight,
- newMaxWidth, newMaxHeight);
-
- // If we fit the height, but not the width
- if (actualSize2)
- {
- var fitWidth:Number = transformSize(actualSize2.x, actualSize2.y, matrix).x;
- if (fitWidth - SOLUTION_TOLERANCE > width)
- actualSize2 = null;
- }
-
- if (actualSize1 && actualSize2)
- {
- // Pick a solution
- actualSize = ((actualSize1.x * actualSize1.y) > (actualSize2.x * actualSize2.y)) ? actualSize1 : actualSize2;
- }
- else if (actualSize1)
- {
- actualSize = actualSize1;
- }
- else
- {
- actualSize = actualSize2;
- }
- }
- return actualSize;
- }
- else if (!isNaN(width))
- {
- return fitTBoundsWidth(width, matrix,
- explicitWidth, explicitHeight,
- preferredWidth, preferredHeight,
- newMinWidth, newMinHeight,
- newMaxWidth, newMaxHeight);
- }
- else
- {
- return fitTBoundsHeight(height, matrix,
- explicitWidth, explicitHeight,
- preferredWidth, preferredHeight,
- newMinWidth, newMinHeight,
- newMaxWidth, newMaxHeight);
- }
- }
-
- /**
- * @private
- *
- * <code>fitTBoundsWidth</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
- * such that the bounding box transformed with <code>matrix</code> will fit
- * into the specified width.
- *
- * @param width This is the width of the bounding box that calculated size
- * needs to fit in.
- *
- * @param matrix This defines the transformations that the function will take
- * into account when calculating the size. The bounding box (0,0,x,y) of the
- * calculated size (x,y) transformed with <code>matrix</code> will fit in the
- * specified <code>width</code> and <code>height</code>.
- *
- * @param explicitWidth Explicit width for the calculated size. The function
- * will first try to find a solution using this width.
- *
- * @param explicitHeight Preferred height for the calculated size. The function
- * will first try to find a solution using this height.
- *
- * @param preferredWidth Preferred width for the calculated size. If possible
- * the function will set the calculated size width to this value.
- *
- * @param preferredHeight Preferred height for the calculated size. If possible
- * the function will set the calculated size height to this value.
- *
- * @param minWidth The minimum allowed value for the calculated size width.
- *
- * @param minHeight The minimum allowed value for the calculated size height.
- *
- * @param maxWidth The maximum allowed value for the calculated size width.
- *
- * @param maxHeight The maximum allowed value for the calculated size height.
- *
- * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
- * fit into (0,0,width,height) after transformation with <code>matrix</code>.
- * Returns null if there is no possible solution.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- private static function fitTBoundsWidth(width:Number, matrix:Matrix,
- explicitWidth:Number, explicitHeight:Number,
- preferredWidth:Number, preferredHeight:Number,
- minWidth:Number, minHeight:Number,
- maxWidth:Number, maxHeight:Number):Point
- {
- var actualSize:Point;
-
- // cases 1 and 2: only explicit width or explicit height is specified,
- // so we try to find a solution with that hard constraint.
- if (!isNaN(explicitWidth) && isNaN(explicitHeight))
- {
- actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
- explicitWidth, preferredHeight,
- explicitWidth, minHeight,
- explicitWidth, maxHeight);
-
- if (actualSize)
- return actualSize;
- }
- else if (isNaN(explicitWidth) && !isNaN(explicitHeight))
- {
- actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
- preferredWidth, explicitHeight,
- minWidth, explicitHeight,
- maxWidth, explicitHeight);
- if (actualSize)
- return actualSize;
- }
-
- // case 3: default case. When explicitWidth, explicitHeight are both set
- // or not set, we use the preferred size since calcUBoundsToFitTBoundsWidth
- // will just pick one.
- actualSize = calcUBoundsToFitTBoundsWidth(width, matrix,
- preferredWidth, preferredHeight,
- minWidth, minHeight,
- maxWidth, maxHeight);
-
- return actualSize;
- }
-
- /**
- * @private
- *
- * <code>fitTBoundsWidth</code> Calculates a size (x,y) for a bounding box (0,0,x,y)
- * such that the bounding box transformed with <code>matrix</code> will fit
- * into the specified height.
- *
- * @param height This is the height of the bounding box that the calculated
- * size needs to fit in.
- *
- * @param matrix This defines the transformations that the function will take
- * into account when calculating the size. The bounding box (0,0,x,y) of the
- * calculated size (x,y) transformed with <code>matrix</code> will fit in the
- * specified <code>width</code> and <code>height</code>.
- *
- * @param explicitWidth Explicit width for the calculated size. The function
- * will first try to find a solution using this width.
- *
- * @param explicitHeight Preferred height for the calculated size. The function
- * will first try to find a solution using this height.
- *
- * @param preferredWidth Preferred width for the calculated size. If possible
- * the function will set the calculated size width to this value.
- *
- * @param preferredHeight Preferred height for the calculated size. If possible
- * the function will set the calculated size height to this value.
- *
- * @param minWidth The minimum allowed value for the calculated size width.
- *
- * @param minHeight The minimum allowed value for the calculated size height.
- *
- * @param maxWidth The maximum allowed value for the calculated size width.
- *
- * @param maxHeight The maximum allowed value for the calculated size height.
- *
- * @return Returns the size (x,y) such that the bounding box (0,0,x,y) will
- * fit into (0,0,width,height) after transformation with <code>matrix</code>.
- * Returns null if there is no possible solution.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- private static function fitTBoundsHeight(height:Number, matrix:Matrix,
- explicitWidth:Number, explicitHeight:Number,
- preferredWidth:Number, preferredHeight:Number,
- minWidth:Number, minHeight:Number,
- maxWidth:Number, maxHeight:Number):Point
- {
- var actualSize:Point;
-
- // cases 1 and 2: only explicit width or explicit height is specified,
- // so we try to find a solution with that hard constraint.
- if (!isNaN(explicitWidth) && isNaN(explicitHeight))
- {
- actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
- explicitWidth, preferredHeight,
- explicitWidth, minHeight,
- explicitWidth, maxHeight);
-
- if (actualSize)
- return actualSize;
- }
- else if (isNaN(explicitWidth) && !isNaN(explicitHeight))
- {
- actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
- preferredWidth, explicitHeight,
- minWidth, explicitHeight,
- maxWidth, explicitHeight);
- if (actualSize)
- return actualSize;
- }
-
- // case 3: default case. When explicitWidth, explicitHeight are both set
- // or not set, we use the preferred size since calcUBoundsToFitTBoundsWidth
- // will just pick one.
- actualSize = calcUBoundsToFitTBoundsHeight(height, matrix,
- preferredWidth, preferredHeight,
- minWidth, minHeight,
- maxWidth, maxHeight);
-
- return actualSize;
- }
-
- /**
- * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
- * with <code>matrix</code> will have bounding box with
- * height equal to <code>h</code>.
- * x and y are restricted by <code>minX</code>, <code>maxX</code> and
- * <code>minY</code>, <code>maxY</code>.
- *
- * If possible x will be set to <code>preferredX</code> or
- * y will be set to <code>preferredY</code>.
- *
- * When there are multiple solutions, the function picks the one that
- * minimizes the bounding box area of transformed (0,0,x,y).
- *
- * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
- * (solution components x and y are non-negative).
- *
- * @return Returns Point(x,y) or null if no solution exists.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static public function calcUBoundsToFitTBoundsHeight(h:Number,
- matrix:Matrix,
- preferredX:Number,
- preferredY:Number,
- minX:Number,
- minY:Number,
- maxX:Number,
- maxY:Number):Point
- {
- // Untransformed bounds size is (x,y). The corners of the untransformed
- // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
- // Matrix is | a c tx |
- // | b d ty |
- //
- // After transfomation with the matrix those four points are:
- // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
- // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
- // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
- // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
- //
- // The transformed bounds bounding box dimensions are (w,h):
- // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
- // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
- //
- // Looking at all the possible cases for min and max functions above,
- // we can construct and solve simple linear systems for x and y.
- // For example in the case of
- // t1.x <= t2.x <= t3.x <= t4.x
- // our first equation is
- // (1) w = t4.x - t1.x <==> w = ax + cy
- //
- // To minimize the cases we're looking at we can take advantage of
- // the limits we have: x >= 0, y >= 0;
- // Taking into account these limits we deduce that:
- // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
- // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
- // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
- // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
- //
- // If we do a substitution such that
- // c1 = a*c >= 0 ? c : -c
- // d1 = b*d >= 0 ? d : -d
- // we get the following linear system:
- // (1) w = abs( ax + c1y )
- // (2) h = abs( bx + d1y )
- //
- // Since we're matching height we only care about (2)
-
- var b:Number = matrix.b;
- var d:Number = matrix.d;
-
- // If components are very close to zero, zero them out to handle the special cases
- if (-1.0e-9 < b && b < +1.0e-9)
- b = 0;
- if (-1.0e-9 < d && d < +1.0e-9)
- d = 0;
-
- if (b == 0 && d == 0)
- return null; // No solution
-
- // Handle special cases first
- if (b == 0 && d == 0)
- return null; // No solution
-
- if (b == 0)
- return new Point( preferredX, h / Math.abs(d) );
- else if (d == 0)
- return new Point( h / Math.abs(b), preferredY );
-
- const d1:Number = (b*d >= 0) ? d : -d;
- // Now we have the following linear sytesm:
- // (1) x = preferredX or y = preferredY
- // (2) h = abs( bx + d1y )
-
- var s:Point;
- var x:Number;
- var y:Number;
-
- if (d1 != 0 && preferredX > 0)
- {
- const invD1:Number = 1 / d1;
- preferredX = Math.max(minX, Math.min(maxX, preferredX));
- x = preferredX;
-
- // Case1:
- // bx + d1y >= 0
- // x = preferredX
- y = (h - b * x) * invD1;
- if (minY <= y && y <= maxY &&
- b * x + d1 * y >= 0 ) // Satisfy Case1
- {
- s = new Point(x, y);
- }
-
- // Case2:
- // bx + d1y < 0
- // x = preferredX
- y = (-h - b * x) * invD1;
- if (minY <= y && y <= maxY &&
- b * x + d1 * y < 0 ) // Satisfy Case2
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
- s = new Point(x, y);
- }
- }
-
- if (b != 0 && preferredY > 0)
- {
- const invB:Number = 1 / b;
- preferredY = Math.max(minY, Math.min(maxY, preferredY));
- y = preferredY;
-
- // Case3:
- // bx + d1y >= 0
- // y = preferredY
- x = ( h - d1 * y ) * invB;
- if (minX <= x && x <= maxX &&
- b * x + d1 * y >= 0) // Satisfy Case3
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
- s = new Point(x, y);
- }
-
- // Case4:
- // bx + d1y < 0
- // y = preferredY
- x = ( -h - d1 * y ) * invB;
- if (minX <= x && x <= maxX &&
- b * x + d1 * y < 0) // Satisfy Case4
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).x > transformSize(x, y, matrix).x)
- s = new Point(x, y);
- }
- }
-
- // If there's already a solution that matches preferred dimention, return
- if (s)
- return s;
-
- // Find a solution that matches the width and minimizes the height:
- const a:Number = matrix.a;
- const c:Number = matrix.c;
- const c1:Number = ( a*c >= 0 ) ? c : -c;
- return solveEquation(b, d1, h, minX, minY, maxX, maxY, a, c1);
- }
-
- /**
- * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
- * with <code>matrix</code> will have bounding box with
- * width equal to <code>w</code>.
- * x and y are restricted by <code>minX</code>, <code>maxX</code> and
- * <code>minY</code>, <code>maxY</code>.
- *
- * If possible x will be set to <code>preferredX</code> or
- * y will be set to <code>preferredY</code>.
- *
- * When there are multiple solutions, the function picks the one that
- * minimizes the bounding box area of transformed (0,0,x,y).
- *
- * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
- * (solution components x and y are non-negative).
- *
- * @return Returns Point(x,y) or null if no solution exists.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static public function calcUBoundsToFitTBoundsWidth(w:Number,
- matrix:Matrix,
- preferredX:Number,
- preferredY:Number,
- minX:Number,
- minY:Number,
- maxX:Number,
- maxY:Number):Point
- {
- // Untransformed bounds size is (x,y). The corners of the untransformed
- // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
- // Matrix is | a c tx |
- // | b d ty |
- //
- // After transfomation with the matrix those four points are:
- // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
- // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
- // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
- // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
- //
- // The transformed bounds bounding box dimensions are (w,h):
- // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
- // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
- //
- // Looking at all the possible cases for min and max functions above,
- // we can construct and solve simple linear systems for x and y.
- // For example in the case of
- // t1.x <= t2.x <= t3.x <= t4.x
- // our first equation is
- // (1) w = t4.x - t1.x <==> w = ax + cy
- //
- // To minimize the cases we're looking at we can take advantage of
- // the limits we have: x >= 0, y >= 0;
- // Taking into account these limits we deduce that:
- // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
- // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
- // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
- // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
- //
- // If we do a substitution such that
- // c1 = a*c >= 0 ? c : -c
- // d1 = b*d >= 0 ? d : -d
- // we get the following linear system:
- // (1) w = abs( ax + c1y )
- // (2) h = abs( bx + d1y )
- //
- // Since we're matching width we only care about (1)
-
- var a:Number = matrix.a;
- var c:Number = matrix.c;
-
- // If components are very close to zero, zero them out to handle the special cases
- if (-1.0e-9 < a && a < +1.0e-9)
- a = 0;
- if (-1.0e-9 < c && c < +1.0e-9)
- c = 0;
-
- // Handle special cases first
- if (a == 0 && c == 0)
- return null; // No solution
-
- if (a == 0)
- return new Point( preferredX, w / Math.abs(c) );
- else if (c == 0)
- return new Point( w / Math.abs(a), preferredY );
-
- const c1:Number = ( a*c >= 0 ) ? c : -c;
- // Now we have the following linear sytesm:
- // (1) w = abs( ax + c1y )
- // (2) x = preferredX or y = preferredY
-
- var s:Point;
- var x:Number;
- var y:Number;
-
- if (c1 != 0 && preferredX > 0)
- {
- const invC1:Number = 1 / c1;
- preferredX = Math.max(minX, Math.min(maxX, preferredX));
- x = preferredX;
-
- // Case1:
- // a * x + c1 * y >= 0
- // x = preferredX
- y = (w - a * x) * invC1;
- if (minY <= y && y <= maxY &&
- a * x + c1 * y >= 0 ) // Satisfy Case1
- {
- s = new Point(x, y);
- }
-
- // Case2:
- // a * x + c1 * y < 0
- // x = preferredX
- y = (-w - a * x) * invC1;
- if (minY <= y && y <= maxY &&
- a * x + c1 * y < 0 ) // Satisfy Case2
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
- s = new Point(x, y);
- }
- }
-
- if (a != 0 && preferredY > 0)
- {
- const invA:Number = 1 / a;
- preferredY = Math.max(minY, Math.min(maxY, preferredY));
- y = preferredY;
-
- // Case3:
- // a * x + c1 * y >= 0
- // y = preferredY
- x = (w - c1 * y ) * invA;
- if (minX <= x && x <= maxX &&
- a * x + c1 * y >= 0) // Satisfy Case3
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
- s = new Point(x, y);
- }
-
- // Case4:
- // a * x + c1 * y < 0
- // y = preferredY
- x = (-w - c1 * y ) * invA;
- if (minX <= x && x <= maxX &&
- a * x + c1 * y < 0) // Satisfy Case4
- {
- // If there is no solution, or the new solution yields smaller value, pick the new solution.
- if (!s || transformSize(s.x, s.y, matrix).y > transformSize(x, y, matrix).y)
- s = new Point(x, y);
- }
- }
-
- // If there's already a solution that matches preferred dimention, return
- if (s)
- return s;
-
- // Find a solution that matches the width and minimizes the height:
- const b:Number = matrix.b;
- const d:Number = matrix.d;
- const d1:Number = (b*d >= 0) ? d : -d;
- return solveEquation(a, c1, w, minX, minY, maxX, maxY, b, d1);
- }
-
- /**
- * Finds a solution (x,y) for the equation abs(a*x + c*y) = w such that
- * abs(b*x +d*y) is minimized.
- * If there is infinite number of solutions, x and y are picked to be
- * as close as possible.
- *
- * Doesn't handle cases where <code>a</code> or <code>c</code> are zero.
- *
- * @return Returns Point(x,y)
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static private function solveEquation(a:Number,
- c:Number,
- w:Number,
- minX:Number,
- minY:Number,
- maxX:Number,
- maxY:Number,
- b:Number,
- d:Number):Point
- {
- if (a == 0 || c == 0)
- return null; // x and y are not co-dependent
-
- // (1) w = abs( ax + cy )
- // Find the range of solutsion for y and pick:
- var x:Number;
- var y:Number;
- var s:Point;
-
- // Case1: ax + cy >= 0, from (1) above we get:
- // (1) x = (w - cy) / a
- //
- // Lets find the possible range of values for y:
- // We know that
- // (3) minX <= x <= maxX
- //
- // Substitute x with (w - cy)/a in (3):
- // (3) minX - w/a <= -cy/a <= maxX - w/a
- // (3) min( A, B ) <= y <= max( A, B ), where
- // A = (minX - w/a) * (-a/c)
- // B = (maxX - w/a) * (-a/c)
-
- var A:Number = (w - minX * a) / c;
- var B:Number = (w - maxX * a) / c;
- var rangeMinY:Number = Math.max(minY, Math.min(A, B));
- var rangeMaxY:Number = Math.min(maxY, Math.max(A, B));
- const det:Number = (b * c - a * d);
-
- // We have a possible solution for Case1 if the range for y is valid
- if (rangeMinY <= rangeMaxY)
- {
- // Now that we have a valid range for y, we need to pick a value within
- // that range.
- //
- // We calculate the value based on a custom condition.
- //
- // The custom condition that we use could be anything that defines
- // another equation for x and y. Some examples are:
- // "make x and y as close as possible": y = w / ( a + c );
- // "minimize abs(bx + dy)": y = b * w / det
- // "preserve aspect ratio": y = w / ( a * preferredX / preferredY + c );
- if (Math.abs(det) < 1.0e-9)
- {
- // There is infinite number of solutions, lets pick x == y
- y = w / ( a + c );
- }
- else
- {
- // Minimize abs(bx + dy) - we need to solve:
- // abs( b * ( w - c * y ) / a + d * y ) = 0
- // which gives us:
- y = b * w / det;
- }
-
- // Now that we have the y value calculated from the custom condition,
- // we clamp with the range. This gives us a solution with
- // values as close as possible to satisfy our custom condition when
- // the condition is a linear function of x and y (in our case it is).
- y = Math.max(rangeMinY, Math.min(y, rangeMaxY));
-
- x = (w - c * y) / a;
- return new Point(x, y);
- }
-
- // Case2: ax + cy < 0, from (1) above we get:
- // (1) x = (-w - cy) / a
- //
- // Lets find the possible range of values for y:
- // We know that
- // (3) minX <= x <= maxX
- //
- // Substitute x with (-w - cy)/a in (3):
- // (3) minX + w/a <= -cy/a <= maxX + w/a
- // (3) min( A, B ) <= y <= max( A, B ), where
- // A = (minX + w/a) * (-a/c)
- // B = (maxX + w/a) * (-a/c)
-
- A = -(minX * a + w) / c;
- B = -(maxX * a + w) / c;
- rangeMinY = Math.max(minY, Math.min(A, B));
- rangeMaxY = Math.min(maxY, Math.max(A, B));
-
- // We have a possible solution for Case2 if the range for y is valid
- if (rangeMinY <= rangeMaxY)
- {
- // Now that we have a valid range for y, we need to pick a value within
- // that range.
- //
- // We calculate the value based on a custom condition.
- //
- // The custom condition that we use could be anything that defines
- // another equation for x and y. Some examples are:
- // "make x and y as close as possible": y = -w / ( a + c );
- // "minimize abs(bx + dy)": y = -b * w / det
- // "preserve aspect ratio": y = w / ( a * preferredX / preferredY + c );
- if (Math.abs(det) < 1.0e-9)
- {
- // There is infinite number of solutions, lets pick x == y
- y = -w / ( a + c );
- }
- else
- {
- // Minimize abs(bx + dy) - we need to solve:
- // abs( b * ( -w - c * y ) / a + d * y ) = 0
- // which gives us:
- y = -b * w / det;
- }
-
- // Now that we have the y value calculated from the custom condition,
- // we clamp with the range. This gives us a solution with
- // values as close as possible to satisfy our custom condition when
- // the condition is a linear function of x and y (in our case it is).
- y = Math.max(rangeMinY, Math.min(y, rangeMaxY));
- x = (-w - c * y) / a;
- return new Point(x, y);
-
- }
- return null; // No solution
- }
-
- /**
- * Calculates (x,y) such that the bounding box (0,0,x,y) transformed
- * with <code>matrix</code> will have bounding box (0,0,w,h).
- * x and y are restricted by <code>minX</code>, <code>maxX</code> and
- * <code>minY</code>, <code>maxY</code>.
- *
- * When there is infinite number of solutions, the function will
- * calculate x and y to be as close as possible.
- *
- * The functon assumes <code>minX >= 0</code> and <code>minY >= 0</code>
- * (solution components x and y are non-negative).
- *
- * @return Point(x,y) or null if no solution exists.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static public function calcUBoundsToFitTBounds(w:Number,
- h:Number,
- matrix:Matrix,
- minX:Number,
- minY:Number,
- maxX:Number,
- maxY:Number):Point
- {
- // Untransformed bounds size is (x,y). The corners of the untransformed
- // bounding box are p1(0,0) p2(x,0) p3(0,y) p4(x,y).
- // Matrix is | a c tx |
- // | b d ty |
- //
- // After transfomation with the matrix those four points are:
- // t1 = (0, 0) = matrix.deltaTransformPoint(p1)
- // t2 = (ax, bx) = matrix.deltaTransformPoint(p2)
- // t3 = (cy, dy) = matrix.deltaTransformPoint(p3)
- // t4 = (ax + cy, cx + dy) = matrix.deltaTransformPoint(p4)
- //
- // The transformed bounds bounding box dimensions are (w,h):
- // (1) w = max( t1.x, t2.x, t3.x, t4.x ) - min( t1.x, t2.x, t3.x, t4.x)
- // (2) h = max( t1.y, t2.y, t3.y, t4.y ) - min( t1.y, t2.y, t3.y, t4.y)
- //
- // Looking at all the possible cases for min and max functions above,
- // we can construct and solve simple linear systems for x and y.
- // For example in the case of
- // t1.x <= t2.x <= t3.x <= t4.x
- // our first equation is
- // (1) w = t4.x - t1.x <==> w = ax + cy
- //
- // To minimize the cases we're looking at we can take advantage of
- // the limits we have: x >= 0, y >= 0;
- // Taking into account these limits we deduce that:
- // a*c >= 0 gives us (1) w = abs( t4.x - t1.x ) = abs( ax + cy )
- // a*c < 0 gives us (1) w = abs( t2.x - t3.x ) = abs( ax - cy )
- // b*d >= 0 gives us (2) h = abs( t4.y - t1.y ) = abs( bx + dy )
- // b*d < 0 gives us (2) h = abs( t2.y - t3.y ) = abs( bx - dy )
- //
- // If we do a substitution such that
- // c1 = a*c >= 0 ? c : -c
- // d1 = b*d >= 0 ? d : -d
- // we get the following linear system:
- // (1) w = abs( ax + c1y )
- // (2) h = abs( bx + d1y )
- //
-
- var a:Number = matrix.a;
- var b:Number = matrix.b;
- var c:Number = matrix.c;
- var d:Number = matrix.d;
-
- // If components are very close to zero, zero them out to handle the special cases
- if (-1.0e-9 < a && a < +1.0e-9)
- a = 0;
- if (-1.0e-9 < b && b < +1.0e-9)
- b = 0;
- if (-1.0e-9 < c && c < +1.0e-9)
- c = 0;
- if (-1.0e-9 < d && d < +1.0e-9)
- d = 0;
-
- // Handle special cases.
- if (b == 0 && c == 0)
- {
- // No solution in the following cases since the matrix collapses
- // all points into a line.
- if (a == 0 || d == 0)
- return null;
-
- // (1) w = abs( ax + cy ) <=> w = abs( ax ) <=> w = abs(a)x
- // (2) h = abs( bx + dy ) <=> h = abs( dy ) <=> h = abs(d)y
- return new Point(w / Math.abs(a), h / Math.abs(d));
- }
-
- if (a == 0 && d == 0)
- {
- // No solution in the following cases since the matrix collapses
- // all points into a line.
- if (b == 0 || c == 0)
- return null;
-
- // (1) w = abs( ax + cy ) <=> w = abs( cy ) <=> w = abs(c)y
- // (2) h = abs( bx + dy ) <=> h = abs( bx ) <=> h = abs(b)x
- return new Point(h / Math.abs(b), w / Math.abs(c));
- }
-
- // Handle general cases.
- const c1:Number = ( a*c >= 0 ) ? c : -c;
- const d1:Number = ( b*d >= 0 ) ? d : -d;
- // we get the following linear system:
- // (1) w = abs( ax + c1y )
- // (2) h = abs( bx + d1y )
-
- // Calculate the determinant of the system
- const det:Number = a * d1 - b * c1;
- if (Math.abs(det) < 1.0e-9)
- {
- // No solution in these cases since the matrix
- // collapses all points into a line.
- if (c1 == 0 || a == 0 || a == -c1)
- return null;
-
- if (Math.abs(a * h - b * w) > 1.0e-9)
- return null; // No solution in this case
-
- // Determinant is zero, the equations (1) & (2) are equivalent and
- // we have only one equation:
- // (1) w = abs( ax + c1y )
- //
- // Solve it finding x and y as close as possible:
- return solveEquation(a, c1, w, minX, minX, maxX, maxY, b, d1);
- }
-
- // Pre-multiply w & h by the inverse dteterminant
- const invDet:Number = 1 / det;
- w *= invDet;
- h *= invDet;
-
- // Case 1:
- // a * x + c1 * y >= 0
- // b * x + d1 * y >= 0
- var s:Point;
- s = solveSystem(a, c1, b, d1, w, h);
- if (s &&
- minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
- a * s.x + c1 * s.x >= 0 &&
- b * s.x + d1 * s.y >= 0)
- return s;
-
- // Case 2:
- // a * x + c1 * y >= 0
- // b * x + d1 * y < 0
- s = solveSystem( a, c1, b, d1, w, -h);
- if (s &&
- minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
- a * s.x + c1 * s.x >= 0 &&
- b * s.x + d1 * s.y < 0)
- return s;
-
- // Case 3:
- // a * x + c1 * y < 0
- // b * x + d1 * y >= 0
- s = solveSystem( a, c1, b, d1, -w, h);
- if (s &&
- minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
- a * s.x + c1 * s.x < 0 &&
- b * s.x + d1 * s.y >= 0)
- return s;
-
- // Case 4:
- // a * x + c1 * y < 0
- // b * x + d1 * y < 0
- s = solveSystem( a, c1, b, d1, -w, -h);
- if (s &&
- minX <= s.x && s.x <= maxX && minY <= s.y && s.y <= maxY &&
- a * s.x + c1 * s.x < 0 &&
- b * s.x + d1 * s.y < 0)
- return s;
-
- return null; // No solution.
- }
-
- /**
- * Determine if two Matrix instances are equal.
- *
- * @return true if the matrices are equal.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function isEqual(m1:Matrix, m2:Matrix):Boolean
- {
- return ((m1 && m2 &&
- m1.a == m2.a &&
- m1.b == m2.b &&
- m1.c == m2.c &&
- m1.d == m2.d &&
- m1.tx == m2.tx &&
- m1.ty == m2.ty) ||
- (!m1 && !m2));
- }
-
- /**
- * Determine if two Matrix3D instances are equal.
- *
- * @return true if the matrices are equal.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static function isEqual3D(m1:Matrix3D, m2:Matrix3D):Boolean
- {
- if (m1 && m2 && m1.rawData.length == m2.rawData.length)
- {
- var r1:Vector.<Number> = m1.rawData;
- var r2:Vector.<Number> = m2.rawData;
-
- return (r1[0] == r2[0] &&
- r1[1] == r2[1] &&
- r1[2] == r2[2] &&
- r1[3] == r2[3] &&
- r1[4] == r2[4] &&
- r1[5] == r2[5] &&
- r1[6] == r2[6] &&
- r1[7] == r2[7] &&
- r1[8] == r2[8] &&
- r1[9] == r2[9] &&
- r1[10] == r2[10] &&
- r1[11] == r2[11] &&
- r1[12] == r2[12] &&
- r1[13] == r2[13] &&
- r1[14] == r2[14] &&
- r1[15] == r2[15]);
- }
-
- return (!m1 && !m2);
- }
-
- /**
- * Calculates (x,y) such as to satisfy the linear system:
- * | a * x + c * y = m
- * | b * x + d * y = n
- *
- * @param mOverDet <code>mOverDet must be equal to m / (a*d - b*c)</code>
- * @param nOverDet <code>mOverDet must be equal to n / (a*d - b*c)</code>
- *
- * @return returns Point(x,y)
- *
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- static private function solveSystem(a:Number,
- c:Number,
- b:Number,
- d:Number,
- mOverDet:Number,
- nOverDet:Number):Point
- {
- return new Point(d * mOverDet - c * nOverDet,
- a * nOverDet - b * mOverDet);
- }
-
- }
-
-}
-
[41/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Network
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
new file mode 100644
index 0000000..45f08b3
--- /dev/null
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPHeader.as
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.net
+{
+ /**
+ * The data class for HTTP headers in HTTP server communications.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class HTTPHeader
+ {
+ /**
+ * The Content-type header.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const CONTENT_TYPE:String = "Content-type";
+
+ /**
+ * Constructor.
+ *
+ * @param name The name of the header.
+ * @param value The value for that header.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function HTTPHeader(name:String = null, value:String = null)
+ {
+ super();
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ * The name of the header.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var name:String;
+
+ /**
+ * The value for the header.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var value:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
new file mode 100644
index 0000000..274559a
--- /dev/null
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPService.as
@@ -0,0 +1,805 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.net
+{
+ COMPILE::AS3
+ {
+ import flash.events.HTTPStatusEvent;
+ import flash.events.IOErrorEvent;
+ import flash.net.URLLoader;
+ import flash.net.URLRequest;
+ import flash.net.URLRequestHeader;
+ import flash.net.URLRequestMethod;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched when the request is complete.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="complete", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched if an error occurs in the server communication.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="ioError", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched when an httpStatus code is received from the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="httpStatus", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched if Adobe AIR is able to detect and return the status
+ * code for the request. Unlike the httpStatus event, the httpResponseStatus
+ * event is delivered before any response data. Also, the httpResponseStatus
+ * event includes values for the responseHeaders and responseURL properties
+ * (which are undefined for an httpStatus event. Note that the
+ * httpResponseStatus event (if any) will be sent before
+ * (and in addition to) any complete or error event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="httpResponseStatus", type="org.apache.flex.events.Event")]
+
+ [DefaultProperty("beads")]
+
+ /**
+ * The HTTPService class is a class designed to transfer text
+ * over HTTP. Use BinaryUploader for transferring non-text.
+ *
+ * @see org.apache.flex.net.BinaryUploader.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class HTTPService extends HTTPServiceBase implements IStrand, IBead
+ {
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_GET
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_GET:String = "GET";
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_POST
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_POST:String = "POST";
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_PUT
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_PUT:String = "PUT";
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_DELETE
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_DELETE:String = "DELETE";
+
+ /**
+ * Dispatched when the request is complete.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const EVENT_COMPLETE:String = "complete";
+
+ /**
+ * Dispatched if an error occurs in the server communication.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const EVENT_IO_ERROR:String = "ioError";
+
+ /**
+ * Dispatched when an httpStatus code is received from the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const EVENT_HTTP_STATUS:String = "httpStatus";
+
+ /**
+ * Dispatched if Adobe AIR is able to detect and return the status
+ * code for the request. Unlike the httpStatus event, the httpResponseStatus
+ * event is delivered before any response data. Also, the httpResponseStatus
+ * event includes values for the responseHeaders and responseURL properties
+ * (which are undefined for an httpStatus event. Note that the
+ * httpResponseStatus event (if any) will be sent before
+ * (and in addition to) any complete or error event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const EVENT_HTTP_RESPONSE_STATUS:String = "httpResponseStatus";
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function HTTPService()
+ {
+ super();
+
+ COMPILE::JS
+ {
+ element = new XMLHttpRequest() as WrappedHTMLElement;
+ }
+ }
+
+ private var _contentType:String = "application/x-www-form-urlencoded";
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#contentType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get contentType():String
+ {
+ return _contentType;
+ }
+
+ /**
+ * @private
+ */
+ public function set contentType(value:String):void
+ {
+ if (_contentType != value)
+ {
+ _contentType = value;
+ dispatchEvent(new Event("contentTypeChanged"));
+ }
+ }
+
+ private var _contentData:String;
+
+ /**
+ * The text to send to the server, if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get contentData():String
+ {
+ return _contentData;
+ }
+
+ /**
+ * @private
+ */
+ public function set contentData(value:String):void
+ {
+ if (_contentData != value)
+ {
+ _contentData = value;
+ dispatchEvent(new Event("contentDataChanged"));
+ }
+ }
+
+ private var _headers:Array;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#headers
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get headers():Array
+ {
+ if (_headers == null)
+ _headers = [];
+ return _headers;
+ }
+
+ /**
+ * @private
+ */
+ public function set headers(value:Array):void
+ {
+ if (_headers != value)
+ {
+ _headers = value;
+ dispatchEvent(new Event("headersChanged"));
+ }
+ }
+
+ private var _method:String = HTTP_METHOD_GET;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#method
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get method():String
+ {
+ return _method;
+ }
+
+ /**
+ * @private
+ */
+ public function set method(value:String):void
+ {
+ if (_method != value)
+ {
+ _method = value;
+ dispatchEvent(new Event("methodChanged"));
+ }
+ }
+
+ private var _responseHeaders:Array;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#responseHeaders
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ public function get responseHeaders():Array
+ {
+ COMPILE::AS3
+ {
+ if (_responseHeaders && _responseHeaders.length > 0)
+ {
+ if (_responseHeaders[0] is URLRequestHeader)
+ {
+ var n:int = _responseHeaders.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var old:URLRequestHeader = _responseHeaders[i];
+ var nu:HTTPHeader = new HTTPHeader(old.name, old.value);
+ _responseHeaders[i] = nu;
+ }
+ }
+ }
+ }
+ COMPILE::JS
+ {
+ var allHeaders:String;
+ var c:int;
+ var hdr:String;
+ var i:int;
+ var n:int;
+ var part1:String;
+ var part2:String;
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+
+ if (typeof _responseHeaders === 'undefined') {
+ allHeaders = element.getAllResponseHeaders();
+ _responseHeaders = allHeaders.split('\n');
+ n = _responseHeaders.length;
+ for (i = 0; i < n; i++) {
+ hdr = _responseHeaders[i];
+ c = hdr.indexOf(':');
+ part1 = hdr.substring(0, c);
+ part2 = hdr.substring(c + 2);
+ _responseHeaders[i] =
+ new HTTPHeader(part1, part2);
+ }
+ }
+
+ }
+ return _responseHeaders;
+ }
+
+ private var _responseURL:String;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#responseURL
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get responseURL():String
+ {
+ return _responseURL;
+ }
+
+ private var _status:int;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#status
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get status():int
+ {
+ return _status;
+ }
+
+ private var _url:String;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#url
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get url():String
+ {
+ return _url;
+ }
+
+ /**
+ * @private
+ */
+ public function set url(value:String):void
+ {
+ if (_url != value)
+ {
+ _url = value;
+ dispatchEvent(new Event("urlChanged"));
+ }
+ }
+
+ private var _timeout:Number = 0;
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#timeout
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get timeout():Number
+ {
+ return _timeout;
+ }
+
+ /**
+ * @private
+ */
+ public function set timeout(value:Number):void
+ {
+ if (_timeout != value)
+ {
+ _timeout = value;
+ dispatchEvent(new Event("timeoutChanged"));
+ }
+ }
+
+ private var _id:String;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#id
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#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;
+ if (_beads == null)
+ {
+ for each (var bead:IBead in beads)
+ addBead(bead);
+ }
+
+ dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#id
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var beads:Array;
+
+ COMPILE::AS3
+ private var _beads:Vector.<IBead>;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#addBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function addBead(bead:IBead):void
+ {
+ if (!_beads)
+ _beads = new Vector.<IBead>;
+ _beads.push(bead);
+ bead.strand = this;
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#getBeadByType()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in _beads)
+ {
+ if (bead is classOrInterface)
+ return bead;
+ }
+ return null;
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#removeBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function removeBead(value:IBead):IBead
+ {
+ var n:int = _beads.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var bead:IBead = _beads[i];
+ if (bead == value)
+ {
+ _beads.splice(i, 1);
+ return bead;
+ }
+ }
+ return null;
+ }
+
+ COMPILE::AS3
+ private var urlLoader:URLLoader;
+
+ /**
+ * Sends the headers and contentData to the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ public function send():void
+ {
+ if (_beads == null)
+ {
+ for each (var bead:IBead in beads)
+ addBead(bead);
+ }
+
+ COMPILE::AS3
+ {
+ if (!urlLoader)
+ urlLoader = new URLLoader();
+ var request:URLRequest = new URLRequest(url);
+ request.method = method;
+ if ("idleTimeout" in request)
+ {
+ request["idleTimeout"] = timeout;
+ }
+ var sawContentType:Boolean;
+ if (headers)
+ {
+ for each (var header:HTTPHeader in headers)
+ {
+ var urlHeader:URLRequestHeader = new URLRequestHeader(header.name, header.value);
+ request.requestHeaders.push(urlHeader);
+ if (header.name == HTTPHeader.CONTENT_TYPE)
+ sawContentType = true;
+ }
+ }
+ if (method != HTTP_METHOD_GET && !sawContentType && contentData != null)
+ {
+ urlHeader = new URLRequestHeader(HTTPHeader.CONTENT_TYPE, contentType);
+ request.requestHeaders.push(urlHeader);
+ }
+ if (contentData)
+ {
+ if (method == HTTP_METHOD_GET)
+ {
+ if (url.indexOf("?") != -1)
+ url += contentData;
+ else
+ url += "?" + contentData;
+ }
+ else
+ request.data = contentData;
+ }
+ urlLoader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
+ urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
+ if (HTTPStatusEvent.HTTP_RESPONSE_STATUS) // only on AIR
+ urlLoader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, statusHandler);
+ urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler);
+ urlLoader.load(request);
+ }
+ COMPILE::JS
+ {
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+ element.onreadystatechange = progressHandler;
+
+ url = _url;
+
+ var contentData:String = null;
+ if (_contentData != null) {
+ if (_method === HTTP_METHOD_GET) {
+ if (url.indexOf('?') !== -1) {
+ url += _contentData;
+ } else {
+ url += '?' + _contentData;
+ }
+ } else {
+ contentData = _contentData;
+ }
+ }
+
+ element.open(_method, _url, true);
+ element.timeout = _timeout;
+
+ var sawContentType:Boolean = false;
+ if (_headers) {
+ var n:int = _headers.length;
+ for (var i:int = 0; i < n; i++) {
+ var header:HTTPHeader = _headers[i];
+ if (header.name === HTTPHeader.CONTENT_TYPE) {
+ sawContentType = true;
+ }
+
+ element.setRequestHeader(header.name, header.value);
+ }
+ }
+
+ if (_method !== HTTP_METHOD_GET &&
+ !sawContentType && contentData) {
+ element.setRequestHeader(
+ HTTPHeader.CONTENT_TYPE, _contentType);
+ }
+
+ if (contentData) {
+ element.setRequestHeader('Content-length', contentData.length.toString());
+ element.setRequestHeader('Connection', 'close');
+ element.send(contentData);
+ } else {
+ element.send();
+ }
+
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#statusHandler()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function statusHandler(event:HTTPStatusEvent):void
+ {
+ _status = event.status;
+ if ("responseHeaders" in event)
+ _responseHeaders = event.responseHeaders;
+ if ("responseURL" in event)
+ _responseURL = event.responseURL;
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#ioErrorHandler()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function ioErrorHandler(event:IOErrorEvent):void
+ {
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * @copy org.apache.flex.net.BinaryUploader#completeHandler()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function completeHandler(event:flash.events.Event):void
+ {
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ COMPILE::JS
+ protected function progressHandler():void
+ {
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+ if (element.readyState === 2) {
+ _status = element.status;
+ dispatchEvent('httpResponseStatus');
+ dispatchEvent('httpStatus');
+ } else if (element.readyState === 4) {
+ dispatchEvent('complete');
+ }
+ }
+
+ /**
+ * The text returned from the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ public function get data():String
+ {
+ COMPILE::AS3
+ {
+ return urlLoader.data;
+ }
+ COMPILE::JS
+ {
+ return (element as XMLHttpRequest).responseText;
+ }
+ }
+
+
+ private var _json:Object;
+
+ /**
+ * A JSON object parsed from the data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get json():Object
+ {
+ if (!_json)
+ _json = JSON.parse(data);
+ return _json;
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
new file mode 100644
index 0000000..4cd73df
--- /dev/null
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/HTTPServiceBase.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.net
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.events.EventDispatcher;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.HTMLElementWrapper;
+ }
+
+ /**
+ * The data class for HTTP headers in HTTP server communications.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class HTTPServiceBase extends EventDispatcher
+ {
+ }
+
+ COMPILE::JS
+ public class HTTPServiceBase extends HTMLElementWrapper
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/resources/basic-manifest.xml b/frameworks/projects/Network/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..235b09d
--- /dev/null
+++ b/frameworks/projects/Network/src/main/resources/basic-manifest.xml
@@ -0,0 +1,27 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="HTTPService" class="org.apache.flex.net.HTTPService"/>
+ <component id="BinaryUploader" class="org.apache.flex.net.BinaryUploader"/>
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..a61da6f
--- /dev/null
+++ b/frameworks/projects/Network/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,82 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>NetworkClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/resources/compile-config.xml b/frameworks/projects/Network/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..ed9e3e8
--- /dev/null
+++ b/frameworks/projects/Network/src/main/resources/compile-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>NetworkClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[18/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Formatters
Posted by ah...@apache.org.
new folders for Formatters
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/36435f3c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/36435f3c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/36435f3c
Branch: refs/heads/develop
Commit: 36435f3c6915abf649957ee27b3ef400385b5d69
Parents: b7951c2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 17:11:20 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:50 2016 -0800
----------------------------------------------------------------------
.../Formatters/as/src/FormattersClasses.as | 41 ----
.../as/src/org/apache/flex/core/FormatBase.as | 113 ----------
.../flex/html/accessories/CurrencyFormatter.as | 215 -------------------
.../html/accessories/DateFormatMMDDYYYYBead.as | 158 --------------
.../flex/html/accessories/NumberFormatter.as | 210 ------------------
.../flex/html/beads/FormatableLabelView.as | 90 --------
.../flex/html/beads/FormatableTextInputView.as | 91 --------
.../projects/Formatters/basic-manifest.xml | 25 ---
.../projects/Formatters/compile-asjs-config.xml | 80 -------
.../projects/Formatters/compile-config.xml | 79 -------
.../src/main/flex/FormattersClasses.as | 41 ++++
.../flex/org/apache/flex/core/FormatBase.as | 113 ++++++++++
.../flex/html/accessories/CurrencyFormatter.as | 215 +++++++++++++++++++
.../html/accessories/DateFormatMMDDYYYYBead.as | 158 ++++++++++++++
.../flex/html/accessories/NumberFormatter.as | 210 ++++++++++++++++++
.../flex/html/beads/FormatableLabelView.as | 90 ++++++++
.../flex/html/beads/FormatableTextInputView.as | 91 ++++++++
.../src/main/resources/basic-manifest.xml | 25 +++
.../src/main/resources/compile-asjs-config.xml | 80 +++++++
.../src/main/resources/compile-config.xml | 79 +++++++
20 files changed, 1102 insertions(+), 1102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/FormattersClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/FormattersClasses.as b/frameworks/projects/Formatters/as/src/FormattersClasses.as
deleted file mode 100644
index bbf43ce..0000000
--- a/frameworks/projects/Formatters/as/src/FormattersClasses.as
+++ /dev/null
@@ -1,41 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class FormattersClasses
-{
- import org.apache.flex.core.FormatBase; FormatBase;
-
- import org.apache.flex.html.accessories.DateFormatMMDDYYYYBead; DateFormatMMDDYYYYBead;
- COMPILE::AS3
- {
- import org.apache.flex.html.beads.FormatableLabelView; FormatableLabelView;
- import org.apache.flex.html.beads.FormatableTextInputView; FormatableTextInputView;
- }
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/core/FormatBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/core/FormatBase.as b/frameworks/projects/Formatters/as/src/org/apache/flex/core/FormatBase.as
deleted file mode 100644
index b1fa1af..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/core/FormatBase.as
+++ /dev/null
@@ -1,113 +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
-{
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
-
- public class FormatBase extends EventDispatcher implements IFormatBead
- {
- public function FormatBase()
- {
- }
-
- /**
- * Retrieves the current value of the property from the strand.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get propertyValue():Object
- {
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- var value:Object = model[propertyName];
- return value;
- }
-
- private var _propertyName:String;
-
- /**
- * The name of the property in the model holding the value to be
- * formatted. The default is text.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get propertyName():String
- {
- if (_propertyName == null) {
- _propertyName = "text";
- }
- return _propertyName;
- }
- public function set propertyName(value:String):void
- {
- _propertyName = value;
- }
-
- private var _eventName:String;
-
- /**
- * The name of the event dispatched when the property changes. The
- * default is propertyName + "Changed".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get eventName():String
- {
- if (_eventName == null) {
- return _propertyName+"Changed";
- }
- return _eventName;
- }
- public function set eventName(value:String):void
- {
- _eventName = value;
- }
-
- /**
- * The resulting formatted value as a string.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get formattedString():String
- {
- // override to produce actual result
- return null;
- }
-
- private var _strand:IStrand;
-
- public function set strand(value:IStrand):void
- {
- _strand = value;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/CurrencyFormatter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/CurrencyFormatter.as b/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/CurrencyFormatter.as
deleted file mode 100644
index 208b5ff..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/CurrencyFormatter.as
+++ /dev/null
@@ -1,215 +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.IBeadModel;
- import org.apache.flex.core.IFormatBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The CurrencyFormatter class formats a value in separated groups. The formatter listens
- * to a property on a model and when the property changes, formats it and dispatches a
- * formatChanged event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CurrencyFormatter extends EventDispatcher implements IFormatBead
- {
- /**
- * constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CurrencyFormatter()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- // Listen for the beadsAdded event which signals when all of a strand's
- // beads have been added.
- IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
- }
-
- /**
- * @private
- */
- private function handleBeadsAdded(event:Event):void
- {
- // Listen for the change in the model
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- model.addEventListener(eventName,propertyChangeHandler);
- model.addEventListener(propertyName+"Change",propertyChangeHandler);
-
- // format the current value of that property
- propertyChangeHandler(null);
- }
-
- private var _propertyName:String;
- private var _eventName:String;
- private var _formattedResult:String;
- private var _fractionalDigits:Number = 2;
- private var _currencySymbol:String = "$";
-
- /**
- * The name of the property on the model to format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get propertyName():String
- {
- if (_propertyName == null) {
- return "text";
- }
- return _propertyName;
- }
- public function set propertyName(value:String):void
- {
- _propertyName = value;
- }
-
- /**
- * The event dispatched by the model when the property changes. The
- * default is propertyName+"Changed".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get eventName():String
- {
- if (_eventName == null) {
- return _propertyName+"Changed";
- }
- return _eventName;
- }
- public function set eventName(value:String):void
- {
- _eventName = value;
- }
-
- /**
- * Number of digits after the decimal separator
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get fractionalDigits():int
- {
- return _fractionalDigits;
- }
- public function set fractionalDigits(value:int):void
- {
- _fractionalDigits = value;
- }
-
- /**
- * The currency symbol, such as "$"
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get currencySymbol():String
- {
- return _currencySymbol;
- }
- public function set currencySymbol(value:String):void
- {
- _currencySymbol = value;
- }
-
- /**
- * The formatted string.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get formattedString():String
- {
- return _formattedResult;
- }
-
- /**
- * @private
- */
- private function propertyChangeHandler(event:Event):void
- {
- // When the property changes, fetch it from the model and
- // format it, storing the result in _formattedResult.
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- var value:Object = model[propertyName];
- _formattedResult = format(value);
-
- // Dispatch the formatChanged event so any bead that's interested in
- // the formatted string knows to use it.
- var newEvent:Event = new Event("formatChanged");
- this.dispatchEvent(newEvent);
- }
-
- /**
- * Computes the formatted string.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function format(value:Object):String
- {
- if (value == null) return "";
-
- var num:Number = Number(value);
- var source:String = num.toFixed(fractionalDigits);
-
- return currencySymbol + source;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as b/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
deleted file mode 100644
index 94d7f20..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
+++ /dev/null
@@ -1,158 +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.IDateChooserModel;
- import org.apache.flex.core.IFormatBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IStrandWithModel;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.html.TextInput;
- import org.apache.flex.html.beads.DateFieldView;
-
- /**
- * The DateFormatBead class formats the display of a DateField using MM/DD/YYYY format.
- *
- * @flexjsignoreimport org.apache.flex.core.IStrandWithModel
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DateFormatMMDDYYYYBead extends EventDispatcher implements IBead, IFormatBead
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DateFormatMMDDYYYYBead()
- {
- }
-
- private var _propertyName:String;
- private var _eventName:String;
- private var _formattedResult:String;
-
- /**
- * The name of the property on the model holding the value to be formatted.
- * The default is selectedDate.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get propertyName():String
- {
- if (_propertyName == null) {
- return "selectedDate";
- }
- return _propertyName;
- }
- public function set propertyName(value:String):void
- {
- _propertyName = value;
- }
-
- /**
- * The name of the event dispatched when the property changes. The
- * default is selectedDateChanged.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get eventName():String
- {
- if (_eventName == null) {
- return _propertyName+"Changed";
- }
- return _eventName;
- }
- public function set eventName(value:String):void
- {
- _eventName = value;
- }
-
- /**
- * The formatted result.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get formattedString():String
- {
- return _formattedResult;
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @flexjsignorecoercion org.apache.flex.core.IStrandWithModel
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- var model:IDateChooserModel = IStrandWithModel(_strand).model as IDateChooserModel;
- model.addEventListener("selectedDateChanged",handleTextChange);
- }
-
- /**
- * @private
- *
- * @flexjsignorecoercion org.apache.flex.core.IStrandWithModel
- */
- private function handleTextChange(event:Event):void
- {
- var model:IDateChooserModel = IStrandWithModel(_strand).model as IDateChooserModel;
- /*var view:DateFieldView = _strand.getBeadByType(DateFieldView) as DateFieldView;
- var input:TextInput = view.textInput;*/
-
- var d:Date = model.selectedDate;
- var month:String = String(d.getMonth()+1);
- if (Number(month)<10) month = "0"+month;
- var date:String = String(d.getDate());
- if (Number(date)<10) date = "0"+date;
- var fmt:String = month+"/"+date+"/"+String(d.getFullYear());
- /*input.text = fmt;*/
- _formattedResult = month+"/"+date+"/"+String(d.getFullYear());
-
- dispatchEvent( new Event("formatChanged") );
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/NumberFormatter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/NumberFormatter.as b/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/NumberFormatter.as
deleted file mode 100644
index 0d1b613..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/html/accessories/NumberFormatter.as
+++ /dev/null
@@ -1,210 +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.IBeadModel;
- import org.apache.flex.core.IFormatBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The NumberFormatter class formats a value in separated groups. The formatter listens
- * to a property on a model and when the property changes, formats it and dispatches a
- * formatChanged event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class NumberFormatter extends EventDispatcher implements IFormatBead
- {
- /**
- * constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function NumberFormatter()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- // Listen for the beadsAdded event which signals when all of a strand's
- // beads have been added.
- IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
- }
-
- /**
- * @private
- */
- private function handleBeadsAdded(event:Event):void
- {
- // Listen for the change in the model
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- model.addEventListener(eventName,propertyChangeHandler);
- model.addEventListener(propertyName+"Change",propertyChangeHandler);
-
- // format the current value of that property
- propertyChangeHandler(null);
- }
-
- private var _propertyName:String;
- private var _eventName:String;
- private var _formattedResult:String;
- private var _groupSize:Number = 3;
- private var _thousandsSeparator:String = ",";
-
- /**
- * The name of the property on the model to format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get propertyName():String
- {
- if (_propertyName == null) {
- return "text";
- }
- return _propertyName;
- }
- public function set propertyName(value:String):void
- {
- _propertyName = value;
- }
-
- /**
- * The event dispatched by the model when the property changes. The
- * default is propertyName+"Changed".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get eventName():String
- {
- if (_eventName == null) {
- return _propertyName+"Changed";
- }
- return _eventName;
- }
- public function set eventName(value:String):void
- {
- _eventName = value;
- }
-
- /**
- * Character to use to separate thousands groups. The default is
- * the comma (,).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get thousandsSeparator():String
- {
- return _thousandsSeparator;
- }
- public function set thousandsSeparator(value:String):void
- {
- _thousandsSeparator = value;
- }
-
- /**
- * The formatted string.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get formattedString():String
- {
- return _formattedResult;
- }
-
- /**
- * @private
- */
- private function propertyChangeHandler(event:Event):void
- {
- // When the property changes, fetch it from the model and
- // format it, storing the result in _formattedResult.
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- var value:Object = model[propertyName];
- _formattedResult = format(value);
-
- // Dispatch the formatChanged event so any bead that's interested in
- // the formatted string knows to use it.
- var newEvent:Event = new Event("formatChanged");
- this.dispatchEvent(newEvent);
- }
-
- /**
- * @private
- */
- private function format(value:Object):String
- {
- if (value == null) return "";
-
- var num:Number = Number(value);
- var source:String = String(value);
- var parts:Array = source.split(thousandsSeparator);
- source = parts.join("");
-
- var l:int = source.length;
- var result:String = "";
- var group:int = 0;
-
- for(var i:int=l-1; i >= 0; i--)
- {
- if (group == _groupSize && result.length > 0) {
- result = thousandsSeparator + result;
- group = 0;
- }
- result = source.charAt(i) + result;
- group++;
- }
-
- return result;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableLabelView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableLabelView.as b/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableLabelView.as
deleted file mode 100644
index 03b6ccd..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableLabelView.as
+++ /dev/null
@@ -1,90 +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
-{
- import org.apache.flex.core.IFormatBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The FormatableLabelView class is a View bead that is capable of working
- * with a format bead to display a formatted value. When the format bead has
- * created a formatted string, it dispatches a formatChanged event that the
- * FormatableLabelView class intercepts and displays in the label.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class FormatableLabelView extends TextFieldView
- {
- /**
- * constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function FormatableLabelView()
- {
- super();
- }
-
- private var _formatter:IFormatBead;
-
- /**
- * @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;
- IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
- }
-
- /**
- * @private
- */
- private function handleBeadsAdded(event:Event):void
- {
- _formatter = _strand.getBeadByType(IFormatBead) as IFormatBead;
- _formatter.addEventListener("formatChanged",formatReadyHandler);
-
- // process any text set in the label at this moment
- text = _formatter.formattedString;
- }
-
- /**
- * @private
- */
- private function formatReadyHandler(event:Event):void
- {
- if (_formatter) {
- text = _formatter.formattedString;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableTextInputView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableTextInputView.as b/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableTextInputView.as
deleted file mode 100644
index 926253c..0000000
--- a/frameworks/projects/Formatters/as/src/org/apache/flex/html/beads/FormatableTextInputView.as
+++ /dev/null
@@ -1,91 +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
-{
- import org.apache.flex.core.IFormatBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The FormatableTextInputView class is a View bead that extends TextInputWithBorderView
- * and is capable of working with a format bead. When a format bead dispatches a
- * formatChanged event, the FormatableTextInputView bead copies the formatted string to
- * to the text field.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class FormatableTextInputView extends TextInputWithBorderView
- {
- /**
- * constructor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function FormatableTextInputView()
- {
- super();
- }
-
- private var _formatter:IFormatBead;
-
- /**
- * @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;
- IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
- }
-
- /**
- * @private
- */
- private function handleBeadsAdded(event:Event):void
- {
- _formatter = _strand.getBeadByType(IFormatBead) as IFormatBead;
- if (_formatter) {
- _formatter.addEventListener("formatChanged",formatChangedHandler);
- }
- }
-
- /**
- * @private
- */
- private function formatChangedHandler(event:Event):void
- {
- this.textField.text = _formatter.formattedString;
-
- // move the cursor to the end
- var l:int = this.textField.text.length;
- this.textField.setSelection(l,l);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/basic-manifest.xml b/frameworks/projects/Formatters/basic-manifest.xml
deleted file mode 100644
index 106df8e..0000000
--- a/frameworks/projects/Formatters/basic-manifest.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
- <component id="NumberFormatter" class="org.apache.flex.html.accessories.NumberFormatter"/>
- <component id="CurrencyFormatter" class="org.apache.flex.html.accessories.CurrencyFormatter"/>
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/compile-asjs-config.xml b/frameworks/projects/Formatters/compile-asjs-config.xml
deleted file mode 100644
index 6b9466f..0000000
--- a/frameworks/projects/Formatters/compile-asjs-config.xml
+++ /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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-classes>
- <class>FormattersClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/compile-config.xml b/frameworks/projects/Formatters/compile-config.xml
deleted file mode 100644
index 96c7e48..0000000
--- a/frameworks/projects/Formatters/compile-config.xml
+++ /dev/null
@@ -1,79 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>FormattersClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as b/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
new file mode 100644
index 0000000..bbf43ce
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/FormattersClasses.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class FormattersClasses
+{
+ import org.apache.flex.core.FormatBase; FormatBase;
+
+ import org.apache.flex.html.accessories.DateFormatMMDDYYYYBead; DateFormatMMDDYYYYBead;
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.beads.FormatableLabelView; FormatableLabelView;
+ import org.apache.flex.html.beads.FormatableTextInputView; FormatableTextInputView;
+ }
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
new file mode 100644
index 0000000..b1fa1af
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/core/FormatBase.as
@@ -0,0 +1,113 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+
+ public class FormatBase extends EventDispatcher implements IFormatBead
+ {
+ public function FormatBase()
+ {
+ }
+
+ /**
+ * Retrieves the current value of the property from the strand.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get propertyValue():Object
+ {
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ var value:Object = model[propertyName];
+ return value;
+ }
+
+ private var _propertyName:String;
+
+ /**
+ * The name of the property in the model holding the value to be
+ * formatted. The default is text.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get propertyName():String
+ {
+ if (_propertyName == null) {
+ _propertyName = "text";
+ }
+ return _propertyName;
+ }
+ public function set propertyName(value:String):void
+ {
+ _propertyName = value;
+ }
+
+ private var _eventName:String;
+
+ /**
+ * The name of the event dispatched when the property changes. The
+ * default is propertyName + "Changed".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get eventName():String
+ {
+ if (_eventName == null) {
+ return _propertyName+"Changed";
+ }
+ return _eventName;
+ }
+ public function set eventName(value:String):void
+ {
+ _eventName = value;
+ }
+
+ /**
+ * The resulting formatted value as a string.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get formattedString():String
+ {
+ // override to produce actual result
+ return null;
+ }
+
+ private var _strand:IStrand;
+
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/CurrencyFormatter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/CurrencyFormatter.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/CurrencyFormatter.as
new file mode 100644
index 0000000..208b5ff
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/CurrencyFormatter.as
@@ -0,0 +1,215 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.IBeadModel;
+ import org.apache.flex.core.IFormatBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The CurrencyFormatter class formats a value in separated groups. The formatter listens
+ * to a property on a model and when the property changes, formats it and dispatches a
+ * formatChanged event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CurrencyFormatter extends EventDispatcher implements IFormatBead
+ {
+ /**
+ * constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CurrencyFormatter()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ // Listen for the beadsAdded event which signals when all of a strand's
+ // beads have been added.
+ IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
+ }
+
+ /**
+ * @private
+ */
+ private function handleBeadsAdded(event:Event):void
+ {
+ // Listen for the change in the model
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ model.addEventListener(eventName,propertyChangeHandler);
+ model.addEventListener(propertyName+"Change",propertyChangeHandler);
+
+ // format the current value of that property
+ propertyChangeHandler(null);
+ }
+
+ private var _propertyName:String;
+ private var _eventName:String;
+ private var _formattedResult:String;
+ private var _fractionalDigits:Number = 2;
+ private var _currencySymbol:String = "$";
+
+ /**
+ * The name of the property on the model to format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get propertyName():String
+ {
+ if (_propertyName == null) {
+ return "text";
+ }
+ return _propertyName;
+ }
+ public function set propertyName(value:String):void
+ {
+ _propertyName = value;
+ }
+
+ /**
+ * The event dispatched by the model when the property changes. The
+ * default is propertyName+"Changed".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get eventName():String
+ {
+ if (_eventName == null) {
+ return _propertyName+"Changed";
+ }
+ return _eventName;
+ }
+ public function set eventName(value:String):void
+ {
+ _eventName = value;
+ }
+
+ /**
+ * Number of digits after the decimal separator
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get fractionalDigits():int
+ {
+ return _fractionalDigits;
+ }
+ public function set fractionalDigits(value:int):void
+ {
+ _fractionalDigits = value;
+ }
+
+ /**
+ * The currency symbol, such as "$"
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get currencySymbol():String
+ {
+ return _currencySymbol;
+ }
+ public function set currencySymbol(value:String):void
+ {
+ _currencySymbol = value;
+ }
+
+ /**
+ * The formatted string.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get formattedString():String
+ {
+ return _formattedResult;
+ }
+
+ /**
+ * @private
+ */
+ private function propertyChangeHandler(event:Event):void
+ {
+ // When the property changes, fetch it from the model and
+ // format it, storing the result in _formattedResult.
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ var value:Object = model[propertyName];
+ _formattedResult = format(value);
+
+ // Dispatch the formatChanged event so any bead that's interested in
+ // the formatted string knows to use it.
+ var newEvent:Event = new Event("formatChanged");
+ this.dispatchEvent(newEvent);
+ }
+
+ /**
+ * Computes the formatted string.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function format(value:Object):String
+ {
+ if (value == null) return "";
+
+ var num:Number = Number(value);
+ var source:String = num.toFixed(fractionalDigits);
+
+ return currencySymbol + source;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
new file mode 100644
index 0000000..94d7f20
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/DateFormatMMDDYYYYBead.as
@@ -0,0 +1,158 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.IDateChooserModel;
+ import org.apache.flex.core.IFormatBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IStrandWithModel;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.html.TextInput;
+ import org.apache.flex.html.beads.DateFieldView;
+
+ /**
+ * The DateFormatBead class formats the display of a DateField using MM/DD/YYYY format.
+ *
+ * @flexjsignoreimport org.apache.flex.core.IStrandWithModel
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DateFormatMMDDYYYYBead extends EventDispatcher implements IBead, IFormatBead
+ {
+ /**
+ * constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DateFormatMMDDYYYYBead()
+ {
+ }
+
+ private var _propertyName:String;
+ private var _eventName:String;
+ private var _formattedResult:String;
+
+ /**
+ * The name of the property on the model holding the value to be formatted.
+ * The default is selectedDate.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get propertyName():String
+ {
+ if (_propertyName == null) {
+ return "selectedDate";
+ }
+ return _propertyName;
+ }
+ public function set propertyName(value:String):void
+ {
+ _propertyName = value;
+ }
+
+ /**
+ * The name of the event dispatched when the property changes. The
+ * default is selectedDateChanged.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get eventName():String
+ {
+ if (_eventName == null) {
+ return _propertyName+"Changed";
+ }
+ return _eventName;
+ }
+ public function set eventName(value:String):void
+ {
+ _eventName = value;
+ }
+
+ /**
+ * The formatted result.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get formattedString():String
+ {
+ return _formattedResult;
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @flexjsignorecoercion org.apache.flex.core.IStrandWithModel
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ var model:IDateChooserModel = IStrandWithModel(_strand).model as IDateChooserModel;
+ model.addEventListener("selectedDateChanged",handleTextChange);
+ }
+
+ /**
+ * @private
+ *
+ * @flexjsignorecoercion org.apache.flex.core.IStrandWithModel
+ */
+ private function handleTextChange(event:Event):void
+ {
+ var model:IDateChooserModel = IStrandWithModel(_strand).model as IDateChooserModel;
+ /*var view:DateFieldView = _strand.getBeadByType(DateFieldView) as DateFieldView;
+ var input:TextInput = view.textInput;*/
+
+ var d:Date = model.selectedDate;
+ var month:String = String(d.getMonth()+1);
+ if (Number(month)<10) month = "0"+month;
+ var date:String = String(d.getDate());
+ if (Number(date)<10) date = "0"+date;
+ var fmt:String = month+"/"+date+"/"+String(d.getFullYear());
+ /*input.text = fmt;*/
+ _formattedResult = month+"/"+date+"/"+String(d.getFullYear());
+
+ dispatchEvent( new Event("formatChanged") );
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/NumberFormatter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/NumberFormatter.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/NumberFormatter.as
new file mode 100644
index 0000000..0d1b613
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/accessories/NumberFormatter.as
@@ -0,0 +1,210 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.IBeadModel;
+ import org.apache.flex.core.IFormatBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The NumberFormatter class formats a value in separated groups. The formatter listens
+ * to a property on a model and when the property changes, formats it and dispatches a
+ * formatChanged event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class NumberFormatter extends EventDispatcher implements IFormatBead
+ {
+ /**
+ * constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function NumberFormatter()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ // Listen for the beadsAdded event which signals when all of a strand's
+ // beads have been added.
+ IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
+ }
+
+ /**
+ * @private
+ */
+ private function handleBeadsAdded(event:Event):void
+ {
+ // Listen for the change in the model
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ model.addEventListener(eventName,propertyChangeHandler);
+ model.addEventListener(propertyName+"Change",propertyChangeHandler);
+
+ // format the current value of that property
+ propertyChangeHandler(null);
+ }
+
+ private var _propertyName:String;
+ private var _eventName:String;
+ private var _formattedResult:String;
+ private var _groupSize:Number = 3;
+ private var _thousandsSeparator:String = ",";
+
+ /**
+ * The name of the property on the model to format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get propertyName():String
+ {
+ if (_propertyName == null) {
+ return "text";
+ }
+ return _propertyName;
+ }
+ public function set propertyName(value:String):void
+ {
+ _propertyName = value;
+ }
+
+ /**
+ * The event dispatched by the model when the property changes. The
+ * default is propertyName+"Changed".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get eventName():String
+ {
+ if (_eventName == null) {
+ return _propertyName+"Changed";
+ }
+ return _eventName;
+ }
+ public function set eventName(value:String):void
+ {
+ _eventName = value;
+ }
+
+ /**
+ * Character to use to separate thousands groups. The default is
+ * the comma (,).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get thousandsSeparator():String
+ {
+ return _thousandsSeparator;
+ }
+ public function set thousandsSeparator(value:String):void
+ {
+ _thousandsSeparator = value;
+ }
+
+ /**
+ * The formatted string.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get formattedString():String
+ {
+ return _formattedResult;
+ }
+
+ /**
+ * @private
+ */
+ private function propertyChangeHandler(event:Event):void
+ {
+ // When the property changes, fetch it from the model and
+ // format it, storing the result in _formattedResult.
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ var value:Object = model[propertyName];
+ _formattedResult = format(value);
+
+ // Dispatch the formatChanged event so any bead that's interested in
+ // the formatted string knows to use it.
+ var newEvent:Event = new Event("formatChanged");
+ this.dispatchEvent(newEvent);
+ }
+
+ /**
+ * @private
+ */
+ private function format(value:Object):String
+ {
+ if (value == null) return "";
+
+ var num:Number = Number(value);
+ var source:String = String(value);
+ var parts:Array = source.split(thousandsSeparator);
+ source = parts.join("");
+
+ var l:int = source.length;
+ var result:String = "";
+ var group:int = 0;
+
+ for(var i:int=l-1; i >= 0; i--)
+ {
+ if (group == _groupSize && result.length > 0) {
+ result = thousandsSeparator + result;
+ group = 0;
+ }
+ result = source.charAt(i) + result;
+ group++;
+ }
+
+ return result;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableLabelView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableLabelView.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableLabelView.as
new file mode 100644
index 0000000..03b6ccd
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableLabelView.as
@@ -0,0 +1,90 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.IFormatBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The FormatableLabelView class is a View bead that is capable of working
+ * with a format bead to display a formatted value. When the format bead has
+ * created a formatted string, it dispatches a formatChanged event that the
+ * FormatableLabelView class intercepts and displays in the label.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class FormatableLabelView extends TextFieldView
+ {
+ /**
+ * constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function FormatableLabelView()
+ {
+ super();
+ }
+
+ private var _formatter:IFormatBead;
+
+ /**
+ * @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;
+ IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
+ }
+
+ /**
+ * @private
+ */
+ private function handleBeadsAdded(event:Event):void
+ {
+ _formatter = _strand.getBeadByType(IFormatBead) as IFormatBead;
+ _formatter.addEventListener("formatChanged",formatReadyHandler);
+
+ // process any text set in the label at this moment
+ text = _formatter.formattedString;
+ }
+
+ /**
+ * @private
+ */
+ private function formatReadyHandler(event:Event):void
+ {
+ if (_formatter) {
+ text = _formatter.formattedString;
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableTextInputView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableTextInputView.as b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableTextInputView.as
new file mode 100644
index 0000000..926253c
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/flex/org/apache/flex/html/beads/FormatableTextInputView.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.IFormatBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The FormatableTextInputView class is a View bead that extends TextInputWithBorderView
+ * and is capable of working with a format bead. When a format bead dispatches a
+ * formatChanged event, the FormatableTextInputView bead copies the formatted string to
+ * to the text field.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class FormatableTextInputView extends TextInputWithBorderView
+ {
+ /**
+ * constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function FormatableTextInputView()
+ {
+ super();
+ }
+
+ private var _formatter:IFormatBead;
+
+ /**
+ * @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;
+ IEventDispatcher(value).addEventListener("beadsAdded",handleBeadsAdded);
+ }
+
+ /**
+ * @private
+ */
+ private function handleBeadsAdded(event:Event):void
+ {
+ _formatter = _strand.getBeadByType(IFormatBead) as IFormatBead;
+ if (_formatter) {
+ _formatter.addEventListener("formatChanged",formatChangedHandler);
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function formatChangedHandler(event:Event):void
+ {
+ this.textField.text = _formatter.formattedString;
+
+ // move the cursor to the end
+ var l:int = this.textField.text.length;
+ this.textField.setSelection(l,l);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/resources/basic-manifest.xml b/frameworks/projects/Formatters/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..106df8e
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/resources/basic-manifest.xml
@@ -0,0 +1,25 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+ <component id="NumberFormatter" class="org.apache.flex.html.accessories.NumberFormatter"/>
+ <component id="CurrencyFormatter" class="org.apache.flex.html.accessories.CurrencyFormatter"/>
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..6b9466f
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
@@ -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.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-classes>
+ <class>FormattersClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/36435f3c/frameworks/projects/Formatters/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/resources/compile-config.xml b/frameworks/projects/Formatters/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..96c7e48
--- /dev/null
+++ b/frameworks/projects/Formatters/src/main/resources/compile-config.xml
@@ -0,0 +1,79 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>FormattersClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[16/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Flat
Posted by ah...@apache.org.
new folders for Flat
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/fab4c21e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/fab4c21e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/fab4c21e
Branch: refs/heads/develop
Commit: fab4c21ef4bdeba6725cbecf0cd1395f7072baa8
Parents: 252ef2c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 17:04:22 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:50 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Flat/as/defaults.css | 842 -------------------
frameworks/projects/Flat/as/src/FlatClasses.as | 44 -
.../as/src/org/apache/flex/flat/CheckBox.as | 161 ----
.../as/src/org/apache/flex/flat/DropDownList.as | 368 --------
.../as/src/org/apache/flex/flat/RadioButton.as | 245 ------
.../beads/CSSContentAndTextToggleButtonView.as | 304 -------
.../flex/flat/beads/CSSScrollBarButtonView.as | 178 ----
.../apache/flex/flat/beads/CSSScrollBarView.as | 241 ------
...CheckboxCSSContentAndTextToggleButtonView.as | 48 --
.../apache/flex/flat/beads/DropDownListView.as | 309 -------
.../RadioCSSContentAndTextToggleButtonView.as | 47 --
.../flat/supportClasses/DropDownListList.as | 64 --
.../DropDownListStringItemRenderer.as | 70 --
.../projects/Flat/compile-asjs-config.xml | 80 --
frameworks/projects/Flat/compile-config.xml | 91 --
frameworks/projects/Flat/flat-as-manifest.xml | 26 -
frameworks/projects/Flat/flat-manifest.xml | 99 ---
.../projects/Flat/src/main/flex/FlatClasses.as | 44 +
.../main/flex/org/apache/flex/flat/CheckBox.as | 161 ++++
.../flex/org/apache/flex/flat/DropDownList.as | 368 ++++++++
.../flex/org/apache/flex/flat/RadioButton.as | 245 ++++++
.../beads/CSSContentAndTextToggleButtonView.as | 304 +++++++
.../flex/flat/beads/CSSScrollBarButtonView.as | 178 ++++
.../apache/flex/flat/beads/CSSScrollBarView.as | 241 ++++++
...CheckboxCSSContentAndTextToggleButtonView.as | 48 ++
.../apache/flex/flat/beads/DropDownListView.as | 309 +++++++
.../RadioCSSContentAndTextToggleButtonView.as | 47 ++
.../flat/supportClasses/DropDownListList.as | 64 ++
.../DropDownListStringItemRenderer.as | 70 ++
.../src/main/resources/compile-asjs-config.xml | 80 ++
.../Flat/src/main/resources/compile-config.xml | 91 ++
.../Flat/src/main/resources/defaults.css | 842 +++++++++++++++++++
.../src/main/resources/flat-as-manifest.xml | 26 +
.../Flat/src/main/resources/flat-manifest.xml | 99 +++
34 files changed, 3217 insertions(+), 3217 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/defaults.css b/frameworks/projects/Flat/as/defaults.css
deleted file mode 100644
index 53a91f1..0000000
--- a/frameworks/projects/Flat/as/defaults.css
+++ /dev/null
@@ -1,842 +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.
- *
- */
-
-@namespace "library://ns.apache.org/flexjs/flat";
-
-@font-face {
- font-family: 'Flat-UI-Icons';
-
- src: url('fonts/flat-ui-icons-regular.eot');
- src: url('fonts/flat-ui-icons-regular.eot?#iefix') format('embedded-opentype'), url('fonts/flat-ui-icons-regular.woff') format('woff'), url('fonts/flat-ui-icons-regular.ttf') format('truetype'), url('fonts/flat-ui-icons-regular.svg#flat-ui-icons-regular') format('svg');
-}
-
-/* Global style declaration */
-*
-{
- font-family: "Arial";
- font-size: 12px;
- color: #34495e;
-}
-
-.flexjs *, . flexjs *:before, . flexjs *:after {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-Button
-{
- color: #fff;
- background-color: #1abc9c;
- padding: 10px 15px;
- font-size: 15px;
- font-weight: normal;
- line-height: 1.4;
- border: none;
- border-radius: 4px;
- -webkit-transition: border .25s linear, color .25s linear, background-color .25s linear;
- transition: border .25s linear, color .25s linear, background-color .25s linear;
-
- -webkit-font-smoothing: subpixel-antialiased;
-}
-
-Button:hover
-{
- border: none;
- color: #fff;
- background-color: #48c9b0;
- border-color: #48c9b0;
- padding: 10px 15px;
-}
-
-Button:active
-{
- border: none;
- padding: 10px 15px;
- outline: none;
- box-shadow: none;
-}
-
-ButtonBar
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.ButtonBarView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.ButtonBarLayout");
- IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer");
-
- border-style: none;
-}
-
-ButtonBarButtonItemRenderer
-{
- width: 80;
- height: 30;
-}
-
-.checkbox-icon,
-.checkbox-icon-hover,
-.checkbox-icon-checked
-{
- position: absolute;
- top: 0;
- left: 0;
- display: block;
- width: 20px;
- height: 20px;
- font-size: 20px;
- line-height: 20px;
- color: #bdc3c7;
- text-align: center;
- cursor: pointer;
-
- /* .radio .icon-checked:before */
- /* .radio .icon-unchecked:before */
- font-family: 'Flat-UI-Icons';
- font-style: normal;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
-
- speak: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-
- font-size: 20px;
- line-height: 20px;
-}
-
-.checkbox-icon:before
-{
- content: "\e60d";
-}
-
-.checkbox-icon-hover:before
-{
- content: "\e60e";
-}
-
-.checkbox-icon-checked:before
-{
- content: "\e60e";
-}
-
-.checkbox-icon-checked
-{
- color: #1abc9c;
-}
-
-.checkbox-input
-{
- position: absolute;
- top: 0;
- left: 0;
- width: 20px;
- height: 20px;
- padding: 0;
- margin: 0;
- outline: none !important;
- opacity: 0;
-}
-
-CheckBox
-{
- /* .checkbox */
- position: relative;
- padding-left: 32px;
- margin-bottom: 12px;
- font-size: 14px;
- line-height: 1.5;
- -webkit-transition: color .25s linear;
- transition: color .25s linear;
-}
-
-Container
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
-}
-
-ControlBar
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
-
- background-color: #CECECE;
- border-style: solid;
- border-color: #000000;
- border-width: 1px;
-}
-
-/* ASJS */
-DataGrid
-{
- IDataGridPresentationModel: ClassReference("org.apache.flex.html.beads.models.DataGridPresentationModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.DataGridView");
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataGridModel");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
-
- background-color: #FFFFFF;
- border-style: solid;
- border-color: #222222;
- border-width: 1px;
-}
-
-DateChooser {
- IBeadView: ClassReference("org.apache.flex.html.beads.DateChooserView");
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateChooserMouseController");
- width: 280px;
- height: 240px;
-}
-
-DateField {
- IBeadView: ClassReference("org.apache.flex.html.beads.DateFieldView");
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateFieldMouseController");
- IFormatBead: ClassReference("org.apache.flex.html.accessories.DateFormatMMDDYYYYBead");
-}
-
-.dropdown-menu {
- position: absolute;
- z-index: 1000;
- padding: 0;
- margin-top: 9px;
- font-size: 14px;
- background-color: #f3f4f5;
- border: none;
- border-radius: 4px;
- box-shadow: none;
- list-style: none;
- }
-.dropdown-menu-divider {
- height: 2px;
- margin: 3px 0;
- overflow: hidden;
- background-color: rgba(202, 206, 209, .5);
- }
-.dropdown-menu-item-renderer {
- padding: 3px 16px;
- line-height: 1.429;
- display: block;
- width: 100%;
- font-size: inherit;
- color: #606d7a;
- background-color: transparent;
-}
-.dropdown-menu-item-renderer-selected {
- padding: 3px 16px;
- line-height: 1.875;
- font-size: inherit;
- display: block;
- width: 100%;
- color: #fff;
- background-color: #1abc9c;
-}
-.dropdown-menu-item-renderer:hover {
- font-size: inherit;
- color: #55606c;
- background-color: rgba(202, 206, 209, .5);
-}
-
-.dropdown-toggle-open-btn {
- border-radius: 4px;
- font-size: 14px;
- color: #fff;
- background-color: #1abc9c;
- border-color: #1abc9c;
- }
-
-.dropdown-toggle-open-btn:hover {
- border-radius: 4px;
- font-size: 14px;
- color: #fff;
- background-color: #48c9b0;
- border-color: #48c9b0;
- }
-
-.dropdown-caret {
- display: inline-block;
- color: inherit;
- background-color: inherit;
- width: 0;
- height: 0;
- margin-left: 5px;
- vertical-align: middle;
- border-top: 8px solid;
- border-right: 6px solid transparent;
- border-left: 6px solid transparent;
- -webkit-transition: border-color .25s, color .25s;
- transition: border-color .25s, color .25s;
- }
-
-.dropdown-label {
- color: inherit;
- background-color: inherit;
- font: inherit;
- text-align: left;
- display: inline-block;
- }
-
-HContainer
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.HorizontalLayout");
-}
-
-ImageButton
-{
- border-style: none;
-}
-
-VContainer
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
-}
-
-List
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
- IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
- IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport");
- border-style: solid;
- border-color: #222222;
-}
-
-Panel
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.PanelView");
-
- background-color: #FFFFFF;
- border-radius: 6px;
- border-color: #1abc9c;
- border-style: solid;
- border-width: 2px;
- padding: 2px;
-}
-
-PanelWithControlBar
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.PanelModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.PanelWithControlBarView");
-
- background-color: #FFFFFF;
- border-radius: 6px;
- border-color: #1abc9c;
- border-style: solid;
- border-width: 2px;
- padding: 2px;
-}
-
-.radio-icon,
-.radio-icon-hover,
-.radio-icon-checked
-{
- position: absolute;
- top: 0;
- left: 0;
- display: block;
- width: 20px;
- height: 20px;
- font-size: 20px;
- line-height: 20px;
- color: #bdc3c7;
- text-align: center;
- cursor: pointer;
-
- /* .radio .icon-checked:before */
- /* .radio .icon-unchecked:before */
- font-family: 'Flat-UI-Icons';
- font-style: normal;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
-
- speak: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-
- font-size: 20px;
- line-height: 20px;
-}
-
-.radio-icon:before
-{
- content: "\e60b";
-}
-
-.radio-icon-hover:before
-{
- content: "\e60c";
-}
-
-.radio-icon-checked:before
-{
- content: "\e60c";
-}
-
-.radio-icon-checked
-{
- color: #1abc9c;
-}
-
-.radio-input
-{
- position: absolute;
- top: 0;
- left: 0;
- width: 20px;
- height: 20px;
- padding: 0;
- margin: 0;
- outline: none !important;
- opacity: 0;
-}
-
-RadioButton
-{
- /* .radio */
- position: relative;
- padding-left: 32px;
- margin-bottom: 12px;
- font-size: 14px;
- line-height: 1.5;
- -webkit-transition: color .25s linear;
- transition: color .25s linear;
-}
-
-SimpleList
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.ListView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VerticalLayout");
- IDataGroup: ClassReference("org.apache.flex.html.supportClasses.DataGroup");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
- IViewport: ClassReference("org.apache.flex.html.supportClasses.ScrollingViewport");
-}
-
-StringItemRenderer
-{
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
- height: 16;
-}
-
-TextArea
-{
- padding: 6px 10px;
- font-size: 13px;
- border-radius: 6px;
- border-width: 2px;
- border: 2px solid #1abc9c;
-}
-
-TextInput
-{
- background-color: #ffffff;
- height: 35px;
- padding: 6px 10px;
- font-size: 13px;
- line-height: 1.462;
- border-radius: 6px;
- border-width: 2px;
- border: 2px solid #1abc9c;
-}
-
-#titleLabel {
- color: #fff;
- font-size: 15px;
-}
-
-TitleBar
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TitleBarModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TitleBarView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
- iMeasurementBead: ClassReference("org.apache.flex.html.beads.TitleBarMeasurementBead");
- color: #fff;
- background-color: #1abc9c;
- font-size: 15px;
- border-style: none;
- border-radius: 4px;
-}
-
-ToolTip
-{
- background-color: #FFFFCC;
-}
-
-ViewBase
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ContainerView");
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.BasicLayout");
-}
-
-
-/* Global Style Declaration */
-global
-{
- IStatesImpl: ClassReference("org.apache.flex.core.SimpleStatesImpl");
- IEffectTimer: ClassReference("org.apache.flex.utils.EffectTimer");
- effectTimerInterval: 10;
-}
-
-@media -flex-flash
-{
-
-Alert
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.AlertView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
-
- background-color: #FFFFFF;
- border-style: solid;
- border-color: #000000;
- border-width: 1px;
-}
-
-Border
-{
- border-radius: inherit;
- border: inherit;
-}
-
-Button
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.CSSButtonView");
-}
-
-CheckBox
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.flat.beads.CheckboxCSSContentAndTextToggleButtonView");
-}
-
-CloseButton
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.CloseButtonView");
-}
-
-ComboBox
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ComboBoxModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.ComboBoxView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ComboBoxController");
- IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
-}
-
-Container
-{
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
-}
-
-ControlBar
-{
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.FlexibleFirstChildHorizontalLayout");
- iMeasurementBead: ClassReference("org.apache.flex.html.beads.ControlBarMeasurementBead");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
-}
-
-DropDownList
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IBeadView: ClassReference("org.apache.flex.flat.beads.DropDownListView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DropDownListController");
- IPopUp: ClassReference("org.apache.flex.flat.supportClasses.DropDownListList");
-}
-
-DropDownListList
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
- IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
- IItemRenderer: ClassReference("org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer");
- iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
- border-style: none;
- border-radius: 4px;
- border-color: #000000;
- border-width: 1px;
- background-color: #FFFFFF;
-}
-
-Image
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ImageModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.ImageView");
-}
-
-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");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextFieldView");
- iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextFieldLabelMeasurementBead");
-}
-
-List
-{
- iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
- 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");
- IBeadView: ClassReference("org.apache.flex.html.beads.NumericStepperView");
-
- padding: 0px;
- border-style: solid;
- border-color: #000000;
- border-width: 1px;
- background-color: #FFFFFF;
- iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
- iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
-}
-
-Panel
-{
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-}
-
-PanelWithControlBar
-{
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-}
-
-RadioButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.flat.beads.RadioCSSContentAndTextToggleButtonView");
-}
-
-.vscrollbar-uparrow {
- padding: 0px;
- display: inline-block;
- border-color: #16a085;
- border-radius: initial;
- background-color: transparent;
- width: 0;
- height: 0;
- margin-left: 5px;
- vertical-align: middle;
- border-bottom: 8px solid;
- border-right: 6px solid transparent;
- border-left: 6px solid transparent;
- -webkit-transition: border-color .25s, color .25s;
- transition: border-color .25s, color .25s;
- }
-.vscrollbar-downarrow-btn {
- padding: 2px;
- display: inline-block;
- border-style: none;
- border-radius: initial;
- background-color: transparent;
- width: 12;
- height: 12;
- margin-left: 5px;
- vertical-align: middle;
- }
-.vscrollbar-uparrow-btn {
- padding: 2px;
- display: inline-block;
- border-style: none;
- border-radius: initial;
- background-color: transparent;
- width: 12;
- height: 12;
- margin-left: 5px;
- vertical-align: middle;
- }
-.vscrollbar-downarrow {
- padding: 0px;
- display: inline-block;
- border-color: #16a085;
- border-radius: initial;
- background-color: transparent;
- width: 0;
- height: 0;
- margin-left: 5px;
- vertical-align: middle;
- border-top: 8px solid;
- border-right: 6px solid transparent;
- border-left: 6px solid transparent;
- -webkit-transition: border-color .25s, color .25s;
- transition: border-color .25s, color .25s;
- }
-.vscrollbar-track {
- padding: 0px;
- position: relative;
- width: 8px;
- height: 8px;
- /*margin-bottom: 20px;*/
- cursor: pointer;
- background-color: #ebedef;
- border-radius: 4px;
- /*border-radius: 32px;*/
- box-shadow: none;
- }
-.vscrollbar-thumb {
- padding: 0px;
- position: absolute;
- z-index: 2;
- width: 12px;
- height: 12px;
- cursor: pointer;
- background-color: #16a085;
- border-radius: 6px;
- -webkit-transition: background .25s;
- transition: background .25s;
- }
-.vscrollbar-thumb:hover {
- background-color: #48c9b0;
- outline: none;
- }
-.vscrollbar-thumb:active {
- background-color: #16a085;
- }
-
-VScrollBar
-{
- IBeadLayout: ClassReference("org.apache.flex.html.beads.layouts.VScrollBarLayout");
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ScrollBarModel");
- IBeadView: ClassReference("org.apache.flex.flat.beads.CSSScrollBarView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.VScrollBarMouseController");
-}
-
-SimpleAlert
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.AlertModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.SimpleAlertView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.AlertController");
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-
- background-color: #FFFFFF;
- border-style: solid;
- border-color: #000000;
- border-width: 1px;
-}
-
-Slider
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
- iBeadView: ClassReference("org.apache.flex.html.beads.SliderView");
- iBeadController: ClassReference("org.apache.flex.html.beads.controllers.SliderMouseController");
- iThumbView: ClassReference("org.apache.flex.html.beads.SliderThumbView");
- iTrackView: ClassReference("org.apache.flex.html.beads.SliderTrackView");
-}
-
-Spinner
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.SpinnerView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.SpinnerMouseController");
-}
-
-TextArea
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextAreaView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController");
- iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
- iBorderModel: ClassReference('org.apache.flex.html.beads.models.SingleLineBorderModel');
-}
-
-TextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
- iMeasurementBead: ClassReference("org.apache.flex.html.beads.TextButtonMeasurementBead");
-}
-
-TextFieldItemRenderer
-{
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
- height: 16;
-}
-
-TextInput
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextInputWithBorderView");
- IBeadController: ClassReference("org.apache.flex.html.beads.controllers.EditableTextKeyboardController");
- iBorderBead: ClassReference('org.apache.flex.html.beads.SingleLineBorderBead');
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-}
-
-TitleBar
-{
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
-}
-
-ToggleTextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextButtonView");
-}
-
-ViewBase
-{
- iBackgroundBead: ClassReference("org.apache.flex.html.beads.SolidBackgroundBead");
- iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");
-}
-
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/FlatClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/FlatClasses.as b/frameworks/projects/Flat/as/src/FlatClasses.as
deleted file mode 100644
index 29173ef..0000000
--- a/frameworks/projects/Flat/as/src/FlatClasses.as
+++ /dev/null
@@ -1,44 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class FlatClasses
-{
- COMPILE::AS3
- {
- import org.apache.flex.flat.beads.CSSScrollBarView; CSSScrollBarView;
- import org.apache.flex.flat.beads.CSSScrollBarButtonView; CSSScrollBarButtonView;
- import org.apache.flex.flat.supportClasses.DropDownListStringItemRenderer; DropDownListStringItemRenderer;
- import org.apache.flex.flat.supportClasses.DropDownListList; DropDownListList;
- import org.apache.flex.flat.beads.DropDownListView; DropDownListView;
- import org.apache.flex.flat.beads.CheckboxCSSContentAndTextToggleButtonView; CheckboxCSSContentAndTextToggleButtonView;
- import org.apache.flex.flat.beads.RadioCSSContentAndTextToggleButtonView; RadioCSSContentAndTextToggleButtonView;
-
- }
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/CheckBox.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/CheckBox.as
deleted file mode 100644
index 466e9b2..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/CheckBox.as
+++ /dev/null
@@ -1,161 +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.flat
-{
- COMPILE::AS3
- {
- import org.apache.flex.html.CheckBox;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.UIBase;
- import org.apache.flex.core.WrappedHTMLElement;
- import org.apache.flex.events.Event;
- }
-
- /**
- * The CheckBox class provides a FlatUI-like appearance for
- * a CheckBox.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class CheckBox extends org.apache.flex.html.CheckBox
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CheckBox()
- {
- super();
- }
- }
-
- COMPILE::JS
- public class CheckBox extends UIBase
- {
-
- private var input:HTMLInputElement;
- private var checkbox:HTMLSpanElement;
- private var label:HTMLLabelElement;
- private var textNode:Text;
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion HTMLLabelElement
- * @flexjsignorecoercion HTMLInputElement
- * @flexjsignorecoercion HTMLSpanElement
- * @flexjsignorecoercion Text
- */
- override protected function createElement():WrappedHTMLElement
- {
- label = document.createElement('label') as HTMLLabelElement;
- element = label as WrappedHTMLElement;
-
- input = document.createElement('input') as HTMLInputElement;
- input.type = 'checkbox';
- input.className = 'checkbox-input';
- input.addEventListener('change', selectionChangeHandler, false);
- label.appendChild(input);
-
- checkbox = document.createElement('span') as HTMLSpanElement;
- checkbox.className = 'checkbox-icon';
- checkbox.addEventListener('mouseover', mouseOverHandler, false);
- checkbox.addEventListener('mouseout', mouseOutHandler, false);
- label.appendChild(checkbox);
-
- textNode = document.createTextNode('') as Text;
- label.appendChild(textNode);
- label.className = 'CheckBox';
- typeNames = 'CheckBox';
-
- positioner = element;
- positioner.style.position = 'relative';
- (input as WrappedHTMLElement).flexjs_wrapper = this;
- (checkbox as WrappedHTMLElement).flexjs_wrapper = this;
- element.flexjs_wrapper = this;
-
- return element;
- };
-
-
- /**
- */
- private function mouseOverHandler(event:Event):void
- {
- checkbox.className = 'checkbox-icon-hover';
- }
-
- /**
- */
- private function mouseOutHandler(event:Event):void
- {
- if (input.checked)
- checkbox.className = 'checkbox-icon-checked';
- else
- checkbox.className = 'checkbox-icon';
- }
-
-
- /**
- */
- private function selectionChangeHandler(event:Event):void
- {
- if (input.checked)
- checkbox.className = 'checkbox-icon-checked';
- else
- checkbox.className = 'checkbox-icon';
- }
-
-
- public function get text():String
- {
- return textNode.nodeValue;
- }
-
- public function set text(value:String):void
- {
- textNode.nodeValue = value;
- }
-
- public function get selected():Boolean
- {
- return input.checked;
- }
-
- public function set selected(value:Boolean):void
- {
- input.checked = value;
- if (value)
- checkbox.className = 'checkbox-icon-checked';
- else
- checkbox.className = 'checkbox-icon';
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/DropDownList.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/DropDownList.as
deleted file mode 100644
index 265f2c7..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/DropDownList.as
+++ /dev/null
@@ -1,368 +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.flat
-{
- import org.apache.flex.core.UIBase;
-
- COMPILE::AS3
- {
- import org.apache.flex.html.DropDownList;
- }
- COMPILE::JS
- {
- import goog.events;
- import org.apache.flex.core.ListBase;
- import org.apache.flex.core.WrappedHTMLElement;
- import org.apache.flex.core.ISelectionModel;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.beads.models.ArraySelectionModel;
- import org.apache.flex.utils.CSSUtils;
- }
-
- /**
- * The DropDownList class provides a FlatUI-like appearance for
- * a DropDownList.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class DropDownList extends org.apache.flex.html.DropDownList
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropDownList()
- {
- super();
- }
- }
-
- COMPILE::JS
- public class DropDownList extends ListBase
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DropDownList()
- {
- super();
- model = new ArraySelectionModel();
- }
-
- private var label:HTMLSpanElement;
- private var button:HTMLButtonElement;
- private var caret:HTMLSpanElement;
- private var menu:HTMLUListElement;
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion HTMLButtonElement
- * @flexjsignorecoercion HTMLDivElement
- * @flexjsignorecoercion HTMLSpanElement
- */
- override protected function createElement():WrappedHTMLElement
- {
- var button:HTMLButtonElement;
- var outer:HTMLDivElement;
- var caret:HTMLSpanElement;
-
- this.element = document.createElement('div') as WrappedHTMLElement;
- outer = this.element as HTMLDivElement;
-
- this.button = button = document.createElement('button') as HTMLButtonElement;
- button.className = 'dropdown-toggle-open-btn';
- if (this.className)
- button.className += ' ' + this.className;
- goog.events.listen(button, 'click', buttonClicked);
- outer.appendChild(button);
-
- this.label = document.createElement('span') as HTMLSpanElement;
- this.label.className = 'dropdown-label';
- button.appendChild(this.label);
- this.caret = caret = document.createElement('span') as HTMLSpanElement;
- button.appendChild(caret);
- caret.className = 'dropdown-caret';
-
- this.positioner = this.element;
- this.positioner.style.position = 'relative';
-
- // add a click handler so that a click outside of the combo box can
- // dismiss the pop-up should it be visible.
- goog.events.listen(document, 'click', dismissPopup);
-
- (button as WrappedHTMLElement).flexjs_wrapper = this;
- this.element.flexjs_wrapper = this;
- (this.label as WrappedHTMLElement).flexjs_wrapper = this;
- (caret as WrappedHTMLElement).flexjs_wrapper = this;
-
- return this.element;
- }
-
-
- /**
- * @param event The event.
- * @flexjsignorecoercion org.apache.flex.core.UIBase
- */
- private function selectChanged(event:Event):void
- {
- var select:UIBase;
-
- select = event.target as UIBase;
-
- this.selectedIndex = parseInt(select.id, 10);
-
- this.menu.parentNode.removeChild(this.menu);
- this.menu = null;
-
- this.dispatchEvent('change');
- }
-
-
- /**
- * @param event The event.
- */
- private function dismissPopup(event:Event = null):void
- {
- // remove the popup if it already exists
- if (this.menu)
- {
- this.menu.parentNode.removeChild(this.menu);
- this.menu = null;
- }
- }
-
-
- /**
- * @param event The event.
- * @flexjsignorecoercion Array
- * @flexjsignorecoercion HTMLButtonElement
- * @flexjsignorecoercion HTMLUListElement
- * @flexjsignorecoercion HTMLLIElement
- * @flexjsignorecoercion HTMLAnchorElement
- */
- private function buttonClicked(event:Event):void
- {
- var dp:Array;
- var i:int;
- var button:HTMLButtonElement;
- var left:Number;
- var n:int;
- var opt:HTMLLIElement;
- var opts:Array;
- var pn:HTMLDivElement;
- var select:HTMLUListElement;
- var top:Number;
- var width:Number;
-
- event.stopPropagation();
-
- if (this.menu)
- {
- this.dismissPopup();
- return;
- }
-
- button = this.element.childNodes.item(0) as HTMLButtonElement;
-
- pn = this.element as HTMLDivElement;
- top = pn.offsetTop + button.offsetHeight;
- left = pn.offsetLeft;
- width = pn.offsetWidth;
-
- this.menu = select = document.createElement('ul') as HTMLUListElement;
- var el:Element = element as Element;
- var cv:Object = getComputedStyle(el);
- select.style.width = cv.width;
- goog.events.listen(select, 'click', selectChanged);
- select.className = 'dropdown-menu';
-
- var lf:String = this.labelField;
- dp = dataProvider as Array;
- n = dp.length;
- for (i = 0; i < n; i++) {
- opt = document.createElement('li') as HTMLLIElement;
- opt.style.backgroundColor = 'transparent';
- var ir:HTMLAnchorElement = document.createElement('a') as HTMLAnchorElement;
- if (lf)
- ir.innerHTML = dp[i][lf];
- else
- ir.innerHTML = dp[i];
- ir.id = i.toString();
- if (i == this.selectedIndex)
- ir.className = 'dropdown-menu-item-renderer-selected';
- else
- ir.className = 'dropdown-menu-item-renderer';
- opt.appendChild(ir);
- select.appendChild(opt);
- }
-
- this.element.appendChild(select);
- };
-
-
- /**
- */
- override public function addedToParent():void
- {
- super.addedToParent();
- var el:Element = button as Element;
- var cv:Object = getComputedStyle(el);
- var s:String = cv.paddingLeft;
- var pl:Number = CSSUtils.toNumber(s);
- s = cv.paddingRight;
- var pr:Number = CSSUtils.toNumber(s);
- s = cv.borderLeftWidth;
- var bl:Number = CSSUtils.toNumber(s);
- s = cv.borderRightWidth;
- var br:Number = CSSUtils.toNumber(s);
- var caretWidth:Number = this.caret.offsetWidth;
- // 10 seems to factor spacing between span and extra FF padding?
- var fluff:Number = pl + pr + bl + br + caretWidth + 1 + 10;
- var labelWidth:Number = this.width - fluff;
- var strWidth:String = labelWidth.toString();
- strWidth += 'px';
- this.label.style.width = strWidth;
- }
-
- override public function set className(value:String):void
- {
- super.className = value;
- if (this.button) {
- this.button.className = this.typeNames ?
- value + ' ' + 'dropdown-toggle-open-btn' + ' ' + this.typeNames :
- value + ' ' + 'dropdown-toggle-open-btn';
- }
- }
-
- /**
- * The data set to be displayed. Usually a simple
- * array of strings. A more complex component
- * would allow more complex data and data sets.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get dataProvider():Object
- {
- return ISelectionModel(model).dataProvider;
- }
-
- /**
- * @private
- * @flexjsignorecoercion HTMLOptionElement
- * @flexjsignorecoercion HTMLSelectElement
- */
- public function set dataProvider(value:Object):void
- {
- ISelectionModel(model).dataProvider = value;
- }
-
- /**
- * The name of field within the data used for display. Each item of the
- * data should have a property with this name.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get labelField():String
- {
- return ISelectionModel(model).labelField;
- }
- public function set labelField(value:String):void
- {
- ISelectionModel(model).labelField = value;
- }
-
- [Bindable("change")]
- /**
- * @copy org.apache.flex.core.ISelectionModel#selectedIndex
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedIndex():int
- {
- return ISelectionModel(model).selectedIndex;
- }
-
- /**
- * @private
- * @flexjsignorecoercion HTMLSelectElement
- * @flexjsignorecoercion String
- */
- public function set selectedIndex(value:int):void
- {
- ISelectionModel(model).selectedIndex = value;
- var lf:String = this.labelField;
- if (lf)
- this.label.innerHTML = this.selectedItem[lf] as String;
- else
- this.label.innerHTML = this.selectedItem as String;
- }
-
-
- [Bindable("change")]
- /**
- * @copy org.apache.flex.core.ISelectionModel#selectedItem
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selectedItem():Object
- {
- return ISelectionModel(model).selectedItem;
- }
-
- /**
- * @private
- * @flexjsignorecoercion HTMLSelectElement
- * @flexjsignorecoercion String
- */
- public function set selectedItem(value:Object):void
- {
- ISelectionModel(model).selectedItem = value;
- var lf:String = this.labelField;
- if (lf)
- this.label.innerHTML = this.selectedItem[lf] as String;
- else
- this.label.innerHTML = this.selectedItem as String;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/RadioButton.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/RadioButton.as
deleted file mode 100644
index 1294a25..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/RadioButton.as
+++ /dev/null
@@ -1,245 +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.flat
-{
- COMPILE::AS3
- {
- import org.apache.flex.html.RadioButton;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.UIBase;
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- /**
- * The RadioButton class provides a FlatUI-like appearance for
- * a RadioButton.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class RadioButton extends org.apache.flex.html.RadioButton
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function RadioButton()
- {
- super();
- }
- }
-
- COMPILE::JS
- public class RadioButton extends UIBase
- {
- /**
- * Provides unique name
- */
- public static var radioCounter:int = 0;
-
- private var input:HTMLInputElement;
- private var radio:HTMLSpanElement;
- private var textNode:Text;
- private var labelFor:HTMLLabelElement;
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion HTMLInputElement
- * @flexjsignorecoercion HTMLSpanElement
- * @flexjsignorecoercion HTMLLabelElement
- */
- override protected function createElement():WrappedHTMLElement
- {
- // hide this eleement
- input = document.createElement('input') as HTMLInputElement;
- input.type = 'radio';
- input.className = 'radio-input';
- input.id = '_radio_' + radioCounter++;
- input.addEventListener('change', selectionChangeHandler, false);
-
- radio = document.createElement('span') as HTMLSpanElement;
- radio.className = 'radio-icon';
- radio.addEventListener('mouseover', mouseOverHandler, false);
- radio.addEventListener('mouseout', mouseOutHandler, false);
-
- textNode = document.createTextNode('radio button') as Text;
-
- labelFor = document.createElement('label') as HTMLLabelElement;
- labelFor.appendChild(input);
- labelFor.appendChild(radio);
- labelFor.appendChild(textNode);
- labelFor.style.position = 'relative';
-
- element = labelFor as WrappedHTMLElement;
- element.className = 'RadioButton';
- typeNames = 'RadioButton';
-
- positioner = element;
- positioner.style.position = 'relative';
- (input as WrappedHTMLElement).flexjs_wrapper = this;
- (radio as WrappedHTMLElement).flexjs_wrapper = this;
- element.flexjs_wrapper = this;
- (textNode as WrappedHTMLElement).flexjs_wrapper = this;
-
- return element;
- }
-
-
- /**
- * @param e The event object.
- */
- private function mouseOverHandler(e:Event):void
- {
- radio.className = 'radio-icon-hover';
- }
-
-
- /**
- * @param e The event object.
- */
- private function mouseOutHandler(e:Event):void
- {
- if (input.checked)
- radio.className = 'radio-icon-checked';
- else
- radio.className = 'radio-icon';
- }
-
-
- /**
- * @param e The event object.
- */
- private function selectionChangeHandler(e:Event):void
- {
- // this should reset the icons in the non-selected radio
- selectedValue = value;
- }
-
-
- override public function set id(value:String):void
- {
- super.id = value;
- labelFor.id = value;
- input.id = value;
- }
-
- /**
- * @flexjsignorecoercion String
- */
- public function get groupName():String
- {
- return input.name as String;
- }
-
- public function set groupName(value:String):void
- {
- input.name = value;
- }
-
- public function get text():String
- {
- return textNode.nodeValue;
- }
-
- public function set text(value:String):void
- {
- textNode.nodeValue = value;
- }
-
- public function get selected():Boolean
- {
- return input.checked;
- }
-
- public function set selected(value:Boolean):void
- {
- input.checked = value;
- if (input.checked)
- radio.className = 'radio-icon-checked';
- else
- radio.className = 'radio-icon';
- }
-
- public function get value():String
- {
- return input.value;
- }
-
- public function set value(value:String):void
- {
- input.value = value;
- }
-
- /**
- * @flexjsignorecoercion Array
- * @flexjsignorecoercion String
- */
- public function get selectedValue():Object
- {
- var buttons:Array;
- var groupName:String;
- var i:int;
- var n:int;
-
- groupName = input.name as String;
- buttons = document.getElementsByName(groupName) as Array;
- n = buttons.length;
-
- for (i = 0; i < n; i++) {
- if (buttons[i].checked) {
- return buttons[i].value;
- }
- }
- return null;
- }
-
- /**
- * @flexjsignorecoercion Array
- * @flexjsignorecoercion String
- */
- public function set selectedValue(value:Object):void
- {
- var buttons:Array;
- var groupName:String;
- var i:int;
- var n:int;
-
- groupName = input.name as String;
- buttons = document.getElementsByName(groupName) as Array;
- n = buttons.length;
- for (i = 0; i < n; i++) {
- if (buttons[i].value === value) {
- buttons[i].checked = true;
- buttons[i].flexjs_wrapper.selected = true;
- }
- else
- buttons[i].flexjs_wrapper.selected = false;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
deleted file mode 100644
index aa3e8b5..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSContentAndTextToggleButtonView.as
+++ /dev/null
@@ -1,304 +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.flat.beads
-{
- import flash.display.Shape;
- import flash.display.SimpleButton;
- import flash.display.Sprite;
- import flash.text.TextFieldAutoSize;
- import flash.text.TextFieldType;
-
- import org.apache.flex.core.BeadViewBase;
- import org.apache.flex.core.CSSTextField;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IToggleButtonModel;
- import org.apache.flex.core.StyleableCSSTextField;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.CSSUtils;
-
- /**
- * The CSSContentAndTextToggleButtonView class is the default view for
- * the org.apache.flex.flat.CheckBox and RadioButton classes.
- * It supports CSS content property for the
- * icon.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CSSContentAndTextToggleButtonView extends BeadViewBase implements IBeadView
- {
- /**
- * map of classname suffixes.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- private static var suffixMap:Object = {
- "upSprite": "",
- "downSprite": "-checked",
- "overSprite": "-hover",
- "upAndSelectedSprite": "-checked",
- "downAndSelectedSprite": "-checked",
- "overAndSelectedSprite": "-checked"
- }
-
- /**
- * className to use for styling.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- protected var className:String;
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSContentAndTextToggleButtonView()
- {
- }
-
- private var upSprite:Sprite;
- private var downSprite:Sprite;
- private var overSprite:Sprite;
- private var upAndSelectedSprite:Sprite;
- private var downAndSelectedSprite:Sprite;
- private var overAndSelectedSprite:Sprite;
-
- private var sprites:Array = [];
-
- private var _toggleButtonModel:IToggleButtonModel;
-
- // TODO: Can we remove this?
- private function get toggleButtonModel() : IToggleButtonModel
- {
- return _toggleButtonModel;
- }
-
- /**
- * @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;
-
- for (var p:String in suffixMap)
- {
- var s:Sprite = new Sprite();
- sprites.push(s);
- this[p] = s;
-
- var tf:CSSTextField = new CSSTextField();
- tf.type = TextFieldType.DYNAMIC;
- tf.autoSize = TextFieldAutoSize.LEFT;
- tf.name = "textField";
- tf.parentHandlesPadding = true;
- var icon:StyleableCSSTextField = new StyleableCSSTextField();
- icon.name = "icon";
- icon.className = className + suffixMap[p];
- s.addChild(icon);
- s.addChild(tf);
- }
-
- _toggleButtonModel = value.getBeadByType(IToggleButtonModel) as IToggleButtonModel;
- _toggleButtonModel.addEventListener("textChange", textChangeHandler);
- _toggleButtonModel.addEventListener("htmlChange", htmlChangeHandler);
- _toggleButtonModel.addEventListener("selectedChange", selectedChangeHandler);
- if (_toggleButtonModel.text !== null)
- text = _toggleButtonModel.text;
-
- layoutControl();
-
- var hitArea:Shape = new Shape();
- hitArea.graphics.beginFill(0x000000);
- hitArea.graphics.drawRect(0,0,upSprite.width, upSprite.height);
- hitArea.graphics.endFill();
-
- SimpleButton(value).upState = upSprite;
- SimpleButton(value).downState = downSprite;
- SimpleButton(value).overState = overSprite;
- SimpleButton(value).hitTestState = hitArea;
-
- if (toggleButtonModel.text !== null)
- text = toggleButtonModel.text;
- if (toggleButtonModel.html !== null)
- html = toggleButtonModel.html;
- }
-
- /**
- * @copy org.apache.flex.html.Label#text
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get text():String
- {
- var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
- return tf.text;
- }
-
- /**
- * @private
- */
- public function set text(value:String):void
- {
- for each( var s:Sprite in sprites )
- {
- var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
- tf.styleParent = _strand;
- tf.text = value;
- }
-
- layoutControl();
- }
-
- /**
- * @copy org.apache.flex.html.Label#html
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get html():String
- {
- var tf:CSSTextField = upSprite.getChildByName('textField') as CSSTextField;
- return tf.htmlText;
- }
-
- /**
- * @private
- */
- public function set html(value:String):void
- {
- for each(var s:Sprite in sprites)
- {
- var tf:CSSTextField = s.getChildByName('textField') as CSSTextField;
- tf.htmlText = value;
- }
-
- layoutControl();
- }
-
- private function textChangeHandler(event:Event):void
- {
- text = toggleButtonModel.text;
- }
-
- private function htmlChangeHandler(event:Event):void
- {
- html = toggleButtonModel.html;
- }
-
- private var _selected:Boolean;
-
- /**
- * @copy org.apache.flex.core.IToggleButtonModel#selected
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get selected():Boolean
- {
- return _selected;
- }
-
- /**
- * @private
- */
- public function set selected(value:Boolean):void
- {
- _selected = value;
-
- layoutControl();
-
- if( value ) {
- SimpleButton(_strand).upState = upAndSelectedSprite;
- SimpleButton(_strand).downState = downAndSelectedSprite;
- SimpleButton(_strand).overState = overAndSelectedSprite;
-
- } else {
- SimpleButton(_strand).upState = upSprite;
- SimpleButton(_strand).downState = downSprite;
- SimpleButton(_strand).overState = overSprite;
- }
- }
-
- private function selectedChangeHandler(event:Event):void
- {
- selected = toggleButtonModel.selected;
- }
-
- /**
- * Display the icon and text label
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- protected function layoutControl() : void
- {
- // TODO: Layout using descendant selectors (.checkbox .icons)
- for (var p:String in suffixMap)
- {
- var s:Sprite = this[p];
- var icon:StyleableCSSTextField = s.getChildByName("icon") as StyleableCSSTextField;
- icon.autoSize = TextFieldAutoSize.LEFT;
- var tf:CSSTextField = s.getChildByName("textField") as CSSTextField;
-
- icon.CSSParent = _strand;
- var content:String = ValuesManager.valuesImpl.getValue(icon, "content", "before");
- if (content != null)
- icon.text = content;
- var mh:Number = Math.max(icon.height,tf.height);
-
- var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding");
- var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand,"padding-left");
- icon.x = 0;
- icon.y = (mh - icon.height)/2;
-
- tf.x = CSSUtils.getLeftValue(paddingLeft, padding, s.width);
- tf.y = (mh - tf.height)/2;
- }
-
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarButtonView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
deleted file mode 100644
index 09669c4..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarButtonView.as
+++ /dev/null
@@ -1,178 +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.flat.beads
-{
- import flash.display.DisplayObject;
- import flash.display.Loader;
- import flash.display.Shape;
- import flash.display.SimpleButton;
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.net.URLRequest;
-
- import org.apache.flex.core.BeadViewBase;
- import org.apache.flex.core.CSSShape;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.ITextModel;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.utils.CSSBorderUtils;
- import org.apache.flex.utils.CSSUtils;
- import org.apache.flex.utils.StringTrimmer;
-
- /**
- * The CSSScrollBarButtonView class is the default view for
- * the buttons in a org.apache.flex.html.ScrollBar class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CSSScrollBarButtonView extends BeadViewBase implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSScrollBarButtonView()
- {
- upSprite = new Sprite();
- downSprite = new Sprite();
- overSprite = new Sprite();
- upArrowShape = new CSSShape();
- downArrowShape = new CSSShape();
- overArrowShape = new CSSShape();
- overArrowShape.state = "hover";
- upSprite.addChild(upArrowShape);
- downSprite.addChild(downArrowShape);
- overSprite.addChild(overArrowShape);
- }
-
- private var textModel:ITextModel;
-
- private var shape:Shape;
-
- /**
- * @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;
- shape = new Shape();
- shape.graphics.beginFill(0xCCCCCC);
- shape.graphics.drawRect(0, 0, 10, 10);
- shape.graphics.endFill();
- SimpleButton(value).upState = upSprite;
- SimpleButton(value).downState = downSprite;
- SimpleButton(value).overState = overSprite;
- SimpleButton(value).hitTestState = shape;
-
- setupBackground(overSprite, overArrowShape, "hover");
- setupBackground(downSprite, downArrowShape, "active");
- setupBackground(upSprite, upArrowShape);
-
- IEventDispatcher(_strand).addEventListener("widthChanged",sizeChangeHandler);
- IEventDispatcher(_strand).addEventListener("heightChanged",sizeChangeHandler);
- }
-
- private function sizeChangeHandler(event:org.apache.flex.events.Event):void
- {
- setupSkins();
- }
-
- protected function setupSkins():void
- {
- setupSkin(overSprite, overArrowShape, "hover");
- setupSkin(downSprite, downArrowShape, "active");
- setupSkin(upSprite, upArrowShape);
- updateHitArea();
- }
-
- private function setupSkin(sprite:Sprite, shape:CSSShape, state:String = null):void
- {
- var padding:Object = ValuesManager.valuesImpl.getValue(_strand, "padding", state);
- var paddingLeft:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-left", state);
- var paddingRight:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-right", state);
- var paddingTop:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-top", state);
- var paddingBottom:Object = ValuesManager.valuesImpl.getValue(_strand, "padding-bottom", state);
- var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, DisplayObject(_strand).width);
- var pr:Number = CSSUtils.getRightValue(paddingRight, padding, DisplayObject(_strand).width);
- var pt:Number = CSSUtils.getTopValue(paddingTop, padding, DisplayObject(_strand).height);
- var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, DisplayObject(_strand).height);
-
- var w:Object = ValuesManager.valuesImpl.getValue(shape, "width", state);
- var h:Object = ValuesManager.valuesImpl.getValue(shape, "height", state);
- shape.draw(Number(w), Number(h));
-
- CSSBorderUtils.draw(sprite.graphics,
- shape.width + pl + pr,
- shape.height + pt + pb,
- _strand as DisplayObject,
- state, true);
- }
-
- private function setupBackground(sprite:Sprite, shape:CSSShape, state:String = null):void
- {
- var backgroundImage:Object = ValuesManager.valuesImpl.getValue(_strand, "background-image", state);
- if (backgroundImage)
- {
- var loader:Loader = new Loader();
- sprite.addChildAt(loader, 0);
- var url:String = backgroundImage as String;
- loader.load(new URLRequest(url));
- loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, function (e:flash.events.Event):void {
- setupSkin(sprite, shape, state);
- updateHitArea();
- });
- }
- else {
- setupSkin(sprite, shape, state);
- updateHitArea();
- }
- }
-
- private var upSprite:Sprite;
- private var downSprite:Sprite;
- private var overSprite:Sprite;
- public var upArrowShape:CSSShape;
- public var downArrowShape:CSSShape;
- public var overArrowShape:CSSShape;
-
- private function updateHitArea():void
- {
- shape.graphics.clear();
- shape.graphics.beginFill(0xCCCCCC);
- shape.graphics.drawRect(0, 0, upSprite.width, upSprite.height);
- shape.graphics.endFill();
-
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarView.as
deleted file mode 100644
index 38583f6..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CSSScrollBarView.as
+++ /dev/null
@@ -1,241 +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.flat.beads
-{
- import flash.display.DisplayObject;
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IBeadLayout;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IScrollBarModel;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.Strand;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.Event;
- import org.apache.flex.html.Button;
- import org.apache.flex.html.beads.controllers.ButtonAutoRepeatController;
- import org.apache.flex.html.beads.IScrollBarView;
-
- /**
- * The ScrollBarView class is the default view for
- * the org.apache.flex.html.supportClasses.ScrollBar class.
- * It implements the classic desktop-like ScrollBar.
- * A different view would implement more modern scrollbars that hide themselves
- * until hovered over with the mouse.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CSSScrollBarView extends Strand implements IBeadView, IStrand, IScrollBarView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSScrollBarView()
- {
- }
-
- private var sbModel:IScrollBarModel;
-
- private var _strand:IStrand;
-
- /**
- * The layout.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- private var layout:IBeadLayout;
-
- /**
- * The host component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get host():IUIBase
- {
- return _strand as IUIBase;
- }
-
- /**
- * @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;
-
- for each (var bead:IBead in beads)
- addBead(bead);
-
- sbModel = value.getBeadByType(IScrollBarModel) as IScrollBarModel;
- sbModel = _strand.getBeadByType(IScrollBarModel) as IScrollBarModel;
- sbModel.addEventListener("maximumChange", changeHandler);
- sbModel.addEventListener("minimumChange", changeHandler);
- sbModel.addEventListener("snapIntervalChange", changeHandler);
- sbModel.addEventListener("stepSizeChange", changeHandler);
- sbModel.addEventListener("pageSizeChange", changeHandler);
- sbModel.addEventListener("valueChange", changeHandler);
-
- // TODO: (aharui) put in values impl
- _increment = new Button();
- Button(_increment).className = "vscrollbar-downarrow-btn";
- var sbView:CSSScrollBarButtonView = new CSSScrollBarButtonView();
- sbView.upArrowShape.className = "vscrollbar-downarrow";
- sbView.downArrowShape.className = "vscrollbar-downarrow";
- sbView.overArrowShape.className = "vscrollbar-downarrow";
- Button(_increment).addBead(sbView);
- Button(_increment).addBead(new ButtonAutoRepeatController());
- _decrement = new Button();
- Button(_decrement).className = "vscrollbar-uparrow-btn";
- sbView = new CSSScrollBarButtonView();
- sbView.upArrowShape.className = "vscrollbar-uparrow";
- sbView.downArrowShape.className = "vscrollbar-uparrow";
- sbView.overArrowShape.className = "vscrollbar-uparrow";
- Button(_decrement).addBead(sbView);
- Button(_decrement).addBead(new ButtonAutoRepeatController());
- _track = new Button();
- Button(_track).className = "vscrollbar-track";
- _thumb = new Button();
- Button(_thumb).className = "vscrollbar-thumb";
-
- UIBase(value).addElement(_decrement);
- UIBase(value).addElement(_increment);
- UIBase(value).addElement(_track);
- UIBase(value).addElement(_thumb);
-
- IEventDispatcher(_strand).addEventListener("heightChanged", changeHandler);
-
- if( _strand.getBeadByType(IBeadLayout) == null ) {
- layout = new (ValuesManager.valuesImpl.getValue(_strand, "iBeadLayout")) as IBeadLayout;
- _strand.addBead(layout);
- }
- layout.layout();
- }
-
- private function changeHandler(event:Event):void
- {
- layout.layout();
- }
-
- private var _decrement:DisplayObject;
- private var _increment:DisplayObject;
- private var _track:DisplayObject;
- private var _thumb:DisplayObject;
-
- /**
- * @copy org.apache.flex.html.beads.IScrollBarView#decrement
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get decrement():DisplayObject
- {
- return _decrement;
- }
-
- /**
- * @copy org.apache.flex.html.beads.IScrollBarView#increment
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get increment():DisplayObject
- {
- return _increment;
- }
-
- /**
- * @copy org.apache.flex.html.beads.IScrollBarView#track
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get track():DisplayObject
- {
- return _track;
- }
-
- /**
- * @copy org.apache.flex.html.beads.IScrollBarView#thumb
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get thumb():DisplayObject
- {
- return _thumb;
- }
-
- /**
- * @copy org.apache.flex.core.IBeadView#viewHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get viewHeight():Number
- {
- // don't want to put $height in an interface
- return _strand["$height"];
- }
-
- /**
- * @copy org.apache.flex.core.IBeadView#viewWidth
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get viewWidth():Number
- {
- // don't want to put $width in an interface
- return _strand["$width"];
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fab4c21e/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as b/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
deleted file mode 100644
index e52076f..0000000
--- a/frameworks/projects/Flat/as/src/org/apache/flex/flat/beads/CheckboxCSSContentAndTextToggleButtonView.as
+++ /dev/null
@@ -1,48 +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.flat.beads
-{
-
- /**
- * The CheckboxCSSContentAndTextToggleButtonView class is the default view for
- * the org.apache.flex.flat.Checkbox class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CheckboxCSSContentAndTextToggleButtonView extends CSSContentAndTextToggleButtonView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CheckboxCSSContentAndTextToggleButtonView()
- {
- super();
-
- className = "checkbox-icon";
- }
- }
-}
[42/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Network
Posted by ah...@apache.org.
new folders for Network
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/c4705283
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/c4705283
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/c4705283
Branch: refs/heads/develop
Commit: c4705283a086cfe9d1fc4a012d7a2002a6eb9f4b
Parents: 2413ead
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:44:51 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
.../projects/Network/as/src/NetworkClasses.as | 33 -
.../src/org/apache/flex/net/BinaryUploader.as | 738 -----------------
.../as/src/org/apache/flex/net/HTTPHeader.as | 79 --
.../as/src/org/apache/flex/net/HTTPService.as | 805 -------------------
.../src/org/apache/flex/net/HTTPServiceBase.as | 47 --
frameworks/projects/Network/basic-manifest.xml | 27 -
.../projects/Network/compile-asjs-config.xml | 82 --
frameworks/projects/Network/compile-config.xml | 78 --
.../Network/src/main/flex/NetworkClasses.as | 33 +
.../flex/org/apache/flex/net/BinaryUploader.as | 738 +++++++++++++++++
.../main/flex/org/apache/flex/net/HTTPHeader.as | 79 ++
.../flex/org/apache/flex/net/HTTPService.as | 805 +++++++++++++++++++
.../flex/org/apache/flex/net/HTTPServiceBase.as | 47 ++
.../src/main/resources/basic-manifest.xml | 27 +
.../src/main/resources/compile-asjs-config.xml | 82 ++
.../src/main/resources/compile-config.xml | 78 ++
16 files changed, 1889 insertions(+), 1889 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/as/src/NetworkClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/as/src/NetworkClasses.as b/frameworks/projects/Network/as/src/NetworkClasses.as
deleted file mode 100644
index cf88050..0000000
--- a/frameworks/projects/Network/as/src/NetworkClasses.as
+++ /dev/null
@@ -1,33 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class NetworkClasses
-{
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/as/src/org/apache/flex/net/BinaryUploader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/as/src/org/apache/flex/net/BinaryUploader.as b/frameworks/projects/Network/as/src/org/apache/flex/net/BinaryUploader.as
deleted file mode 100644
index 3f9f697..0000000
--- a/frameworks/projects/Network/as/src/org/apache/flex/net/BinaryUploader.as
+++ /dev/null
@@ -1,738 +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.net
-{
- COMPILE::AS3
- {
- import flash.events.HTTPStatusEvent;
- import flash.events.IOErrorEvent;
- import flash.net.URLLoader;
- import flash.net.URLRequest;
- import flash.net.URLRequestHeader;
- import flash.net.URLRequestMethod;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.utils.BinaryData;
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched when the upload is complete.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="complete", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched if an error occurs in the upload.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="ioError", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched when an httpStatus code is received from the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="httpStatus", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched if Adobe AIR is able to detect and return the status
- * code for the request. Unlike the httpStatus event, the httpResponseStatus
- * event is delivered before any response data. Also, the httpResponseStatus
- * event includes values for the responseHeaders and responseURL properties
- * (which are undefined for an httpStatus event. Note that the
- * httpResponseStatus event (if any) will be sent before
- * (and in addition to) any complete or error event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="httpResponseStatus", type="org.apache.flex.events.Event")]
-
- [DefaultProperty("beads")]
-
- /**
- * The BinaryUploader class is a class designed to upload binary data
- * over HTTP.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BinaryUploader extends HTTPServiceBase implements IStrand, IBead
- {
- /**
- * The GET request method.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_GET:String = "GET";
-
- /**
- * The POST request method.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_POST:String = "POST";
-
- /**
- * The PUT request method.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_PUT:String = "PUT";
-
- /**
- * The DELETE request method.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_DELETE:String = "DELETE";
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function BinaryUploader()
- {
- super();
- COMPILE::JS
- {
- element = new XMLHttpRequest() as WrappedHTMLElement;
- }
- }
-
- private var _contentType:String = "application/octet-stream";
-
- /**
- * The content-type of the binary data.
- * @default application/octet-stream
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get contentType():String
- {
- return _contentType;
- }
-
- /**
- * @private
- */
- public function set contentType(value:String):void
- {
- if (_contentType != value)
- {
- _contentType = value;
- dispatchEvent(new Event("contentTypeChanged"));
- }
- }
-
- private var _binaryData:BinaryData;
-
- /**
- * The data to be uploaded. Note the type of this
- * property is org.apache.flex.utils.BinaryData.
- * This class abstracts the way binary data is handled
- * in the browser.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get binaryData():BinaryData
- {
- return _binaryData;
- }
-
- /**
- * @private
- */
- public function set binaryData(value:BinaryData):void
- {
- if (_binaryData != value)
- {
- _binaryData = value;
- dispatchEvent(new Event("binaryDataChanged"));
- }
- }
-
- private var _headers:Array;
-
- /**
- * The HTTP headers to be sent with the upload.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get headers():Array
- {
- if (_headers == null)
- _headers = [];
- return _headers;
- }
-
- /**
- * @private
- */
- public function set headers(value:Array):void
- {
- if (_headers != value)
- {
- _headers = value;
- dispatchEvent(new Event("headersChanged"));
- }
- }
-
- private var _method:String = HTTP_METHOD_POST;
-
- /**
- * The HTTP method for the upload.
- * @default POST
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get method():String
- {
- return _method;
- }
-
- /**
- * @private
- */
- public function set method(value:String):void
- {
- if (_method != value)
- {
- _method = value;
- dispatchEvent(new Event("methodChanged"));
- }
- }
-
- private var _responseHeaders:Array;
-
- /**
- * The HTTP headers that were received from the server
- * if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get responseHeaders():Array
- {
- COMPILE::AS3
- {
- if (_responseHeaders && _responseHeaders.length > 0)
- {
- if (_responseHeaders[0] is URLRequestHeader)
- {
- var n:int = _responseHeaders.length;
- for (var i:int = 0; i < n; i++)
- {
- var old:URLRequestHeader = _responseHeaders[i];
- var nu:HTTPHeader = new HTTPHeader(old.name, old.value);
- _responseHeaders[i] = nu;
- }
- }
- }
- }
- COMPILE::JS
- {
- var allHeaders:String;
- var c:int;
- var hdr:String;
- var i:int;
- var n:int;
- var part1:String;
- var part2:String;
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
-
- if (typeof _responseHeaders === 'undefined')
- {
- allHeaders = element.getAllResponseHeaders();
- _responseHeaders = allHeaders.split('\n');
- n = _responseHeaders.length;
- for (i = 0; i < n; i++)
- {
- hdr = _responseHeaders[i];
- c = hdr.indexOf(':');
- part1 = hdr.substring(0, c);
- part2 = hdr.substring(c + 2);
- _responseHeaders[i] =
- new HTTPHeader(part1, part2);
- }
- }
- }
- return _responseHeaders;
- }
-
- private var _responseURL:String;
-
- /**
- * The value of the responseURL header, if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get responseURL():String
- {
- return _responseURL;
- }
-
- private var _status:int;
-
- /**
- * The http status code from the server, if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get status():int
- {
- return _status;
- }
-
- private var _url:String;
-
- /**
- * The url of the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get url():String
- {
- return _url;
- }
-
- /**
- * @private
- */
- public function set url(value:String):void
- {
- if (_url != value)
- {
- _url = value;
- dispatchEvent(new Event("urlChanged"));
- }
- }
-
- private var _timeout:Number = 0;
-
- /**
- * A timeout value for server response.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get timeout():Number
- {
- return _timeout;
- }
-
- /**
- * @private
- */
- public function set timeout(value:Number):void
- {
- if (_timeout != value)
- {
- _timeout = value;
- dispatchEvent(new Event("timeoutChanged"));
- }
- }
-
- private var _id:String;
-
- /**
- * @copy org.apache.flex.core.UIBase#id
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.UIBase#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;
-
- for each (var bead:IBead in beads)
- addBead(bead);
-
- dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#beads
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var beads:Array;
-
- COMPILE::AS3
- private var _beads:Vector.<IBead>;
-
- /**
- * @copy org.apache.flex.core.UIBase#addBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function addBead(bead:IBead):void
- {
- if (!_beads)
- _beads = new Vector.<IBead>;
- _beads.push(bead);
- bead.strand = this;
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#getBeadByType()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function getBeadByType(classOrInterface:Class):IBead
- {
- for each (var bead:IBead in _beads)
- {
- if (bead is classOrInterface)
- return bead;
- }
- return null;
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#removeBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function removeBead(value:IBead):IBead
- {
- var n:int = _beads.length;
- for (var i:int = 0; i < n; i++)
- {
- var bead:IBead = _beads[i];
- if (bead == value)
- {
- _beads.splice(i, 1);
- return bead;
- }
- }
- return null;
- }
-
- COMPILE::AS3
- private var urlLoader:URLLoader;
-
- /**
- * Starts the upload to the server. Events
- * are dispatched as the upload progresses.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function send():void
- {
- COMPILE::AS3
- {
- if (!urlLoader)
- urlLoader = new URLLoader();
- var request:URLRequest = new URLRequest(url);
- request.method = method;
- if ("idleTimeout" in request)
- {
- request["idleTimeout"] = timeout;
- }
- var sawContentType:Boolean;
- if (headers)
- {
- for each (var header:HTTPHeader in headers)
- {
- var urlHeader:URLRequestHeader = new URLRequestHeader(header.name, header.value);
- request.requestHeaders.push(urlHeader);
- if (header.name == HTTPHeader.CONTENT_TYPE)
- sawContentType = true;
- }
- }
- if (method != HTTP_METHOD_GET && !sawContentType)
- {
- urlHeader = new URLRequestHeader(HTTPHeader.CONTENT_TYPE, contentType);
- request.requestHeaders.push(urlHeader);
- }
- if (binaryData)
- {
- if (method == HTTP_METHOD_GET)
- {
- if (url.indexOf("?") != -1)
- url += binaryData.data.toString();
- else
- url += "?" + binaryData.data.toString();
- }
- else
- request.data = binaryData.data;
- }
- urlLoader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
- urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
- if (HTTPStatusEvent.HTTP_RESPONSE_STATUS) // only on AIR
- urlLoader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, statusHandler);
- urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler);
- urlLoader.load(request);
-
- }
- COMPILE::JS
- {
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
- element.onreadystatechange = progressHandler;
-
- url = _url;
-
- var binaryData:String = null;
- if (_binaryData != null) {
- if (_method === HTTP_METHOD_GET) {
- if (url.indexOf('?') !== -1) {
- url += _binaryData.data;
- } else {
- url += '?' + _binaryData.data;
- }
- } else {
- binaryData = _binaryData.data.toString();
- }
- }
-
- element.open(_method, _url, true);
- element.timeout = _timeout;
-
- var sawContentType:Boolean = false;
- if (_headers) {
- var n:int = _headers.length;
- for (var i:int = 0; i < n; i++) {
- var header:HTTPHeader = _headers[i];
- if (header.name === HTTPHeader.CONTENT_TYPE) {
- sawContentType = true;
- }
-
- element.setRequestHeader(header.name, header.value);
- }
- }
-
- if (_method !== HTTP_METHOD_GET &&
- !sawContentType && binaryData) {
- element.setRequestHeader(
- HTTPHeader.CONTENT_TYPE, _contentType);
- }
-
- if (binaryData) {
- element.setRequestHeader('Content-length', binaryData.length.toString());
- element.setRequestHeader('Connection', 'close');
- element.send(binaryData);
- } else {
- element.send();
- }
-
- }
- }
-
- /**
- * The handler for HTTP_STATUS and/or HTTP_RESPONSE_STATUS events
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function statusHandler(event:HTTPStatusEvent):void
- {
- _status = event.status;
- if ("responseHeaders" in event)
- _responseHeaders = event.responseHeaders;
- if ("responseURL" in event)
- _responseURL = event.responseURL;
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * The handler for the IO_ERROR event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function ioErrorHandler(event:IOErrorEvent):void
- {
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * The handler for the COMPLETE event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function completeHandler(event:flash.events.Event):void
- {
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * @flexjsignorecoercion XMLHttpRequest
- */
- COMPILE::JS
- protected function progressHandler():void
- {
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
- if (element.readyState === 2) {
- _status = element.status;
- dispatchEvent('httpResponseStatus');
- dispatchEvent('httpStatus');
- } else if (element.readyState === 4) {
- dispatchEvent('complete');
- }
- }
-
- /**
- * Sometimes, after the upload, the server returns useful
- * information which will be available after the COMPLETE event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion XMLHttpRequest
- */
- public function get data():*
- {
- COMPILE::AS3
- {
- return urlLoader.data;
- }
- COMPILE::JS
- {
- return (element as XMLHttpRequest).responseText;
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPHeader.as b/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPHeader.as
deleted file mode 100644
index 45f08b3..0000000
--- a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPHeader.as
+++ /dev/null
@@ -1,79 +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.net
-{
- /**
- * The data class for HTTP headers in HTTP server communications.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class HTTPHeader
- {
- /**
- * The Content-type header.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const CONTENT_TYPE:String = "Content-type";
-
- /**
- * Constructor.
- *
- * @param name The name of the header.
- * @param value The value for that header.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function HTTPHeader(name:String = null, value:String = null)
- {
- super();
- this.name = name;
- this.value = value;
- }
-
- /**
- * The name of the header.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var name:String;
-
- /**
- * The value for the header.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var value:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPService.as b/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPService.as
deleted file mode 100644
index 274559a..0000000
--- a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPService.as
+++ /dev/null
@@ -1,805 +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.net
-{
- COMPILE::AS3
- {
- import flash.events.HTTPStatusEvent;
- import flash.events.IOErrorEvent;
- import flash.net.URLLoader;
- import flash.net.URLRequest;
- import flash.net.URLRequestHeader;
- import flash.net.URLRequestMethod;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched when the request is complete.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="complete", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched if an error occurs in the server communication.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="ioError", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched when an httpStatus code is received from the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="httpStatus", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched if Adobe AIR is able to detect and return the status
- * code for the request. Unlike the httpStatus event, the httpResponseStatus
- * event is delivered before any response data. Also, the httpResponseStatus
- * event includes values for the responseHeaders and responseURL properties
- * (which are undefined for an httpStatus event. Note that the
- * httpResponseStatus event (if any) will be sent before
- * (and in addition to) any complete or error event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="httpResponseStatus", type="org.apache.flex.events.Event")]
-
- [DefaultProperty("beads")]
-
- /**
- * The HTTPService class is a class designed to transfer text
- * over HTTP. Use BinaryUploader for transferring non-text.
- *
- * @see org.apache.flex.net.BinaryUploader.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class HTTPService extends HTTPServiceBase implements IStrand, IBead
- {
- /**
- * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_GET
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_GET:String = "GET";
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_POST
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_POST:String = "POST";
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_PUT
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_PUT:String = "PUT";
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#HTTP_METHOD_DELETE
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const HTTP_METHOD_DELETE:String = "DELETE";
-
- /**
- * Dispatched when the request is complete.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const EVENT_COMPLETE:String = "complete";
-
- /**
- * Dispatched if an error occurs in the server communication.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const EVENT_IO_ERROR:String = "ioError";
-
- /**
- * Dispatched when an httpStatus code is received from the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const EVENT_HTTP_STATUS:String = "httpStatus";
-
- /**
- * Dispatched if Adobe AIR is able to detect and return the status
- * code for the request. Unlike the httpStatus event, the httpResponseStatus
- * event is delivered before any response data. Also, the httpResponseStatus
- * event includes values for the responseHeaders and responseURL properties
- * (which are undefined for an httpStatus event. Note that the
- * httpResponseStatus event (if any) will be sent before
- * (and in addition to) any complete or error event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const EVENT_HTTP_RESPONSE_STATUS:String = "httpResponseStatus";
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function HTTPService()
- {
- super();
-
- COMPILE::JS
- {
- element = new XMLHttpRequest() as WrappedHTMLElement;
- }
- }
-
- private var _contentType:String = "application/x-www-form-urlencoded";
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#contentType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get contentType():String
- {
- return _contentType;
- }
-
- /**
- * @private
- */
- public function set contentType(value:String):void
- {
- if (_contentType != value)
- {
- _contentType = value;
- dispatchEvent(new Event("contentTypeChanged"));
- }
- }
-
- private var _contentData:String;
-
- /**
- * The text to send to the server, if any.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get contentData():String
- {
- return _contentData;
- }
-
- /**
- * @private
- */
- public function set contentData(value:String):void
- {
- if (_contentData != value)
- {
- _contentData = value;
- dispatchEvent(new Event("contentDataChanged"));
- }
- }
-
- private var _headers:Array;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#headers
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get headers():Array
- {
- if (_headers == null)
- _headers = [];
- return _headers;
- }
-
- /**
- * @private
- */
- public function set headers(value:Array):void
- {
- if (_headers != value)
- {
- _headers = value;
- dispatchEvent(new Event("headersChanged"));
- }
- }
-
- private var _method:String = HTTP_METHOD_GET;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#method
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get method():String
- {
- return _method;
- }
-
- /**
- * @private
- */
- public function set method(value:String):void
- {
- if (_method != value)
- {
- _method = value;
- dispatchEvent(new Event("methodChanged"));
- }
- }
-
- private var _responseHeaders:Array;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#responseHeaders
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion XMLHttpRequest
- */
- public function get responseHeaders():Array
- {
- COMPILE::AS3
- {
- if (_responseHeaders && _responseHeaders.length > 0)
- {
- if (_responseHeaders[0] is URLRequestHeader)
- {
- var n:int = _responseHeaders.length;
- for (var i:int = 0; i < n; i++)
- {
- var old:URLRequestHeader = _responseHeaders[i];
- var nu:HTTPHeader = new HTTPHeader(old.name, old.value);
- _responseHeaders[i] = nu;
- }
- }
- }
- }
- COMPILE::JS
- {
- var allHeaders:String;
- var c:int;
- var hdr:String;
- var i:int;
- var n:int;
- var part1:String;
- var part2:String;
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
-
- if (typeof _responseHeaders === 'undefined') {
- allHeaders = element.getAllResponseHeaders();
- _responseHeaders = allHeaders.split('\n');
- n = _responseHeaders.length;
- for (i = 0; i < n; i++) {
- hdr = _responseHeaders[i];
- c = hdr.indexOf(':');
- part1 = hdr.substring(0, c);
- part2 = hdr.substring(c + 2);
- _responseHeaders[i] =
- new HTTPHeader(part1, part2);
- }
- }
-
- }
- return _responseHeaders;
- }
-
- private var _responseURL:String;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#responseURL
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get responseURL():String
- {
- return _responseURL;
- }
-
- private var _status:int;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#status
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get status():int
- {
- return _status;
- }
-
- private var _url:String;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#url
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get url():String
- {
- return _url;
- }
-
- /**
- * @private
- */
- public function set url(value:String):void
- {
- if (_url != value)
- {
- _url = value;
- dispatchEvent(new Event("urlChanged"));
- }
- }
-
- private var _timeout:Number = 0;
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#timeout
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get timeout():Number
- {
- return _timeout;
- }
-
- /**
- * @private
- */
- public function set timeout(value:Number):void
- {
- if (_timeout != value)
- {
- _timeout = value;
- dispatchEvent(new Event("timeoutChanged"));
- }
- }
-
- private var _id:String;
-
- /**
- * @copy org.apache.flex.core.UIBase#id
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.UIBase#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;
- if (_beads == null)
- {
- for each (var bead:IBead in beads)
- addBead(bead);
- }
-
- dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#id
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var beads:Array;
-
- COMPILE::AS3
- private var _beads:Vector.<IBead>;
-
- /**
- * @copy org.apache.flex.core.UIBase#addBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function addBead(bead:IBead):void
- {
- if (!_beads)
- _beads = new Vector.<IBead>;
- _beads.push(bead);
- bead.strand = this;
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#getBeadByType()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function getBeadByType(classOrInterface:Class):IBead
- {
- for each (var bead:IBead in _beads)
- {
- if (bead is classOrInterface)
- return bead;
- }
- return null;
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#removeBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function removeBead(value:IBead):IBead
- {
- var n:int = _beads.length;
- for (var i:int = 0; i < n; i++)
- {
- var bead:IBead = _beads[i];
- if (bead == value)
- {
- _beads.splice(i, 1);
- return bead;
- }
- }
- return null;
- }
-
- COMPILE::AS3
- private var urlLoader:URLLoader;
-
- /**
- * Sends the headers and contentData to the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion XMLHttpRequest
- */
- public function send():void
- {
- if (_beads == null)
- {
- for each (var bead:IBead in beads)
- addBead(bead);
- }
-
- COMPILE::AS3
- {
- if (!urlLoader)
- urlLoader = new URLLoader();
- var request:URLRequest = new URLRequest(url);
- request.method = method;
- if ("idleTimeout" in request)
- {
- request["idleTimeout"] = timeout;
- }
- var sawContentType:Boolean;
- if (headers)
- {
- for each (var header:HTTPHeader in headers)
- {
- var urlHeader:URLRequestHeader = new URLRequestHeader(header.name, header.value);
- request.requestHeaders.push(urlHeader);
- if (header.name == HTTPHeader.CONTENT_TYPE)
- sawContentType = true;
- }
- }
- if (method != HTTP_METHOD_GET && !sawContentType && contentData != null)
- {
- urlHeader = new URLRequestHeader(HTTPHeader.CONTENT_TYPE, contentType);
- request.requestHeaders.push(urlHeader);
- }
- if (contentData)
- {
- if (method == HTTP_METHOD_GET)
- {
- if (url.indexOf("?") != -1)
- url += contentData;
- else
- url += "?" + contentData;
- }
- else
- request.data = contentData;
- }
- urlLoader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
- urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
- if (HTTPStatusEvent.HTTP_RESPONSE_STATUS) // only on AIR
- urlLoader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, statusHandler);
- urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler);
- urlLoader.load(request);
- }
- COMPILE::JS
- {
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
- element.onreadystatechange = progressHandler;
-
- url = _url;
-
- var contentData:String = null;
- if (_contentData != null) {
- if (_method === HTTP_METHOD_GET) {
- if (url.indexOf('?') !== -1) {
- url += _contentData;
- } else {
- url += '?' + _contentData;
- }
- } else {
- contentData = _contentData;
- }
- }
-
- element.open(_method, _url, true);
- element.timeout = _timeout;
-
- var sawContentType:Boolean = false;
- if (_headers) {
- var n:int = _headers.length;
- for (var i:int = 0; i < n; i++) {
- var header:HTTPHeader = _headers[i];
- if (header.name === HTTPHeader.CONTENT_TYPE) {
- sawContentType = true;
- }
-
- element.setRequestHeader(header.name, header.value);
- }
- }
-
- if (_method !== HTTP_METHOD_GET &&
- !sawContentType && contentData) {
- element.setRequestHeader(
- HTTPHeader.CONTENT_TYPE, _contentType);
- }
-
- if (contentData) {
- element.setRequestHeader('Content-length', contentData.length.toString());
- element.setRequestHeader('Connection', 'close');
- element.send(contentData);
- } else {
- element.send();
- }
-
- }
- }
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#statusHandler()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function statusHandler(event:HTTPStatusEvent):void
- {
- _status = event.status;
- if ("responseHeaders" in event)
- _responseHeaders = event.responseHeaders;
- if ("responseURL" in event)
- _responseURL = event.responseURL;
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#ioErrorHandler()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function ioErrorHandler(event:IOErrorEvent):void
- {
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * @copy org.apache.flex.net.BinaryUploader#completeHandler()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function completeHandler(event:flash.events.Event):void
- {
- dispatchEvent(new Event(event.type));
- }
-
- /**
- * @flexjsignorecoercion XMLHttpRequest
- */
- COMPILE::JS
- protected function progressHandler():void
- {
- var element:XMLHttpRequest = this.element as XMLHttpRequest;
- if (element.readyState === 2) {
- _status = element.status;
- dispatchEvent('httpResponseStatus');
- dispatchEvent('httpStatus');
- } else if (element.readyState === 4) {
- dispatchEvent('complete');
- }
- }
-
- /**
- * The text returned from the server.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion XMLHttpRequest
- */
- public function get data():String
- {
- COMPILE::AS3
- {
- return urlLoader.data;
- }
- COMPILE::JS
- {
- return (element as XMLHttpRequest).responseText;
- }
- }
-
-
- private var _json:Object;
-
- /**
- * A JSON object parsed from the data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get json():Object
- {
- if (!_json)
- _json = JSON.parse(data);
- return _json;
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPServiceBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPServiceBase.as b/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPServiceBase.as
deleted file mode 100644
index 4cd73df..0000000
--- a/frameworks/projects/Network/as/src/org/apache/flex/net/HTTPServiceBase.as
+++ /dev/null
@@ -1,47 +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.net
-{
- COMPILE::AS3
- {
- import org.apache.flex.events.EventDispatcher;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.HTMLElementWrapper;
- }
-
- /**
- * The data class for HTTP headers in HTTP server communications.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class HTTPServiceBase extends EventDispatcher
- {
- }
-
- COMPILE::JS
- public class HTTPServiceBase extends HTMLElementWrapper
- {
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/basic-manifest.xml b/frameworks/projects/Network/basic-manifest.xml
deleted file mode 100644
index 235b09d..0000000
--- a/frameworks/projects/Network/basic-manifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="HTTPService" class="org.apache.flex.net.HTTPService"/>
- <component id="BinaryUploader" class="org.apache.flex.net.BinaryUploader"/>
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/compile-asjs-config.xml b/frameworks/projects/Network/compile-asjs-config.xml
deleted file mode 100644
index a61da6f..0000000
--- a/frameworks/projects/Network/compile-asjs-config.xml
+++ /dev/null
@@ -1,82 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- </include-sources>
-
- <include-classes>
- <class>NetworkClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/compile-config.xml b/frameworks/projects/Network/compile-config.xml
deleted file mode 100644
index ed9e3e8..0000000
--- a/frameworks/projects/Network/compile-config.xml
+++ /dev/null
@@ -1,78 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>NetworkClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/flex/NetworkClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/NetworkClasses.as b/frameworks/projects/Network/src/main/flex/NetworkClasses.as
new file mode 100644
index 0000000..cf88050
--- /dev/null
+++ b/frameworks/projects/Network/src/main/flex/NetworkClasses.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class NetworkClasses
+{
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/c4705283/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
new file mode 100644
index 0000000..3f9f697
--- /dev/null
+++ b/frameworks/projects/Network/src/main/flex/org/apache/flex/net/BinaryUploader.as
@@ -0,0 +1,738 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.net
+{
+ COMPILE::AS3
+ {
+ import flash.events.HTTPStatusEvent;
+ import flash.events.IOErrorEvent;
+ import flash.net.URLLoader;
+ import flash.net.URLRequest;
+ import flash.net.URLRequestHeader;
+ import flash.net.URLRequestMethod;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.utils.BinaryData;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched when the upload is complete.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="complete", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched if an error occurs in the upload.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="ioError", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched when an httpStatus code is received from the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="httpStatus", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched if Adobe AIR is able to detect and return the status
+ * code for the request. Unlike the httpStatus event, the httpResponseStatus
+ * event is delivered before any response data. Also, the httpResponseStatus
+ * event includes values for the responseHeaders and responseURL properties
+ * (which are undefined for an httpStatus event. Note that the
+ * httpResponseStatus event (if any) will be sent before
+ * (and in addition to) any complete or error event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="httpResponseStatus", type="org.apache.flex.events.Event")]
+
+ [DefaultProperty("beads")]
+
+ /**
+ * The BinaryUploader class is a class designed to upload binary data
+ * over HTTP.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BinaryUploader extends HTTPServiceBase implements IStrand, IBead
+ {
+ /**
+ * The GET request method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_GET:String = "GET";
+
+ /**
+ * The POST request method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_POST:String = "POST";
+
+ /**
+ * The PUT request method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_PUT:String = "PUT";
+
+ /**
+ * The DELETE request method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const HTTP_METHOD_DELETE:String = "DELETE";
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ public function BinaryUploader()
+ {
+ super();
+ COMPILE::JS
+ {
+ element = new XMLHttpRequest() as WrappedHTMLElement;
+ }
+ }
+
+ private var _contentType:String = "application/octet-stream";
+
+ /**
+ * The content-type of the binary data.
+ * @default application/octet-stream
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get contentType():String
+ {
+ return _contentType;
+ }
+
+ /**
+ * @private
+ */
+ public function set contentType(value:String):void
+ {
+ if (_contentType != value)
+ {
+ _contentType = value;
+ dispatchEvent(new Event("contentTypeChanged"));
+ }
+ }
+
+ private var _binaryData:BinaryData;
+
+ /**
+ * The data to be uploaded. Note the type of this
+ * property is org.apache.flex.utils.BinaryData.
+ * This class abstracts the way binary data is handled
+ * in the browser.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get binaryData():BinaryData
+ {
+ return _binaryData;
+ }
+
+ /**
+ * @private
+ */
+ public function set binaryData(value:BinaryData):void
+ {
+ if (_binaryData != value)
+ {
+ _binaryData = value;
+ dispatchEvent(new Event("binaryDataChanged"));
+ }
+ }
+
+ private var _headers:Array;
+
+ /**
+ * The HTTP headers to be sent with the upload.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get headers():Array
+ {
+ if (_headers == null)
+ _headers = [];
+ return _headers;
+ }
+
+ /**
+ * @private
+ */
+ public function set headers(value:Array):void
+ {
+ if (_headers != value)
+ {
+ _headers = value;
+ dispatchEvent(new Event("headersChanged"));
+ }
+ }
+
+ private var _method:String = HTTP_METHOD_POST;
+
+ /**
+ * The HTTP method for the upload.
+ * @default POST
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get method():String
+ {
+ return _method;
+ }
+
+ /**
+ * @private
+ */
+ public function set method(value:String):void
+ {
+ if (_method != value)
+ {
+ _method = value;
+ dispatchEvent(new Event("methodChanged"));
+ }
+ }
+
+ private var _responseHeaders:Array;
+
+ /**
+ * The HTTP headers that were received from the server
+ * if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get responseHeaders():Array
+ {
+ COMPILE::AS3
+ {
+ if (_responseHeaders && _responseHeaders.length > 0)
+ {
+ if (_responseHeaders[0] is URLRequestHeader)
+ {
+ var n:int = _responseHeaders.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var old:URLRequestHeader = _responseHeaders[i];
+ var nu:HTTPHeader = new HTTPHeader(old.name, old.value);
+ _responseHeaders[i] = nu;
+ }
+ }
+ }
+ }
+ COMPILE::JS
+ {
+ var allHeaders:String;
+ var c:int;
+ var hdr:String;
+ var i:int;
+ var n:int;
+ var part1:String;
+ var part2:String;
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+
+ if (typeof _responseHeaders === 'undefined')
+ {
+ allHeaders = element.getAllResponseHeaders();
+ _responseHeaders = allHeaders.split('\n');
+ n = _responseHeaders.length;
+ for (i = 0; i < n; i++)
+ {
+ hdr = _responseHeaders[i];
+ c = hdr.indexOf(':');
+ part1 = hdr.substring(0, c);
+ part2 = hdr.substring(c + 2);
+ _responseHeaders[i] =
+ new HTTPHeader(part1, part2);
+ }
+ }
+ }
+ return _responseHeaders;
+ }
+
+ private var _responseURL:String;
+
+ /**
+ * The value of the responseURL header, if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get responseURL():String
+ {
+ return _responseURL;
+ }
+
+ private var _status:int;
+
+ /**
+ * The http status code from the server, if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get status():int
+ {
+ return _status;
+ }
+
+ private var _url:String;
+
+ /**
+ * The url of the server.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get url():String
+ {
+ return _url;
+ }
+
+ /**
+ * @private
+ */
+ public function set url(value:String):void
+ {
+ if (_url != value)
+ {
+ _url = value;
+ dispatchEvent(new Event("urlChanged"));
+ }
+ }
+
+ private var _timeout:Number = 0;
+
+ /**
+ * A timeout value for server response.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get timeout():Number
+ {
+ return _timeout;
+ }
+
+ /**
+ * @private
+ */
+ public function set timeout(value:Number):void
+ {
+ if (_timeout != value)
+ {
+ _timeout = value;
+ dispatchEvent(new Event("timeoutChanged"));
+ }
+ }
+
+ private var _id:String;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#id
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#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;
+
+ for each (var bead:IBead in beads)
+ addBead(bead);
+
+ dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#beads
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var beads:Array;
+
+ COMPILE::AS3
+ private var _beads:Vector.<IBead>;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#addBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function addBead(bead:IBead):void
+ {
+ if (!_beads)
+ _beads = new Vector.<IBead>;
+ _beads.push(bead);
+ bead.strand = this;
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#getBeadByType()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in _beads)
+ {
+ if (bead is classOrInterface)
+ return bead;
+ }
+ return null;
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#removeBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function removeBead(value:IBead):IBead
+ {
+ var n:int = _beads.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var bead:IBead = _beads[i];
+ if (bead == value)
+ {
+ _beads.splice(i, 1);
+ return bead;
+ }
+ }
+ return null;
+ }
+
+ COMPILE::AS3
+ private var urlLoader:URLLoader;
+
+ /**
+ * Starts the upload to the server. Events
+ * are dispatched as the upload progresses.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function send():void
+ {
+ COMPILE::AS3
+ {
+ if (!urlLoader)
+ urlLoader = new URLLoader();
+ var request:URLRequest = new URLRequest(url);
+ request.method = method;
+ if ("idleTimeout" in request)
+ {
+ request["idleTimeout"] = timeout;
+ }
+ var sawContentType:Boolean;
+ if (headers)
+ {
+ for each (var header:HTTPHeader in headers)
+ {
+ var urlHeader:URLRequestHeader = new URLRequestHeader(header.name, header.value);
+ request.requestHeaders.push(urlHeader);
+ if (header.name == HTTPHeader.CONTENT_TYPE)
+ sawContentType = true;
+ }
+ }
+ if (method != HTTP_METHOD_GET && !sawContentType)
+ {
+ urlHeader = new URLRequestHeader(HTTPHeader.CONTENT_TYPE, contentType);
+ request.requestHeaders.push(urlHeader);
+ }
+ if (binaryData)
+ {
+ if (method == HTTP_METHOD_GET)
+ {
+ if (url.indexOf("?") != -1)
+ url += binaryData.data.toString();
+ else
+ url += "?" + binaryData.data.toString();
+ }
+ else
+ request.data = binaryData.data;
+ }
+ urlLoader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
+ urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
+ if (HTTPStatusEvent.HTTP_RESPONSE_STATUS) // only on AIR
+ urlLoader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, statusHandler);
+ urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler);
+ urlLoader.load(request);
+
+ }
+ COMPILE::JS
+ {
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+ element.onreadystatechange = progressHandler;
+
+ url = _url;
+
+ var binaryData:String = null;
+ if (_binaryData != null) {
+ if (_method === HTTP_METHOD_GET) {
+ if (url.indexOf('?') !== -1) {
+ url += _binaryData.data;
+ } else {
+ url += '?' + _binaryData.data;
+ }
+ } else {
+ binaryData = _binaryData.data.toString();
+ }
+ }
+
+ element.open(_method, _url, true);
+ element.timeout = _timeout;
+
+ var sawContentType:Boolean = false;
+ if (_headers) {
+ var n:int = _headers.length;
+ for (var i:int = 0; i < n; i++) {
+ var header:HTTPHeader = _headers[i];
+ if (header.name === HTTPHeader.CONTENT_TYPE) {
+ sawContentType = true;
+ }
+
+ element.setRequestHeader(header.name, header.value);
+ }
+ }
+
+ if (_method !== HTTP_METHOD_GET &&
+ !sawContentType && binaryData) {
+ element.setRequestHeader(
+ HTTPHeader.CONTENT_TYPE, _contentType);
+ }
+
+ if (binaryData) {
+ element.setRequestHeader('Content-length', binaryData.length.toString());
+ element.setRequestHeader('Connection', 'close');
+ element.send(binaryData);
+ } else {
+ element.send();
+ }
+
+ }
+ }
+
+ /**
+ * The handler for HTTP_STATUS and/or HTTP_RESPONSE_STATUS events
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function statusHandler(event:HTTPStatusEvent):void
+ {
+ _status = event.status;
+ if ("responseHeaders" in event)
+ _responseHeaders = event.responseHeaders;
+ if ("responseURL" in event)
+ _responseURL = event.responseURL;
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * The handler for the IO_ERROR event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function ioErrorHandler(event:IOErrorEvent):void
+ {
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * The handler for the COMPLETE event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function completeHandler(event:flash.events.Event):void
+ {
+ dispatchEvent(new Event(event.type));
+ }
+
+ /**
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ COMPILE::JS
+ protected function progressHandler():void
+ {
+ var element:XMLHttpRequest = this.element as XMLHttpRequest;
+ if (element.readyState === 2) {
+ _status = element.status;
+ dispatchEvent('httpResponseStatus');
+ dispatchEvent('httpStatus');
+ } else if (element.readyState === 4) {
+ dispatchEvent('complete');
+ }
+ }
+
+ /**
+ * Sometimes, after the upload, the server returns useful
+ * information which will be available after the COMPLETE event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion XMLHttpRequest
+ */
+ public function get data():*
+ {
+ COMPILE::AS3
+ {
+ return urlLoader.data;
+ }
+ COMPILE::JS
+ {
+ return (element as XMLHttpRequest).responseText;
+ }
+ }
+ }
+}
\ No newline at end of file
[40/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for reflection
Posted by ah...@apache.org.
new folders for reflection
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9875cf8a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9875cf8a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9875cf8a
Branch: refs/heads/develop
Commit: 9875cf8a7b94fd61c2020f59e824fa6dfc18a65e
Parents: cfe7d2c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:50:10 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
.../apache/flex/reflection/DefinitionBase.as | 51 ----
.../flex/reflection/DefinitionWithMetaData.as | 79 ------
.../flex/reflection/FunctionDefinition.as | 37 ---
.../flex/reflection/MetaDataArgDefinition.as | 45 ----
.../flex/reflection/MetaDataDefinition.as | 71 -----
.../apache/flex/reflection/MethodDefinition.as | 50 ----
.../apache/flex/reflection/TypeDefinition.as | 260 -------------------
.../flex/reflection/VariableDefinition.as | 38 ---
.../org/apache/flex/reflection/describeType.as | 47 ----
.../flex/reflection/getDefinitionByName.as | 51 ----
.../flex/reflection/getQualifiedClassName.as | 51 ----
.../reflection/getQualifiedSuperclassName.as | 49 ----
.../projects/Reflection/compile-asjs-config.xml | 77 ------
.../projects/Reflection/compile-config.xml | 73 ------
.../apache/flex/reflection/DefinitionBase.as | 51 ++++
.../flex/reflection/DefinitionWithMetaData.as | 79 ++++++
.../flex/reflection/FunctionDefinition.as | 37 +++
.../flex/reflection/MetaDataArgDefinition.as | 45 ++++
.../flex/reflection/MetaDataDefinition.as | 71 +++++
.../apache/flex/reflection/MethodDefinition.as | 50 ++++
.../apache/flex/reflection/TypeDefinition.as | 260 +++++++++++++++++++
.../flex/reflection/VariableDefinition.as | 38 +++
.../org/apache/flex/reflection/describeType.as | 47 ++++
.../flex/reflection/getDefinitionByName.as | 51 ++++
.../flex/reflection/getQualifiedClassName.as | 51 ++++
.../reflection/getQualifiedSuperclassName.as | 49 ++++
.../src/main/resources/compile-asjs-config.xml | 77 ++++++
.../src/main/resources/compile-config.xml | 73 ++++++
28 files changed, 979 insertions(+), 979 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionBase.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionBase.as
deleted file mode 100755
index f8bdd82..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionBase.as
+++ /dev/null
@@ -1,51 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DefinitionBase
- {
- public function DefinitionBase(name:String, rawData:Object = null)
- {
- _name = name;
- _rawData = rawData;
- }
-
- private var _name:String;
- public function get name():String
- {
- return _name;
- }
-
- protected var _rawData:Object;
-
- protected function get rawData():Object
- {
- return _rawData;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionWithMetaData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionWithMetaData.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionWithMetaData.as
deleted file mode 100755
index 3ca31ba..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/DefinitionWithMetaData.as
+++ /dev/null
@@ -1,79 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DefinitionWithMetaData extends DefinitionBase
- {
- public function DefinitionWithMetaData(name:String, rawData:Object = null)
- {
- super(name, rawData);
- }
-
- public function get metadata():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.metadata;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@name;
- results.push(new MetaDataDefinition(qname, item));
- }
- }
- COMPILE::JS
- {
- var rdata:*;
- var data:Object = rawData;
- if (data.names !== undefined)
- {
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- rdata = def.prototype.FLEXJS_REFLECTION_INFO();
- }
- else
- rdata = data;
- if (rdata !== undefined && rdata.metadata !== undefined)
- {
- var metadatas:Array = rdata.metadata();
- if (metadatas)
- {
- var n:int = metadatas.length;
- for each (var mdDef:Object in metadatas)
- results.push(new MetaDataDefinition(mdDef.name, mdDef));
- }
- }
- }
- return results;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/FunctionDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/FunctionDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/FunctionDefinition.as
deleted file mode 100755
index 5f1f829..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/FunctionDefinition.as
+++ /dev/null
@@ -1,37 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class FunctionDefinition extends DefinitionBase
- {
- public function FunctionDefinition(rawData:Object, packageName:String, name:String)
- {
- super(packageName, name);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataArgDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataArgDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataArgDefinition.as
deleted file mode 100755
index 1f1366f..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataArgDefinition.as
+++ /dev/null
@@ -1,45 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MetaDataArgDefinition extends DefinitionBase
- {
- public function MetaDataArgDefinition(name:String, value:String)
- {
- super(name);
- _value = value;
- }
-
- private var _value:String;
-
- public function get value():String
- {
- return _value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataDefinition.as
deleted file mode 100755
index 4b9a8c9..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MetaDataDefinition.as
+++ /dev/null
@@ -1,71 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MetaDataDefinition extends DefinitionBase
- {
- public function MetaDataDefinition(name:String, rawData:Object)
- {
- super(name, rawData);
- }
-
- public function get args():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.arg;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var key:String = item.@key;
- var value:String = item.@value;
- results.push(new MetaDataArgDefinition(key, value));
- }
- }
- COMPILE::JS
- {
- var rdata:* = rawData;
- if (rdata !== undefined)
- {
- var args:Array = rdata.args;
- if (args)
- {
- var n:int = args.length;
- for each (var argDef:Object in args)
- results.push(new MetaDataArgDefinition(argDef.key, argDef.value));
- }
- }
- }
- return results;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MethodDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MethodDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MethodDefinition.as
deleted file mode 100755
index a16c649..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/MethodDefinition.as
+++ /dev/null
@@ -1,50 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MethodDefinition extends DefinitionWithMetaData
- {
- public function MethodDefinition(name:String, declaredBy:String, rawData:Object = null)
- {
- super(name, rawData);
- _declaredBy = declaredBy;
- }
-
- private var _declaredBy:String;
- private var declaredByDef:TypeDefinition;
-
- public function get declaredBy():TypeDefinition
- {
- if (declaredByDef == null)
- declaredByDef = new TypeDefinition(_declaredBy);
-
- return declaredByDef;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/TypeDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/TypeDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/TypeDefinition.as
deleted file mode 100755
index 6035bab..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/TypeDefinition.as
+++ /dev/null
@@ -1,260 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class TypeDefinition extends DefinitionWithMetaData
- {
- public function TypeDefinition(name:String, rawData:Object = null)
- {
- var c:int = name.indexOf("::");
- if (c > -1)
- {
- _packageName = name.substring(0, c);
- name = name.substring(c+2);
- }
- else
- _packageName = "";
- super(name, rawData);
- }
-
- private var _packageName:String;
-
- public function get packageName():String
- {
- return _packageName;
- }
-
- override protected function get rawData():Object
- {
- if (_rawData == null)
- {
- var def:Object = getDefinitionByName(packageName + "::" + name);
- COMPILE::AS3
- {
- _rawData = describeType(def);
- }
- COMPILE::JS
- {
- _rawData = def.prototype.FLEXJS_CLASS_INFO;
- }
- }
- return _rawData;
- }
- /**
- * @flexjsignorecoercion XML
- */
- public function get baseClasses():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.extendsClass;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@type;
- results.push(new TypeDefinition(qname));
- }
- }
- COMPILE::JS
- {
- var data:Object = rawData;
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- var prototype:Object = def.prototype;
- while (prototype.FLEXJS_CLASS_INFO !== undefined)
- {
- name = prototype.FLEXJS_CLASS_INFO.names[0].qName;
- results.push(new TypeDefinition(name));
- def = getDefinitionByName(name);
- prototype = def.prototype;
- }
- }
- return results;
- }
-
- public function get interfaces():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.implementsInterface;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@type;
- results.push(new TypeDefinition(qname));
- }
- }
- COMPILE::JS
- {
- var data:* = rawData;
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- var prototype:Object = def.prototype;
- while (data !== undefined)
- {
- var interfaces:Array = data.interfaces;
- if (interfaces)
- {
- var n:int = interfaces.length;
- for each (var s:String in interfaces)
- results.push(new TypeDefinition(s));
- }
- name = data.names[0].qName;
- results.push(new TypeDefinition(name));
- def = getDefinitionByName(name);
- prototype = def.prototype;
- data = prototype.FLEXJS_CLASS_INFO;
- }
- }
- return results;
- }
-
- public function get variables():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.variable;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@name;
- results.push(new VariableDefinition(qname, item));
- }
- }
- COMPILE::JS
- {
- var data:Object = rawData;
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
- if (rdata !== undefined)
- {
- var variables:Object = rdata.variables();
- if (variables)
- {
- for (var v:String in variables)
- {
- var varDef:Object = variables[v];
- results.push(new VariableDefinition(v, varDef));
- }
- }
- }
- }
- return results;
- }
-
- public function get accessors():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.accessor;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@name;
- results.push(new MethodDefinition(qname, item.@declaredBy, item));
- }
- }
- COMPILE::JS
- {
- var data:Object = rawData;
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
- if (rdata !== undefined)
- {
- var accessors:Object = rdata.accessors();
- if (accessors)
- {
- for (var prop:String in accessors)
- {
- var propDef:Object = accessors[prop];
- results.push(new MethodDefinition(prop, propDef.declaredBy, propDef));
- }
- }
- }
- }
- return results;
- }
-
- public function get methods():Array
- {
- var results:Array = [];
-
- COMPILE::AS3
- {
- var xml:XML = rawData as XML;
- var data:XMLList = xml.method;
- var n:int = data.length();
- for (var i:int = 0; i < n; i++)
- {
- var item:XML = data[i] as XML;
- var qname:String = item.@name;
- results.push(new MethodDefinition(qname, item.@declaredBy, item));
- }
- }
- COMPILE::JS
- {
- var data:Object = rawData;
- var name:String = data.names[0].qName;
- var def:Object = getDefinitionByName(name);
- var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
- if (rdata !== undefined)
- {
- var methods:Object = rdata.methods();
- if (methods)
- {
- for (var fn:String in methods)
- {
- var fnDef:Object = methods[fn];
- results.push(new MethodDefinition(fn, fnDef.declaredBy, fnDef));
- }
- }
- }
- }
- return results;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/VariableDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/VariableDefinition.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/VariableDefinition.as
deleted file mode 100755
index 3e87566..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/VariableDefinition.as
+++ /dev/null
@@ -1,38 +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.reflection
-{
-
- /**
- * The description of a Class or Interface
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class VariableDefinition extends DefinitionWithMetaData
- {
- public function VariableDefinition(name:String, rawData:Object = null)
- {
- super(rawData, name);
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/describeType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/describeType.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/describeType.as
deleted file mode 100755
index 1114a1e..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/describeType.as
+++ /dev/null
@@ -1,47 +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.reflection
-{
-COMPILE::AS3
-{
- import flash.utils.describeType;
-}
-
- /**
- * The equivalent of flash.utils.describeType.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function describeType(value:Object):TypeDefinition
- {
- COMPILE::AS3
- {
- var xml:XML = flash.utils.describeType(value);
- return new TypeDefinition(xml.@name, xml);
- }
- COMPILE::JS
- {
- var qname:String = getQualifiedClassName(value);
- return new TypeDefinition(qname, value.FLEXJS_CLASS_INFO);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getDefinitionByName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getDefinitionByName.as
deleted file mode 100755
index b18ab3c..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getDefinitionByName.as
+++ /dev/null
@@ -1,51 +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.reflection
-{
-COMPILE::AS3
-{
- import flash.utils.getDefinitionByName;
-}
-
- /**
- * The equivalent of flash.utils.getQualifiedClassName.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getDefinitionByName(name:String):Object
- {
- COMPILE::AS3
- {
- return flash.utils.getDefinitionByName(name);
- }
- COMPILE::JS
- {
- var parts:Array = name.split('.');
- var n:int = parts.length;
- var o:Object = window;
- for (var i:int = 0; i < n; i++) {
- o = o[parts[i]];
- }
- return o;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedClassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedClassName.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedClassName.as
deleted file mode 100755
index 42eaa47..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedClassName.as
+++ /dev/null
@@ -1,51 +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.reflection
-{
-COMPILE::AS3
-{
- import flash.utils.getQualifiedClassName;
-}
-
- /**
- * The equivalent of flash.utils.getQualifiedClassName.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getQualifiedClassName(value:*):String
- {
- COMPILE::AS3
- {
- return flash.utils.getQualifiedClassName(value);
- }
- COMPILE::JS
- {
- if (value.FLEXJS_CLASS_INFO == null)
- {
- if (value.prototype.FLEXJS_CLASS_INFO == null)
- return null;
- value = value.prototype;
- }
- return value.FLEXJS_CLASS_INFO.names[0].qName;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedSuperclassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedSuperclassName.as b/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedSuperclassName.as
deleted file mode 100755
index 95c75fa..0000000
--- a/frameworks/projects/Reflection/as/src/org/apache/flex/reflection/getQualifiedSuperclassName.as
+++ /dev/null
@@ -1,49 +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.reflection
-{
-COMPILE::AS3
-{
- import flash.utils.getQualifiedSuperclassName;
-}
-
- /**
- * The equivalent of flash.utils.getQualifiedSuperclassName.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getQualifiedSuperclassName(value:*):String
- {
- COMPILE::AS3
- {
- return flash.utils.getQualifiedSuperclassName(value);
- }
- COMPILE::JS
- {
- var constructorAsObject:Object = value["constructor"];
- value = constructorAsObject.superClass_;
- if (value == null || value.FLEXJS_CLASS_INFO == null)
- return null;
- return value.FLEXJS_CLASS_INFO.names[0].qName;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/compile-asjs-config.xml b/frameworks/projects/Reflection/compile-asjs-config.xml
deleted file mode 100644
index 92f5a0f..0000000
--- a/frameworks/projects/Reflection/compile-asjs-config.xml
+++ /dev/null
@@ -1,77 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <namespaces>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- <path-element>as/src</path-element>
- </include-sources>
-
- <include-classes>
- </include-classes>
-
- <include-namespaces>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/compile-config.xml b/frameworks/projects/Reflection/compile-config.xml
deleted file mode 100644
index e02f6b2..0000000
--- a/frameworks/projects/Reflection/compile-config.xml
+++ /dev/null
@@ -1,73 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-sources>
- <path-element>as/src</path-element>
- </include-sources>
-
- <include-namespaces>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionBase.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionBase.as
new file mode 100755
index 0000000..f8bdd82
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionBase.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DefinitionBase
+ {
+ public function DefinitionBase(name:String, rawData:Object = null)
+ {
+ _name = name;
+ _rawData = rawData;
+ }
+
+ private var _name:String;
+ public function get name():String
+ {
+ return _name;
+ }
+
+ protected var _rawData:Object;
+
+ protected function get rawData():Object
+ {
+ return _rawData;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
new file mode 100755
index 0000000..3ca31ba
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/DefinitionWithMetaData.as
@@ -0,0 +1,79 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DefinitionWithMetaData extends DefinitionBase
+ {
+ public function DefinitionWithMetaData(name:String, rawData:Object = null)
+ {
+ super(name, rawData);
+ }
+
+ public function get metadata():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.metadata;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@name;
+ results.push(new MetaDataDefinition(qname, item));
+ }
+ }
+ COMPILE::JS
+ {
+ var rdata:*;
+ var data:Object = rawData;
+ if (data.names !== undefined)
+ {
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ rdata = def.prototype.FLEXJS_REFLECTION_INFO();
+ }
+ else
+ rdata = data;
+ if (rdata !== undefined && rdata.metadata !== undefined)
+ {
+ var metadatas:Array = rdata.metadata();
+ if (metadatas)
+ {
+ var n:int = metadatas.length;
+ for each (var mdDef:Object in metadatas)
+ results.push(new MetaDataDefinition(mdDef.name, mdDef));
+ }
+ }
+ }
+ return results;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/FunctionDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/FunctionDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/FunctionDefinition.as
new file mode 100755
index 0000000..5f1f829
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/FunctionDefinition.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class FunctionDefinition extends DefinitionBase
+ {
+ public function FunctionDefinition(rawData:Object, packageName:String, name:String)
+ {
+ super(packageName, name);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataArgDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataArgDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataArgDefinition.as
new file mode 100755
index 0000000..1f1366f
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataArgDefinition.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MetaDataArgDefinition extends DefinitionBase
+ {
+ public function MetaDataArgDefinition(name:String, value:String)
+ {
+ super(name);
+ _value = value;
+ }
+
+ private var _value:String;
+
+ public function get value():String
+ {
+ return _value;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
new file mode 100755
index 0000000..4b9a8c9
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MetaDataDefinition.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MetaDataDefinition extends DefinitionBase
+ {
+ public function MetaDataDefinition(name:String, rawData:Object)
+ {
+ super(name, rawData);
+ }
+
+ public function get args():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.arg;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var key:String = item.@key;
+ var value:String = item.@value;
+ results.push(new MetaDataArgDefinition(key, value));
+ }
+ }
+ COMPILE::JS
+ {
+ var rdata:* = rawData;
+ if (rdata !== undefined)
+ {
+ var args:Array = rdata.args;
+ if (args)
+ {
+ var n:int = args.length;
+ for each (var argDef:Object in args)
+ results.push(new MetaDataArgDefinition(argDef.key, argDef.value));
+ }
+ }
+ }
+ return results;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MethodDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MethodDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MethodDefinition.as
new file mode 100755
index 0000000..a16c649
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/MethodDefinition.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MethodDefinition extends DefinitionWithMetaData
+ {
+ public function MethodDefinition(name:String, declaredBy:String, rawData:Object = null)
+ {
+ super(name, rawData);
+ _declaredBy = declaredBy;
+ }
+
+ private var _declaredBy:String;
+ private var declaredByDef:TypeDefinition;
+
+ public function get declaredBy():TypeDefinition
+ {
+ if (declaredByDef == null)
+ declaredByDef = new TypeDefinition(_declaredBy);
+
+ return declaredByDef;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
new file mode 100755
index 0000000..6035bab
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as
@@ -0,0 +1,260 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class TypeDefinition extends DefinitionWithMetaData
+ {
+ public function TypeDefinition(name:String, rawData:Object = null)
+ {
+ var c:int = name.indexOf("::");
+ if (c > -1)
+ {
+ _packageName = name.substring(0, c);
+ name = name.substring(c+2);
+ }
+ else
+ _packageName = "";
+ super(name, rawData);
+ }
+
+ private var _packageName:String;
+
+ public function get packageName():String
+ {
+ return _packageName;
+ }
+
+ override protected function get rawData():Object
+ {
+ if (_rawData == null)
+ {
+ var def:Object = getDefinitionByName(packageName + "::" + name);
+ COMPILE::AS3
+ {
+ _rawData = describeType(def);
+ }
+ COMPILE::JS
+ {
+ _rawData = def.prototype.FLEXJS_CLASS_INFO;
+ }
+ }
+ return _rawData;
+ }
+ /**
+ * @flexjsignorecoercion XML
+ */
+ public function get baseClasses():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.extendsClass;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@type;
+ results.push(new TypeDefinition(qname));
+ }
+ }
+ COMPILE::JS
+ {
+ var data:Object = rawData;
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ var prototype:Object = def.prototype;
+ while (prototype.FLEXJS_CLASS_INFO !== undefined)
+ {
+ name = prototype.FLEXJS_CLASS_INFO.names[0].qName;
+ results.push(new TypeDefinition(name));
+ def = getDefinitionByName(name);
+ prototype = def.prototype;
+ }
+ }
+ return results;
+ }
+
+ public function get interfaces():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.implementsInterface;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@type;
+ results.push(new TypeDefinition(qname));
+ }
+ }
+ COMPILE::JS
+ {
+ var data:* = rawData;
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ var prototype:Object = def.prototype;
+ while (data !== undefined)
+ {
+ var interfaces:Array = data.interfaces;
+ if (interfaces)
+ {
+ var n:int = interfaces.length;
+ for each (var s:String in interfaces)
+ results.push(new TypeDefinition(s));
+ }
+ name = data.names[0].qName;
+ results.push(new TypeDefinition(name));
+ def = getDefinitionByName(name);
+ prototype = def.prototype;
+ data = prototype.FLEXJS_CLASS_INFO;
+ }
+ }
+ return results;
+ }
+
+ public function get variables():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.variable;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@name;
+ results.push(new VariableDefinition(qname, item));
+ }
+ }
+ COMPILE::JS
+ {
+ var data:Object = rawData;
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
+ if (rdata !== undefined)
+ {
+ var variables:Object = rdata.variables();
+ if (variables)
+ {
+ for (var v:String in variables)
+ {
+ var varDef:Object = variables[v];
+ results.push(new VariableDefinition(v, varDef));
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ public function get accessors():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.accessor;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@name;
+ results.push(new MethodDefinition(qname, item.@declaredBy, item));
+ }
+ }
+ COMPILE::JS
+ {
+ var data:Object = rawData;
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
+ if (rdata !== undefined)
+ {
+ var accessors:Object = rdata.accessors();
+ if (accessors)
+ {
+ for (var prop:String in accessors)
+ {
+ var propDef:Object = accessors[prop];
+ results.push(new MethodDefinition(prop, propDef.declaredBy, propDef));
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ public function get methods():Array
+ {
+ var results:Array = [];
+
+ COMPILE::AS3
+ {
+ var xml:XML = rawData as XML;
+ var data:XMLList = xml.method;
+ var n:int = data.length();
+ for (var i:int = 0; i < n; i++)
+ {
+ var item:XML = data[i] as XML;
+ var qname:String = item.@name;
+ results.push(new MethodDefinition(qname, item.@declaredBy, item));
+ }
+ }
+ COMPILE::JS
+ {
+ var data:Object = rawData;
+ var name:String = data.names[0].qName;
+ var def:Object = getDefinitionByName(name);
+ var rdata:* = def.prototype.FLEXJS_REFLECTION_INFO();
+ if (rdata !== undefined)
+ {
+ var methods:Object = rdata.methods();
+ if (methods)
+ {
+ for (var fn:String in methods)
+ {
+ var fnDef:Object = methods[fn];
+ results.push(new MethodDefinition(fn, fnDef.declaredBy, fnDef));
+ }
+ }
+ }
+ }
+ return results;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/VariableDefinition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/VariableDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/VariableDefinition.as
new file mode 100755
index 0000000..3e87566
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/VariableDefinition.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+
+ /**
+ * The description of a Class or Interface
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class VariableDefinition extends DefinitionWithMetaData
+ {
+ public function VariableDefinition(name:String, rawData:Object = null)
+ {
+ super(rawData, name);
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
new file mode 100755
index 0000000..1114a1e
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/describeType.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.reflection
+{
+COMPILE::AS3
+{
+ import flash.utils.describeType;
+}
+
+ /**
+ * The equivalent of flash.utils.describeType.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function describeType(value:Object):TypeDefinition
+ {
+ COMPILE::AS3
+ {
+ var xml:XML = flash.utils.describeType(value);
+ return new TypeDefinition(xml.@name, xml);
+ }
+ COMPILE::JS
+ {
+ var qname:String = getQualifiedClassName(value);
+ return new TypeDefinition(qname, value.FLEXJS_CLASS_INFO);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
new file mode 100755
index 0000000..b18ab3c
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getDefinitionByName.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+COMPILE::AS3
+{
+ import flash.utils.getDefinitionByName;
+}
+
+ /**
+ * The equivalent of flash.utils.getQualifiedClassName.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getDefinitionByName(name:String):Object
+ {
+ COMPILE::AS3
+ {
+ return flash.utils.getDefinitionByName(name);
+ }
+ COMPILE::JS
+ {
+ var parts:Array = name.split('.');
+ var n:int = parts.length;
+ var o:Object = window;
+ for (var i:int = 0; i < n; i++) {
+ o = o[parts[i]];
+ }
+ return o;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
new file mode 100755
index 0000000..42eaa47
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedClassName.as
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.reflection
+{
+COMPILE::AS3
+{
+ import flash.utils.getQualifiedClassName;
+}
+
+ /**
+ * The equivalent of flash.utils.getQualifiedClassName.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getQualifiedClassName(value:*):String
+ {
+ COMPILE::AS3
+ {
+ return flash.utils.getQualifiedClassName(value);
+ }
+ COMPILE::JS
+ {
+ if (value.FLEXJS_CLASS_INFO == null)
+ {
+ if (value.prototype.FLEXJS_CLASS_INFO == null)
+ return null;
+ value = value.prototype;
+ }
+ return value.FLEXJS_CLASS_INFO.names[0].qName;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
new file mode 100755
index 0000000..95c75fa
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/getQualifiedSuperclassName.as
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.reflection
+{
+COMPILE::AS3
+{
+ import flash.utils.getQualifiedSuperclassName;
+}
+
+ /**
+ * The equivalent of flash.utils.getQualifiedSuperclassName.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getQualifiedSuperclassName(value:*):String
+ {
+ COMPILE::AS3
+ {
+ return flash.utils.getQualifiedSuperclassName(value);
+ }
+ COMPILE::JS
+ {
+ var constructorAsObject:Object = value["constructor"];
+ value = constructorAsObject.superClass_;
+ if (value == null || value.FLEXJS_CLASS_INFO == null)
+ return null;
+ return value.FLEXJS_CLASS_INFO.names[0].qName;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..92f5a0f
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
@@ -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.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ <path-element>as/src</path-element>
+ </include-sources>
+
+ <include-classes>
+ </include-classes>
+
+ <include-namespaces>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9875cf8a/frameworks/projects/Reflection/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/resources/compile-config.xml b/frameworks/projects/Reflection/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..e02f6b2
--- /dev/null
+++ b/frameworks/projects/Reflection/src/main/resources/compile-config.xml
@@ -0,0 +1,73 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-sources>
+ <path-element>as/src</path-element>
+ </include-sources>
+
+ <include-namespaces>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[37/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
new folders for Graphics
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a95bd7a0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a95bd7a0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a95bd7a0
Branch: refs/heads/develop
Commit: a95bd7a0b2b4cdbe6469331df7bd5c2f1ddaeb62
Parents: ae593ef
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:16:51 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
.../projects/Graphics/as/src/GraphicsClasses.as | 44 -
.../src/org/apache/flex/core/graphics/Circle.as | 98 -
.../org/apache/flex/core/graphics/Ellipse.as | 91 -
.../apache/flex/core/graphics/GradientBase.as | 229 ---
.../apache/flex/core/graphics/GradientEntry.as | 133 --
.../apache/flex/core/graphics/GraphicShape.as | 213 ---
.../flex/core/graphics/GraphicsContainer.as | 302 ---
.../src/org/apache/flex/core/graphics/IFill.as | 32 -
.../org/apache/flex/core/graphics/IStroke.as | 29 -
.../apache/flex/core/graphics/LinearGradient.as | 123 --
.../src/org/apache/flex/core/graphics/Path.as | 103 --
.../src/org/apache/flex/core/graphics/Rect.as | 87 -
.../org/apache/flex/core/graphics/SolidColor.as | 112 --
.../flex/core/graphics/SolidColorStroke.as | 130 --
.../src/org/apache/flex/core/graphics/Text.as | 140 --
.../graphics/utils/AdvancedLayoutFeatures.as | 1140 ------------
.../core/graphics/utils/CompoundTransform.as | 777 --------
.../core/graphics/utils/IAssetLayoutFeatures.as | 371 ----
.../flex/core/graphics/utils/MatrixUtil.as | 1605 ----------------
.../flex/core/graphics/utils/PathHelper.as | 1712 ------------------
.../core/graphics/utils/TransformOffsets.as | 367 ----
frameworks/projects/Graphics/basic-manifest.xml | 34 -
.../projects/Graphics/compile-asjs-config.xml | 82 -
frameworks/projects/Graphics/compile-config.xml | 78 -
.../Graphics/src/main/flex/GraphicsClasses.as | 44 +
.../org/apache/flex/core/graphics/Circle.as | 98 +
.../org/apache/flex/core/graphics/Ellipse.as | 91 +
.../apache/flex/core/graphics/GradientBase.as | 229 +++
.../apache/flex/core/graphics/GradientEntry.as | 133 ++
.../apache/flex/core/graphics/GraphicShape.as | 213 +++
.../flex/core/graphics/GraphicsContainer.as | 302 +++
.../flex/org/apache/flex/core/graphics/IFill.as | 32 +
.../org/apache/flex/core/graphics/IStroke.as | 29 +
.../apache/flex/core/graphics/LinearGradient.as | 123 ++
.../flex/org/apache/flex/core/graphics/Path.as | 103 ++
.../flex/org/apache/flex/core/graphics/Rect.as | 87 +
.../org/apache/flex/core/graphics/SolidColor.as | 112 ++
.../flex/core/graphics/SolidColorStroke.as | 130 ++
.../flex/org/apache/flex/core/graphics/Text.as | 140 ++
.../graphics/utils/AdvancedLayoutFeatures.as | 1140 ++++++++++++
.../core/graphics/utils/CompoundTransform.as | 777 ++++++++
.../core/graphics/utils/IAssetLayoutFeatures.as | 371 ++++
.../flex/core/graphics/utils/MatrixUtil.as | 1605 ++++++++++++++++
.../flex/core/graphics/utils/PathHelper.as | 1712 ++++++++++++++++++
.../core/graphics/utils/TransformOffsets.as | 367 ++++
.../src/main/resources/basic-manifest.xml | 34 +
.../src/main/resources/compile-asjs-config.xml | 82 +
.../src/main/resources/compile-config.xml | 78 +
48 files changed, 8032 insertions(+), 8032 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/GraphicsClasses.as b/frameworks/projects/Graphics/as/src/GraphicsClasses.as
deleted file mode 100644
index c463f04..0000000
--- a/frameworks/projects/Graphics/as/src/GraphicsClasses.as
+++ /dev/null
@@ -1,44 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class GraphicsClasses
-{
-
- import org.apache.flex.core.graphics.GraphicShape; GraphicShape;
- import org.apache.flex.core.graphics.Rect; Rect;
- import org.apache.flex.core.graphics.Ellipse; Ellipse;
- import org.apache.flex.core.graphics.Circle; Circle;
- import org.apache.flex.core.graphics.Path; Path;
- import org.apache.flex.core.graphics.SolidColor; SolidColor;
- import org.apache.flex.core.graphics.SolidColorStroke; SolidColorStroke;
- import org.apache.flex.core.graphics.Text; Text;
- import org.apache.flex.core.graphics.GraphicsContainer; GraphicsContainer;
- import org.apache.flex.core.graphics.LinearGradient; LinearGradient;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Circle.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Circle.as
deleted file mode 100644
index 8868bec..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Circle.as
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- public class Circle extends GraphicShape
- {
- private var _radius:Number;
-
- public function get radius():Number
- {
- return _radius;
- }
-
- public function set radius(value:Number):void
- {
- _radius = value;
- }
-
- /**
- * Draw the circle.
- * @param x The x location of the center of the circle
- * @param y The y location of the center of the circle.
- * @param radius The radius of the circle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion SVGCircleElement
- */
- public function drawCircle(x:Number, y:Number, radius:Number):void
- {
- COMPILE::AS3
- {
- graphics.clear();
- applyStroke();
- beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
- graphics.drawCircle(x,y,radius);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var circle:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
- circle.flexjs_wrapper = this;
- circle.setAttribute('style', style);
- if (stroke)
- {
- circle.setAttribute('cx', String(radius + stroke.weight));
- circle.setAttribute('cy', String(radius + stroke.weight));
- setPosition(x - radius, y - radius, stroke.weight, stroke.weight);
- }
- else
- {
- circle.setAttribute('cx', String(radius));
- circle.setAttribute('cy', String(radius));
- setPosition(x - radius, y - radius, 0, 0);
- }
-
- circle.setAttribute('rx', String(radius));
- circle.setAttribute('ry', String(radius));
- element.appendChild(circle);
-
- resize(x, y, (circle as SVGCircleElement).getBBox());
-
- }
- }
-
- override public function addedToParent():void
- {
- drawCircle(0, 0, radius);
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Ellipse.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Ellipse.as
deleted file mode 100644
index f22161f..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Ellipse.as
+++ /dev/null
@@ -1,91 +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.graphics
-{
- COMPILE::AS3
- {
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- public class Ellipse extends GraphicShape
- {
-
- /**
- * Draw the ellipse.
- * @param x The x position of the top-left corner of the bounding box of the ellipse.
- * @param y The y position of the top-left corner of the bounding box of the ellipse.
- * @param width The width of the ellipse.
- * @param height The height of the ellipse.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion SVGEllipseElement
- */
- public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void
- {
- COMPILE::AS3
- {
- graphics.clear();
- applyStroke();
- beginFill(new Rectangle(x, y, width, height), new Point(x,y));
- graphics.drawEllipse(x,y,width,height);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var ellipse:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
- ellipse.flexjs_wrapper = this;
- ellipse.setAttribute('style', style);
- if (stroke)
- {
- ellipse.setAttribute('cx', String(width / 2 + stroke.weight));
- ellipse.setAttribute('cy', String(height / 2 + stroke.weight));
- setPosition(x, y, stroke.weight * 2, stroke.weight * 2);
- }
- else
- {
- ellipse.setAttribute('cx', String(width / 2));
- ellipse.setAttribute('cy', String(height / 2));
- setPosition(x, y, 0, 0);
- }
- ellipse.setAttribute('rx', String(width / 2));
- ellipse.setAttribute('ry', String(height / 2));
- element.appendChild(ellipse);
-
- resize(x, y, (ellipse as SVGEllipseElement).getBBox());
-
- }
- }
-
- override protected function draw():void
- {
- drawEllipse(0, 0, width, height);
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientBase.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientBase.as
deleted file mode 100644
index 58d417a..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientBase.as
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- import org.apache.flex.core.graphics.utils.CompoundTransform;
-
- public class GradientBase
- {
-
- protected var colors:Array /* of uint */ = [];
-
- protected var ratios:Array /* of Number */ = [];
-
- protected var alphas:Array /* of Number */ = [];
-
- /**
- * Holds the matrix and the convenience transform properties (<code>x</code>, <code>y</code>, and <code>rotation</code>).
- * The compoundTransform is only created when the <code>matrix</code> property is set.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- */
- COMPILE::AS3
- protected var compoundTransform:CompoundTransform;
-
- /**
- * Value of the width and height of the untransformed gradient
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- */
- public static const GRADIENT_DIMENSION:Number = 1638.4;
-
- /**
- * generate uid
- */
- public function get newId():String
- {
- return 'gradient' + String(Math.floor((Math.random() * 100000) + 1));
- }
-
- /**
- * Storage for the entries property.
- */
- private var _entries:Array = [];
-
- /**
- * @private
- * Storage for the rotation property.
- */
- private var _rotation:Number = 0.0;
-
- /**
- * An Array of GradientEntry objects
- * defining the fill patterns for the gradient fill.
- *
- */
- public function get entries():Array
- {
- return _entries;
- }
-
- /**
- * @private
- */
- public function set entries(value:Array):void
- {
- _entries = value;
- COMPILE::AS3
- {
- processEntries();
- }
- }
-
- /**
- * By default, the LinearGradientStroke defines a transition
- * from left to right across the control.
- * Use the <code>rotation</code> property to control the transition direction.
- * For example, a value of 180.0 causes the transition
- * to occur from right to left, rather than from left to right.
- *
- * @default 0.0
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get rotation():Number
- {
- return _rotation;
- }
-
- /**
- * @private
- */
- public function set rotation(value:Number):void
- {
- _rotation = value;
- }
-
-
- private var _x:Number = 0;
-
- /**
- * The distance by which to translate each point along the x axis.
- */
- public function get x():Number
- {
- return _x;
- }
-
- /**
- * @private
- */
- public function set x(value:Number):void
- {
- _x = value;
- }
-
- private var _y:Number = 0;
-
- /**
- * The distance by which to translate each point along the y axis.
- */
- public function get y():Number
- {
- return _y;
- }
-
- /**
- * @private
- */
- public function set y(value:Number):void
- {
- _y = value;
- }
-
- COMPILE::AS3
- protected function toRad(a:Number):Number {
- return a*Math.PI/180;
- }
-
- COMPILE::AS3
- protected function get rotationInRadians():Number
- {
- return rotation / 180 * Math.PI;
- }
-
- /**
- * @private
- * Extract the gradient information in the public <code>entries</code>
- * Array into the internal <code>colors</code>, <code>ratios</code>,
- * and <code>alphas</code> arrays.
- */
- COMPILE::AS3
- private function processEntries():void
- {
- colors = [];
- ratios = [];
- alphas = [];
-
- if (!_entries || _entries.length == 0)
- return;
-
- var ratioConvert:Number = 255;
-
- var i:int;
-
- var n:int = _entries.length;
- for (i = 0; i < n; i++)
- {
- var e:GradientEntry = _entries[i];
- colors.push(e.color);
- alphas.push(e.alpha);
- ratios.push(e.ratio * ratioConvert);
- }
-
- if (isNaN(ratios[0]))
- ratios[0] = 0;
-
- if (isNaN(ratios[n - 1]))
- ratios[n - 1] = 255;
-
- i = 1;
-
- while (true)
- {
- while (i < n && !isNaN(ratios[i]))
- {
- i++;
- }
-
- if (i == n)
- break;
-
- var start:int = i - 1;
-
- while (i < n && isNaN(ratios[i]))
- {
- i++;
- }
-
- var br:Number = ratios[start];
- var tr:Number = ratios[i];
-
- for (var j:int = 1; j < i - start; j++)
- {
- ratios[j] = br + j * (tr - br) / (i - start);
- }
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientEntry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientEntry.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientEntry.as
deleted file mode 100644
index cbcdb3f..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GradientEntry.as
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- public class GradientEntry
- {
-
- //----------------------------------
- // alpha
- //----------------------------------
-
- private var _alpha:Number = 1.0;
- //----------------------------------
- // color
- //----------------------------------
-
- private var _color:uint = 0x000000;
- //----------------------------------
- // ratio
- //----------------------------------
-
- private var _ratio:Number = 0x000000;
-
-
- public function GradientEntry(alpha:Number = 1.0, color:uint = 0x000000, ratio:Number = 1.0)
- {
- _alpha = alpha;
- _color = color;
- _ratio = ratio;
- }
-
- /**
- * The transparency of a color.
- * Possible values are 0.0 (invisible) through 1.0 (opaque).
- *
- * @default 1.0
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.3
- */
- public function get alpha():Number
- {
- return _alpha;
- }
-
- public function set alpha(value:Number):void
- {
- var oldValue:Number = _alpha;
- if (value != oldValue)
- {
- _alpha = value;
- }
- }
-
- /**
- * A color value.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.3
- */
- public function get color():uint
- {
- return _color;
- }
-
- public function set color(value:uint):void
- {
- var oldValue:uint = _color;
- if (value != oldValue)
- {
- _color = value;
- }
- }
-
- /**
- * Where in the graphical element, as a percentage from 0.0 to 1.0,
- * Flex samples the associated color at 100%.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.3
- */
- public function get ratio():Number
- {
- return _ratio;
- }
-
- public function set ratio(value:Number):void
- {
- _ratio = value;
- }
-
- /**
- * Begin drawing the fill on the given shape's graphic object
- */
- public function begin(s:GraphicShape):void
- {
- COMPILE::AS3
- {
- s.graphics.beginFill(color,alpha);
- }
- }
-
- /**
- * End the fill
- */
- public function end(s:GraphicShape):void
- {
- COMPILE::AS3
- {
- s.graphics.endFill();
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicShape.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicShape.as
deleted file mode 100644
index 7e0391e..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicShape.as
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- import org.apache.flex.core.UIBase;
-
- public class GraphicShape extends UIBase
- {
- private var _fill:IFill;
- private var _stroke:IStroke;
-
- public function get stroke():IStroke
- {
- return _stroke;
- }
-
- /**
- * A solid color fill.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.0
- */
- public function set stroke(value:IStroke):void
- {
- _stroke = value;
- }
-
- public function get fill():IFill
- {
- return _fill;
- }
- /**
- * A solid color fill.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.0
- */
- public function set fill(value:IFill):void
- {
- _fill = value;
- }
-
- /**
- * Constructor
- *
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function GraphicShape()
- {
- COMPILE::JS
- {
- element = document.createElementNS('http://www.w3.org/2000/svg', 'svg') as WrappedHTMLElement;
- element.flexjs_wrapper = this;
- element.style.left = 0;
- element.style.top = 0;
- //element.offsetParent = null;
- positioner = element;
- positioner.style.position = 'relative';
- }
- }
-
- COMPILE::AS3
- protected function applyStroke():void
- {
- if(stroke)
- {
- stroke.apply(this);
- }
- }
-
- COMPILE::AS3
- protected function beginFill(targetBounds:Rectangle,targetOrigin:Point):void
- {
- if(fill)
- {
- fill.begin(this, targetBounds,targetOrigin);
- }
- }
-
- COMPILE::AS3
- protected function endFill():void
- {
- if(fill)
- {
- fill.end(this);
- }
- }
-
- /**
- * This is where the drawing methods get called from
- */
- protected function draw():void
- {
- //Overwrite in subclass
- }
-
- override public function addedToParent():void
- {
- COMPILE::AS3
- {
- super.addedToParent();
- }
- draw();
- COMPILE::JS
- {
- element.style.overflow = 'visible';
- }
- }
-
- /**
- * @return {string} The style attribute.
- */
- COMPILE::JS
- public function getStyleStr():String
- {
- var fillStr:String;
- if (fill)
- {
- fillStr = fill.addFillAttrib(this);
- }
- else
- {
- fillStr = 'fill:none';
- }
-
- var strokeStr:String;
- if (stroke)
- {
- strokeStr = stroke.addStrokeAttrib(this);
- }
- else
- {
- strokeStr = 'stroke:none';
- }
-
-
- return fillStr + ';' + strokeStr;
- }
-
-
- /**
- * @param x X position.
- * @param y Y position.
- * @param bbox The bounding box of the svg element.
- */
- COMPILE::JS
- public function resize(x:Number, y:Number, bbox:SVGRect):void
- {
- var useWidth:Number = Math.max(this.width, bbox.width);
- var useHeight:Number = Math.max(this.height, bbox.height);
-
- element.style.position = 'absolute';
- if (!isNaN(x)) element.style.top = String(x) + 'px';
- if (!isNaN(y)) element.style.left = String(y) + 'px';
- element.style.width = String(useWidth) + 'px';
- element.style.height = String(useHeight) + 'px';
- element.style.left = x;
- element.style.top = y;
- }
-
- COMPILE::JS
- private var _x:Number;
- COMPILE::JS
- private var _y:Number;
- COMPILE::JS
- private var _xOffset:Number;
- COMPILE::JS
- private var _yOffset:Number;
-
- /**
- * @param x X position.
- * @param y Y position.
- * @param xOffset offset from x position.
- * @param yOffset offset from y position.
- */
- COMPILE::JS
- public function setPosition(x:Number, y:Number, xOffset:Number, yOffset:Number):void
- {
- _x = x;
- _y = y;
- _xOffset = xOffset;
- _yOffset = yOffset;
- element.style.left = xOffset;
- element.style.top = yOffset;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicsContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicsContainer.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicsContainer.as
deleted file mode 100644
index 4927eb9..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/GraphicsContainer.as
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.display.GraphicsPath;
- import flash.display.Shape;
- import flash.display.Sprite;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.text.TextFieldType;
-
- import org.apache.flex.core.CSSTextField;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
- import org.apache.flex.core.graphics.utils.PathHelper;
-
- /**
- * GraphicsContainer is a surface on which you can
- * draw various graphic elements such as Rect, Circle,
- * Ellipse, Path etc.
- * Use this class if you want to draw multiple graphic
- * shapes on a single container.
- *
- */
- public class GraphicsContainer extends GraphicShape
- {
- /**
- * Removes all of the drawn elements of the container.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0.3
- */
- public function removeAllElements():void
- {
- COMPILE::AS3
- {
- graphics.clear();
- }
- COMPILE::JS
- {
- var svg:HTMLElement = element;
- while (svg.lastChild) {
- svg.removeChild(svg.lastChild);
- }
- }
- }
-
- /**
- * Draw the rectangle.
- * @param x The x position of the top-left corner of the rectangle.
- * @param y The y position of the top-left corner.
- * @param width The width of the rectangle.
- * @param height The height of the rectangle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0.3
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawRect(x:Number, y:Number, width:Number, height:Number):void
- {
- COMPILE::AS3
- {
- applyStroke();
- beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
- graphics.drawRect(x, y, width, height);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
- rect.flexjs_wrapper = this;
- rect.style.left = x;
- rect.style.top = y;
- rect.setAttribute('style', style);
- rect.setAttribute('x', String(x) + 'px');
- rect.setAttribute('y', String(y) + 'px');
- rect.setAttribute('width', String(width) + 'px');
- rect.setAttribute('height', String(height) + 'px');
- element.appendChild(rect);
- }
- }
-
- COMPILE::AS3
- public function createRect(x:Number, y:Number, width:Number, height:Number):void
- {
- var color:uint = (fill as SolidColor).color;
- var alpha:uint = (fill as SolidColor).alpha;
-
- var shape:Sprite = new Sprite();
- shape.graphics.beginFill(color,alpha);
- shape.graphics.drawRect(0, 0, width, height);
- shape.graphics.endFill();
- shape.x = x;
- shape.y = y;
- addChild(shape);
- }
-
- /**
- * Draw the ellipse.
- * @param x The x position of the top-left corner of the bounding box of the ellipse.
- * @param y The y position of the top-left corner of the bounding box of the ellipse.
- * @param width The width of the ellipse.
- * @param height The height of the ellipse.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0.3
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void
- {
- COMPILE::AS3
- {
- applyStroke();
- beginFill(new Rectangle(x,y,width,height), new Point(x,y));
- graphics.drawEllipse(x,y,width,height);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var ellipse:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
- ellipse.flexjs_wrapper = this;
- ellipse.style.left = x;
- ellipse.style.top = y;
- ellipse.setAttribute('style', style);
- ellipse.setAttribute('cx', String(x + width / 2));
- ellipse.setAttribute('cy', String(y + height / 2));
- ellipse.setAttribute('rx', String(width / 2));
- ellipse.setAttribute('ry', String(height / 2));
- element.appendChild(ellipse);
- }
- }
-
- /**
- * Draw the circle.
- * @param x The x location of the center of the circle
- * @param y The y location of the center of the circle.
- * @param radius The radius of the circle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawCircle(x:Number, y:Number, radius:Number):void
- {
- COMPILE::AS3
- {
- applyStroke();
- beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
- graphics.drawCircle(x,y,radius);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var circle:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
- circle.flexjs_wrapper = this;
- circle.style.left = x;
- circle.style.top = y;
- circle.setAttribute('style', style);
- circle.setAttribute('cx', String(x));
- circle.setAttribute('cy', String(y));
- circle.setAttribute('rx', String(radius));
- circle.setAttribute('ry', String(radius));
- element.appendChild(circle);
-
- }
- }
-
- /**
- * Draw the path.
- * @param data A string containing a compact represention of the path segments.
- * The value is a space-delimited string describing each path segment. Each
- * segment entry has a single character which denotes the segment type and
- * two or more segment parameters.
- *
- * If the segment command is upper-case, the parameters are absolute values.
- * If the segment command is lower-case, the parameters are relative values.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawPath(data:String):void
- {
- COMPILE::AS3
- {
- applyStroke();
- var bounds:Rectangle = PathHelper.getBounds(data);
- beginFill(bounds,bounds.topLeft);
- var graphicsPath:GraphicsPath = PathHelper.getSegments(data);
- graphics.drawPath(graphicsPath.commands, graphicsPath.data);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var path:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'path') as WrappedHTMLElement;
- path.flexjs_wrapper = this;
- path.style.left = 0;
- path.style.top = 0;
- path.setAttribute('style', style);
- path.setAttribute('d', data);
- element.appendChild(path);
- }
- }
-
- public function drawLine():void
- {
-
- }
-
- public function drawPolygon():void
- {
-
- }
-
- /**
- * Draw a string of characters.
- * @param value The string to draw.
- * @param x The x location of the center of the circle
- * @param y The y location of the center of the circle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion Text
- * @flexjsignorecoercion Node
- */
- public function drawText(value:String, x:Number, y:Number):Object
- {
- COMPILE::AS3
- {
- var textField:CSSTextField = new CSSTextField();
- addChild(textField);
-
- textField.selectable = false;
- textField.type = TextFieldType.DYNAMIC;
- textField.mouseEnabled = false;
- textField.autoSize = "left";
- textField.text = value;
-
- var lineColor:SolidColorStroke = stroke as SolidColorStroke;
- if (lineColor) {
- textField.textColor = lineColor.color;
- textField.alpha = lineColor.alpha;
- }
-
- textField.x = x;
- textField.y = y + textField.textHeight/4;
-
- return textField;
-
- }
- COMPILE::JS
- {
- var style:String = getStyleStr();
- var text:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'text') as WrappedHTMLElement;
- text.flexjs_wrapper = this;
- text.style.left = x;
- text.style.top = y;
- text.setAttribute('style', style);
- text.setAttribute('x', String(x) + 'px');
- text.setAttribute('y', String(y + 15) + 'px');
- var textNode:Text = document.createTextNode(value) as Text;
- text.appendChild(textNode as Node);
- element.appendChild(text);
- return text;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IFill.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IFill.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IFill.as
deleted file mode 100644
index f0101ab..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IFill.as
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
-
- public interface IFill
- {
- COMPILE::AS3
- function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void;
- COMPILE::AS3
- function end(s:GraphicShape):void;
- COMPILE::JS
- function addFillAttrib(s:GraphicShape):String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IStroke.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IStroke.as
deleted file mode 100644
index be3f022..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/IStroke.as
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- public interface IStroke
- {
- COMPILE::AS3
- function apply(s:GraphicShape):void;
-
- COMPILE::JS
- function get weight():Number;
-
- COMPILE::JS
- function addStrokeAttrib(s:GraphicShape):String;
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/LinearGradient.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/LinearGradient.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/LinearGradient.as
deleted file mode 100644
index c36a37b..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/LinearGradient.as
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.display.GradientType;
- import flash.display.InterpolationMethod;
- import flash.display.SpreadMethod;
- import flash.geom.Matrix;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
-
- public class LinearGradient extends GradientBase implements IFill
- {
- COMPILE::AS3
- private static var commonMatrix:Matrix = new Matrix();
-
- private var _scaleX:Number;
-
- /**
- * The horizontal scale of the gradient transform, which defines the width of the (unrotated) gradient
- */
- public function get scaleX():Number
- {
- return _scaleX;
- }
-
- public function set scaleX(value:Number):void
- {
- _scaleX = value;
- }
-
- COMPILE::AS3
- public function begin(s:GraphicShape,targetBounds:Rectangle, targetOrigin:Point):void
- {
- commonMatrix.identity();
- commonMatrix.createGradientBox(targetBounds.width,targetBounds.height,toRad(this.rotation),targetOrigin.x, targetOrigin.y);
-
- s.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios,
- commonMatrix, SpreadMethod.PAD, InterpolationMethod.RGB);
-
- }
-
- COMPILE::AS3
- public function end(s:GraphicShape):void
- {
- s.graphics.endFill();
- }
-
- /**
- * addFillAttrib()
- *
- * @param value The GraphicShape object on which the fill must be added.
- * @return {string}
- * @flexjsignorecoercion Node
- */
- COMPILE::JS
- public function addFillAttrib(value:GraphicShape):String
- {
- //Create and add a linear gradient def
- var svgNS:String = value.element.namespaceURI;
- var grad:HTMLElement = document.createElementNS(svgNS, 'linearGradient') as HTMLElement;
- var gradientId:String = this.newId;
- grad.setAttribute('id', gradientId);
-
- //Set x1, y1, x2, y2 of gradient
- grad.setAttribute('x1', '0%');
- grad.setAttribute('y1', '0%');
- grad.setAttribute('x2', '100%');
- grad.setAttribute('y2', '0%');
-
- //Apply rotation to the gradient if rotation is a number
- if (rotation)
- {
- grad.setAttribute('gradientTransform', 'rotate(' + rotation + ' 0.5 0.5)');
- }
-
- //Process gradient entries and create a stop for each entry
- var entries:Array = this.entries;
- for (var i:int = 0; i < entries.length; i++)
- {
- var gradientEntry:GradientEntry = entries[i];
- var stop:HTMLElement = document.createElementNS(svgNS, 'stop') as HTMLElement;
- //Set Offset
- stop.setAttribute('offset', String(gradientEntry.ratio * 100) + '%');
- //Set Color
- var color:String = Number(gradientEntry.color).toString(16);
- if (color.length == 1) color = '00' + color;
- if (color.length == 2) color = '00' + color;
- if (color.length == 4) color = '00' + color;
- stop.setAttribute('stop-color', '#' + String(color));
- //Set Alpha
- stop.setAttribute('stop-opacity', String(gradientEntry.alpha));
-
- grad.appendChild(stop);
- }
-
- //Add defs element if not available already
- //Add newly created gradient to defs element
- var defs:Node = value.element.querySelector('defs') ||
- value.element.insertBefore(document.createElementNS(svgNS, 'defs'), value.element.firstChild);
- defs.appendChild(grad);
-
- //Return the fill attribute
- return 'fill:url(#' + gradientId + ')';
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Path.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Path.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Path.as
deleted file mode 100644
index 2d69364..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Path.as
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.display.GraphicsPath;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- import org.apache.flex.core.graphics.utils.PathHelper;
-
- public class Path extends GraphicShape
- {
-
- private var _data:String;
-
- public function get data():String
- {
- return _data;
- }
-
- public function set data(value:String):void
- {
- _data = value;
- }
-
- /**
- * Draw the path.
- * @param data A string containing a compact represention of the path segments.
- * The value is a space-delimited string describing each path segment. Each
- * segment entry has a single character which denotes the segment type and
- * two or more segment parameters.
- *
- * If the segment command is upper-case, the parameters are absolute values.
- * If the segment command is lower-case, the parameters are relative values.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawPath(x:Number,y:Number,data:String):void
- {
- COMPILE::AS3
- {
- graphics.clear();
- applyStroke();
- var bounds:Rectangle = PathHelper.getBounds(data);
- this.width = bounds.width;
- this.height = bounds.height;
- beginFill(bounds,new Point(bounds.left + x, bounds.top + y) );
- var graphicsPath:GraphicsPath = PathHelper.getSegments(data,x,y);
- graphics.drawPath(graphicsPath.commands, graphicsPath.data);
- endFill();
- }
- COMPILE::JS
- {
- if (data == null || data.length === 0) return;
- var style:String = getStyleStr();
- var path:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'path') as WrappedHTMLElement;
- path.flexjs_wrapper = this;
- path.setAttribute('style', style);
- path.setAttribute('d', data);
- element.appendChild(path);
- if (stroke)
- {
- setPosition(x, y, stroke.weight, stroke.weight);
- }
- else
- {
- setPosition(x, y, 0, 0);
- }
-
- resize(x, y, path['getBBox']());
-
- }
- }
-
- override protected function draw():void
- {
- drawPath(0, 0, data);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Rect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Rect.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Rect.as
deleted file mode 100644
index fd1daa8..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Rect.as
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.display.CapsStyle;
- import flash.display.JointStyle;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- public class Rect extends GraphicShape
- {
-
- /**
- * Draw the rectangle.
- * @param x The x position of the top-left corner of the rectangle.
- * @param y The y position of the top-left corner.
- * @param width The width of the rectangle.
- * @param height The height of the rectangle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- public function drawRect(x:Number, y:Number, width:Number, height:Number):void
- {
- COMPILE::AS3
- {
- graphics.clear();
- applyStroke();
- beginFill(new Rectangle(x, y, width, height), new Point(x,y));
- graphics.drawRect(x, y, width, height);
- endFill();
- }
- COMPILE::JS
- {
- var style:String = this.getStyleStr();
- var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
- rect.flexjs_wrapper = this;
- rect.setAttribute('style', style);
- if (stroke)
- {
- rect.setAttribute('x', String(stroke.weight / 2) + 'px');
- rect.setAttribute('y', String(stroke.weight / 2) + 'px');
- setPosition(x, y, stroke.weight, stroke.weight);
- }
- else
- {
- rect.setAttribute('x', '0' + 'px');
- rect.setAttribute('y', '0' + 'px');
- setPosition(x, y, 0, 0);
- }
- rect.setAttribute('width', String(width) + 'px');
- rect.setAttribute('height', String(height) + 'px');
- element.appendChild(rect);
-
- resize(x, y, rect['getBBox']());
- }
- }
-
- override protected function draw():void
- {
- drawRect(0,0,width,height);
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColor.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColor.as
deleted file mode 100644
index 73e99b0..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColor.as
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.geom.Point;
- import flash.geom.Rectangle;
- }
-
- public class SolidColor implements IFill
- {
-
- //----------------------------------
- // alpha
- //----------------------------------
-
- private var _alpha:Number = 1.0;
- //----------------------------------
- // color
- //----------------------------------
-
- private var _color:uint = 0x000000;
-
- /**
- * The transparency of a color.
- * Possible values are 0.0 (invisible) through 1.0 (opaque).
- *
- * @default 1.0
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.3
- */
- public function get alpha():Number
- {
- return _alpha;
- }
-
- public function set alpha(value:Number):void
- {
- var oldValue:Number = _alpha;
- if (value != oldValue)
- {
- _alpha = value;
- }
- }
-
- /**
- * A color value.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.3
- */
- public function get color():uint
- {
- return _color;
- }
-
- public function set color(value:uint):void
- {
- var oldValue:uint = _color;
- if (value != oldValue)
- {
- _color = value;
- }
- }
-
- COMPILE::AS3
- public function begin(s:GraphicShape,targetBounds:Rectangle,targetOrigin:Point):void
- {
- s.graphics.beginFill(color,alpha);
- }
-
- COMPILE::AS3
- public function end(s:GraphicShape):void
- {
- s.graphics.endFill();
- }
-
- /**
- * addFillAttrib()
- *
- * @param value The GraphicShape object on which the fill must be added.
- * @return {string}
- */
- COMPILE::JS
- public function addFillAttrib(value:GraphicShape):String
- {
- var color:String = Number(this.color).toString(16);
- if (color.length == 1) color = '00' + color;
- if (color.length == 2) color = '00' + color;
- if (color.length == 4) color = '00' + color;
- return 'fill:#' + String(color) + ';fill-opacity:' + String(alpha);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColorStroke.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColorStroke.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColorStroke.as
deleted file mode 100644
index 9535cdc..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/SolidColorStroke.as
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics
-{
- COMPILE::AS3
- {
- import flash.display.CapsStyle;
- import flash.display.JointStyle;
- }
-
- public class SolidColorStroke implements IStroke
- {
-
- //----------------------------------
- // alpha
- //----------------------------------
- private var _alpha:Number = 1.0;
-
- //----------------------------------
- // color
- //----------------------------------
- private var _color:uint = 0x000000;
-
- //----------------------------------
- // weight
- //----------------------------------
- private var _weight:Number = 1;
-
- /**
- * The transparency of a color.
- * Possible values are 0.0 (invisible) through 1.0 (opaque).
- *
- * @default 1.0
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.3
- */
- public function get alpha():Number
- {
- return _alpha;
- }
-
- public function set alpha(value:Number):void
- {
- var oldValue:Number = _alpha;
- if (value != oldValue)
- {
- _alpha = value;
- }
- }
-
- /**
- * A color value.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.3
- */
- public function get color():uint
- {
- return _color;
- }
-
- public function set color(value:uint):void
- {
- var oldValue:uint = _color;
- if (value != oldValue)
- {
- _color = value;
- }
- }
-
- public function get weight():Number
- {
- return _weight;
- }
-
- /**
- * A color value.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion FlexJS 0.3
- */
- public function set weight(value:Number):void
- {
- _weight = value;
- }
-
- COMPILE::AS3
- public function apply(s:GraphicShape):void
- {
- s.graphics.lineStyle(weight,color,alpha,false,"normal",CapsStyle.SQUARE,JointStyle.MITER);
- }
-
- /**
- * addStrokeAttrib()
- *
- * @param value The GraphicShape object on which the stroke must be added.
- * @return {string}
- */
- COMPILE::JS
- public function addStrokeAttrib(value:GraphicShape):String
- {
- var strokeColor:String = Number(color).toString(16);
- if (strokeColor.length == 1) strokeColor = '00' + strokeColor;
- if (strokeColor.length == 2) strokeColor = '00' + strokeColor;
- if (strokeColor.length == 4) strokeColor = '00' + strokeColor;
- return 'stroke:#' + String(strokeColor) + ';stroke-width:' +
- String(weight) + ';stroke-opacity:' + String(alpha);
- };
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Text.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Text.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Text.as
deleted file mode 100644
index 24dd840..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/Text.as
+++ /dev/null
@@ -1,140 +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.graphics
-{
- COMPILE::AS3
- {
- import flash.text.TextFieldType;
- import org.apache.flex.core.CSSTextField;
- }
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- /**
- * Draws a string of characters at a specific location using the stroke
- * value of color and alpha.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * // TODO (aharui) ignore imports of external linkage interfaces?
- * @flexjsignoreimport SVGLocatable
- */
- public class Text extends GraphicShape
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Text()
- {
- super();
-
- COMPILE::AS3
- {
- _textField = new CSSTextField();
- addChild(_textField);
- }
- }
-
-
- COMPILE::AS3
- private var _textField:CSSTextField;
-
- /**
- * @copy org.apache.flex.core.ITextModel#textField
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function get textField() : CSSTextField
- {
- return _textField;
- }
-
- /**
- * Draws text at the given point.
- * @param value The string to draw.
- * @param x The x position of the top-left corner of the rectangle.
- * @param y The y position of the top-left corner.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion Text
- * @flexjsignorecoercion Node
- * @flexjsignorecoercion SVGLocatable
- */
- public function drawText(value:String, x:Number, y:Number):void
- {
- COMPILE::AS3
- {
- textField.selectable = false;
- textField.type = TextFieldType.DYNAMIC;
- textField.mouseEnabled = false;
- textField.autoSize = "left";
- textField.text = value;
-
- var color:SolidColorStroke = stroke as SolidColorStroke;
- if (color) {
- textField.textColor = color.color;
- textField.alpha = color.alpha;
- }
-
- textField.x = x;
- textField.y = y;
- }
- COMPILE::JS
- {
- var style:String = this.getStyleStr();
- var text:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'text') as WrappedHTMLElement;
- text.flexjs_wrapper = this;
- text.setAttribute('style', style);
- text.setAttribute('x', String(x) + 'px');
- text.setAttribute('y', String(y) + 'px');
- setPosition(x, y, 0, 0);
- var textNode:Text = document.createTextNode(value) as Text;
- text.appendChild(textNode as Node);
- element.appendChild(text);
-
- resize(x, y, (text as SVGLocatable).getBBox());
-
- }
- }
-
- COMPILE::JS
- override protected function draw():void
- {
-
- }
-
- }
-}
\ No newline at end of file
[34/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/PathHelper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/PathHelper.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/PathHelper.as
deleted file mode 100644
index 5b5e136..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/PathHelper.as
+++ /dev/null
@@ -1,1712 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics.utils
-{
- import flash.display.GraphicsPath;
- import flash.geom.Rectangle;
-
- public class PathHelper
- {
- private static var segments:PathSegmentsCollection;
- private static var graphicsPath:GraphicsPath = new GraphicsPath(new Vector.<int>(), new Vector.<Number>());
-
- public static function getSegments(data:String, x:Number=0, y:Number=0):GraphicsPath
- {
- segments = new PathSegmentsCollection(data);
- segments.generateGraphicsPath(graphicsPath, x, y, 1, 1);
- return graphicsPath;
- }
-
- public static function getBounds(data:String):Rectangle
- {
- segments = new PathSegmentsCollection(data);
- return segments.getBounds();
- }
- }
-}
-
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - PathSegmentsCollection
-//
-//--------------------------------------------------------------------------
-
-/**
- * Helper class that takes in a string and stores and generates a vector of
- * Path segments.
- * Provides methods for generating GraphicsPath and calculating bounds.
- */
-class PathSegmentsCollection
-{
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param value
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function PathSegmentsCollection(value:String)
- {
- if (!value)
- {
- _segments = new Vector.<PathSegment>();
- return;
- }
-
- var newSegments:Vector.<PathSegment> = new Vector.<PathSegment>();
- var charCount:int = value.length;
- var c:Number; // current char code, String.charCodeAt() returns Number.
- var useRelative:Boolean;
- var prevIdentifier:Number = 0;
- var prevX:Number = 0;
- var prevY:Number = 0;
- var lastMoveX:Number = 0;
- var lastMoveY:Number = 0;
- var x:Number;
- var y:Number;
- var controlX:Number;
- var controlY:Number;
- var control2X:Number;
- var control2Y:Number;
- var lastMoveSegmentIndex:int = -1;
-
- _dataLength = charCount;
- _charPos = 0;
- while (true)
- {
- // Skip any whitespace or commas first
- skipWhiteSpace(value);
-
- // Are we done parsing?
- if (_charPos >= charCount)
- break;
-
- // Get the next character
- c = value.charCodeAt(_charPos++);
-
- // Is this a start of a number?
- // The RegExp for a float is /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/
- if ((c >= 0x30 && c < 0x3A) || // A digit
- (c == 0x2B || c == 0x2D) || // '+' & '-'
- (c == 0x2E)) // '.'
- {
- c = prevIdentifier;
- _charPos--;
- }
- else if (c >= 0x41 && c <= 0x56) // Between 'A' and 'V'
- useRelative = false;
- else if (c >= 0x61 && c <= 0x7A) // Between 'a' and 'v'
- useRelative = true;
-
- switch(c)
- {
- case 0x63: // c
- case 0x43: // C
- controlX = getNumber(useRelative, prevX, value);
- controlY = getNumber(useRelative, prevY, value);
- control2X = getNumber(useRelative, prevX, value);
- control2Y = getNumber(useRelative, prevY, value);
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new CubicBezierSegment(controlX, controlY,
- control2X, control2Y,
- x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x63;
-
- break;
-
- case 0x6D: // m
- case 0x4D: // M
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new MoveSegment(x, y));
- prevX = x;
- prevY = y;
- // If a moveto is followed by multiple pairs of coordinates,
- // the subsequent pairs are treated as implicit lineto commands.
- prevIdentifier = (c == 0x6D) ? 0x6C : 0x4C; // c == 'm' ? 'l' : 'L'
-
- // Fix for bug SDK-24457:
- // If the Quadratic segment is isolated, the Player
- // won't draw fill correctly. We need to generate
- // a dummy line segment.
- var curSegmentIndex:int = newSegments.length - 1;
- if (lastMoveSegmentIndex + 2 == curSegmentIndex &&
- newSegments[lastMoveSegmentIndex + 1] is QuadraticBezierSegment)
- {
- // Insert a dummy LineSegment
- newSegments.splice(lastMoveSegmentIndex + 1, 0, new LineSegment(lastMoveX, lastMoveY));
- curSegmentIndex++;
- }
-
- lastMoveSegmentIndex = curSegmentIndex;
- lastMoveX = x;
- lastMoveY = y;
- break;
-
- case 0x6C: // l
- case 0x4C: // L
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new LineSegment(x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x6C;
- break;
-
- case 0x68: // h
- case 0x48: // H
- x = getNumber(useRelative, prevX, value);
- y = prevY;
- newSegments.push(new LineSegment(x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x68;
- break;
-
- case 0x76: // v
- case 0x56: // V
- x = prevX;
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new LineSegment(x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x76;
- break;
-
- case 0x71: // q
- case 0x51: // Q
- controlX = getNumber(useRelative, prevX, value);
- controlY = getNumber(useRelative, prevY, value);
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new QuadraticBezierSegment(controlX, controlY, x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x71;
- break;
-
- case 0x74: // t
- case 0x54: // T
- // control is a reflection of the previous control point
- if (prevIdentifier == 0x74 || prevIdentifier == 0x71) // 't' or 'q'
- {
- controlX = prevX + (prevX - controlX);
- controlY = prevY + (prevY - controlY);
- }
- else
- {
- controlX = prevX;
- controlY = prevY;
- }
-
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new QuadraticBezierSegment(controlX, controlY, x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x74;
-
- break;
-
- case 0x73: // s
- case 0x53: // S
- if (prevIdentifier == 0x73 || prevIdentifier == 0x63) // s or c
- {
- controlX = prevX + (prevX - control2X);
- controlY = prevY + (prevY - control2Y);
- }
- else
- {
- controlX = prevX;
- controlY = prevY;
- }
-
- control2X = getNumber(useRelative, prevX, value);
- control2Y = getNumber(useRelative, prevY, value);
- x = getNumber(useRelative, prevX, value);
- y = getNumber(useRelative, prevY, value);
- newSegments.push(new CubicBezierSegment(controlX, controlY,
- control2X, control2Y, x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x73;
-
- break;
- case 0x61: //a
- case 0x41: //A
- var rx:Number = getNumber(useRelative, prevX, value);
- var ry:Number = getNumber(useRelative, prevY, value);
- var angle:Number = getNumber(useRelative, prevY, value);
- var largeArcFlag:Boolean = getNumber(useRelative, prevY, value) == 1 ? true:false;
- var sweepFlag:Boolean = getNumber(useRelative, prevY, value) == 1 ? true:false;
- var endX:Number = getNumber(useRelative, prevX, value);
- var endY:Number = getNumber(useRelative, prevY, value);
- newSegments.push(new EllipticalArcSegment(rx,ry,angle,largeArcFlag,sweepFlag,endX,endY));
- prevX = endX;
- prevY = endY;
- prevIdentifier = 0x41;
- break;
- case 0x7A: // z
- case 0x5A: // Z
- x = lastMoveX;
- y = lastMoveY;
- newSegments.push(new LineSegment(x, y));
- prevX = x;
- prevY = y;
- prevIdentifier = 0x7A;
-
- break;
-
- default:
- // unknown identifier, throw error?
- _segments = new Vector.<PathSegment>();
- return;
- }
- }
-
- // Fix for bug SDK-24457:
- // If the Quadratic segment is isolated, the Player
- // won't draw fill correctly. We need to generate
- // a dummy line segment.
- curSegmentIndex = newSegments.length;
- if (lastMoveSegmentIndex + 2 == curSegmentIndex &&
- newSegments[lastMoveSegmentIndex + 1] is QuadraticBezierSegment)
- {
- // Insert a dummy LineSegment
- newSegments.splice(lastMoveSegmentIndex + 1, 0, new LineSegment(lastMoveX, lastMoveY));
- curSegmentIndex++;
- }
-
- _segments = newSegments;
- }
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // data
- //----------------------------------
-
- private var _segments:Vector.<PathSegment>;
-
- /**
- * A Vector of the actual path segments. May be empty, but always non-null.
- */
- public function get data():Vector.<PathSegment>
- {
- return _segments;
- }
-
- //----------------------------------
- // bounds
- //----------------------------------
-
- private var _bounds:Rectangle;
-
- /**
- * The bounds of the segments in local coordinates.
- */
- public function getBounds():Rectangle
- {
- if (_bounds)
- return _bounds;
-
- // First, allocate temporary bounds, as getBoundingBox() requires
- // natual bounds to calculate a scaling factor
- _bounds = new Rectangle(0, 0, 1, 1);
-
- // Pass in the same size to getBoundingBox
- // so that the scaling factor is (1, 1).
- _bounds = getBoundingBox(1, 1, null /*Matrix*/);
- return _bounds;
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * @return Returns the axis aligned bounding box of the segments stretched to
- * width, height and then transformed with transformation matrix m.
- */
- public function getBoundingBox(width:Number, height:Number, m:Matrix):Rectangle
- {
- var naturalBounds:Rectangle = getBounds();
- var sx:Number = naturalBounds.width == 0 ? 1 : width / naturalBounds.width;
- var sy:Number = naturalBounds.height == 0 ? 1 : height / naturalBounds.height;
-
- var prevSegment:PathSegment;
- var pathBBox:Rectangle;
- var count:int = _segments.length;
-
- for (var i:int = 0; i < count; i++)
- {
- var segment:PathSegment = _segments[i];
- pathBBox = segment.getBoundingBox(prevSegment, sx, sy, m, pathBBox);
- prevSegment = segment;
- }
-
- // If path is empty, it's untransformed bounding box is (0,0), so we return transformed point (0,0)
- if (!pathBBox)
- {
- var x:Number = m ? m.tx : 0;
- var y:Number = m ? m.ty : 0;
- pathBBox = new Rectangle(x, y);
- }
- return pathBBox;
- }
-
- /**
- * Workhorse method that iterates through the <code>segments</code>
- * array and draws each path egment based on its control points.
- *
- * Segments are drawn from the x and y position of the path.
- * Additionally, segments are drawn by taking into account the scale
- * applied to the path.
- *
- * @param tx A Number representing the x position of where this
- * path segment should be drawn
- *
- * @param ty A Number representing the y position of where this
- * path segment should be drawn
- *
- * @param sx A Number representing the scaleX at which to draw
- * this path segment
- *
- * @param sy A Number representing the scaleY at which to draw this
- * path segment
- */
- public function generateGraphicsPath(graphicsPath:GraphicsPath,
- tx:Number,
- ty:Number,
- sx:Number,
- sy:Number):void
- {
- graphicsPath.commands = null;
- graphicsPath.data = null;
-
- // Always start by moving to drawX, drawY. Otherwise
- // the path will begin at the previous pen location
- // if it does not start with a MoveSegment.
- graphicsPath.moveTo(tx, ty);
-
- var curSegment:PathSegment;
- var prevSegment:PathSegment;
- var count:int = _segments.length;
- for (var i:int = 0; i < count; i++)
- {
- prevSegment = curSegment;
- curSegment = _segments[i];
- curSegment.draw(graphicsPath, tx, ty, sx, sy, prevSegment);
- }
- }
-
- //--------------------------------------------------------------------------
- //
- // Private methods
- //
- //--------------------------------------------------------------------------
-
- private var _charPos:int = 0;
- private var _dataLength:int = 0;
-
- private function skipWhiteSpace(data:String):void
- {
- while (_charPos < _dataLength)
- {
- var c:Number = data.charCodeAt(_charPos);
- if (c != 0x20 && // Space
- c != 0x2C && // Comma
- c != 0xD && // Carriage return
- c != 0x9 && // Tab
- c != 0xA) // New line
- {
- break;
- }
- _charPos++;
- }
- }
-
- private function getNumber(useRelative:Boolean, offset:Number, value:String):Number
- {
- // Parse the string and find the first occurrance of the following RexExp
- // numberRegExp:RegExp = /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/g;
-
- skipWhiteSpace(value); // updates _charPos
- if (_charPos >= _dataLength)
- return NaN;
-
- // Remember the start of the number
- var numberStart:int = _charPos;
- var hasSignCharacter:Boolean = false;
- var hasDigits:Boolean = false;
-
- // The number could start with '+' or '-' (the "[+-]?" part of the RegExp)
- var c:Number = value.charCodeAt(_charPos);
- if (c == 0x2B || c == 0x2D) // '+' or '-'
- {
- hasSignCharacter = true;
- _charPos++;
- }
-
- // The index of the '.' if any
- var dotIndex:int = -1;
-
- // First sequence of digits and optional dot in between (the "\d*\.?\d+" part of the RegExp)
- while (_charPos < _dataLength)
- {
- c = value.charCodeAt(_charPos);
-
- if (c >= 0x30 && c < 0x3A) // A digit
- {
- hasDigits = true;
- }
- else if (c == 0x2E && dotIndex == -1) // '.'
- {
- dotIndex = _charPos;
- }
- else
- break;
-
- _charPos++;
- }
-
- // Now check whether we had at least one digit.
- if (!hasDigits)
- {
- // Go to the end of the data
- _charPos = _dataLength;
- return NaN;
- }
-
- // 1. Was the last character a '.'? If so, rewind one character back.
- if (c == 0x2E)
- _charPos--;
-
- // So far we have a valid number, remember its end character index
- var numberEnd:int = _charPos;
-
- // Check to see if we have scientific notation (the "([Ee][+-]?\d+)?" part of the RegExp)
- if (c == 0x45 || c == 0x65)
- {
- _charPos++;
-
- // Check for '+' or '-'
- if (_charPos < _dataLength)
- {
- c = value.charCodeAt(_charPos);
- if (c == 0x2B || c == 0x2D)
- _charPos++;
- }
-
- // Find all the digits
- var digitStart:int = _charPos;
- while (_charPos < _dataLength)
- {
- c = value.charCodeAt(_charPos);
-
- // Not a digit?
- if (!(c >= 0x30 && c < 0x3A))
- {
- break;
- }
-
- _charPos++;
- }
-
- // Do we have at least one digit?
- if (digitStart < _charPos)
- numberEnd = _charPos; // Scientific notation, update the end index of the number.
- else
- _charPos = numberEnd; // No scientific notation, rewind back to the end index of the number.
- }
-
- // Use parseFloat to get the actual number.
- // TODO (egeorgie): we could build the number while matching the RegExp which will save the substr and parseFloat
- var subString:String = value.substr(numberStart, numberEnd - numberStart);
- var result:Number = parseFloat(subString);
- if (isNaN(result))
- {
- // Go to the end of the data
- _charPos = _dataLength;
- return NaN;
- }
- _charPos = numberEnd;
- return useRelative ? result + offset : result;
- }
-}
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - PathSegment
-//
-//--------------------------------------------------------------------------
-import flash.display.GraphicsPath;
-import flash.geom.Matrix;
-import flash.geom.Rectangle;
-
-
-/**
- * The PathSegment class is the base class for a segment of a path.
- * This class is not created directly. It is the base class for
- * MoveSegment, LineSegment, CubicBezierSegment and QuadraticBezierSegment.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class PathSegment extends Object
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param _x The x position of the pen in the current coordinate system.
- *
- * @param _y The y position of the pen in the current coordinate system.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function PathSegment(_x:Number = 0, _y:Number = 0)
- {
- super();
- x = _x;
- y = _y;
- }
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // x
- //----------------------------------
-
- /**
- * The ending x position for this segment.
- *
- * @default 0
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var x:Number = 0;
-
- //----------------------------------
- // y
- //----------------------------------
-
- /**
- * The ending y position for this segment.
- *
- * @default 0
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var y:Number = 0;
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * Draws this path segment. You can determine the current pen position by
- * reading the x and y values of the previous segment.
- *
- * @param g The graphics context to draw into.
- * @param prev The previous segment drawn, or null if this is the first segment.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
- {
- // Override to draw your segment
- }
-
- /**
- * @param prev The previous segment drawn, or null if this is the first segment.
- * @param sx Pre-transform scale factor for x coordinates.
- * @param sy Pre-transform scale factor for y coordinates.
- * @param m Transformation matrix.
- * @param rect If non-null, rect is expanded to include the bounding box of the segment.
- * @return Returns the union of rect and the axis aligned bounding box of the post-transformed
- * path segment.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
- {
- // Override to calculate your segment's bounding box.
- return rect;
- }
-
- /**
- * Returns the tangent for the segment.
- * @param prev The previous segment drawn, or null if this is the first segment.
- * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
- * @param sx Pre-transform scale factor for x coordinates.
- * @param sy Pre-transform scale factor for y coordinates.
- * @param m Transformation matrix.
- * @param result The tangent is returned as vector (x, y) in result.
- */
- public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
- {
- result.x = 0;
- result.y = 0;
- }
-}
-
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - LineSegment
-//
-//--------------------------------------------------------------------------
-
-import flash.display.GraphicsPath;
-import flash.geom.Matrix;
-import flash.geom.Point;
-import flash.geom.Rectangle;
-
-
-/**
- * The LineSegment draws a line from the current pen position to the coordinate located at x, y.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class LineSegment extends PathSegment
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param x The current location of the pen along the x axis. The <code>draw()</code> method uses
- * this value to determine where to draw to.
- *
- * @param y The current location of the pen along the y axis. The <code>draw()</code> method uses
- * this value to determine where to draw to.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function LineSegment(x:Number = 0, y:Number = 0)
- {
- super(x, y);
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * @inheritDoc
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
- {
- graphicsPath.lineTo(dx + x*sx, dy + y*sy);
- }
-
- /**
- * @inheritDoc
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
- {
- pt = MatrixUtil.transformPoint(x * sx, y * sy, m);
- var x1:Number = pt.x;
- var y1:Number = pt.y;
-
- // If the previous segment actually draws, then only add the end point to the rectangle,
- // as the start point would have been added by the previous segment:
- if (prev != null && !(prev is MoveSegment))
- return MatrixUtil.rectUnion(x1, y1, x1, y1, rect);
-
- var pt:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m);
- var x2:Number = pt.x;
- var y2:Number = pt.y;
-
- return MatrixUtil.rectUnion(Math.min(x1, x2), Math.min(y1, y2),
- Math.max(x1, x2), Math.max(y1, y2), rect);
- }
-
- /**
- * Returns the tangent for the segment.
- * @param prev The previous segment drawn, or null if this is the first segment.
- * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
- * @param sx Pre-transform scale factor for x coordinates.
- * @param sy Pre-transform scale factor for y coordinates.
- * @param m Transformation matrix.
- * @param result The tangent is returned as vector (x, y) in result.
- */
- override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
- {
- var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
- var pt1:Point = MatrixUtil.transformPoint(x * sx, y * sy, m);
-
- result.x = pt1.x - pt0.x;
- result.y = pt1.y - pt0.y;
- }
-}
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - MoveSegment
-//
-//--------------------------------------------------------------------------
-import flash.display.GraphicsPath;
-
-/**
- * The MoveSegment moves the pen to the x,y position. This class calls the <code>Graphics.moveTo()</code> method
- * from the <code>draw()</code> method.
- *
- *
- * @see flash.display.Graphics
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class MoveSegment extends PathSegment
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param x The target x-axis location in 2-d coordinate space.
- *
- * @param y The target y-axis location in 2-d coordinate space.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function MoveSegment(x:Number = 0, y:Number = 0)
- {
- super(x, y);
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * @inheritDoc
- *
- * The MoveSegment class moves the pen to the position specified by the
- * x and y properties.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
- {
- graphicsPath.moveTo(dx+x*sx, dy+y*sy);
- }
-}
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - CubicBezierSegment
-//
-//--------------------------------------------------------------------------
-
-import flash.display.GraphicsPath;
-import flash.geom.Matrix;
-import flash.geom.Point;
-import flash.geom.Rectangle;
-
-import org.apache.flex.core.graphics.utils.MatrixUtil;
-
-/**
- * The CubicBezierSegment draws a cubic bezier curve from the current pen position
- * to x, y. The control1X and control1Y properties specify the first control point;
- * the control2X and control2Y properties specify the second control point.
- *
- * <p>Cubic bezier curves are not natively supported in Flash Player. This class does
- * an approximation based on the fixed midpoint algorithm and uses 4 quadratic curves
- * to simulate a cubic curve.</p>
- *
- * <p>For details on the fixed midpoint algorithm, see:<br/>
- * http://timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm</p>
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class CubicBezierSegment extends PathSegment
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * <p>For a CubicBezierSegment, there are two control points, each with x and y coordinates. Control points
- * are points that define the direction and amount of curves of a Bezier curve.
- * The curved line never reaches the control points; however, the line curves as though being drawn
- * toward the control point.</p>
- *
- * @param _control1X The x-axis location in 2-d coordinate space of the first control point.
- *
- * @param _control1Y The y-axis location of the first control point.
- *
- * @param _control2X The x-axis location of the second control point.
- *
- * @param _control2Y The y-axis location of the second control point.
- *
- * @param x The x-axis location of the starting point of the curve.
- *
- * @param y The y-axis location of the starting point of the curve.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function CubicBezierSegment(
- _control1X:Number = 0, _control1Y:Number = 0,
- _control2X:Number = 0, _control2Y:Number = 0,
- x:Number = 0, y:Number = 0)
- {
- super(x, y);
-
- control1X = _control1X;
- control1Y = _control1Y;
- control2X = _control2X;
- control2Y = _control2Y;
- }
-
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- private var _qPts:QuadraticPoints;
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // control1X
- //----------------------------------
-
- /**
- * The first control point x position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control1X:Number = 0;
-
- //----------------------------------
- // control1Y
- //----------------------------------
-
- /**
- * The first control point y position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control1Y:Number = 0;
-
- //----------------------------------
- // control2X
- //----------------------------------
-
- /**
- * The second control point x position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control2X:Number = 0;
-
- //----------------------------------
- // control2Y
- //----------------------------------
-
- /**
- * The second control point y position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control2Y:Number = 0;
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * Draws the segment.
- *
- * @param g The graphics context where the segment is drawn.
- *
- * @param prev The previous location of the pen.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function draw(graphicsPath:GraphicsPath, dx:Number, dy:Number, sx:Number, sy:Number, prev:PathSegment):void
- {
- var qPts:QuadraticPoints = getQuadraticPoints(prev);
-
- graphicsPath.curveTo(dx + qPts.control1.x*sx, dy+qPts.control1.y*sy, dx+qPts.anchor1.x*sx, dy+qPts.anchor1.y*sy);
- graphicsPath.curveTo(dx + qPts.control2.x*sx, dy+qPts.control2.y*sy, dx+qPts.anchor2.x*sx, dy+qPts.anchor2.y*sy);
- graphicsPath.curveTo(dx + qPts.control3.x*sx, dy+qPts.control3.y*sy, dx+qPts.anchor3.x*sx, dy+qPts.anchor3.y*sy);
- graphicsPath.curveTo(dx + qPts.control4.x*sx, dy+qPts.control4.y*sy, dx+qPts.anchor4.x*sx, dy+qPts.anchor4.y*sy);
- }
-
- /**
- * @inheritDoc
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
- m:Matrix, rect:Rectangle):Rectangle
- {
- var qPts:QuadraticPoints = getQuadraticPoints(prev);
-
- rect = MatrixUtil.getQBezierSegmentBBox(prev ? prev.x : 0, prev ? prev.y : 0,
- qPts.control1.x, qPts.control1.y,
- qPts.anchor1.x, qPts.anchor1.y,
- sx, sy, m, rect);
-
- rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor1.x, qPts.anchor1.y,
- qPts.control2.x, qPts.control2.y,
- qPts.anchor2.x, qPts.anchor2.y,
- sx, sy, m, rect);
-
- rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor2.x, qPts.anchor2.y,
- qPts.control3.x, qPts.control3.y,
- qPts.anchor3.x, qPts.anchor3.y,
- sx, sy, m, rect);
-
- rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor3.x, qPts.anchor3.y,
- qPts.control4.x, qPts.control4.y,
- qPts.anchor4.x, qPts.anchor4.y,
- sx, sy, m, rect);
- return rect;
- }
-
- /**
- * Returns the tangent for the segment.
- * @param prev The previous segment drawn, or null if this is the first segment.
- * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
- * @param sx Pre-transform scale factor for x coordinates.
- * @param sy Pre-transform scale factor for y coordinates.
- * @param m Transformation matrix.
- * @param result The tangent is returned as vector (x, y) in result.
- */
- override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
- {
- // Get the approximation (we want the tangents to be the same as the ones we use to draw
- var qPts:QuadraticPoints = getQuadraticPoints(prev);
-
- var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
- var pt1:Point = MatrixUtil.transformPoint(qPts.control1.x * sx, qPts.control1.y * sy, m).clone();
- var pt2:Point = MatrixUtil.transformPoint(qPts.anchor1.x * sx, qPts.anchor1.y * sy, m).clone();
- var pt3:Point = MatrixUtil.transformPoint(qPts.control2.x * sx, qPts.control2.y * sy, m).clone();
- var pt4:Point = MatrixUtil.transformPoint(qPts.anchor2.x * sx, qPts.anchor2.y * sy, m).clone();
- var pt5:Point = MatrixUtil.transformPoint(qPts.control3.x * sx, qPts.control3.y * sy, m).clone();
- var pt6:Point = MatrixUtil.transformPoint(qPts.anchor3.x * sx, qPts.anchor3.y * sy, m).clone();
- var pt7:Point = MatrixUtil.transformPoint(qPts.control4.x * sx, qPts.control4.y * sy, m).clone();
- var pt8:Point = MatrixUtil.transformPoint(qPts.anchor4.x * sx, qPts.anchor4.y * sy, m).clone();
-
- if (start)
- {
- QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt2.x, pt2.y, start, result);
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- {
- // Try 3 & 4
- QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt3.x, pt3.y, pt4.x, pt4.y, start, result);
-
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- {
- // Try 5 & 6
- QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt5.x, pt5.y, pt6.x, pt6.y, start, result);
-
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- // Try 7 & 8
- QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt7.x, pt7.y, pt8.x, pt8.y, start, result);
- }
- }
- }
- else
- {
- QuadraticBezierSegment.getQTangent(pt6.x, pt6.y, pt7.x, pt7.y, pt8.x, pt8.y, start, result);
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- {
- // Try 4 & 5
- QuadraticBezierSegment.getQTangent(pt4.x, pt4.y, pt5.x, pt5.y, pt8.x, pt8.y, start, result);
-
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- {
- // Try 2 & 3
- QuadraticBezierSegment.getQTangent(pt2.x, pt2.y, pt3.x, pt3.y, pt8.x, pt8.y, start, result);
-
- // If there is no tangent
- if (result.x == 0 && result.y == 0)
- // Try 0 & 1
- QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt8.x, pt8.y, start, result);
- }
- }
- }
- }
-
- /**
- * @private
- * Tim Groleau's method to approximate a cubic bezier with 4 quadratic beziers,
- * with endpoint and control point of each saved.
- */
- private function getQuadraticPoints(prev:PathSegment):QuadraticPoints
- {
- if (_qPts)
- return _qPts;
-
- var p1:Point = new Point(prev ? prev.x : 0, prev ? prev.y : 0);
- var p2:Point = new Point(x, y);
- var c1:Point = new Point(control1X, control1Y);
- var c2:Point = new Point(control2X, control2Y);
-
- // calculates the useful base points
- var PA:Point = Point.interpolate(c1, p1, 3/4);
- var PB:Point = Point.interpolate(c2, p2, 3/4);
-
- // get 1/16 of the [p2, p1] segment
- var dx:Number = (p2.x - p1.x) / 16;
- var dy:Number = (p2.y - p1.y) / 16;
-
- _qPts = new QuadraticPoints;
-
- // calculates control point 1
- _qPts.control1 = Point.interpolate(c1, p1, 3/8);
-
- // calculates control point 2
- _qPts.control2 = Point.interpolate(PB, PA, 3/8);
- _qPts.control2.x -= dx;
- _qPts.control2.y -= dy;
-
- // calculates control point 3
- _qPts.control3 = Point.interpolate(PA, PB, 3/8);
- _qPts.control3.x += dx;
- _qPts.control3.y += dy;
-
- // calculates control point 4
- _qPts.control4 = Point.interpolate(c2, p2, 3/8);
-
- // calculates the 3 anchor points
- _qPts.anchor1 = Point.interpolate(_qPts.control1, _qPts.control2, 0.5);
- _qPts.anchor2 = Point.interpolate(PA, PB, 0.5);
- _qPts.anchor3 = Point.interpolate(_qPts.control3, _qPts.control4, 0.5);
-
- // the 4th anchor point is p2
- _qPts.anchor4 = p2;
-
- return _qPts;
- }
-}
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - QuadraticPoints
-//
-//--------------------------------------------------------------------------
-import flash.geom.Point;
-
-/**
- * Utility class to store the computed quadratic points.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class QuadraticPoints
-{
- public var control1:Point;
- public var anchor1:Point;
- public var control2:Point;
- public var anchor2:Point;
- public var control3:Point;
- public var anchor3:Point;
- public var control4:Point;
- public var anchor4:Point;
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function QuadraticPoints()
- {
- super();
- }
-}
-
-//--------------------------------------------------------------------------
-//
-// Internal Helper Class - QuadraticBezierSegment
-//
-//--------------------------------------------------------------------------
-import flash.display.GraphicsPath;
-import flash.geom.Matrix;
-import flash.geom.Point;
-import flash.geom.Rectangle;
-
-import org.apache.flex.core.graphics.utils.MatrixUtil;
-
-/**
- * The QuadraticBezierSegment draws a quadratic curve from the current pen position
- * to x, y.
- *
- * Quadratic bezier is the native curve type
- * in Flash Player.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class QuadraticBezierSegment extends PathSegment
-{
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * <p>For a QuadraticBezierSegment, there is one control point. A control point
- * is a point that defines the direction and amount of a Bezier curve.
- * The curved line never reaches the control point; however, the line curves as though being drawn
- * toward the control point.</p>
- *
- * @param _control1X The x-axis location in 2-d coordinate space of the control point.
- *
- * @param _control1Y The y-axis location in 2-d coordinate space of the control point.
- *
- * @param x The x-axis location of the starting point of the curve.
- *
- * @param y The y-axis location of the starting point of the curve.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function QuadraticBezierSegment(
- _control1X:Number = 0, _control1Y:Number = 0,
- x:Number = 0, y:Number = 0)
- {
- super(x, y);
-
- control1X = _control1X;
- control1Y = _control1Y;
- }
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // control1X
- //----------------------------------
-
- /**
- * The control point's x position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control1X:Number = 0;
-
- //----------------------------------
- // control1Y
- //----------------------------------
-
- /**
- * The control point's y position.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public var control1Y:Number = 0;
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * Draws the segment using the control point location and the x and y coordinates.
- * This method calls the <code>Graphics.curveTo()</code> method.
- *
- * @see flash.display.Graphics
- *
- * @param g The graphics context where the segment is drawn.
- *
- * @param prev The previous location of the pen.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
- {
- graphicsPath.curveTo(dx+control1X*sx, dy+control1Y*sy, dx+x*sx, dy+y*sy);
- }
-
- static public function getQTangent(x0:Number, y0:Number,
- x1:Number, y1:Number,
- x2:Number, y2:Number,
- start:Boolean,
- result:Point):void
- {
- if (start)
- {
- if (x0 == x1 && y0 == y1)
- {
- result.x = x2 - x0;
- result.y = y2 - y0;
- }
- else
- {
- result.x = x1 - x0;
- result.y = y1 - y0;
- }
- }
- else
- {
- if (x2 == x1 && y2 == y1)
- {
- result.x = x2 - x0;
- result.y = y2 - y0;
- }
- else
- {
- result.x = x2 - x1;
- result.y = y2 - y1;
- }
- }
- }
-
- /**
- * Returns the tangent for the segment.
- * @param prev The previous segment drawn, or null if this is the first segment.
- * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
- * @param sx Pre-transform scale factor for x coordinates.
- * @param sy Pre-transform scale factor for y coordinates.
- * @param m Transformation matrix.
- * @param result The tangent is returned as vector (x, y) in result.
- */
- override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
- {
- var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
- var pt1:Point = MatrixUtil.transformPoint(control1X * sx, control1Y * sy, m).clone();;
- var pt2:Point = MatrixUtil.transformPoint(x * sx, y * sy, m).clone();
-
- getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt2.x, pt2.y, start, result);
- }
-
- /**
- * @inheritDoc
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
- m:Matrix, rect:Rectangle):Rectangle
- {
- return MatrixUtil.getQBezierSegmentBBox(prev ? prev.x : 0, prev ? prev.y : 0,
- control1X, control1Y, x, y, sx, sy, m, rect);
- }
-}
-
-
-/**
- * The EllipticalArcSegment draws an arc from the current point to a specified point.
- * The arc command begins with the x and y radius and ends with the ending point of the arc.
- * Between these are three other values: x axis rotation, large arc flag and sweep flag.
- * The x axis rotation is used to rotate the ellipse that the arc is created from.
- * This rotation maintains the start and end points, whereas a rotation with the transform
- * attribute (outside the path description) would cause the entire path, including the start
- * and end points, to be rotated. The large arc flag and sweep flag control which part of
- * the ellipse is used to cut the arc. These are needed because there's more than one way
- * to place an ellipse so that it includes the start and end points.
- *
- *
- * Derieved from the svgweb library
- * Original found here https://code.google.com/p/svgweb/source/browse/trunk/src/org/svgweb/utils/EllipticalArc.as?r=1251
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
-class EllipticalArcSegment extends PathSegment
-{
-
- private var _rx:Number;
- private var _ry:Number;
- private var _angle:Number;
- private var _largeArcFlag:Boolean;
- private var _sweepFlag:Boolean;
- private var _endX:Number;
- private var _endY:Number;
-
- /**
- * Constructor.
- *
- *
- * @param rx x radius
- *
- * @param ry y radius
- *
- * @param angle angle of rotation from the x-axis
- *
- * @param largeArcFlag true if arc is greater than 180 degrees
- *
- * @param sweepFlag determines if the arc proceeds in a postitive or negative radial direction
- *
- * @param x arc end x value
- *
- * @param y arc end y value
- *
- * @param LastPointX starting x value of arc
- *
- * @param LastPointY starting y value of arc
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function EllipticalArcSegment(rx:Number, ry:Number, angle:Number, largeArcFlag:Boolean, sweepFlag:Boolean, endX:Number, endY:Number)
- {
- _rx = rx;
- _ry = ry;
- _angle = angle;
- _largeArcFlag = largeArcFlag;
- _sweepFlag = sweepFlag;
- _endX = endX;
- _endY = endY;
- }
-
- override public function draw(graphicsPath:GraphicsPath, dx:Number, dy:Number, sx:Number, sy:Number, prev:PathSegment):void
- {
- var ellipticalArc:Object = computeSvgArc(_rx, _ry, _angle, _largeArcFlag, _sweepFlag, dx + _endX, dy + _endY, dx + prev.x , dy + prev.y);
- drawEllipticalArc(ellipticalArc.cx, ellipticalArc.cy, ellipticalArc.startAngle, ellipticalArc.arc, ellipticalArc.radius, ellipticalArc.yRadius, ellipticalArc.xAxisRotation, graphicsPath);
- }
-
- /**
- * @private
- * Create quadratic circle graphics commands from an elliptical arc
- **/
- private static function drawEllipticalArc(x:Number, y:Number, startAngle:Number, arc:Number,
- radius:Number, yRadius:Number, xAxisRotation:Number, path:GraphicsPath):void
- {
- // Circumvent drawing more than is needed
- if (Math.abs(arc)>360)
- {
- arc = 360;
- }
-
- // Draw in a maximum of 45 degree segments. First we calculate how many
- // segments are needed for our arc.
- var segs:Number = Math.ceil(Math.abs(arc)/45);
-
- // Now calculate the sweep of each segment
- var segAngle:Number = arc/segs;
-
- var theta:Number = degreesToRadians(segAngle);
- var angle:Number = degreesToRadians(startAngle);
-
- // Draw as 45 degree segments
- if (segs>0)
- {
- var beta:Number = degreesToRadians(xAxisRotation);
- var sinbeta:Number = Math.sin(beta);
- var cosbeta:Number = Math.cos(beta);
-
- var cx:Number;
- var cy:Number;
- var x1:Number;
- var y1:Number;
-
- // Loop for drawing arc segments
- for (var i:int = 0; i<segs; i++) {
-
- angle += theta;
-
- var sinangle:Number = Math.sin(angle-(theta/2));
- var cosangle:Number = Math.cos(angle-(theta/2));
-
- var div:Number = Math.cos(theta/2);
- cx = x + (radius * cosangle * cosbeta - yRadius * sinangle * sinbeta)/div; //Why divide by Math.cos(theta/2)? - FIX THIS
- cy = y + (radius * cosangle * sinbeta + yRadius * sinangle * cosbeta)/div; //Why divide by Math.cos(theta/2)? - FIX THIS
-
- sinangle = Math.sin(angle);
- cosangle = Math.cos(angle);
-
- x1 = x + (radius * cosangle * cosbeta - yRadius * sinangle * sinbeta);
- y1 = y + (radius * cosangle * sinbeta + yRadius * sinangle * cosbeta);
-
- path.curveTo(cx, cy, x1, y1);
- }
- }
- }
-
-
- private function computeSvgArc(rx:Number, ry:Number,angle:Number,largeArcFlag:Boolean,sweepFlag:Boolean,
- x:Number,y:Number,LastPointX:Number, LastPointY:Number):Object {
- //store before we do anything with it
- var xAxisRotation:Number = angle;
-
- // Compute the half distance between the current and the final point
- var dx2:Number = (LastPointX - x) / 2.0;
- var dy2:Number = (LastPointY - y) / 2.0;
-
- // Convert angle from degrees to radians
- angle = degreesToRadians(angle);
- var cosAngle:Number = Math.cos(angle);
- var sinAngle:Number = Math.sin(angle);
-
-
- //Compute (x1, y1)
- var x1:Number = (cosAngle * dx2 + sinAngle * dy2);
- var y1:Number = (-sinAngle * dx2 + cosAngle * dy2);
-
- // Ensure radii are large enough
- rx = Math.abs(rx);
- ry = Math.abs(ry);
- var Prx:Number = rx * rx;
- var Pry:Number = ry * ry;
- var Px1:Number = x1 * x1;
- var Py1:Number = y1 * y1;
-
- // check that radii are large enough
- var radiiCheck:Number = Px1/Prx + Py1/Pry;
- if (radiiCheck > 1) {
- rx = Math.sqrt(radiiCheck) * rx;
- ry = Math.sqrt(radiiCheck) * ry;
- Prx = rx * rx;
- Pry = ry * ry;
- }
-
-
- //Compute (cx1, cy1)
- var sign:Number = (largeArcFlag == sweepFlag) ? -1 : 1;
- var sq:Number = ((Prx*Pry)-(Prx*Py1)-(Pry*Px1)) / ((Prx*Py1)+(Pry*Px1));
- sq = (sq < 0) ? 0 : sq;
- var coef:Number = (sign * Math.sqrt(sq));
- var cx1:Number = coef * ((rx * y1) / ry);
- var cy1:Number = coef * -((ry * x1) / rx);
-
-
- //Compute (cx, cy) from (cx1, cy1)
- var sx2:Number = (LastPointX + x) / 2.0;
- var sy2:Number = (LastPointY + y) / 2.0;
- var cx:Number = sx2 + (cosAngle * cx1 - sinAngle * cy1);
- var cy:Number = sy2 + (sinAngle * cx1 + cosAngle * cy1);
-
-
- //Compute the angleStart (angle1) and the angleExtent (dangle)
- var ux:Number = (x1 - cx1) / rx;
- var uy:Number = (y1 - cy1) / ry;
- var vx:Number = (-x1 - cx1) / rx;
- var vy:Number = (-y1 - cy1) / ry;
- var p:Number
- var n:Number
-
- //Compute the angle start
- n = Math.sqrt((ux * ux) + (uy * uy));
- p = ux;
-
- sign = (uy < 0) ? -1.0 : 1.0;
-
- var angleStart:Number = radiansToDegrees(sign * Math.acos(p / n));
-
- // Compute the angle extent
- n = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
- p = ux * vx + uy * vy;
- sign = (ux * vy - uy * vx < 0) ? -1.0 : 1.0;
- var angleExtent:Number = radiansToDegrees(sign * Math.acos(p / n));
-
- if(!sweepFlag && angleExtent > 0)
- {
- angleExtent -= 360;
- }
- else if (sweepFlag && angleExtent < 0)
- {
- angleExtent += 360;
- }
-
- angleExtent %= 360;
- angleStart %= 360;
-
- //return Object({x:LastPointX,y:LastPointY,startAngle:angleStart,arc:angleExtent,radius:rx,yRadius:ry,xAxisRotation:xAxisRotation});
- return Object({x:LastPointX,y:LastPointY,startAngle:angleStart,arc:angleExtent,radius:rx,yRadius:ry,xAxisRotation:xAxisRotation, cx:cx,cy:cy});
- }
-
- /**
- * @private
- * Convert degrees to radians
- **/
- private static function degreesToRadians(angle:Number):Number{
- return angle*(Math.PI/180);
- }
-
- /**
- * @private
- * Convert radiansToDegrees
- **/
- private static function radiansToDegrees(angle:Number):Number{
- return angle*(180/Math.PI);
- }
-
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/TransformOffsets.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/TransformOffsets.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/TransformOffsets.as
deleted file mode 100644
index 91389ba..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/TransformOffsets.as
+++ /dev/null
@@ -1,367 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics.utils
-{
- import flash.events.Event;
- import flash.events.EventDispatcher;
-
- import __AS3__.vec.Vector;
-
-
- /**
- * A CompoundTransform represents a 2D or 3D matrix transform. It can be used in the postLayoutTransformOffsets property on a UIComponent or GraphicElement.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public class TransformOffsets extends EventDispatcher
- {
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function TransformOffsets()
- {
- }
-
-
-
- /**
- * @private
- * storage for transform properties. These values are concatenated together with the layout properties to
- * form the actual computed matrix used to render the object.
- */
- private var _rotationX:Number = 0;
- private var _rotationY:Number = 0;
- private var _rotationZ:Number = 0;
- private var _scaleX:Number = 1;
- private var _scaleY:Number = 1;
- private var _scaleZ:Number = 1;
- private var _x:Number = 0;
- private var _y:Number = 0;
- private var _z:Number = 0;
-
- /**
- * @private
- * flags for tracking whether the transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
- */
- private static const IS_3D:uint = 0x200;
- private static const M3D_FLAGS_VALID:uint = 0x400;
-
- /**
- * @private
- * general storage for all of our flags.
- */
- private var _flags:uint = 0;
-
- /**
- * @private
- */
- public var owner:AdvancedLayoutFeatures;
- //----------------------------------------------------------------------------
-
- /**
- * the x value added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set x(value:Number):void
- {
- if (value == _x)
- return;
- _x = value;
- invalidate(false);
- }
- /**
- * @private
- */
- public function get x():Number
- {
- return _x;
- }
-
- /**
- * the y value added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set y(value:Number):void
- {
- if (value == _y)
- return;
- _y = value;
- invalidate(false);
- }
-
- /**
- * @private
- */
- public function get y():Number
- {
- return _y;
- }
-
- /**
- * the z value added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set z(value:Number):void
- {
- if (value == _z)
- return;
- _z = value;
- invalidate(true);
- }
-
- /**
- * @private
- */
- public function get z():Number
- {
- return _z;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * the rotationX, in degrees, added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationX(value:Number):void
- {
- if (value == _rotationX)
- return;
- _rotationX = value;
- invalidate(true);
- }
-
- /**
- * @private
- */
- public function get rotationX():Number
- {
- return _rotationX;
- }
-
- /**
- * the rotationY, in degrees, added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationY(value:Number):void
- {
- if (value == _rotationY)
- return;
- _rotationY = value;
- invalidate(true);
- }
-
- /**
- * @private
- */
- public function get rotationY():Number
- {
- return _rotationY;
- }
-
- /**
- * the rotationZ, in degrees, added to the transform
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationZ(value:Number):void
- {
- if (value == _rotationZ)
- return;
- _rotationZ = value;
- invalidate(false);
- }
-
- /**
- * @private
- */
- public function get rotationZ():Number
- {
- return _rotationZ;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * the multiplier applied to the scaleX of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleX(value:Number):void
- {
- if (value == _scaleX)
- return;
- _scaleX = value;
- invalidate(false);
- }
-
- /**
- * @private
- */
- public function get scaleX():Number
- {
- return _scaleX;
- }
-
- /**
- * the multiplier applied to the scaleY of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleY(value:Number):void
- {
- if (value == _scaleY)
- return;
- _scaleY = value;
- invalidate(false);
- }
-
- /**
- * @private
- */
- public function get scaleY():Number
- {
- return _scaleY;
- }
-
-
- /**
- * the multiplier applied to the scaleZ of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleZ(value:Number):void
- {
- if (value == _scaleZ)
- return;
- _scaleZ = value;
- invalidate(true);
- }
-
- /**
- * @private
- */
- public function get scaleZ():Number
- {
- return _scaleZ;
- }
-
-
- /**
- * @private
- * returns true if the transform has 3D values.
- */
- public function get is3D():Boolean
- {
- if ((_flags & M3D_FLAGS_VALID) == 0)
- update3DFlags();
- return ((_flags & IS_3D) != 0);
- }
-
-
- //------------------------------------------------------------------------------
-
- /**
- * @private
- * invalidates our various cached values. Any change to the CompoundTransform object that affects
- * the various transforms should call this function.
- * @param reason - the code indicating what changes to cause the invalidation.
- * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
- * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
- * have been modified.
- */
- private function invalidate(affects3D:Boolean,dispatchChangeEvent:Boolean = true):void
- {
- if (affects3D)
- _flags &= ~M3D_FLAGS_VALID;
-
- if (dispatchChangeEvent)
- dispatchEvent(new Event(Event.CHANGE));
- }
-
- private static const EPSILON:Number = .001;
- /**
- * @private
- * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
- * Since the user can set either the individual transform properties or the matrices directly, we compute these
- * flags based on what the current 'source of truth' is for each of these values.
- */
- private function update3DFlags():void
- {
- if ((_flags & M3D_FLAGS_VALID) == 0)
- {
- var matrixIs3D:Boolean = ( // note that rotationZ is the same as rotation, and not a 3D affecting
- (Math.abs(_scaleZ-1) > EPSILON) || // property.
- ((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
- ((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
- Math.abs(_z) > EPSILON
- );
- if (matrixIs3D)
- _flags |= IS_3D;
- else
- _flags &= ~IS_3D;
- _flags |= M3D_FLAGS_VALID;
- }
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/basic-manifest.xml b/frameworks/projects/Graphics/basic-manifest.xml
deleted file mode 100644
index 2191691..0000000
--- a/frameworks/projects/Graphics/basic-manifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Circle" class="org.apache.flex.core.graphics.Circle" />
- <component id="Ellipse" class="org.apache.flex.core.graphics.Ellipse" />
- <component id="Path" class="org.apache.flex.core.graphics.Path" />
- <component id="Rect" class="org.apache.flex.core.graphics.Rect" />
- <component id="GraphicsContainer" class="org.apache.flex.core.graphics.GraphicsContainer" />
- <component id="GradientEntry" class="org.apache.flex.core.graphics.GradientEntry" />
- <component id="LinearGradient" class="org.apache.flex.core.graphics.LinearGradient" />
- <component id="SolidColor" class="org.apache.flex.core.graphics.SolidColor" />
- <component id="SolidColorStroke" class="org.apache.flex.core.graphics.SolidColorStroke" />
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/compile-asjs-config.xml b/frameworks/projects/Graphics/compile-asjs-config.xml
deleted file mode 100644
index 4943b8e..0000000
--- a/frameworks/projects/Graphics/compile-asjs-config.xml
+++ /dev/null
@@ -1,82 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- </include-sources>
-
- <include-classes>
- <class>GraphicsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/compile-config.xml b/frameworks/projects/Graphics/compile-config.xml
deleted file mode 100644
index 200768a..0000000
--- a/frameworks/projects/Graphics/compile-config.xml
+++ /dev/null
@@ -1,78 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>GraphicsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
new file mode 100644
index 0000000..c463f04
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class GraphicsClasses
+{
+
+ import org.apache.flex.core.graphics.GraphicShape; GraphicShape;
+ import org.apache.flex.core.graphics.Rect; Rect;
+ import org.apache.flex.core.graphics.Ellipse; Ellipse;
+ import org.apache.flex.core.graphics.Circle; Circle;
+ import org.apache.flex.core.graphics.Path; Path;
+ import org.apache.flex.core.graphics.SolidColor; SolidColor;
+ import org.apache.flex.core.graphics.SolidColorStroke; SolidColorStroke;
+ import org.apache.flex.core.graphics.Text; Text;
+ import org.apache.flex.core.graphics.GraphicsContainer; GraphicsContainer;
+ import org.apache.flex.core.graphics.LinearGradient; LinearGradient;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
new file mode 100644
index 0000000..8868bec
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Circle.as
@@ -0,0 +1,98 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ public class Circle extends GraphicShape
+ {
+ private var _radius:Number;
+
+ public function get radius():Number
+ {
+ return _radius;
+ }
+
+ public function set radius(value:Number):void
+ {
+ _radius = value;
+ }
+
+ /**
+ * Draw the circle.
+ * @param x The x location of the center of the circle
+ * @param y The y location of the center of the circle.
+ * @param radius The radius of the circle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion SVGCircleElement
+ */
+ public function drawCircle(x:Number, y:Number, radius:Number):void
+ {
+ COMPILE::AS3
+ {
+ graphics.clear();
+ applyStroke();
+ beginFill(new Rectangle(x,y,radius*2, radius*2),new Point(x-radius,y-radius));
+ graphics.drawCircle(x,y,radius);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var circle:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
+ circle.flexjs_wrapper = this;
+ circle.setAttribute('style', style);
+ if (stroke)
+ {
+ circle.setAttribute('cx', String(radius + stroke.weight));
+ circle.setAttribute('cy', String(radius + stroke.weight));
+ setPosition(x - radius, y - radius, stroke.weight, stroke.weight);
+ }
+ else
+ {
+ circle.setAttribute('cx', String(radius));
+ circle.setAttribute('cy', String(radius));
+ setPosition(x - radius, y - radius, 0, 0);
+ }
+
+ circle.setAttribute('rx', String(radius));
+ circle.setAttribute('ry', String(radius));
+ element.appendChild(circle);
+
+ resize(x, y, (circle as SVGCircleElement).getBBox());
+
+ }
+ }
+
+ override public function addedToParent():void
+ {
+ drawCircle(0, 0, radius);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
new file mode 100644
index 0000000..f22161f
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/Ellipse.as
@@ -0,0 +1,91 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.graphics
+{
+ COMPILE::AS3
+ {
+ import flash.geom.Point;
+ import flash.geom.Rectangle;
+ }
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ public class Ellipse extends GraphicShape
+ {
+
+ /**
+ * Draw the ellipse.
+ * @param x The x position of the top-left corner of the bounding box of the ellipse.
+ * @param y The y position of the top-left corner of the bounding box of the ellipse.
+ * @param width The width of the ellipse.
+ * @param height The height of the ellipse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion SVGEllipseElement
+ */
+ public function drawEllipse(x:Number, y:Number, width:Number, height:Number):void
+ {
+ COMPILE::AS3
+ {
+ graphics.clear();
+ applyStroke();
+ beginFill(new Rectangle(x, y, width, height), new Point(x,y));
+ graphics.drawEllipse(x,y,width,height);
+ endFill();
+ }
+ COMPILE::JS
+ {
+ var style:String = getStyleStr();
+ var ellipse:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'ellipse') as WrappedHTMLElement;
+ ellipse.flexjs_wrapper = this;
+ ellipse.setAttribute('style', style);
+ if (stroke)
+ {
+ ellipse.setAttribute('cx', String(width / 2 + stroke.weight));
+ ellipse.setAttribute('cy', String(height / 2 + stroke.weight));
+ setPosition(x, y, stroke.weight * 2, stroke.weight * 2);
+ }
+ else
+ {
+ ellipse.setAttribute('cx', String(width / 2));
+ ellipse.setAttribute('cy', String(height / 2));
+ setPosition(x, y, 0, 0);
+ }
+ ellipse.setAttribute('rx', String(width / 2));
+ ellipse.setAttribute('ry', String(height / 2));
+ element.appendChild(ellipse);
+
+ resize(x, y, (ellipse as SVGEllipseElement).getBBox());
+
+ }
+ }
+
+ override protected function draw():void
+ {
+ drawEllipse(0, 0, width, height);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
new file mode 100644
index 0000000..58d417a
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientBase.as
@@ -0,0 +1,229 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ import org.apache.flex.core.graphics.utils.CompoundTransform;
+
+ public class GradientBase
+ {
+
+ protected var colors:Array /* of uint */ = [];
+
+ protected var ratios:Array /* of Number */ = [];
+
+ protected var alphas:Array /* of Number */ = [];
+
+ /**
+ * Holds the matrix and the convenience transform properties (<code>x</code>, <code>y</code>, and <code>rotation</code>).
+ * The compoundTransform is only created when the <code>matrix</code> property is set.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ */
+ COMPILE::AS3
+ protected var compoundTransform:CompoundTransform;
+
+ /**
+ * Value of the width and height of the untransformed gradient
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ */
+ public static const GRADIENT_DIMENSION:Number = 1638.4;
+
+ /**
+ * generate uid
+ */
+ public function get newId():String
+ {
+ return 'gradient' + String(Math.floor((Math.random() * 100000) + 1));
+ }
+
+ /**
+ * Storage for the entries property.
+ */
+ private var _entries:Array = [];
+
+ /**
+ * @private
+ * Storage for the rotation property.
+ */
+ private var _rotation:Number = 0.0;
+
+ /**
+ * An Array of GradientEntry objects
+ * defining the fill patterns for the gradient fill.
+ *
+ */
+ public function get entries():Array
+ {
+ return _entries;
+ }
+
+ /**
+ * @private
+ */
+ public function set entries(value:Array):void
+ {
+ _entries = value;
+ COMPILE::AS3
+ {
+ processEntries();
+ }
+ }
+
+ /**
+ * By default, the LinearGradientStroke defines a transition
+ * from left to right across the control.
+ * Use the <code>rotation</code> property to control the transition direction.
+ * For example, a value of 180.0 causes the transition
+ * to occur from right to left, rather than from left to right.
+ *
+ * @default 0.0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get rotation():Number
+ {
+ return _rotation;
+ }
+
+ /**
+ * @private
+ */
+ public function set rotation(value:Number):void
+ {
+ _rotation = value;
+ }
+
+
+ private var _x:Number = 0;
+
+ /**
+ * The distance by which to translate each point along the x axis.
+ */
+ public function get x():Number
+ {
+ return _x;
+ }
+
+ /**
+ * @private
+ */
+ public function set x(value:Number):void
+ {
+ _x = value;
+ }
+
+ private var _y:Number = 0;
+
+ /**
+ * The distance by which to translate each point along the y axis.
+ */
+ public function get y():Number
+ {
+ return _y;
+ }
+
+ /**
+ * @private
+ */
+ public function set y(value:Number):void
+ {
+ _y = value;
+ }
+
+ COMPILE::AS3
+ protected function toRad(a:Number):Number {
+ return a*Math.PI/180;
+ }
+
+ COMPILE::AS3
+ protected function get rotationInRadians():Number
+ {
+ return rotation / 180 * Math.PI;
+ }
+
+ /**
+ * @private
+ * Extract the gradient information in the public <code>entries</code>
+ * Array into the internal <code>colors</code>, <code>ratios</code>,
+ * and <code>alphas</code> arrays.
+ */
+ COMPILE::AS3
+ private function processEntries():void
+ {
+ colors = [];
+ ratios = [];
+ alphas = [];
+
+ if (!_entries || _entries.length == 0)
+ return;
+
+ var ratioConvert:Number = 255;
+
+ var i:int;
+
+ var n:int = _entries.length;
+ for (i = 0; i < n; i++)
+ {
+ var e:GradientEntry = _entries[i];
+ colors.push(e.color);
+ alphas.push(e.alpha);
+ ratios.push(e.ratio * ratioConvert);
+ }
+
+ if (isNaN(ratios[0]))
+ ratios[0] = 0;
+
+ if (isNaN(ratios[n - 1]))
+ ratios[n - 1] = 255;
+
+ i = 1;
+
+ while (true)
+ {
+ while (i < n && !isNaN(ratios[i]))
+ {
+ i++;
+ }
+
+ if (i == n)
+ break;
+
+ var start:int = i - 1;
+
+ while (i < n && isNaN(ratios[i]))
+ {
+ i++;
+ }
+
+ var br:Number = ratios[start];
+ var tr:Number = ratios[i];
+
+ for (var j:int = 1; j < i - start; j++)
+ {
+ ratios[j] = br + j * (tr - br) / (i - start);
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
new file mode 100644
index 0000000..cbcdb3f
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GradientEntry.as
@@ -0,0 +1,133 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics
+{
+ public class GradientEntry
+ {
+
+ //----------------------------------
+ // alpha
+ //----------------------------------
+
+ private var _alpha:Number = 1.0;
+ //----------------------------------
+ // color
+ //----------------------------------
+
+ private var _color:uint = 0x000000;
+ //----------------------------------
+ // ratio
+ //----------------------------------
+
+ private var _ratio:Number = 0x000000;
+
+
+ public function GradientEntry(alpha:Number = 1.0, color:uint = 0x000000, ratio:Number = 1.0)
+ {
+ _alpha = alpha;
+ _color = color;
+ _ratio = ratio;
+ }
+
+ /**
+ * The transparency of a color.
+ * Possible values are 0.0 (invisible) through 1.0 (opaque).
+ *
+ * @default 1.0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.3
+ */
+ public function get alpha():Number
+ {
+ return _alpha;
+ }
+
+ public function set alpha(value:Number):void
+ {
+ var oldValue:Number = _alpha;
+ if (value != oldValue)
+ {
+ _alpha = value;
+ }
+ }
+
+ /**
+ * A color value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.3
+ */
+ public function get color():uint
+ {
+ return _color;
+ }
+
+ public function set color(value:uint):void
+ {
+ var oldValue:uint = _color;
+ if (value != oldValue)
+ {
+ _color = value;
+ }
+ }
+
+ /**
+ * Where in the graphical element, as a percentage from 0.0 to 1.0,
+ * Flex samples the associated color at 100%.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion FlexJS 0.3
+ */
+ public function get ratio():Number
+ {
+ return _ratio;
+ }
+
+ public function set ratio(value:Number):void
+ {
+ _ratio = value;
+ }
+
+ /**
+ * Begin drawing the fill on the given shape's graphic object
+ */
+ public function begin(s:GraphicShape):void
+ {
+ COMPILE::AS3
+ {
+ s.graphics.beginFill(color,alpha);
+ }
+ }
+
+ /**
+ * End the fill
+ */
+ public function end(s:GraphicShape):void
+ {
+ COMPILE::AS3
+ {
+ s.graphics.endFill();
+ }
+ }
+
+ }
+}
\ No newline at end of file
[31/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/PathHelper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/PathHelper.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/PathHelper.as
new file mode 100644
index 0000000..5b5e136
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/PathHelper.as
@@ -0,0 +1,1712 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics.utils
+{
+ import flash.display.GraphicsPath;
+ import flash.geom.Rectangle;
+
+ public class PathHelper
+ {
+ private static var segments:PathSegmentsCollection;
+ private static var graphicsPath:GraphicsPath = new GraphicsPath(new Vector.<int>(), new Vector.<Number>());
+
+ public static function getSegments(data:String, x:Number=0, y:Number=0):GraphicsPath
+ {
+ segments = new PathSegmentsCollection(data);
+ segments.generateGraphicsPath(graphicsPath, x, y, 1, 1);
+ return graphicsPath;
+ }
+
+ public static function getBounds(data:String):Rectangle
+ {
+ segments = new PathSegmentsCollection(data);
+ return segments.getBounds();
+ }
+ }
+}
+
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - PathSegmentsCollection
+//
+//--------------------------------------------------------------------------
+
+/**
+ * Helper class that takes in a string and stores and generates a vector of
+ * Path segments.
+ * Provides methods for generating GraphicsPath and calculating bounds.
+ */
+class PathSegmentsCollection
+{
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param value
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function PathSegmentsCollection(value:String)
+ {
+ if (!value)
+ {
+ _segments = new Vector.<PathSegment>();
+ return;
+ }
+
+ var newSegments:Vector.<PathSegment> = new Vector.<PathSegment>();
+ var charCount:int = value.length;
+ var c:Number; // current char code, String.charCodeAt() returns Number.
+ var useRelative:Boolean;
+ var prevIdentifier:Number = 0;
+ var prevX:Number = 0;
+ var prevY:Number = 0;
+ var lastMoveX:Number = 0;
+ var lastMoveY:Number = 0;
+ var x:Number;
+ var y:Number;
+ var controlX:Number;
+ var controlY:Number;
+ var control2X:Number;
+ var control2Y:Number;
+ var lastMoveSegmentIndex:int = -1;
+
+ _dataLength = charCount;
+ _charPos = 0;
+ while (true)
+ {
+ // Skip any whitespace or commas first
+ skipWhiteSpace(value);
+
+ // Are we done parsing?
+ if (_charPos >= charCount)
+ break;
+
+ // Get the next character
+ c = value.charCodeAt(_charPos++);
+
+ // Is this a start of a number?
+ // The RegExp for a float is /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/
+ if ((c >= 0x30 && c < 0x3A) || // A digit
+ (c == 0x2B || c == 0x2D) || // '+' & '-'
+ (c == 0x2E)) // '.'
+ {
+ c = prevIdentifier;
+ _charPos--;
+ }
+ else if (c >= 0x41 && c <= 0x56) // Between 'A' and 'V'
+ useRelative = false;
+ else if (c >= 0x61 && c <= 0x7A) // Between 'a' and 'v'
+ useRelative = true;
+
+ switch(c)
+ {
+ case 0x63: // c
+ case 0x43: // C
+ controlX = getNumber(useRelative, prevX, value);
+ controlY = getNumber(useRelative, prevY, value);
+ control2X = getNumber(useRelative, prevX, value);
+ control2Y = getNumber(useRelative, prevY, value);
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new CubicBezierSegment(controlX, controlY,
+ control2X, control2Y,
+ x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x63;
+
+ break;
+
+ case 0x6D: // m
+ case 0x4D: // M
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new MoveSegment(x, y));
+ prevX = x;
+ prevY = y;
+ // If a moveto is followed by multiple pairs of coordinates,
+ // the subsequent pairs are treated as implicit lineto commands.
+ prevIdentifier = (c == 0x6D) ? 0x6C : 0x4C; // c == 'm' ? 'l' : 'L'
+
+ // Fix for bug SDK-24457:
+ // If the Quadratic segment is isolated, the Player
+ // won't draw fill correctly. We need to generate
+ // a dummy line segment.
+ var curSegmentIndex:int = newSegments.length - 1;
+ if (lastMoveSegmentIndex + 2 == curSegmentIndex &&
+ newSegments[lastMoveSegmentIndex + 1] is QuadraticBezierSegment)
+ {
+ // Insert a dummy LineSegment
+ newSegments.splice(lastMoveSegmentIndex + 1, 0, new LineSegment(lastMoveX, lastMoveY));
+ curSegmentIndex++;
+ }
+
+ lastMoveSegmentIndex = curSegmentIndex;
+ lastMoveX = x;
+ lastMoveY = y;
+ break;
+
+ case 0x6C: // l
+ case 0x4C: // L
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new LineSegment(x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x6C;
+ break;
+
+ case 0x68: // h
+ case 0x48: // H
+ x = getNumber(useRelative, prevX, value);
+ y = prevY;
+ newSegments.push(new LineSegment(x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x68;
+ break;
+
+ case 0x76: // v
+ case 0x56: // V
+ x = prevX;
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new LineSegment(x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x76;
+ break;
+
+ case 0x71: // q
+ case 0x51: // Q
+ controlX = getNumber(useRelative, prevX, value);
+ controlY = getNumber(useRelative, prevY, value);
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new QuadraticBezierSegment(controlX, controlY, x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x71;
+ break;
+
+ case 0x74: // t
+ case 0x54: // T
+ // control is a reflection of the previous control point
+ if (prevIdentifier == 0x74 || prevIdentifier == 0x71) // 't' or 'q'
+ {
+ controlX = prevX + (prevX - controlX);
+ controlY = prevY + (prevY - controlY);
+ }
+ else
+ {
+ controlX = prevX;
+ controlY = prevY;
+ }
+
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new QuadraticBezierSegment(controlX, controlY, x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x74;
+
+ break;
+
+ case 0x73: // s
+ case 0x53: // S
+ if (prevIdentifier == 0x73 || prevIdentifier == 0x63) // s or c
+ {
+ controlX = prevX + (prevX - control2X);
+ controlY = prevY + (prevY - control2Y);
+ }
+ else
+ {
+ controlX = prevX;
+ controlY = prevY;
+ }
+
+ control2X = getNumber(useRelative, prevX, value);
+ control2Y = getNumber(useRelative, prevY, value);
+ x = getNumber(useRelative, prevX, value);
+ y = getNumber(useRelative, prevY, value);
+ newSegments.push(new CubicBezierSegment(controlX, controlY,
+ control2X, control2Y, x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x73;
+
+ break;
+ case 0x61: //a
+ case 0x41: //A
+ var rx:Number = getNumber(useRelative, prevX, value);
+ var ry:Number = getNumber(useRelative, prevY, value);
+ var angle:Number = getNumber(useRelative, prevY, value);
+ var largeArcFlag:Boolean = getNumber(useRelative, prevY, value) == 1 ? true:false;
+ var sweepFlag:Boolean = getNumber(useRelative, prevY, value) == 1 ? true:false;
+ var endX:Number = getNumber(useRelative, prevX, value);
+ var endY:Number = getNumber(useRelative, prevY, value);
+ newSegments.push(new EllipticalArcSegment(rx,ry,angle,largeArcFlag,sweepFlag,endX,endY));
+ prevX = endX;
+ prevY = endY;
+ prevIdentifier = 0x41;
+ break;
+ case 0x7A: // z
+ case 0x5A: // Z
+ x = lastMoveX;
+ y = lastMoveY;
+ newSegments.push(new LineSegment(x, y));
+ prevX = x;
+ prevY = y;
+ prevIdentifier = 0x7A;
+
+ break;
+
+ default:
+ // unknown identifier, throw error?
+ _segments = new Vector.<PathSegment>();
+ return;
+ }
+ }
+
+ // Fix for bug SDK-24457:
+ // If the Quadratic segment is isolated, the Player
+ // won't draw fill correctly. We need to generate
+ // a dummy line segment.
+ curSegmentIndex = newSegments.length;
+ if (lastMoveSegmentIndex + 2 == curSegmentIndex &&
+ newSegments[lastMoveSegmentIndex + 1] is QuadraticBezierSegment)
+ {
+ // Insert a dummy LineSegment
+ newSegments.splice(lastMoveSegmentIndex + 1, 0, new LineSegment(lastMoveX, lastMoveY));
+ curSegmentIndex++;
+ }
+
+ _segments = newSegments;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // data
+ //----------------------------------
+
+ private var _segments:Vector.<PathSegment>;
+
+ /**
+ * A Vector of the actual path segments. May be empty, but always non-null.
+ */
+ public function get data():Vector.<PathSegment>
+ {
+ return _segments;
+ }
+
+ //----------------------------------
+ // bounds
+ //----------------------------------
+
+ private var _bounds:Rectangle;
+
+ /**
+ * The bounds of the segments in local coordinates.
+ */
+ public function getBounds():Rectangle
+ {
+ if (_bounds)
+ return _bounds;
+
+ // First, allocate temporary bounds, as getBoundingBox() requires
+ // natual bounds to calculate a scaling factor
+ _bounds = new Rectangle(0, 0, 1, 1);
+
+ // Pass in the same size to getBoundingBox
+ // so that the scaling factor is (1, 1).
+ _bounds = getBoundingBox(1, 1, null /*Matrix*/);
+ return _bounds;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @return Returns the axis aligned bounding box of the segments stretched to
+ * width, height and then transformed with transformation matrix m.
+ */
+ public function getBoundingBox(width:Number, height:Number, m:Matrix):Rectangle
+ {
+ var naturalBounds:Rectangle = getBounds();
+ var sx:Number = naturalBounds.width == 0 ? 1 : width / naturalBounds.width;
+ var sy:Number = naturalBounds.height == 0 ? 1 : height / naturalBounds.height;
+
+ var prevSegment:PathSegment;
+ var pathBBox:Rectangle;
+ var count:int = _segments.length;
+
+ for (var i:int = 0; i < count; i++)
+ {
+ var segment:PathSegment = _segments[i];
+ pathBBox = segment.getBoundingBox(prevSegment, sx, sy, m, pathBBox);
+ prevSegment = segment;
+ }
+
+ // If path is empty, it's untransformed bounding box is (0,0), so we return transformed point (0,0)
+ if (!pathBBox)
+ {
+ var x:Number = m ? m.tx : 0;
+ var y:Number = m ? m.ty : 0;
+ pathBBox = new Rectangle(x, y);
+ }
+ return pathBBox;
+ }
+
+ /**
+ * Workhorse method that iterates through the <code>segments</code>
+ * array and draws each path egment based on its control points.
+ *
+ * Segments are drawn from the x and y position of the path.
+ * Additionally, segments are drawn by taking into account the scale
+ * applied to the path.
+ *
+ * @param tx A Number representing the x position of where this
+ * path segment should be drawn
+ *
+ * @param ty A Number representing the y position of where this
+ * path segment should be drawn
+ *
+ * @param sx A Number representing the scaleX at which to draw
+ * this path segment
+ *
+ * @param sy A Number representing the scaleY at which to draw this
+ * path segment
+ */
+ public function generateGraphicsPath(graphicsPath:GraphicsPath,
+ tx:Number,
+ ty:Number,
+ sx:Number,
+ sy:Number):void
+ {
+ graphicsPath.commands = null;
+ graphicsPath.data = null;
+
+ // Always start by moving to drawX, drawY. Otherwise
+ // the path will begin at the previous pen location
+ // if it does not start with a MoveSegment.
+ graphicsPath.moveTo(tx, ty);
+
+ var curSegment:PathSegment;
+ var prevSegment:PathSegment;
+ var count:int = _segments.length;
+ for (var i:int = 0; i < count; i++)
+ {
+ prevSegment = curSegment;
+ curSegment = _segments[i];
+ curSegment.draw(graphicsPath, tx, ty, sx, sy, prevSegment);
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Private methods
+ //
+ //--------------------------------------------------------------------------
+
+ private var _charPos:int = 0;
+ private var _dataLength:int = 0;
+
+ private function skipWhiteSpace(data:String):void
+ {
+ while (_charPos < _dataLength)
+ {
+ var c:Number = data.charCodeAt(_charPos);
+ if (c != 0x20 && // Space
+ c != 0x2C && // Comma
+ c != 0xD && // Carriage return
+ c != 0x9 && // Tab
+ c != 0xA) // New line
+ {
+ break;
+ }
+ _charPos++;
+ }
+ }
+
+ private function getNumber(useRelative:Boolean, offset:Number, value:String):Number
+ {
+ // Parse the string and find the first occurrance of the following RexExp
+ // numberRegExp:RegExp = /[+-]?\d*\.?\d+([Ee][+-]?\d+)?/g;
+
+ skipWhiteSpace(value); // updates _charPos
+ if (_charPos >= _dataLength)
+ return NaN;
+
+ // Remember the start of the number
+ var numberStart:int = _charPos;
+ var hasSignCharacter:Boolean = false;
+ var hasDigits:Boolean = false;
+
+ // The number could start with '+' or '-' (the "[+-]?" part of the RegExp)
+ var c:Number = value.charCodeAt(_charPos);
+ if (c == 0x2B || c == 0x2D) // '+' or '-'
+ {
+ hasSignCharacter = true;
+ _charPos++;
+ }
+
+ // The index of the '.' if any
+ var dotIndex:int = -1;
+
+ // First sequence of digits and optional dot in between (the "\d*\.?\d+" part of the RegExp)
+ while (_charPos < _dataLength)
+ {
+ c = value.charCodeAt(_charPos);
+
+ if (c >= 0x30 && c < 0x3A) // A digit
+ {
+ hasDigits = true;
+ }
+ else if (c == 0x2E && dotIndex == -1) // '.'
+ {
+ dotIndex = _charPos;
+ }
+ else
+ break;
+
+ _charPos++;
+ }
+
+ // Now check whether we had at least one digit.
+ if (!hasDigits)
+ {
+ // Go to the end of the data
+ _charPos = _dataLength;
+ return NaN;
+ }
+
+ // 1. Was the last character a '.'? If so, rewind one character back.
+ if (c == 0x2E)
+ _charPos--;
+
+ // So far we have a valid number, remember its end character index
+ var numberEnd:int = _charPos;
+
+ // Check to see if we have scientific notation (the "([Ee][+-]?\d+)?" part of the RegExp)
+ if (c == 0x45 || c == 0x65)
+ {
+ _charPos++;
+
+ // Check for '+' or '-'
+ if (_charPos < _dataLength)
+ {
+ c = value.charCodeAt(_charPos);
+ if (c == 0x2B || c == 0x2D)
+ _charPos++;
+ }
+
+ // Find all the digits
+ var digitStart:int = _charPos;
+ while (_charPos < _dataLength)
+ {
+ c = value.charCodeAt(_charPos);
+
+ // Not a digit?
+ if (!(c >= 0x30 && c < 0x3A))
+ {
+ break;
+ }
+
+ _charPos++;
+ }
+
+ // Do we have at least one digit?
+ if (digitStart < _charPos)
+ numberEnd = _charPos; // Scientific notation, update the end index of the number.
+ else
+ _charPos = numberEnd; // No scientific notation, rewind back to the end index of the number.
+ }
+
+ // Use parseFloat to get the actual number.
+ // TODO (egeorgie): we could build the number while matching the RegExp which will save the substr and parseFloat
+ var subString:String = value.substr(numberStart, numberEnd - numberStart);
+ var result:Number = parseFloat(subString);
+ if (isNaN(result))
+ {
+ // Go to the end of the data
+ _charPos = _dataLength;
+ return NaN;
+ }
+ _charPos = numberEnd;
+ return useRelative ? result + offset : result;
+ }
+}
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - PathSegment
+//
+//--------------------------------------------------------------------------
+import flash.display.GraphicsPath;
+import flash.geom.Matrix;
+import flash.geom.Rectangle;
+
+
+/**
+ * The PathSegment class is the base class for a segment of a path.
+ * This class is not created directly. It is the base class for
+ * MoveSegment, LineSegment, CubicBezierSegment and QuadraticBezierSegment.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class PathSegment extends Object
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param _x The x position of the pen in the current coordinate system.
+ *
+ * @param _y The y position of the pen in the current coordinate system.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function PathSegment(_x:Number = 0, _y:Number = 0)
+ {
+ super();
+ x = _x;
+ y = _y;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // x
+ //----------------------------------
+
+ /**
+ * The ending x position for this segment.
+ *
+ * @default 0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var x:Number = 0;
+
+ //----------------------------------
+ // y
+ //----------------------------------
+
+ /**
+ * The ending y position for this segment.
+ *
+ * @default 0
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var y:Number = 0;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Draws this path segment. You can determine the current pen position by
+ * reading the x and y values of the previous segment.
+ *
+ * @param g The graphics context to draw into.
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
+ {
+ // Override to draw your segment
+ }
+
+ /**
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ * @param sx Pre-transform scale factor for x coordinates.
+ * @param sy Pre-transform scale factor for y coordinates.
+ * @param m Transformation matrix.
+ * @param rect If non-null, rect is expanded to include the bounding box of the segment.
+ * @return Returns the union of rect and the axis aligned bounding box of the post-transformed
+ * path segment.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
+ {
+ // Override to calculate your segment's bounding box.
+ return rect;
+ }
+
+ /**
+ * Returns the tangent for the segment.
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
+ * @param sx Pre-transform scale factor for x coordinates.
+ * @param sy Pre-transform scale factor for y coordinates.
+ * @param m Transformation matrix.
+ * @param result The tangent is returned as vector (x, y) in result.
+ */
+ public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
+ {
+ result.x = 0;
+ result.y = 0;
+ }
+}
+
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - LineSegment
+//
+//--------------------------------------------------------------------------
+
+import flash.display.GraphicsPath;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+
+/**
+ * The LineSegment draws a line from the current pen position to the coordinate located at x, y.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class LineSegment extends PathSegment
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param x The current location of the pen along the x axis. The <code>draw()</code> method uses
+ * this value to determine where to draw to.
+ *
+ * @param y The current location of the pen along the y axis. The <code>draw()</code> method uses
+ * this value to determine where to draw to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function LineSegment(x:Number = 0, y:Number = 0)
+ {
+ super(x, y);
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
+ {
+ graphicsPath.lineTo(dx + x*sx, dy + y*sy);
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number, m:Matrix, rect:Rectangle):Rectangle
+ {
+ pt = MatrixUtil.transformPoint(x * sx, y * sy, m);
+ var x1:Number = pt.x;
+ var y1:Number = pt.y;
+
+ // If the previous segment actually draws, then only add the end point to the rectangle,
+ // as the start point would have been added by the previous segment:
+ if (prev != null && !(prev is MoveSegment))
+ return MatrixUtil.rectUnion(x1, y1, x1, y1, rect);
+
+ var pt:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m);
+ var x2:Number = pt.x;
+ var y2:Number = pt.y;
+
+ return MatrixUtil.rectUnion(Math.min(x1, x2), Math.min(y1, y2),
+ Math.max(x1, x2), Math.max(y1, y2), rect);
+ }
+
+ /**
+ * Returns the tangent for the segment.
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
+ * @param sx Pre-transform scale factor for x coordinates.
+ * @param sy Pre-transform scale factor for y coordinates.
+ * @param m Transformation matrix.
+ * @param result The tangent is returned as vector (x, y) in result.
+ */
+ override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
+ {
+ var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
+ var pt1:Point = MatrixUtil.transformPoint(x * sx, y * sy, m);
+
+ result.x = pt1.x - pt0.x;
+ result.y = pt1.y - pt0.y;
+ }
+}
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - MoveSegment
+//
+//--------------------------------------------------------------------------
+import flash.display.GraphicsPath;
+
+/**
+ * The MoveSegment moves the pen to the x,y position. This class calls the <code>Graphics.moveTo()</code> method
+ * from the <code>draw()</code> method.
+ *
+ *
+ * @see flash.display.Graphics
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class MoveSegment extends PathSegment
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param x The target x-axis location in 2-d coordinate space.
+ *
+ * @param y The target y-axis location in 2-d coordinate space.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function MoveSegment(x:Number = 0, y:Number = 0)
+ {
+ super(x, y);
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @inheritDoc
+ *
+ * The MoveSegment class moves the pen to the position specified by the
+ * x and y properties.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
+ {
+ graphicsPath.moveTo(dx+x*sx, dy+y*sy);
+ }
+}
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - CubicBezierSegment
+//
+//--------------------------------------------------------------------------
+
+import flash.display.GraphicsPath;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import org.apache.flex.core.graphics.utils.MatrixUtil;
+
+/**
+ * The CubicBezierSegment draws a cubic bezier curve from the current pen position
+ * to x, y. The control1X and control1Y properties specify the first control point;
+ * the control2X and control2Y properties specify the second control point.
+ *
+ * <p>Cubic bezier curves are not natively supported in Flash Player. This class does
+ * an approximation based on the fixed midpoint algorithm and uses 4 quadratic curves
+ * to simulate a cubic curve.</p>
+ *
+ * <p>For details on the fixed midpoint algorithm, see:<br/>
+ * http://timotheegroleau.com/Flash/articles/cubic_bezier_in_flash.htm</p>
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class CubicBezierSegment extends PathSegment
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * <p>For a CubicBezierSegment, there are two control points, each with x and y coordinates. Control points
+ * are points that define the direction and amount of curves of a Bezier curve.
+ * The curved line never reaches the control points; however, the line curves as though being drawn
+ * toward the control point.</p>
+ *
+ * @param _control1X The x-axis location in 2-d coordinate space of the first control point.
+ *
+ * @param _control1Y The y-axis location of the first control point.
+ *
+ * @param _control2X The x-axis location of the second control point.
+ *
+ * @param _control2Y The y-axis location of the second control point.
+ *
+ * @param x The x-axis location of the starting point of the curve.
+ *
+ * @param y The y-axis location of the starting point of the curve.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function CubicBezierSegment(
+ _control1X:Number = 0, _control1Y:Number = 0,
+ _control2X:Number = 0, _control2Y:Number = 0,
+ x:Number = 0, y:Number = 0)
+ {
+ super(x, y);
+
+ control1X = _control1X;
+ control1Y = _control1Y;
+ control2X = _control2X;
+ control2Y = _control2Y;
+ }
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ private var _qPts:QuadraticPoints;
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // control1X
+ //----------------------------------
+
+ /**
+ * The first control point x position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control1X:Number = 0;
+
+ //----------------------------------
+ // control1Y
+ //----------------------------------
+
+ /**
+ * The first control point y position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control1Y:Number = 0;
+
+ //----------------------------------
+ // control2X
+ //----------------------------------
+
+ /**
+ * The second control point x position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control2X:Number = 0;
+
+ //----------------------------------
+ // control2Y
+ //----------------------------------
+
+ /**
+ * The second control point y position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control2Y:Number = 0;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Draws the segment.
+ *
+ * @param g The graphics context where the segment is drawn.
+ *
+ * @param prev The previous location of the pen.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function draw(graphicsPath:GraphicsPath, dx:Number, dy:Number, sx:Number, sy:Number, prev:PathSegment):void
+ {
+ var qPts:QuadraticPoints = getQuadraticPoints(prev);
+
+ graphicsPath.curveTo(dx + qPts.control1.x*sx, dy+qPts.control1.y*sy, dx+qPts.anchor1.x*sx, dy+qPts.anchor1.y*sy);
+ graphicsPath.curveTo(dx + qPts.control2.x*sx, dy+qPts.control2.y*sy, dx+qPts.anchor2.x*sx, dy+qPts.anchor2.y*sy);
+ graphicsPath.curveTo(dx + qPts.control3.x*sx, dy+qPts.control3.y*sy, dx+qPts.anchor3.x*sx, dy+qPts.anchor3.y*sy);
+ graphicsPath.curveTo(dx + qPts.control4.x*sx, dy+qPts.control4.y*sy, dx+qPts.anchor4.x*sx, dy+qPts.anchor4.y*sy);
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
+ m:Matrix, rect:Rectangle):Rectangle
+ {
+ var qPts:QuadraticPoints = getQuadraticPoints(prev);
+
+ rect = MatrixUtil.getQBezierSegmentBBox(prev ? prev.x : 0, prev ? prev.y : 0,
+ qPts.control1.x, qPts.control1.y,
+ qPts.anchor1.x, qPts.anchor1.y,
+ sx, sy, m, rect);
+
+ rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor1.x, qPts.anchor1.y,
+ qPts.control2.x, qPts.control2.y,
+ qPts.anchor2.x, qPts.anchor2.y,
+ sx, sy, m, rect);
+
+ rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor2.x, qPts.anchor2.y,
+ qPts.control3.x, qPts.control3.y,
+ qPts.anchor3.x, qPts.anchor3.y,
+ sx, sy, m, rect);
+
+ rect = MatrixUtil.getQBezierSegmentBBox(qPts.anchor3.x, qPts.anchor3.y,
+ qPts.control4.x, qPts.control4.y,
+ qPts.anchor4.x, qPts.anchor4.y,
+ sx, sy, m, rect);
+ return rect;
+ }
+
+ /**
+ * Returns the tangent for the segment.
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
+ * @param sx Pre-transform scale factor for x coordinates.
+ * @param sy Pre-transform scale factor for y coordinates.
+ * @param m Transformation matrix.
+ * @param result The tangent is returned as vector (x, y) in result.
+ */
+ override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
+ {
+ // Get the approximation (we want the tangents to be the same as the ones we use to draw
+ var qPts:QuadraticPoints = getQuadraticPoints(prev);
+
+ var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
+ var pt1:Point = MatrixUtil.transformPoint(qPts.control1.x * sx, qPts.control1.y * sy, m).clone();
+ var pt2:Point = MatrixUtil.transformPoint(qPts.anchor1.x * sx, qPts.anchor1.y * sy, m).clone();
+ var pt3:Point = MatrixUtil.transformPoint(qPts.control2.x * sx, qPts.control2.y * sy, m).clone();
+ var pt4:Point = MatrixUtil.transformPoint(qPts.anchor2.x * sx, qPts.anchor2.y * sy, m).clone();
+ var pt5:Point = MatrixUtil.transformPoint(qPts.control3.x * sx, qPts.control3.y * sy, m).clone();
+ var pt6:Point = MatrixUtil.transformPoint(qPts.anchor3.x * sx, qPts.anchor3.y * sy, m).clone();
+ var pt7:Point = MatrixUtil.transformPoint(qPts.control4.x * sx, qPts.control4.y * sy, m).clone();
+ var pt8:Point = MatrixUtil.transformPoint(qPts.anchor4.x * sx, qPts.anchor4.y * sy, m).clone();
+
+ if (start)
+ {
+ QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt2.x, pt2.y, start, result);
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ {
+ // Try 3 & 4
+ QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt3.x, pt3.y, pt4.x, pt4.y, start, result);
+
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ {
+ // Try 5 & 6
+ QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt5.x, pt5.y, pt6.x, pt6.y, start, result);
+
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ // Try 7 & 8
+ QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt7.x, pt7.y, pt8.x, pt8.y, start, result);
+ }
+ }
+ }
+ else
+ {
+ QuadraticBezierSegment.getQTangent(pt6.x, pt6.y, pt7.x, pt7.y, pt8.x, pt8.y, start, result);
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ {
+ // Try 4 & 5
+ QuadraticBezierSegment.getQTangent(pt4.x, pt4.y, pt5.x, pt5.y, pt8.x, pt8.y, start, result);
+
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ {
+ // Try 2 & 3
+ QuadraticBezierSegment.getQTangent(pt2.x, pt2.y, pt3.x, pt3.y, pt8.x, pt8.y, start, result);
+
+ // If there is no tangent
+ if (result.x == 0 && result.y == 0)
+ // Try 0 & 1
+ QuadraticBezierSegment.getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt8.x, pt8.y, start, result);
+ }
+ }
+ }
+ }
+
+ /**
+ * @private
+ * Tim Groleau's method to approximate a cubic bezier with 4 quadratic beziers,
+ * with endpoint and control point of each saved.
+ */
+ private function getQuadraticPoints(prev:PathSegment):QuadraticPoints
+ {
+ if (_qPts)
+ return _qPts;
+
+ var p1:Point = new Point(prev ? prev.x : 0, prev ? prev.y : 0);
+ var p2:Point = new Point(x, y);
+ var c1:Point = new Point(control1X, control1Y);
+ var c2:Point = new Point(control2X, control2Y);
+
+ // calculates the useful base points
+ var PA:Point = Point.interpolate(c1, p1, 3/4);
+ var PB:Point = Point.interpolate(c2, p2, 3/4);
+
+ // get 1/16 of the [p2, p1] segment
+ var dx:Number = (p2.x - p1.x) / 16;
+ var dy:Number = (p2.y - p1.y) / 16;
+
+ _qPts = new QuadraticPoints;
+
+ // calculates control point 1
+ _qPts.control1 = Point.interpolate(c1, p1, 3/8);
+
+ // calculates control point 2
+ _qPts.control2 = Point.interpolate(PB, PA, 3/8);
+ _qPts.control2.x -= dx;
+ _qPts.control2.y -= dy;
+
+ // calculates control point 3
+ _qPts.control3 = Point.interpolate(PA, PB, 3/8);
+ _qPts.control3.x += dx;
+ _qPts.control3.y += dy;
+
+ // calculates control point 4
+ _qPts.control4 = Point.interpolate(c2, p2, 3/8);
+
+ // calculates the 3 anchor points
+ _qPts.anchor1 = Point.interpolate(_qPts.control1, _qPts.control2, 0.5);
+ _qPts.anchor2 = Point.interpolate(PA, PB, 0.5);
+ _qPts.anchor3 = Point.interpolate(_qPts.control3, _qPts.control4, 0.5);
+
+ // the 4th anchor point is p2
+ _qPts.anchor4 = p2;
+
+ return _qPts;
+ }
+}
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - QuadraticPoints
+//
+//--------------------------------------------------------------------------
+import flash.geom.Point;
+
+/**
+ * Utility class to store the computed quadratic points.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class QuadraticPoints
+{
+ public var control1:Point;
+ public var anchor1:Point;
+ public var control2:Point;
+ public var anchor2:Point;
+ public var control3:Point;
+ public var anchor3:Point;
+ public var control4:Point;
+ public var anchor4:Point;
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function QuadraticPoints()
+ {
+ super();
+ }
+}
+
+//--------------------------------------------------------------------------
+//
+// Internal Helper Class - QuadraticBezierSegment
+//
+//--------------------------------------------------------------------------
+import flash.display.GraphicsPath;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import org.apache.flex.core.graphics.utils.MatrixUtil;
+
+/**
+ * The QuadraticBezierSegment draws a quadratic curve from the current pen position
+ * to x, y.
+ *
+ * Quadratic bezier is the native curve type
+ * in Flash Player.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class QuadraticBezierSegment extends PathSegment
+{
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * <p>For a QuadraticBezierSegment, there is one control point. A control point
+ * is a point that defines the direction and amount of a Bezier curve.
+ * The curved line never reaches the control point; however, the line curves as though being drawn
+ * toward the control point.</p>
+ *
+ * @param _control1X The x-axis location in 2-d coordinate space of the control point.
+ *
+ * @param _control1Y The y-axis location in 2-d coordinate space of the control point.
+ *
+ * @param x The x-axis location of the starting point of the curve.
+ *
+ * @param y The y-axis location of the starting point of the curve.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function QuadraticBezierSegment(
+ _control1X:Number = 0, _control1Y:Number = 0,
+ x:Number = 0, y:Number = 0)
+ {
+ super(x, y);
+
+ control1X = _control1X;
+ control1Y = _control1Y;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // control1X
+ //----------------------------------
+
+ /**
+ * The control point's x position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control1X:Number = 0;
+
+ //----------------------------------
+ // control1Y
+ //----------------------------------
+
+ /**
+ * The control point's y position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public var control1Y:Number = 0;
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Draws the segment using the control point location and the x and y coordinates.
+ * This method calls the <code>Graphics.curveTo()</code> method.
+ *
+ * @see flash.display.Graphics
+ *
+ * @param g The graphics context where the segment is drawn.
+ *
+ * @param prev The previous location of the pen.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function draw(graphicsPath:GraphicsPath, dx:Number,dy:Number,sx:Number,sy:Number,prev:PathSegment):void
+ {
+ graphicsPath.curveTo(dx+control1X*sx, dy+control1Y*sy, dx+x*sx, dy+y*sy);
+ }
+
+ static public function getQTangent(x0:Number, y0:Number,
+ x1:Number, y1:Number,
+ x2:Number, y2:Number,
+ start:Boolean,
+ result:Point):void
+ {
+ if (start)
+ {
+ if (x0 == x1 && y0 == y1)
+ {
+ result.x = x2 - x0;
+ result.y = y2 - y0;
+ }
+ else
+ {
+ result.x = x1 - x0;
+ result.y = y1 - y0;
+ }
+ }
+ else
+ {
+ if (x2 == x1 && y2 == y1)
+ {
+ result.x = x2 - x0;
+ result.y = y2 - y0;
+ }
+ else
+ {
+ result.x = x2 - x1;
+ result.y = y2 - y1;
+ }
+ }
+ }
+
+ /**
+ * Returns the tangent for the segment.
+ * @param prev The previous segment drawn, or null if this is the first segment.
+ * @param start If true, returns the tangent to the start point, otherwise the tangend to the end point.
+ * @param sx Pre-transform scale factor for x coordinates.
+ * @param sy Pre-transform scale factor for y coordinates.
+ * @param m Transformation matrix.
+ * @param result The tangent is returned as vector (x, y) in result.
+ */
+ override public function getTangent(prev:PathSegment, start:Boolean, sx:Number, sy:Number, m:Matrix, result:Point):void
+ {
+ var pt0:Point = MatrixUtil.transformPoint(prev ? prev.x * sx : 0, prev ? prev.y * sy : 0, m).clone();
+ var pt1:Point = MatrixUtil.transformPoint(control1X * sx, control1Y * sy, m).clone();;
+ var pt2:Point = MatrixUtil.transformPoint(x * sx, y * sy, m).clone();
+
+ getQTangent(pt0.x, pt0.y, pt1.x, pt1.y, pt2.x, pt2.y, start, result);
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ override public function getBoundingBox(prev:PathSegment, sx:Number, sy:Number,
+ m:Matrix, rect:Rectangle):Rectangle
+ {
+ return MatrixUtil.getQBezierSegmentBBox(prev ? prev.x : 0, prev ? prev.y : 0,
+ control1X, control1Y, x, y, sx, sy, m, rect);
+ }
+}
+
+
+/**
+ * The EllipticalArcSegment draws an arc from the current point to a specified point.
+ * The arc command begins with the x and y radius and ends with the ending point of the arc.
+ * Between these are three other values: x axis rotation, large arc flag and sweep flag.
+ * The x axis rotation is used to rotate the ellipse that the arc is created from.
+ * This rotation maintains the start and end points, whereas a rotation with the transform
+ * attribute (outside the path description) would cause the entire path, including the start
+ * and end points, to be rotated. The large arc flag and sweep flag control which part of
+ * the ellipse is used to cut the arc. These are needed because there's more than one way
+ * to place an ellipse so that it includes the start and end points.
+ *
+ *
+ * Derieved from the svgweb library
+ * Original found here https://code.google.com/p/svgweb/source/browse/trunk/src/org/svgweb/utils/EllipticalArc.as?r=1251
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+class EllipticalArcSegment extends PathSegment
+{
+
+ private var _rx:Number;
+ private var _ry:Number;
+ private var _angle:Number;
+ private var _largeArcFlag:Boolean;
+ private var _sweepFlag:Boolean;
+ private var _endX:Number;
+ private var _endY:Number;
+
+ /**
+ * Constructor.
+ *
+ *
+ * @param rx x radius
+ *
+ * @param ry y radius
+ *
+ * @param angle angle of rotation from the x-axis
+ *
+ * @param largeArcFlag true if arc is greater than 180 degrees
+ *
+ * @param sweepFlag determines if the arc proceeds in a postitive or negative radial direction
+ *
+ * @param x arc end x value
+ *
+ * @param y arc end y value
+ *
+ * @param LastPointX starting x value of arc
+ *
+ * @param LastPointY starting y value of arc
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function EllipticalArcSegment(rx:Number, ry:Number, angle:Number, largeArcFlag:Boolean, sweepFlag:Boolean, endX:Number, endY:Number)
+ {
+ _rx = rx;
+ _ry = ry;
+ _angle = angle;
+ _largeArcFlag = largeArcFlag;
+ _sweepFlag = sweepFlag;
+ _endX = endX;
+ _endY = endY;
+ }
+
+ override public function draw(graphicsPath:GraphicsPath, dx:Number, dy:Number, sx:Number, sy:Number, prev:PathSegment):void
+ {
+ var ellipticalArc:Object = computeSvgArc(_rx, _ry, _angle, _largeArcFlag, _sweepFlag, dx + _endX, dy + _endY, dx + prev.x , dy + prev.y);
+ drawEllipticalArc(ellipticalArc.cx, ellipticalArc.cy, ellipticalArc.startAngle, ellipticalArc.arc, ellipticalArc.radius, ellipticalArc.yRadius, ellipticalArc.xAxisRotation, graphicsPath);
+ }
+
+ /**
+ * @private
+ * Create quadratic circle graphics commands from an elliptical arc
+ **/
+ private static function drawEllipticalArc(x:Number, y:Number, startAngle:Number, arc:Number,
+ radius:Number, yRadius:Number, xAxisRotation:Number, path:GraphicsPath):void
+ {
+ // Circumvent drawing more than is needed
+ if (Math.abs(arc)>360)
+ {
+ arc = 360;
+ }
+
+ // Draw in a maximum of 45 degree segments. First we calculate how many
+ // segments are needed for our arc.
+ var segs:Number = Math.ceil(Math.abs(arc)/45);
+
+ // Now calculate the sweep of each segment
+ var segAngle:Number = arc/segs;
+
+ var theta:Number = degreesToRadians(segAngle);
+ var angle:Number = degreesToRadians(startAngle);
+
+ // Draw as 45 degree segments
+ if (segs>0)
+ {
+ var beta:Number = degreesToRadians(xAxisRotation);
+ var sinbeta:Number = Math.sin(beta);
+ var cosbeta:Number = Math.cos(beta);
+
+ var cx:Number;
+ var cy:Number;
+ var x1:Number;
+ var y1:Number;
+
+ // Loop for drawing arc segments
+ for (var i:int = 0; i<segs; i++) {
+
+ angle += theta;
+
+ var sinangle:Number = Math.sin(angle-(theta/2));
+ var cosangle:Number = Math.cos(angle-(theta/2));
+
+ var div:Number = Math.cos(theta/2);
+ cx = x + (radius * cosangle * cosbeta - yRadius * sinangle * sinbeta)/div; //Why divide by Math.cos(theta/2)? - FIX THIS
+ cy = y + (radius * cosangle * sinbeta + yRadius * sinangle * cosbeta)/div; //Why divide by Math.cos(theta/2)? - FIX THIS
+
+ sinangle = Math.sin(angle);
+ cosangle = Math.cos(angle);
+
+ x1 = x + (radius * cosangle * cosbeta - yRadius * sinangle * sinbeta);
+ y1 = y + (radius * cosangle * sinbeta + yRadius * sinangle * cosbeta);
+
+ path.curveTo(cx, cy, x1, y1);
+ }
+ }
+ }
+
+
+ private function computeSvgArc(rx:Number, ry:Number,angle:Number,largeArcFlag:Boolean,sweepFlag:Boolean,
+ x:Number,y:Number,LastPointX:Number, LastPointY:Number):Object {
+ //store before we do anything with it
+ var xAxisRotation:Number = angle;
+
+ // Compute the half distance between the current and the final point
+ var dx2:Number = (LastPointX - x) / 2.0;
+ var dy2:Number = (LastPointY - y) / 2.0;
+
+ // Convert angle from degrees to radians
+ angle = degreesToRadians(angle);
+ var cosAngle:Number = Math.cos(angle);
+ var sinAngle:Number = Math.sin(angle);
+
+
+ //Compute (x1, y1)
+ var x1:Number = (cosAngle * dx2 + sinAngle * dy2);
+ var y1:Number = (-sinAngle * dx2 + cosAngle * dy2);
+
+ // Ensure radii are large enough
+ rx = Math.abs(rx);
+ ry = Math.abs(ry);
+ var Prx:Number = rx * rx;
+ var Pry:Number = ry * ry;
+ var Px1:Number = x1 * x1;
+ var Py1:Number = y1 * y1;
+
+ // check that radii are large enough
+ var radiiCheck:Number = Px1/Prx + Py1/Pry;
+ if (radiiCheck > 1) {
+ rx = Math.sqrt(radiiCheck) * rx;
+ ry = Math.sqrt(radiiCheck) * ry;
+ Prx = rx * rx;
+ Pry = ry * ry;
+ }
+
+
+ //Compute (cx1, cy1)
+ var sign:Number = (largeArcFlag == sweepFlag) ? -1 : 1;
+ var sq:Number = ((Prx*Pry)-(Prx*Py1)-(Pry*Px1)) / ((Prx*Py1)+(Pry*Px1));
+ sq = (sq < 0) ? 0 : sq;
+ var coef:Number = (sign * Math.sqrt(sq));
+ var cx1:Number = coef * ((rx * y1) / ry);
+ var cy1:Number = coef * -((ry * x1) / rx);
+
+
+ //Compute (cx, cy) from (cx1, cy1)
+ var sx2:Number = (LastPointX + x) / 2.0;
+ var sy2:Number = (LastPointY + y) / 2.0;
+ var cx:Number = sx2 + (cosAngle * cx1 - sinAngle * cy1);
+ var cy:Number = sy2 + (sinAngle * cx1 + cosAngle * cy1);
+
+
+ //Compute the angleStart (angle1) and the angleExtent (dangle)
+ var ux:Number = (x1 - cx1) / rx;
+ var uy:Number = (y1 - cy1) / ry;
+ var vx:Number = (-x1 - cx1) / rx;
+ var vy:Number = (-y1 - cy1) / ry;
+ var p:Number
+ var n:Number
+
+ //Compute the angle start
+ n = Math.sqrt((ux * ux) + (uy * uy));
+ p = ux;
+
+ sign = (uy < 0) ? -1.0 : 1.0;
+
+ var angleStart:Number = radiansToDegrees(sign * Math.acos(p / n));
+
+ // Compute the angle extent
+ n = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
+ p = ux * vx + uy * vy;
+ sign = (ux * vy - uy * vx < 0) ? -1.0 : 1.0;
+ var angleExtent:Number = radiansToDegrees(sign * Math.acos(p / n));
+
+ if(!sweepFlag && angleExtent > 0)
+ {
+ angleExtent -= 360;
+ }
+ else if (sweepFlag && angleExtent < 0)
+ {
+ angleExtent += 360;
+ }
+
+ angleExtent %= 360;
+ angleStart %= 360;
+
+ //return Object({x:LastPointX,y:LastPointY,startAngle:angleStart,arc:angleExtent,radius:rx,yRadius:ry,xAxisRotation:xAxisRotation});
+ return Object({x:LastPointX,y:LastPointY,startAngle:angleStart,arc:angleExtent,radius:rx,yRadius:ry,xAxisRotation:xAxisRotation, cx:cx,cy:cy});
+ }
+
+ /**
+ * @private
+ * Convert degrees to radians
+ **/
+ private static function degreesToRadians(angle:Number):Number{
+ return angle*(Math.PI/180);
+ }
+
+ /**
+ * @private
+ * Convert radiansToDegrees
+ **/
+ private static function radiansToDegrees(angle:Number):Number{
+ return angle*(180/Math.PI);
+ }
+
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/TransformOffsets.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/TransformOffsets.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/TransformOffsets.as
new file mode 100644
index 0000000..91389ba
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/utils/TransformOffsets.as
@@ -0,0 +1,367 @@
+/**
+ * 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.
+ */
+
+package org.apache.flex.core.graphics.utils
+{
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+
+ import __AS3__.vec.Vector;
+
+
+ /**
+ * A CompoundTransform represents a 2D or 3D matrix transform. It can be used in the postLayoutTransformOffsets property on a UIComponent or GraphicElement.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public class TransformOffsets extends EventDispatcher
+ {
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function TransformOffsets()
+ {
+ }
+
+
+
+ /**
+ * @private
+ * storage for transform properties. These values are concatenated together with the layout properties to
+ * form the actual computed matrix used to render the object.
+ */
+ private var _rotationX:Number = 0;
+ private var _rotationY:Number = 0;
+ private var _rotationZ:Number = 0;
+ private var _scaleX:Number = 1;
+ private var _scaleY:Number = 1;
+ private var _scaleZ:Number = 1;
+ private var _x:Number = 0;
+ private var _y:Number = 0;
+ private var _z:Number = 0;
+
+ /**
+ * @private
+ * flags for tracking whether the transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
+ */
+ private static const IS_3D:uint = 0x200;
+ private static const M3D_FLAGS_VALID:uint = 0x400;
+
+ /**
+ * @private
+ * general storage for all of our flags.
+ */
+ private var _flags:uint = 0;
+
+ /**
+ * @private
+ */
+ public var owner:AdvancedLayoutFeatures;
+ //----------------------------------------------------------------------------
+
+ /**
+ * the x value added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set x(value:Number):void
+ {
+ if (value == _x)
+ return;
+ _x = value;
+ invalidate(false);
+ }
+ /**
+ * @private
+ */
+ public function get x():Number
+ {
+ return _x;
+ }
+
+ /**
+ * the y value added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set y(value:Number):void
+ {
+ if (value == _y)
+ return;
+ _y = value;
+ invalidate(false);
+ }
+
+ /**
+ * @private
+ */
+ public function get y():Number
+ {
+ return _y;
+ }
+
+ /**
+ * the z value added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set z(value:Number):void
+ {
+ if (value == _z)
+ return;
+ _z = value;
+ invalidate(true);
+ }
+
+ /**
+ * @private
+ */
+ public function get z():Number
+ {
+ return _z;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * the rotationX, in degrees, added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationX(value:Number):void
+ {
+ if (value == _rotationX)
+ return;
+ _rotationX = value;
+ invalidate(true);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationX():Number
+ {
+ return _rotationX;
+ }
+
+ /**
+ * the rotationY, in degrees, added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationY(value:Number):void
+ {
+ if (value == _rotationY)
+ return;
+ _rotationY = value;
+ invalidate(true);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationY():Number
+ {
+ return _rotationY;
+ }
+
+ /**
+ * the rotationZ, in degrees, added to the transform
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set rotationZ(value:Number):void
+ {
+ if (value == _rotationZ)
+ return;
+ _rotationZ = value;
+ invalidate(false);
+ }
+
+ /**
+ * @private
+ */
+ public function get rotationZ():Number
+ {
+ return _rotationZ;
+ }
+
+ //------------------------------------------------------------------------------
+
+
+ /**
+ * the multiplier applied to the scaleX of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleX(value:Number):void
+ {
+ if (value == _scaleX)
+ return;
+ _scaleX = value;
+ invalidate(false);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleX():Number
+ {
+ return _scaleX;
+ }
+
+ /**
+ * the multiplier applied to the scaleY of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleY(value:Number):void
+ {
+ if (value == _scaleY)
+ return;
+ _scaleY = value;
+ invalidate(false);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleY():Number
+ {
+ return _scaleY;
+ }
+
+
+ /**
+ * the multiplier applied to the scaleZ of the transform.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set scaleZ(value:Number):void
+ {
+ if (value == _scaleZ)
+ return;
+ _scaleZ = value;
+ invalidate(true);
+ }
+
+ /**
+ * @private
+ */
+ public function get scaleZ():Number
+ {
+ return _scaleZ;
+ }
+
+
+ /**
+ * @private
+ * returns true if the transform has 3D values.
+ */
+ public function get is3D():Boolean
+ {
+ if ((_flags & M3D_FLAGS_VALID) == 0)
+ update3DFlags();
+ return ((_flags & IS_3D) != 0);
+ }
+
+
+ //------------------------------------------------------------------------------
+
+ /**
+ * @private
+ * invalidates our various cached values. Any change to the CompoundTransform object that affects
+ * the various transforms should call this function.
+ * @param reason - the code indicating what changes to cause the invalidation.
+ * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
+ * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
+ * have been modified.
+ */
+ private function invalidate(affects3D:Boolean,dispatchChangeEvent:Boolean = true):void
+ {
+ if (affects3D)
+ _flags &= ~M3D_FLAGS_VALID;
+
+ if (dispatchChangeEvent)
+ dispatchEvent(new Event(Event.CHANGE));
+ }
+
+ private static const EPSILON:Number = .001;
+ /**
+ * @private
+ * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
+ * Since the user can set either the individual transform properties or the matrices directly, we compute these
+ * flags based on what the current 'source of truth' is for each of these values.
+ */
+ private function update3DFlags():void
+ {
+ if ((_flags & M3D_FLAGS_VALID) == 0)
+ {
+ var matrixIs3D:Boolean = ( // note that rotationZ is the same as rotation, and not a 3D affecting
+ (Math.abs(_scaleZ-1) > EPSILON) || // property.
+ ((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
+ ((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
+ Math.abs(_z) > EPSILON
+ );
+ if (matrixIs3D)
+ _flags |= IS_3D;
+ else
+ _flags &= ~IS_3D;
+ _flags |= M3D_FLAGS_VALID;
+ }
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml b/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..2191691
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/resources/basic-manifest.xml
@@ -0,0 +1,34 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Circle" class="org.apache.flex.core.graphics.Circle" />
+ <component id="Ellipse" class="org.apache.flex.core.graphics.Ellipse" />
+ <component id="Path" class="org.apache.flex.core.graphics.Path" />
+ <component id="Rect" class="org.apache.flex.core.graphics.Rect" />
+ <component id="GraphicsContainer" class="org.apache.flex.core.graphics.GraphicsContainer" />
+ <component id="GradientEntry" class="org.apache.flex.core.graphics.GradientEntry" />
+ <component id="LinearGradient" class="org.apache.flex.core.graphics.LinearGradient" />
+ <component id="SolidColor" class="org.apache.flex.core.graphics.SolidColor" />
+ <component id="SolidColorStroke" class="org.apache.flex.core.graphics.SolidColorStroke" />
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..4943b8e
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,82 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>GraphicsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/compile-config.xml b/frameworks/projects/Graphics/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..200768a
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/resources/compile-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>GraphicsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[09/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for DragDrop
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
new file mode 100644
index 0000000..3165241
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/html/beads/controllers/DropMouseController.as
@@ -0,0 +1,185 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 the mouse is moving out of a component during
+ * a drag/drop operation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="dragExit", 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
+ * @flexjsignorecoercion org.apache.flex.events.MouseEvent
+ */
+ private function dragMoveHandler(event:DragEvent):void
+ {
+ trace("dragMove");
+ var dragEvent:DragEvent;
+ if (!inside)
+ {
+ dragEvent = DragEvent.createDragEvent("dragEnter", event as MouseEvent);
+ dispatchEvent(dragEvent);
+ inside = true;
+ IUIBase(_strand).topMostEventDispatcher.addEventListener(DragEvent.DRAG_END, dragEndHandler);
+ IUIBase(_strand).addEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+ else
+ {
+ dragEvent = DragEvent.createDragEvent("dragOver", event as MouseEvent);
+ dispatchEvent(dragEvent);
+ }
+ }
+
+ private function rollOutHandler(event:MouseEvent):void
+ {
+ var dragEvent:DragEvent;
+
+ if (inside)
+ {
+ dragEvent = DragEvent.createDragEvent("dragExit", event);
+ dispatchEvent(dragEvent);
+ inside = false;
+ }
+ IUIBase(_strand).topMostEventDispatcher.removeEventListener(DragEvent.DRAG_END, dragEndHandler);
+ IUIBase(_strand).removeEventListener(MouseEvent.ROLL_OUT, rollOutHandler);
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.events.MouseEvent
+ */
+ private function dragEndHandler(event:DragEvent):void
+ {
+ trace("dragEnd");
+ var dragEvent:DragEvent;
+
+ dragEvent = DragEvent.createDragEvent("dragDrop", event as MouseEvent);
+ 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/51c4ffee/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..bf5911f
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/resources/basic-manifest.xml
@@ -0,0 +1,27 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="DragMouseController" class="org.apache.flex.html.beads.controllers.DragMouseController" />
+ <component id="DropMouseController" class="org.apache.flex.html.beads.controllers.DropMouseController" />
+
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml b/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..1ad65d7
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,79 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-classes>
+ <class>DragDropClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51c4ffee/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/resources/compile-config.xml b/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..f8d1526
--- /dev/null
+++ b/frameworks/projects/DragDrop/src/main/resources/compile-config.xml
@@ -0,0 +1,78 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>DragDropClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
[29/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder change
Posted by ah...@apache.org.
fix scripts after folder change
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/693d2839
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/693d2839
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/693d2839
Branch: refs/heads/develop
Commit: 693d28394984af2f523123d4c1bf7c8189893990
Parents: 1bfcf5d
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:27:31 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/HTML5/build.xml | 65 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 8 +--
.../HTML5/src/main/resources/compile-config.xml | 10 +--
3 files changed, 44 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/693d2839/frameworks/projects/HTML5/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/build.xml b/frameworks/projects/HTML5/build.xml
index 1b1d27d..447af25 100644
--- a/frameworks/projects/HTML5/build.xml
+++ b/frameworks/projects/HTML5/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="HTML5-${release.version}.swc" />
+ <property name="target.name.no.version" value="HTML5.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of HTML5.swc">
</target>
@@ -41,55 +43,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="HTML5.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/HTML5.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in ChartsClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/HTML5.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling HTML5"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -99,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -111,13 +114,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/HTML5.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -135,9 +139,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/HTML5.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -146,11 +150,12 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
+
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/693d2839/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml b/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
index 0e2439c..c3db508 100644
--- a/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
@@ -45,19 +45,19 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
</compiler>
<include-sources>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</include-sources>
<include-namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/693d2839/frameworks/projects/HTML5/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/compile-config.xml b/frameworks/projects/HTML5/src/main/resources/compile-config.xml
index f2ece61..75d4ef8 100644
--- a/frameworks/projects/HTML5/src/main/resources/compile-config.xml
+++ b/frameworks/projects/HTML5/src/main/resources/compile-config.xml
@@ -23,8 +23,8 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -54,7 +54,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -62,11 +62,11 @@
<include-file>
<name>defaults.css</name>
- <path>as/defaults.css</path>
+ <path>defaults.css</path>
</include-file>
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[13/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/252ef2cd
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/252ef2cd
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/252ef2cd
Branch: refs/heads/develop
Commit: 252ef2cd97db0b6f782eb0c50d88e7a2b256668e
Parents: bbf9301
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 17:02:04 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:50 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Effects/build.xml | 71 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 4 +-
.../src/main/resources/compile-config.xml | 6 +-
3 files changed, 43 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/252ef2cd/frameworks/projects/Effects/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/build.xml b/frameworks/projects/Effects/build.xml
index 048f6d9..558a021 100644
--- a/frameworks/projects/Effects/build.xml
+++ b/frameworks/projects/Effects/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Effects-${release.version}.swc" />
+ <property name="target.name.no.version" value="Effects.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile" description="Full build of Effects.swc">
</target>
@@ -49,55 +51,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Effects.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
-
+
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Effects.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in EffectsClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Effects.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling Effects"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -107,8 +110,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -119,13 +122,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Effects.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -134,7 +138,7 @@
Link in the classes (and their dependencies) for the MXML tags
listed in this project's manifest.xml.
Also link the additional classes (and their dependencies)
- listed in EffectsClasses.as,
+ listed in CoreClasses.as,
because these aren't referenced by the manifest classes.
Keep the standard metadata when compiling.
Include the appropriate CSS files and assets in the SWC.
@@ -143,9 +147,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Effects.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -154,12 +158,13 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
- <target name="copy-js" >
+
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/252ef2cd/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
index 8f64d55..9cd51ef 100644
--- a/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Effects/src/main/resources/compile-asjs-config.xml
@@ -45,11 +45,11 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<namespaces>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/252ef2cd/frameworks/projects/Effects/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/resources/compile-config.xml b/frameworks/projects/Effects/src/main/resources/compile-config.xml
index a07b904..684baa4 100644
--- a/frameworks/projects/Effects/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Effects/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -53,7 +53,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -61,7 +61,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[05/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - missed
one
Posted by ah...@apache.org.
missed one
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b2e35b81
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b2e35b81
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b2e35b81
Branch: refs/heads/develop
Commit: b2e35b81c44019b26d4db60c1280defb1fcfad9e
Parents: dd3df6f
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:41:41 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
frameworks/projects/CreateJS/src/defaults.css | 36 --------------------
.../CreateJS/src/main/resources/defaults.css | 36 ++++++++++++++++++++
2 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b2e35b81/frameworks/projects/CreateJS/src/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/defaults.css b/frameworks/projects/CreateJS/src/defaults.css
deleted file mode 100644
index 55fa336..0000000
--- a/frameworks/projects/CreateJS/src/defaults.css
+++ /dev/null
@@ -1,36 +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.
- *
- */
-
-@namespace createjs "library://ns.apache.org/flexjs/createjs";
-
-@media -flex-flash
-{
-
-createjs|TextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
-}
-
-createjs|CheckBox
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b2e35b81/frameworks/projects/CreateJS/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/defaults.css b/frameworks/projects/CreateJS/src/main/resources/defaults.css
new file mode 100644
index 0000000..55fa336
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/defaults.css
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace createjs "library://ns.apache.org/flexjs/createjs";
+
+@media -flex-flash
+{
+
+createjs|TextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
+}
+
+createjs|CheckBox
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
+}
+
+}
[36/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for Graphics
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
deleted file mode 100644
index 14cc5af..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/AdvancedLayoutFeatures.as
+++ /dev/null
@@ -1,1140 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics.utils
-{
- import flash.events.Event;
- import flash.geom.Matrix;
- import flash.geom.Matrix3D;
- import flash.geom.Point;
- import flash.geom.Vector3D;
- import flash.system.Capabilities;
-
- import org.apache.flex.core.graphics.utils.IAssetLayoutFeatures;
-
-
- /**
- * @private
- * Transform Offsets can be assigned to any Component or GraphicElement to modify the transform
- * of the object beyond where its parent layout places it.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public class AdvancedLayoutFeatures implements IAssetLayoutFeatures
- {
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function AdvancedLayoutFeatures()
- {
- layout = new CompoundTransform();
- }
-
-
-
- /**
- * @private
- * a flag for use by the owning object indicating whether the owning object has a pending update
- * to the computed matrix. it is the owner's responsibility to set this flag.
- */
- public var updatePending:Boolean = false;
-
- /**
- * storage for the depth value. Layering is considered 'advanced' layout behavior, and not something
- * that gets used by the majority of the components out there. So if a component has a non-zero depth,
- * it will allocate a AdvancedLayoutFeatures object and store the value here.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var depth:Number = 0;
-
- /**
- * @private
- * slots for the various 2D and 3D matrices for layout, offset, and computed transforms. Note that
- * these are only allocated and computed on demand -- many component instances will never use a 3D
- * matrix, for example.
- */
- protected var _computedMatrix:Matrix;
- protected var _computedMatrix3D:Matrix3D;
-
- /**
- * @private
- * the layout visible transform as defined by the user and parent layout.
- */
- protected var layout:CompoundTransform;
-
- /**
- * @private
- * offset values applied by the user
- */
- private var _postLayoutTransformOffsets:TransformOffsets;
-
- /**
- * @private
- * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
- * and the 3D matrices. Since developers can set any of the three programmatically, the last one set
- * will always be valid, and the others will be invalid until validated on demand.
- */
- private static const COMPUTED_MATRIX_VALID:uint = 0x1;
- private static const COMPUTED_MATRIX3D_VALID:uint = 0x2;
-
- /**
- * @private
- * general storage for all of our flags.
- */
- private var _flags:uint = 0;
-
- /**
- * @private
- * static data used by utility methods below
- */
- private static var reVT:Vector3D = new Vector3D(0,0,0);
- private static var reVR:Vector3D = new Vector3D(0,0,0);
- private static var reVS:Vector3D = new Vector3D(1,1,1);
-
- private static var reV:Vector.<Vector3D> = new Vector.<Vector3D>();
- reV.push(reVT);
- reV.push(reVR);
- reV.push(reVS);
-
-
- private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
-
- private static const ZERO_REPLACEMENT_IN_3D:Number = .00000000000001;
-
- private static var tempLocalPosition:Vector3D;
-
- /**
- * @private
- * a pointer to the function we use to transform vectors, to work around a bug
- * in early versions of the flash player.
- */
- private static var transformVector:Function = initTransformVectorFunction;
-
- /**
- * @private
- * an actionscript implementation to transform a vector by a matrix. Bugs in early versions of
- * flash 10's implementation of Matrix.transformVector force us to do it ourselves in actionscript.
- */
- private static function pre10_0_22_87_transformVector(m:Matrix3D,v:Vector3D):Vector3D
- {
- var r:Vector.<Number> = m.rawData;
- return new Vector3D(
- r[0] * v.x + r[4] * v.y + r[8] * v.z + r[12],
- r[1] * v.x + r[5] * v.y + r[9] * v.z + r[13],
- r[2] * v.x + r[6] * v.y + r[10] * v.z + r[14],
- 1);
- }
-
- /**
- * @private
- * a function to transform vectors using the built in player API, if we're in a late enough player version
- * that we won't run into bugs.s
- */
- private static function nativeTransformVector(m:Matrix3D,v:Vector3D):Vector3D
- {
- return m.transformVector(v);
- }
-
- /**
- * @private
- * the first time someone calls transformVector, they'll get this function. It checks the player version,
- * and if decides which implementation to use based on whether a bug is present or not.
- */
- private static function initTransformVectorFunction(m:Matrix3D,v:Vector3D):Vector3D
- {
- var canUseNative:Boolean = false;
- var version:Array = Capabilities.version.split(' ')[1].split(',');
- if (parseFloat(version[0]) > 10)
- canUseNative = true;
- else if (parseFloat(version[1]) > 0)
- canUseNative = true;
- else if (parseFloat(version[2]) > 22)
- canUseNative = true;
- else if (parseFloat(version[3]) >= 87)
- canUseNative = true;
- if (canUseNative)
- transformVector = nativeTransformVector;
- else
- transformVector = pre10_0_22_87_transformVector;
-
- return transformVector(m,v);
- }
-
-
- //------------------------------------------------------------------------------
-
- /**
- * layout transform convenience property. Represents the x value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutX(value:Number):void
- {
- layout.x = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutX():Number
- {
- return layout.x;
- }
- /**
- * layout transform convenience property. Represents the y value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutY(value:Number):void
- {
- layout.y = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutY():Number
- {
- return layout.y;
- }
-
- /**
- * layout transform convenience property. Represents the z value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutZ(value:Number):void
- {
- layout.z = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutZ():Number
- {
- return layout.z;
- }
-
- //----------------------------------
- // layoutWidth
- //----------------------------------
-
- private var _layoutWidth:Number = 0;
-
- /**
- * Used by the mirroring transform. See the mirror property.
- * @default 0
- */
- public function get layoutWidth():Number
- {
- return _layoutWidth;
- }
-
- /**
- * @private
- */
- public function set layoutWidth(value:Number):void
- {
- if (value == _layoutWidth)
- return;
- _layoutWidth = value;
- invalidate();
- }
-
-
- //------------------------------------------------------------------------------
-
- /**
- * @private
- * the x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- */
- public function set transformX(value:Number):void
- {
- layout.transformX = value;
- invalidate();
- }
- /**
- * @private
- */
- public function get transformX():Number
- {
- return layout.transformX;
- }
-
- /**
- * @private
- * the y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- */
- public function set transformY(value:Number):void
- {
- layout.transformY = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get transformY():Number
- {
- return layout.transformY;
- }
-
- /**
- * @private
- * the z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- */
- public function set transformZ(value:Number):void
- {
- layout.transformZ = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get transformZ():Number
- {
- return layout.transformZ;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * layout transform convenience property. Represents the rotation around the X axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutRotationX(value:Number):void
- {
- layout.rotationX= value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutRotationX():Number
- {
- return layout.rotationX;
- }
-
- /**
- * layout transform convenience property. Represents the rotation around the Y axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutRotationY(value:Number):void
- {
- layout.rotationY= value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutRotationY():Number
- {
- return layout.rotationY;
- }
-
- /**
- * layout transform convenience property. Represents the rotation around the Z axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutRotationZ(value:Number):void
- {
- layout.rotationZ= value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutRotationZ():Number
- {
- return layout.rotationZ;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * layout transform convenience property. Represents the scale along the X axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutScaleX(value:Number):void
- {
- layout.scaleX = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutScaleX():Number
- {
- return layout.scaleX;
- }
-
- /**
- * layout transform convenience property. Represents the scale along the Y axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutScaleY(value:Number):void
- {
- layout.scaleY= value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutScaleY():Number
- {
- return layout.scaleY;
- }
-
-
- /**
- * layout transform convenience property. Represents the scale along the Z axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set layoutScaleZ(value:Number):void
- {
- layout.scaleZ= value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutScaleZ():Number
- {
- return layout.scaleZ;
- }
-
- /**
- * @private
- * The 2D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
- * If the convenience properties are set, this matrix is built from those properties.
- * If the matrix is set directly, the convenience properties will be updated to values derived from this matrix.
- * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
- * offsets are provided, the decomposed layout properties will be used instead.
- */
- public function set layoutMatrix(value:Matrix):void
- {
- layout.matrix = value;
- invalidate();
- }
-
-
- /**
- * @private
- */
- public function get layoutMatrix():Matrix
- {
- return layout.matrix;
-
- }
-
-
- /**
- * @private
- * The 3D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
- * This matrix is only used by parents that respect 3D layoyut.
- * If the convenience properties are set, this matrix is built from those properties.
- * If the matrix is set directly, the convenience properties will be updated to values derived from this matrix.
- * This matrix is used in the calculation of the computed transform if possible. Under certain circumstances, such as when
- * offsets are provided, the decomposed layout properties will be used instead.
- */
- public function set layoutMatrix3D(value:Matrix3D):void
- {
- layout.matrix3D = value;
- invalidate();
- }
-
- /**
- * @private
- */
- public function get layoutMatrix3D():Matrix3D
- {
- return layout.matrix3D;
- }
-
- /**
- * true if the computed transform has 3D values.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get is3D():Boolean
- {
- return (layout.is3D || (postLayoutTransformOffsets != null && postLayoutTransformOffsets.is3D));
- }
-
- /**
- * true if the layout transform has 3D values.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get layoutIs3D():Boolean
- {
- return layout.is3D;
- }
-
- //------------------------------------------------------------------------------
-
- /** offsets to the transform convenience properties that are applied when a component is rendered. If this
- * property is set, its values will be added to the layout transform properties to determine the true matrix used to render
- * the component
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set postLayoutTransformOffsets(value:TransformOffsets):void
- {
- if (_postLayoutTransformOffsets != null)
- {
- _postLayoutTransformOffsets.removeEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
- _postLayoutTransformOffsets.owner = null;
- }
- _postLayoutTransformOffsets = value;
- if (_postLayoutTransformOffsets != null)
- {
- _postLayoutTransformOffsets.addEventListener(Event.CHANGE,postLayoutTransformOffsetsChangedHandler);
- _postLayoutTransformOffsets.owner = this;
- }
- invalidate();
- }
-
- public function get postLayoutTransformOffsets():TransformOffsets
- {
- return _postLayoutTransformOffsets;
- }
-
- private function postLayoutTransformOffsetsChangedHandler(e:Event):void
- {
- invalidate();
- }
-
- //----------------------------------
- // mirror
- //----------------------------------
-
- private var _mirror:Boolean = false;
-
- /**
- * If true the X axis is scaled by -1 and the x coordinate of the origin
- * is translated by the component's width.
- *
- * The net effect of this "mirror" transform is to flip the direction
- * that the X axis increases in without changing the layout element's
- * location relative to the parent's origin.
- *
- * @default false
- */
- public function get mirror():Boolean
- {
- return _mirror;
- }
-
- /**
- * @private
- */
- public function set mirror(value:Boolean):void
- {
- _mirror = value;
- invalidate();
- }
-
-
- //----------------------------------
- // stretchX
- //----------------------------------
-
- private var _stretchX:Number = 1;
-
- /**
- * The stretchY is the horizontal component of the stretch scale factor which
- * is applied before any other transformation property.
- * @default 1
- */
- public function get stretchX():Number
- {
- return _stretchX;
- }
-
- /**
- * @private
- */
- public function set stretchX(value:Number):void
- {
- if (value == _stretchX)
- return;
- _stretchX = value;
- invalidate();
- }
-
- //----------------------------------
- // stretchY
- //----------------------------------
-
- private var _stretchY:Number = 1;
-
- /**
- * The stretchY is the vertical component of the stretch scale factor which
- * is applied before any other transformation property.
- * @default 1
- */
- public function get stretchY():Number
- {
- return _stretchY;
- }
-
- /**
- * @private
- */
- public function set stretchY(value:Number):void
- {
- if (value == _stretchY)
- return;
- _stretchY = value;
- invalidate();
- }
-
- //------------------------------------------------------------------------------
-
- /**
- * @private
- * invalidates our various cached values. Any change to the AdvancedLayoutFeatures object that affects
- * the various transforms should call this function.
- * @param reason - the code indicating what changes to cause the invalidation.
- * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
- * @param dispatchChangeEvent - if true, the AdvancedLayoutFeatures will dispatch a change indicating that its underlying transforms
- * have been modified.
- */
- private function invalidate():void
- {
- _flags &= ~COMPUTED_MATRIX_VALID;
- _flags &= ~COMPUTED_MATRIX3D_VALID;
- }
-
-
- /**
- * the computed matrix, calculated by combining the layout matrix and and any offsets provided..
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get computedMatrix():Matrix
- {
- if (_flags & COMPUTED_MATRIX_VALID)
- return _computedMatrix;
-
- if (!postLayoutTransformOffsets && !mirror && stretchX == 1 && stretchY == 1)
- {
- return layout.matrix;
- }
-
- var m:Matrix = _computedMatrix;
- if (m == null)
- m = _computedMatrix = new Matrix();
- else
- m.identity();
-
- var tx:Number = layout.transformX;
- var ty:Number = layout.transformY;
- var sx:Number = layout.scaleX;
- var sy:Number = layout.scaleY;
- var rz:Number = layout.rotationZ;
- var x:Number = layout.x;
- var y:Number = layout.y;
-
- if (mirror)
- {
- sx *= -1;
- x += layoutWidth;
- }
-
- if (postLayoutTransformOffsets)
- {
- sx *= postLayoutTransformOffsets.scaleX;
- sy *= postLayoutTransformOffsets.scaleY;
- rz += postLayoutTransformOffsets.rotationZ;
- x += postLayoutTransformOffsets.x;
- y += postLayoutTransformOffsets.y;
- }
-
- if (stretchX != 1 || stretchY != 1)
- m.scale(stretchX, stretchY);
- build2DMatrix(m, tx, ty, sx, sy, rz, x, y);
-
- _flags |= COMPUTED_MATRIX_VALID;
- return m;
- }
-
- /**
- * the computed 3D matrix, calculated by combining the 3D layout matrix and and any offsets provided..
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get computedMatrix3D():Matrix3D
- {
- if (_flags & COMPUTED_MATRIX3D_VALID)
- return _computedMatrix3D;
-
-
- if (!postLayoutTransformOffsets && !mirror && stretchX == 1 && stretchY == 1)
- {
- return layout.matrix3D;
- }
-
- var m:Matrix3D = _computedMatrix3D;
- if (m == null)
- m = _computedMatrix3D = new Matrix3D();
- else
- m.identity();
-
- var tx:Number = layout.transformX;
- var ty:Number = layout.transformY;
- var tz:Number = layout.transformZ;
- var sx:Number = layout.scaleX;
- var sy:Number = layout.scaleY;
- var sz:Number = layout.scaleZ;
- var rx:Number = layout.rotationX;
- var ry:Number = layout.rotationY;
- var rz:Number = layout.rotationZ;
- var x:Number = layout.x;
- var y:Number = layout.y;
- var z:Number = layout.z;
-
- if (mirror)
- {
- sx *= -1;
- x += layoutWidth;
- }
-
- if (postLayoutTransformOffsets)
- {
- sx *= postLayoutTransformOffsets.scaleX;
- sy *= postLayoutTransformOffsets.scaleY;
- sz *= postLayoutTransformOffsets.scaleZ;
- rx += postLayoutTransformOffsets.rotationX;
- ry += postLayoutTransformOffsets.rotationY;
- rz += postLayoutTransformOffsets.rotationZ;
- x += postLayoutTransformOffsets.x;
- y += postLayoutTransformOffsets.y;
- z += postLayoutTransformOffsets.z;
- }
-
- build3DMatrix(m, tx, ty, tz, sx, sy, sz, rx, ry, rz, x, y, z);
- // Always prepend last
- if (stretchX != 1 || stretchY != 1)
- m.prependScale(stretchX, stretchY, 1);
-
- _flags |= COMPUTED_MATRIX3D_VALID;
- return m;
- }
-
-
- /**
- * @private
- * convenience function for building a 2D matrix from the convenience properties
- */
- public static function build2DMatrix(m:Matrix,
- tx:Number,ty:Number,
- sx:Number,sy:Number,
- rz:Number,
- x:Number,y:Number):void
- {
- m.translate(-tx,-ty);
- m.scale(sx,sy);
- m.rotate(rz* RADIANS_PER_DEGREES);
- m.translate(x+tx,y+ty);
- }
-
-
- /**
- * @private
- * convenience function for building a 3D matrix from the convenience properties
- */
- public static function build3DMatrix(m:Matrix3D,
- tx:Number,ty:Number,tz:Number,
- sx:Number,sy:Number,sz:Number,
- rx:Number,ry:Number,rz:Number,
- x:Number,y:Number,z:Number):void
- {
- reVR.x = rx * RADIANS_PER_DEGREES;
- reVR.y = ry * RADIANS_PER_DEGREES;
- reVR.z = rz * RADIANS_PER_DEGREES;
- m.recompose(reV);
- if (sx == 0)
- sx = ZERO_REPLACEMENT_IN_3D;
- if (sy == 0)
- sy = ZERO_REPLACEMENT_IN_3D;
- if (sz == 0)
- sz = ZERO_REPLACEMENT_IN_3D;
- m.prependScale(sx,sy,sz);
- m.prependTranslation(-tx,-ty,-tz);
- m.appendTranslation(tx+x,ty+y,tz+z);
- }
-
-
- /**
- * A utility method to transform a point specified in the local
- * coordinates of this object to its location in the object's parent's
- * coordinates. The pre-layout and post-layout result will be set on
- * the <code>position</code> and <code>postLayoutPosition</code>
- * parameters, if they are non-null.
- *
- * @param propertyIs3D A boolean reflecting whether the calculation needs
- * to take into account the 3D matrix of the object.
- * @param localPoint The point to be transformed, specified in the
- * local coordinates of the object.
- * @position A Vector3D point that will hold the pre-layout
- * result. If null, the parameter is ignored.
- * @postLayoutPosition A Vector3D point that will hold the post-layout
- * result. If null, the parameter is ignored.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4
- */
- public function transformPointToParent(propertyIs3D:Boolean,
- localPosition:Vector3D, position:Vector3D,
- postLayoutPosition:Vector3D):void
- {
- var transformedV:Vector3D;
- var transformedP:Point;
- tempLocalPosition =
- localPosition ?
- localPosition.clone() :
- new Vector3D();
-
- if (is3D || propertyIs3D)
- {
- if (position != null)
- {
- transformedV = transformVector(layoutMatrix3D, tempLocalPosition);
- position.x = transformedV.x;
- position.y = transformedV.y;
- position.z = transformedV.z;
- }
-
- if (postLayoutPosition != null)
- {
- // computedMatrix factor in stretchXY, so divide it out of position first
- tempLocalPosition.x /= stretchX;
- tempLocalPosition.y /= stretchY;
- transformedV = transformVector(computedMatrix3D, tempLocalPosition);
- postLayoutPosition.x = transformedV.x;
- postLayoutPosition.y = transformedV.y;
- postLayoutPosition.z = transformedV.z;
- }
- }
- else
- {
- var localP:Point = new Point(tempLocalPosition.x,
- tempLocalPosition.y);
- if (position != null)
- {
- transformedP = layoutMatrix.transformPoint(localP);
- position.x = transformedP.x;
- position.y = transformedP.y;
- position.z = 0;
- }
-
- if (postLayoutPosition != null)
- {
- // computedMatrix factor in stretchXY, so divide it out of position first
- localP.x /= stretchX;
- localP.y /= stretchY;
- transformedP = computedMatrix.transformPoint(localP);
- postLayoutPosition.x = transformedP.x;
- postLayoutPosition.y = transformedP.y;
- postLayoutPosition.z = 0;
- }
- }
- }
-
- /**
- * @private
- * call when you've changed the inputs to the computed transform to make
- * any adjustments to keep a particular point fixed in parent coordinates.
- */
- private function completeTransformCenterAdjustment(changeIs3D:Boolean,
- transformCenter:Vector3D, targetPosition:Vector3D,
- targetPostLayoutPosition:Vector3D):void
- {
- // TODO (chaase): optimize for transformCenter == (0,0,0)
- if (is3D || changeIs3D)
- {
- if (targetPosition != null)
- {
- var adjustedLayoutCenterV:Vector3D = transformVector(layoutMatrix3D, transformCenter);
- if (adjustedLayoutCenterV.equals(targetPosition) == false)
- {
- layout.translateBy(targetPosition.x - adjustedLayoutCenterV.x,
- targetPosition.y - adjustedLayoutCenterV.y,
- targetPosition.z - adjustedLayoutCenterV.z);
- invalidate();
- }
- }
- if (targetPostLayoutPosition != null && _postLayoutTransformOffsets != null)
- {
- // computedMatrix factor in stretchXY, so divide it out of transform center first
- var tmpPos:Vector3D = new Vector3D(transformCenter.x, transformCenter.y, transformCenter.z);
- tmpPos.x /= stretchX;
- tmpPos.y /= stretchY;
- var adjustedComputedCenterV:Vector3D = transformVector(computedMatrix3D, tmpPos);
- if (adjustedComputedCenterV.equals(targetPostLayoutPosition) == false)
- {
- postLayoutTransformOffsets.x +=targetPostLayoutPosition.x - adjustedComputedCenterV.x;
- postLayoutTransformOffsets.y += targetPostLayoutPosition.y - adjustedComputedCenterV.y;
- postLayoutTransformOffsets.z += targetPostLayoutPosition.z - adjustedComputedCenterV.z;
- invalidate();
- }
- }
- }
- else
- {
- var transformCenterP:Point = new Point(transformCenter.x,transformCenter.y);
- if (targetPosition != null)
- {
- var currentPositionP:Point = layoutMatrix.transformPoint(transformCenterP);
- if (currentPositionP.x != targetPosition.x ||
- currentPositionP.y != targetPosition.y)
- {
- layout.translateBy(targetPosition.x - currentPositionP.x,
- targetPosition.y - currentPositionP.y, 0);
- invalidate();
- }
- }
-
- if (targetPostLayoutPosition != null && _postLayoutTransformOffsets != null)
- {
- // computedMatrix factor in stretchXY, so divide it out of transform center first
- transformCenterP.x /= stretchX;
- transformCenterP.y /= stretchY;
- var currentPostLayoutPosition:Point =
- computedMatrix.transformPoint(transformCenterP);
- if (currentPostLayoutPosition.x != targetPostLayoutPosition.x ||
- currentPostLayoutPosition.y != targetPostLayoutPosition.y)
- {
- _postLayoutTransformOffsets.x += targetPostLayoutPosition.x - currentPostLayoutPosition.x;
- _postLayoutTransformOffsets.y += targetPostLayoutPosition.y - currentPostLayoutPosition.y;
- invalidate();
- }
- }
- }
- }
-
- private static var staticTranslation:Vector3D = new Vector3D();
- private static var staticOffsetTranslation:Vector3D = new Vector3D();
-
- /**
- * A utility method to update the rotation and scale of the transform
- * while keeping a particular point, specified in the component's own
- * coordinate space, fixed in the parent's coordinate space. This
- * function will assign the rotation and scale values provided, then
- * update the x/y/z properties as necessary to keep tx/ty/tz fixed.
- * @param transformCenter the point, in the component's own coordinates,
- * to keep fixed relative to its parent.
- * @param rotation the new values for the rotation of the transform
- * @param scale the new values for the scale of the transform
- * @param translation the new values for the translation of the transform
- */
- public function transformAround(transformCenter:Vector3D,
- scale:Vector3D,
- rotation:Vector3D,
- transformCenterPosition:Vector3D,
- postLayoutScale:Vector3D = null,
- postLayoutRotation:Vector3D = null,
- postLayoutTransformCenterPosition:Vector3D = null):void
- {
- var is3D:Boolean = (scale != null && scale.z != 1) ||
- (rotation != null && ((rotation.x != 0 ) || (rotation.y != 0))) ||
- (transformCenterPosition != null && transformCenterPosition.z != 0) ||
- (postLayoutScale != null && postLayoutScale.z != 1) ||
- (postLayoutRotation != null &&
- (postLayoutRotation.x != 0 || postLayoutRotation.y != 0)) ||
- (postLayoutTransformCenterPosition != null && postLayoutTransformCenterPosition.z != 0);
-
- var needOffsets:Boolean = _postLayoutTransformOffsets == null &&
- (postLayoutScale != null || postLayoutRotation != null ||
- postLayoutTransformCenterPosition != null);
- if (needOffsets)
- _postLayoutTransformOffsets = new TransformOffsets();
-
- // now if they gave us a non-trivial transform center, and didn't tell us where they want it,
- // we need to calculate where it is so that we can make sure we keep it there.
- if (transformCenter != null &&
- (transformCenterPosition == null || postLayoutTransformCenterPosition == null))
- {
- transformPointToParent(is3D, transformCenter, staticTranslation,
- staticOffsetTranslation);
- if (postLayoutTransformCenterPosition == null && transformCenterPosition != null)
- {
- staticOffsetTranslation.x = transformCenterPosition.x + staticOffsetTranslation.x - staticTranslation.x;
- staticOffsetTranslation.y = transformCenterPosition.y + staticOffsetTranslation.y - staticTranslation.y;
- staticOffsetTranslation.z = transformCenterPosition.z + staticOffsetTranslation.z - staticTranslation.z;
- }
-
- }
- // if targetPosition/postLayoutTargetPosition is null here, it might be because the caller passed in
- // requested values, so we haven't calculated it yet. So that means our target position is the values
- // they passed in.
- var targetPosition:Vector3D = (transformCenterPosition == null)? staticTranslation:transformCenterPosition;
- var postLayoutTargetPosition:Vector3D = (postLayoutTransformCenterPosition == null)? staticOffsetTranslation:postLayoutTransformCenterPosition;
-
- // now update our transform values.
- if (rotation != null)
- {
- if (!isNaN(rotation.x))
- layout.rotationX = rotation.x;
- if (!isNaN(rotation.y))
- layout.rotationY = rotation.y;
- if (!isNaN(rotation.z))
- layout.rotationZ = rotation.z;
- }
- if (scale != null)
- {
- if (!isNaN(scale.x))
- layout.scaleX = scale.x;
- if (!isNaN(scale.y))
- layout.scaleY = scale.y;
- if (!isNaN(scale.z))
- layout.scaleZ = scale.z;
- }
-
- if (postLayoutRotation != null)
- {
- _postLayoutTransformOffsets.rotationX = postLayoutRotation.x;
- _postLayoutTransformOffsets.rotationY = postLayoutRotation.y;
- _postLayoutTransformOffsets.rotationZ = postLayoutRotation.z;
- }
- if (postLayoutScale != null)
- {
- _postLayoutTransformOffsets.scaleX = postLayoutScale.x;
- _postLayoutTransformOffsets.scaleY = postLayoutScale.y;
- _postLayoutTransformOffsets.scaleZ = postLayoutScale.z;
- }
-
- // if they didn't pass us a transform center,
- // then we assume it's the origin. In that case, it's trivially easy
- // to make sure the origin is at a particular point...we simply set
- // the transformCenterPosition portion of our transforms to that point.
- if (transformCenter == null)
- {
- if (transformCenterPosition != null)
- {
- layout.x = transformCenterPosition.x;
- layout.y = transformCenterPosition.y;
- layout.z = transformCenterPosition.z;
- }
- if (postLayoutTransformCenterPosition != null)
- {
- _postLayoutTransformOffsets.x = postLayoutTransformCenterPosition.x - layout.x;
- _postLayoutTransformOffsets.y = postLayoutTransformCenterPosition.y - layout.y;
- _postLayoutTransformOffsets.z = postLayoutTransformCenterPosition.z - layout.z;
- }
- }
- invalidate();
-
- // if they did pass in a transform center, go do the adjustments necessary to keep it fixed in place.
- if (transformCenter != null)
- completeTransformCenterAdjustment(is3D, transformCenter,
- targetPosition, postLayoutTargetPosition);
-
-
- }
-
- }
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/CompoundTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/CompoundTransform.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/CompoundTransform.as
deleted file mode 100644
index 7b1916b..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/CompoundTransform.as
+++ /dev/null
@@ -1,777 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics.utils
-{
- import flash.geom.Matrix;
- import flash.geom.Matrix3D;
- import flash.geom.Vector3D;
-
- import __AS3__.vec.Vector;
-
- /**
- * A CompoundTransform represents a 2D or 3D matrix transform. A compound transform represents a matrix that can be queried or set either as a 2D matrix,
- * a 3D matrix, or as individual convenience transform properties such as x, y, scaleX, rotationZ, etc.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public class CompoundTransform
- {
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function CompoundTransform()
- {
- }
-
-
-
- /**
- * @private
- * storage for transform properties. These values are concatenated together with the layout properties to
- * form the actual computed matrix used to render the object.
- */
- private var _rotationX:Number = 0;
- private var _rotationY:Number = 0;
- private var _rotationZ:Number = 0;
- private var _scaleX:Number = 1;
- private var _scaleY:Number = 1;
- private var _scaleZ:Number = 1;
- private var _x:Number = 0;
- private var _y:Number = 0;
- private var _z:Number = 0;
-
- private var _transformX:Number = 0;
- private var _transformY:Number = 0;
- private var _transformZ:Number = 0;
-
-
- /**
- * @private
- * slots for the 2D and 3D matrix transforms. Note that
- * these are only allocated and computed on demand -- many component instances will never use a 3D
- * matrix, for example.
- */
- private var _matrix:Matrix;
- private var _matrix3D:Matrix3D;
-
-
- /**
- * @private
- * bit field flags for indicating which transforms are valid -- the layout properties, the matrices,
- * and the 3D matrices. Since developers can set any of the three programmatically, the last one set
- * will always be valid, and the others will be invalid until validated on demand.
- */
- private static const MATRIX_VALID:uint = 0x20;
- private static const MATRIX3D_VALID:uint = 0x40;
- private static const PROPERTIES_VALID:uint = 0x80;
-
-
- /**
- * @private
- * flags for tracking whether the transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
- */
- private static const IS_3D:uint = 0x200;
- private static const M3D_FLAGS_VALID:uint = 0x400;
-
- /**
- * @private
- * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
- * 'the source of truth.'
- */
- public static const SOURCE_PROPERTIES:uint = 1;
- /**
- * @private
- * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
- * 'the source of truth.'
- */
- public static const SOURCE_MATRIX:uint = 2;
- /**
- * @private
- * constants to indicate which form of a transform -- the properties, matrix, or matrix3D -- is
- * 'the source of truth.'
- */
- public static const SOURCE_MATRIX3D:uint = 3;
-
- /**
- * @private
- * indicates the 'source of truth' for the transform.
- */
- public var sourceOfTruth:uint = SOURCE_PROPERTIES;
-
- /**
- * @private
- * general storage for all of ur flags.
- */
- private var _flags:uint = PROPERTIES_VALID;
-
- /**
- * @private
- * flags that get passed to the invalidate method indicating why the invalidation is happening.
- */
- private static const INVALIDATE_FROM_NONE:uint = 0;
- private static const INVALIDATE_FROM_PROPERTY:uint = 4;
- private static const INVALIDATE_FROM_MATRIX:uint = 5;
- private static const INVALIDATE_FROM_MATRIX3D:uint = 6;
-
- /**
- * @private
- * static data used by utility methods below
- */
- private static var decomposition:Vector.<Number> = new Vector.<Number>();
- decomposition.push(0);
- decomposition.push(0);
- decomposition.push(0);
- decomposition.push(0);
- decomposition.push(0);
-
- private static const RADIANS_PER_DEGREES:Number = Math.PI / 180;
-
- //----------------------------------------------------------------------------
-
- /**
- * The x value of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set x(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _x)
- return;
- translateBy(value-_x,0,0);
- invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
- }
- /**
- * @private
- */
- public function get x():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _x;
- }
-
- /**
- * The y value of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set y(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _y)
- return;
- translateBy(0,value-_y,0);
- invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get y():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _y;
- }
-
- /**
- * The z value of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set z(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _z)
- return;
- translateBy(0,0,value-_z);
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get z():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _z;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * The rotationX, in degrees, of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationX(value:Number):void
- {
- // clamp the rotation value between -180 and 180. This is what
- // the Flash player does, so let's mimic it here too.
- value = MatrixUtil.clampRotation(value);
-
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _rotationX)
- return;
- _rotationX = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get rotationX():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _rotationX;
- }
-
- /**
- * The rotationY, in degrees, of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationY(value:Number):void
- {
- // clamp the rotation value between -180 and 180. This is what
- // the Flash player does, so let's mimic it here too.
- value = MatrixUtil.clampRotation(value);
-
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _rotationY)
- return;
- _rotationY = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get rotationY():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _rotationY;
- }
-
- /**
- * The rotationZ, in degrees, of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set rotationZ(value:Number):void
- {
- // clamp the rotation value between -180 and 180. This is what
- // the Flash player does, so let's mimic it here too.
- value = MatrixUtil.clampRotation(value);
-
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _rotationZ)
- return;
- _rotationZ = value;
- invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get rotationZ():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _rotationZ;
- }
-
- //------------------------------------------------------------------------------
-
-
- /**
- * The scaleX of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleX(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _scaleX)
- return;
- _scaleX = value;
- invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get scaleX():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _scaleX;
- }
-
- /**
- * The scaleY of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleY(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _scaleY)
- return;
- _scaleY = value;
- invalidate(INVALIDATE_FROM_PROPERTY, false /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get scaleY():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _scaleY;
- }
-
-
- /**
- * The scaleZ of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set scaleZ(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _scaleZ)
- return;
- _scaleZ = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get scaleZ():Number
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- return _scaleZ;
- }
-
-
- /**
- * @private
- * returns true if the transform has 3D values.
- */
- public function get is3D():Boolean
- {
- if ((_flags & M3D_FLAGS_VALID) == 0)
- update3DFlags();
- return ((_flags & IS_3D) != 0);
- }
-
- //------------------------------------------------------------------------------
- /**
- * The x value of the transform center. The transform center is kept fixed as rotation and scale are applied.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set transformX(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _transformX)
- return;
- _transformX = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get transformX():Number
- {
- return _transformX;
- }
-
- //------------------------------------------------------------------------------
- /**
- * The y value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set transformY(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _transformY)
- return;
- _transformY = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get transformY():Number
- {
- return _transformY;
- }
- //------------------------------------------------------------------------------
- /**
- * The z value of the tansform center. The transform center is kept fixed as rotation and scale are applied.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set transformZ(value:Number):void
- {
- if ((_flags & PROPERTIES_VALID) == false) validatePropertiesFromMatrix();
- if (value == _transformZ)
- return;
- _transformZ = value;
- invalidate(INVALIDATE_FROM_PROPERTY, true /*affects3D*/);
- }
-
- /**
- * @private
- */
- public function get transformZ():Number
- {
- return _transformZ;
- }
-
- //------------------------------------------------------------------------------
-
- /**
- * @private
- * invalidates our various cached values. Any change to the CompoundTransform object that affects
- * the various transforms should call this function.
- * @param reason - the code indicating what changes to cause the invalidation.
- * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
- * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
- * have been modified.
- */
- private function invalidate(reason:uint, affects3D:Boolean):void
- {
- //race("invalidating: " + reason);
- switch(reason)
- {
- case INVALIDATE_FROM_PROPERTY:
- sourceOfTruth = SOURCE_PROPERTIES;
- _flags |= PROPERTIES_VALID;
- _flags &= ~MATRIX_VALID;
- _flags &= ~MATRIX3D_VALID;
- break;
- case INVALIDATE_FROM_MATRIX:
- sourceOfTruth = SOURCE_MATRIX;
- _flags |= MATRIX_VALID;
- _flags &= ~PROPERTIES_VALID;
- _flags &= ~MATRIX3D_VALID;
- break;
- case INVALIDATE_FROM_MATRIX3D:
- sourceOfTruth = SOURCE_MATRIX3D;
- _flags |= MATRIX3D_VALID;
- _flags &= ~PROPERTIES_VALID;
- _flags &= ~MATRIX_VALID;
- break;
- }
- if (affects3D)
- _flags &= ~M3D_FLAGS_VALID;
-
- }
-
- private static const EPSILON:Number = .001;
- /**
- * @private
- * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
- * Since the user can set either the individual transform properties or the matrices directly, we compute these
- * flags based on what the current 'source of truth' is for each of these values.
- */
- private function update3DFlags():void
- {
- if ((_flags & M3D_FLAGS_VALID) == 0)
- {
- var matrixIs3D:Boolean = false;
-
- switch(sourceOfTruth)
- {
- case SOURCE_PROPERTIES:
- matrixIs3D = ( // note that rotationZ is the same as rotation, and not a 3D affecting
- (Math.abs(_scaleZ-1) > EPSILON) || // property.
- ((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
- ((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
- Math.abs(_z) > EPSILON
- );
- break;
- case SOURCE_MATRIX:
- matrixIs3D = false;
- break;
- case SOURCE_MATRIX3D:
- var rawData:Vector.<Number> = _matrix3D.rawData;
- matrixIs3D = (rawData[2] != 0 || // rotation y
- rawData[6] != 0 || // rotation x
- rawData[8] !=0 || // rotation y
- rawData[10] != 1 || // scalez / rotation x / rotation y
- rawData[14] != 0); // translation z
- break;
- }
-
- if (matrixIs3D)
- _flags |= IS_3D;
- else
- _flags &= ~IS_3D;
-
- _flags |= M3D_FLAGS_VALID;
- }
- }
-
-
- /**
- * Applies the delta to the transform's translation component. Unlike setting the x, y, or z properties directly,
- * this method can be safely called without changing the transform's concept of 'the source of truth'.
- *
- * @param x The x value of the transform.
- *
- * @param y The y value of the transform.
- *
- * @param z The z value of the transform.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function translateBy(x:Number,y:Number,z:Number = 0):void
- {
- if (_flags & MATRIX_VALID)
- {
- _matrix.tx += x;
- _matrix.ty += y;
- }
- if (_flags & PROPERTIES_VALID)
- {
- _x += x;
- _y += y;
- _z += z;
- }
- if (_flags & MATRIX3D_VALID)
- {
- var data:Vector.<Number> = _matrix3D.rawData;
- data[12] += x;
- data[13] += y;
- data[14] += z;
- _matrix3D.rawData = data;
- }
- invalidate(INVALIDATE_FROM_NONE, z != 0 /*affects3D*/);
- }
-
-
- /**
- * The 2D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
- * and translation, in that order.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get matrix():Matrix
- {
-
- if (_flags & MATRIX_VALID)
- return _matrix;
-
- if ((_flags & PROPERTIES_VALID) == false)
- validatePropertiesFromMatrix();
-
- var m:Matrix = _matrix;
- if (m == null)
- m = _matrix = new Matrix();
- else
- m.identity();
-
- AdvancedLayoutFeatures.build2DMatrix(m,_transformX,_transformY,
- _scaleX,_scaleY,
- _rotationZ,
- _x,_y);
- _flags |= MATRIX_VALID;
- return m;
- }
-
- /**
- * @private
- */
- public function set matrix(v:Matrix):void
- {
- if (_matrix== null)
- {
- _matrix = v.clone();
- }
- else
- {
- _matrix.identity();
- _matrix.concat(v);
- }
-
- // affects3D is true since setting matrix changes the transform to 2D
- invalidate(INVALIDATE_FROM_MATRIX, true /*affects3D*/);
- }
-
- /**
- * @private
- * decomposes the offset transform matrices down into the convenience offset properties. Note that this is not
- * a bi-directional transformation -- it is possible to create a matrix that can't be fully represented in the
- * convenience properties. This function will pull from the matrix or matrix3D values, depending on which was most
- * recently set
- */
- private function validatePropertiesFromMatrix():void
- {
- if (sourceOfTruth == SOURCE_MATRIX3D)
- {
- var result:Vector.<Vector3D> = _matrix3D.decompose();
- _rotationX = result[1].x / RADIANS_PER_DEGREES;
- _rotationY = result[1].y / RADIANS_PER_DEGREES;
- _rotationZ = result[1].z / RADIANS_PER_DEGREES;
- _scaleX = result[2].x;
- _scaleY = result[2].y;
- _scaleZ = result[2].z;
-
- if (_transformX != 0 || _transformY != 0 || _transformZ != 0)
- {
- var postTransformTCenter:Vector3D = _matrix3D.transformVector(new Vector3D(_transformX,_transformY,_transformZ));
- _x = postTransformTCenter.x - _transformX;
- _y = postTransformTCenter.y - _transformY;
- _z = postTransformTCenter.z - _transformZ;
- }
- else
- {
- _x = result[0].x;
- _y = result[0].y;
- _z = result[0].z;
- }
- }
- else if (sourceOfTruth == SOURCE_MATRIX)
- {
- MatrixUtil.decomposeMatrix(decomposition,_matrix,_transformX,_transformY);
- _x = decomposition[0];
- _y = decomposition[1];
- _z = 0;
- _rotationX = 0;
- _rotationY = 0;
- _rotationZ = decomposition[2];
- _scaleX = decomposition[3];
- _scaleY = decomposition[4];
- _scaleZ = 1;
- }
- _flags |= PROPERTIES_VALID;
-
- }
-
-
-
- /**
- * The 3D matrix either set directly by the user, or composed by combining the transform center, scale, rotation
- * and translation, in that order.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get matrix3D():Matrix3D
- {
- if (_flags & MATRIX3D_VALID)
- return _matrix3D;
-
- if ((_flags & PROPERTIES_VALID) == false)
- validatePropertiesFromMatrix();
-
- var m:Matrix3D = _matrix3D;
- if (m == null)
- m = _matrix3D = new Matrix3D();
- else
- m.identity();
-
- AdvancedLayoutFeatures.build3DMatrix(m,transformX,transformY,transformZ,
- _scaleX,_scaleY,_scaleZ,
- _rotationX,_rotationY,_rotationZ,
- _x,_y,_z);
- _flags |= MATRIX3D_VALID;
- return m;
-
- }
-
- /**
- * @private
- */
- public function set matrix3D(v:Matrix3D):void
- {
- if (_matrix3D == null)
- {
- _matrix3D = v.clone();
- }
- else
- {
- _matrix3D.identity();
- if (v)
- _matrix3D.append(v);
- }
- invalidate(INVALIDATE_FROM_MATRIX3D, true /*affects3D*/);
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a95bd7a0/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as b/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
deleted file mode 100644
index 1e36b60..0000000
--- a/frameworks/projects/Graphics/as/src/org/apache/flex/core/graphics/utils/IAssetLayoutFeatures.as
+++ /dev/null
@@ -1,371 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.flex.core.graphics.utils
-{
- import flash.geom.Matrix;
- import flash.geom.Matrix3D;
-
-
- /**
- * The IAssetLayoutFeatures interface defines the minimum properties and methods
- * required for an Object to support advanced transforms in embedded assets.
- *
- * @see mx.core.AdvancedLayoutFeatures
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- public interface IAssetLayoutFeatures
- {
-
- /**
- * Layout transform convenience property. Represents the x value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutX(value:Number):void;
-
- /**
- * @private
- */
- function get layoutX():Number;
-
- /**
- * Layout transform convenience property. Represents the y value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutY(value:Number):void;
-
- /**
- * @private
- */
- function get layoutY():Number;
-
- /**
- * Layout transform convenience property. Represents the z value of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutZ(value:Number):void;
-
- /**
- * @private
- */
- function get layoutZ():Number;
-
- /**
- * Used by the mirroring transform. See the mirror property.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get layoutWidth():Number;
-
- /**
- * @private
- */
- function set layoutWidth(value:Number):void;
-
- //------------------------------------------------------------------------------
-
- /**
- * The x value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set transformX(value:Number):void;
- /**
- * @private
- */
- function get transformX():Number;
-
- /**
- * The y value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set transformY(value:Number):void;
-
- /**
- * @private
- */
- function get transformY():Number;
-
- /**
- * The z value of the point around which any rotation and scale is performed in both the layout and computed matrix.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set transformZ(value:Number):void;
-
- /**
- * @private
- */
- function get transformZ():Number;
-
- //------------------------------------------------------------------------------
-
- /**
- * Layout transform convenience property. Represents the rotation around the X axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutRotationX(value:Number):void;
-
- /**
- * @private
- */
- function get layoutRotationX():Number;
-
- /**
- * Layout transform convenience property. Represents the rotation around the Y axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutRotationY(value:Number):void;
-
- /**
- * @private
- */
- function get layoutRotationY():Number;
-
- /**
- * Layout transform convenience property. Represents the rotation around the Z axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutRotationZ(value:Number):void;
-
- /**
- * @private
- */
- function get layoutRotationZ():Number;
-
- //------------------------------------------------------------------------------
-
- /**
- * Layout transform convenience property. Represents the scale along the X axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutScaleX(value:Number):void;
-
- /**
- * @private
- */
- function get layoutScaleX():Number;
-
- /**
- * Layout transform convenience property. Represents the scale along the Y axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutScaleY(value:Number):void;
-
- /**
- * @private
- */
- function get layoutScaleY():Number;
-
- /**
- * Layout transform convenience property. Represents the scale along the Z axis of the layout matrix used in layout and in
- * the computed transform.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutScaleZ(value:Number):void;
-
- /**
- * @private
- */
- function get layoutScaleZ():Number;
-
- /**
- * The 2D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutMatrix(value:Matrix):void;
-
- /**
- * @private
- */
- function get layoutMatrix():Matrix;
-
- /**
- * The 3D matrix used during layout calculations to determine the layout and size of the component and its parent and siblings.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function set layoutMatrix3D(value:Matrix3D):void;
-
- /**
- * @private
- */
- function get layoutMatrix3D():Matrix3D;
-
- /**
- * True if the computed transform has 3D values.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get is3D():Boolean;
-
- /**
- * True if the layout transform has 3D values.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get layoutIs3D():Boolean;
-
- /**
- * If true the X axis is scaled by -1 and the x coordinate of the origin
- * is translated by the component's width.
- *
- * The net effect of this "mirror" transform is to flip the direction
- * that the X axis increases in without changing the layout element's
- * location relative to the parent's origin.
- *
- * @default false
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get mirror():Boolean;
-
- /**
- * @private
- */
- function set mirror(value:Boolean):void;
-
-
- /**
- * The stretchY is the horizontal component of the stretch scale factor which
- * is applied before any other transformation property.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get stretchX():Number;
-
- /**
- * @private
- */
- function set stretchX(value:Number):void;
-
- /**
- * The stretchY is the vertical component of the stretch scale factor which
- * is applied before any other transformation property.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get stretchY():Number;
-
- /**
- * @private
- */
- function set stretchY(value:Number):void;
-
- //------------------------------------------------------------------------------
-
- /**
- * The computed matrix, calculated by combining the layout matrix and any offsets provided.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get computedMatrix():Matrix;
-
- /**
- * The computed 3D matrix, calculated by combining the 3D layout matrix and any offsets provided.
- *
- * @langversion 3.0
- * @playerversion Flash 10
- * @playerversion AIR 1.5
- * @productversion Flex 4.1
- */
- function get computedMatrix3D():Matrix3D;
- }
-}
[19/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
new file mode 100644
index 0000000..d21314e
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/MapView_original.as
@@ -0,0 +1,515 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * NOTE
+ *
+ * THIS IS THE OLD MapView. The new one is GoogleMapView. This code exists to preserve
+ * the AS/HTMLLoader version for use with AIR. Someday we will come back to this and make
+ * it work again.
+ */
+package org.apache.flex.maps.google.beads
+{
+ COMPILE::AS3 {
+ import flash.events.Event;
+ import flash.html.HTMLLoader;
+ import flash.net.URLRequest;
+ }
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.maps.google.GoogleMap;
+ import org.apache.flex.maps.google.models.MapModel;
+
+ /**
+ * The MapView bead class displays a Google Map using HTMLLoader.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ public class MapView_original extends BeadViewBase implements IBeadView
+ {
+ public function MapView_original()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ override public function set strand(value:IStrand):void
+ {
+ super.strand = value;
+ _strand = value;
+
+ var token:String = (_strand as GoogleMap).token;
+ var src:String = 'https://maps.googleapis.com/maps/api/js?v=3.exp';
+ if (token)
+ src += '&key=' + token;
+ src += '&libraries=places&sensor=false&callback=mapInit';
+
+ var script:HTMLScriptElement = document.createElement('script') as HTMLScriptElement;
+ script.type = 'text/javascript';
+ script.src = src;
+
+/** window.mapView = this;
+ window['mapInit'] = function() {
+ (this.mapView._strand as GoogleMap).finishInitialization();
+ }
+**/
+ document.head.appendChild(script);
+ }
+ }
+
+ COMPILE::AS3
+ public class MapView_original extends BeadViewBase implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MapView_original()
+ {
+ }
+
+ private var _loader:HTMLLoader;
+
+ /**
+ * @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;
+
+ _loader = new HTMLLoader();
+ _loader.x = 0;
+ _loader.y = 0;
+ _loader.width = UIBase(value).width;
+ _loader.height = UIBase(value).height;
+
+ IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
+ IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);
+
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ model.addEventListener("zoomChanged", handleZoomChange);
+ model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
+
+ (_strand as UIBase).addChild(_loader);
+
+ var token:String = Map(_strand).token;
+ if (token)
+ page = pageTemplateStart + "&key=" + token + pageTemplateEnd;
+ else
+ page = pageTemplateStart + pageTemplateEnd;
+
+ if (page) {
+ _loader.loadString(page);
+ _loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
+ }
+ }
+
+ private function completeHandler(event:flash.events.Event):void
+ {
+ trace("htmlLoader complete");
+
+ if (_loader && page) {
+ _loader.window.map.center_changed = onMapCentered;
+ _loader.window.map.bounds_changed = onMapBoundsChanged;
+ _loader.window.map.zoom_changed = onMapZoomChanged;
+ _loader.window.map.dragend = onMapDragEnd;
+
+ // custom event handlers
+ _loader.window.addEventListener("searchResults",onSearchResults);
+ _loader.window.addEventListener("markerClicked",onMarkerClicked);
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
+ }
+
+ private function handleZoomChange(event:org.apache.flex.events.Event):void
+ {
+ if (_loader && page) {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ setZoom(model.zoom);
+ }
+ }
+
+ private function handleCurrentLocationChange(event:org.apache.flex.events.Event):void
+ {
+ if (_loader && page) {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ setCenter(model.currentLocation.location);
+ }
+ }
+
+ private var page:String;
+
+ /**
+ * Adjusts the map to the given coordinate and zoom level.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function mapit(lat:Number, lng:Number, zoomLevel:Number):void
+ {
+ if (_loader && page) {
+ _loader.window.mapit(lat,lng,zoomLevel);
+ }
+ }
+
+ /**
+ * Finds the given address and places a marker on it. This function may be dropped
+ * since centerOnAddress + markCurrentLocation does the same thing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function geoCodeAndMarkAddress(address:String):void
+ {
+ if (_loader && page) {
+ _loader.window.codeaddress(address);
+ }
+ }
+
+ /**
+ * Centers the map on the address given.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function centerOnAddress(address:String):void
+ {
+ if (_loader && page) {
+ _loader.window.centeronaddress(address);
+ }
+ }
+
+ /**
+ * Marks the current center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function markCurrentLocation():void
+ {
+ if (_loader && page) {
+ _loader.window.markcurrentlocation();
+ }
+ }
+
+ /**
+ * Performs a search near the center of map. The result is a set of
+ * markers displayed on the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function nearbySearch(placeName:String):void
+ {
+ if (_loader && page) {
+ _loader.window.nearbysearch(placeName);
+ }
+ }
+
+ /**
+ * Removes all of the markers from the map
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeAllMarkers():void
+ {
+ if (_loader && page) {
+ _loader.window.clearmarkers();
+ }
+ }
+
+ /**
+ * Sets the zoom factor of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setZoom(zoom:Number):void
+ {
+ if (_loader && page) {
+ _loader.window.map.setZoom(zoom);
+ }
+ }
+
+ /**
+ * Sets the center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setCenter( location:LatLng ):void
+ {
+ if (_loader && page) {
+ _loader.window.setCenter(location.lat, location.lng);
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function handleSizeChange(event:org.apache.flex.events.Event):void
+ {
+ _loader.width = UIBase(_strand).width;
+ _loader.height = UIBase(_strand).height;
+ }
+
+ /**
+ * @private
+ */
+ private function onMapCentered():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapBoundsChanged():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapZoomChanged():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("zoomChanged") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapDragEnd():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
+ }
+
+ /**
+ * @private
+ */
+ private function onSearchResults(event:*):void
+ {
+ var results:Array = [];
+ for(var i:int=0; i < event.results.length; i++) {
+ var result:Place = new Place();
+ result.geometry.location.lat = event.results[i].geometry.location.lat();
+ result.geometry.location.lng = event.results[i].geometry.location.lng();
+ result.icon = event.results[i].icon;
+ result.id = event.results[i].id;
+ result.name = event.results[i].name;
+ result.reference = event.results[i].reference;
+ result.vicinity = event.results[i].vicinity;
+ results.push(result);
+ }
+
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.searchResults = results;
+ }
+
+ /**
+ * @private
+ */
+ private function onMarkerClicked(event:*):void
+ {
+ var marker:Marker = new Marker();
+ marker.position.lat = event.marker.position.lat();
+ marker.position.lng = event.marker.position.lng();
+ marker.title = event.marker.title;
+ marker.map = Map(_strand);
+
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.selectedMarker = marker;
+
+ IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("markerClicked"));
+ }
+
+ /**
+ * @private
+ * This page definition is used with HTMLLoader to bring in the Google Maps
+ * API (a Google APP token is required).
+ */
+ private static var pageTemplateStart:String = '<!DOCTYPE html>'+
+ '<html>'+
+ ' <head>'+
+ ' <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />'+
+ ' <style type="text/css">'+
+ ' html { height: 100% }'+
+ ' body { height: 100%; margin: 0; padding: 0 }'+
+ ' #map-canvas { height: 100% }'+
+ ' </style>'+
+ ' <script type="text/javascript"'+
+ ' src="https://maps.googleapis.com/maps/api/js?v=3.exp';
+
+ private static var pageTemplateEnd:String = '&libraries=places&sensor=false">'+
+ ' </script>'+
+ ' <script type="text/javascript">'+
+ ' var map;'+
+ ' var geocoder;'+
+ ' var currentCenter;' +
+ ' var service;' +
+ ' var places;' +
+ ' var markers;'+
+ ' function mapit(lat, lng, zoomLevel) {' +
+ ' currentCenter = new google.maps.LatLng(lat, lng);'+
+ ' if (map == null) {' +
+ ' var mapOptions = {'+
+ ' center: currentCenter,'+
+ ' zoom: zoomLevel'+
+ ' };'+
+ ' map = new google.maps.Map(document.getElementById("map-canvas"),'+
+ ' mapOptions);' +
+ ' }' +
+ ' google.maps.event.addListener(map, "center_changed", function() {' +
+ ' currentCenter = map.getCenter();' +
+ ' });' +
+ ' google.maps.event.addListener(map, "bounds_changed", function() {' +
+ ' currentCenter = map.getCenter();' +
+ ' });' +
+ ' map.setCenter(currentCenter);'+
+ ' };' +
+ ' function setCenter(lat, lng) {' +
+ ' currentCenter = new google.maps.LatLng(lat,lng);' +
+ ' map.setCenter(currentCenter);' +
+ ' };'+
+ ' function codeaddress(address) {'+
+ ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
+ ' geocoder.geocode( { "address": address}, function(results, status) {'+
+ ' if (status == google.maps.GeocoderStatus.OK) {'+
+ ' currentCenter = results[0].geometry.location;'+
+ ' map.setCenter(currentCenter);'+
+ ' var marker = new google.maps.Marker({'+
+ ' map: map,'+
+ ' position: currentCenter,'+
+ ' });'+
+ ' } else {'+
+ ' alert("Geocode was not successful for the following reason: " + status);'+
+ ' }'+
+ ' });'+
+ ' };'+
+ ' function centeronaddress(address) {'+
+ ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
+ ' geocoder.geocode( { "address": address}, function(results, status) {'+
+ ' if (status == google.maps.GeocoderStatus.OK) {'+
+ ' currentCenter = results[0].geometry.location;'+
+ ' map.setCenter(currentCenter);' +
+ ' } else {'+
+ ' alert("Geocode was not successful for the following reason: " + status);'+
+ ' }'+
+ ' });'+
+ ' };'+
+ ' function markcurrentlocation() {'+
+ ' createMarker(currentCenter);'+
+ ' };' +
+ ' function createMarker(location) {' +
+ ' var marker = new google.maps.Marker({'+
+ ' map: map,'+
+ ' position: location,'+
+ ' });' +
+ ' google.maps.event.addListener(marker, "click", function() {' +
+ ' markerClicked(marker);' +
+ ' });'+
+ ' return marker;'+
+ ' };' +
+ ' function clearmarkers() {' +
+ ' if (markers) {' +
+ ' for(var i=0; i < markers.length; i++) {' +
+ ' markers[i].setMap(null);' +
+ ' }' +
+ ' markers = null;' +
+ ' }' +
+ ' };'+
+ ' function nearbysearch(placename) {' +
+ ' if (markers == null) markers = [];' +
+ ' service = new google.maps.places.PlacesService(map);'+
+ ' service.nearbySearch({"location": currentCenter,' +
+ ' "radius": 5000,' +
+ ' "name": placename}, function(results, status) {' +
+ ' places = results;' +
+ ' if (status == google.maps.places.PlacesServiceStatus.OK) {' +
+ ' for(var i=0; i < results.length; i++) {' +
+ ' var place = results[i];' +
+ ' var marker = createMarker(place.geometry.location);' +
+ ' marker.title = place.name;' +
+ ' markers.push(marker);' +
+ ' }' +
+ ' var event = document.createEvent("Event");' +
+ ' event.results = places;'+
+ ' event.initEvent("searchResults", true, true);' +
+ ' window.dispatchEvent(event);' +
+ ' }' +
+ ' });'+
+ ' };' +
+ ' function markerClicked(marker) {' +
+ ' var newEvent = document.createEvent("Event");' +
+ ' newEvent.marker = marker;' +
+ ' newEvent.initEvent("markerClicked", true, true);' +
+ ' window.dispatchEvent(newEvent);' +
+ ' };'+
+ ' function initialize() {'+
+ ' mapit(37.333, -121.900, 12);'+
+ ' };'+
+ ' google.maps.event.addDomListener(window, "load", initialize);'+
+ ' </script>'+
+ ' </head>'+
+ ' <body>'+
+ ' <div id="map-canvas"></div>'+
+ ' </body>'+
+ '</html>';
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/models/MapModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/models/MapModel.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/models/MapModel.as
new file mode 100644
index 0000000..6184143
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/models/MapModel.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.maps.google.models
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+
+ import google.maps.LatLng;
+ import google.maps.Marker;
+
+ /**
+ * The data model for the Map class, this holds the maps current center
+ * location, its current zoom level, the last marker selected, and any
+ * search results.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MapModel extends EventDispatcher implements IBeadModel
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MapModel()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ }
+
+ private var _token:String;
+
+ public function get token():String
+ {
+ return _token;
+ }
+ public function set token(value:String):void
+ {
+ _token = value;
+ dispatchEvent(new Event("tokenChanged"));
+ }
+
+ private var _currentCenter:LatLng;
+
+ /**
+ * The current center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get currentCenter():LatLng
+ {
+ return _currentCenter;
+ }
+
+ public function set currentCenter(value:LatLng):void
+ {
+ _currentCenter = value;
+ dispatchEvent( new Event("currentCenterChanged") );
+ }
+
+ private var _selectedMarker:Marker;
+
+ /**
+ * The last marker selected, if any.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get selectedMarker():Marker
+ {
+ return _selectedMarker;
+ }
+
+ public function set selectedMarker(value:Marker):void
+ {
+ _selectedMarker = value;
+ dispatchEvent( new Event("selectedMarkerChanged") );
+ }
+
+ private var _zoom:Number;
+
+ /**
+ * The current zoom level.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get zoom():Number
+ {
+ return _zoom;
+ }
+ public function set zoom(value:Number):void
+ {
+ if (value != _zoom) {
+ _zoom = value;
+ dispatchEvent( new Event("zoomChanged") );
+ }
+ }
+
+ private var _searchResults:Array;
+
+ /**
+ * Results from the last search.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get searchResults():Array
+ {
+ return _searchResults;
+ }
+ public function set searchResults(value:Array):void
+ {
+ _searchResults = value;
+ dispatchEvent( new Event("searchResultsChanged") );
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml b/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..52a9e48
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,75 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+ <manifest>google-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-classes>
+ <class>GoogleStubClasses</class>
+ <class>GoogleMapsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml b/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..7a80279
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+ <manifest>google-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>GoogleStubClasses</class>
+ <class>GoogleMapsClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/defaults.css b/frameworks/projects/GoogleMaps/src/main/resources/defaults.css
new file mode 100644
index 0000000..214e84f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/resources/defaults.css
@@ -0,0 +1,29 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace g "library://ns.apache.org/flexjs/google";
+
+g|Map
+{
+ IBeadView: ClassReference("org.apache.flex.maps.google.beads.GoogleMapView");
+ IBeadModel: ClassReference("org.apache.flex.maps.google.models.MapModel");
+}
+
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/resources/google-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/resources/google-manifest.xml b/frameworks/projects/GoogleMaps/src/main/resources/google-manifest.xml
new file mode 100644
index 0000000..f843c0c
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/resources/google-manifest.xml
@@ -0,0 +1,24 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+ <component id="Map" class="org.apache.flex.maps.google.GoogleMap" />
+</componentPackage>
[02/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
effects folders
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/states/Transition.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/states/Transition.as b/frameworks/projects/Effects/as/src/org/apache/flex/states/Transition.as
deleted file mode 100644
index 3469417..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/states/Transition.as
+++ /dev/null
@@ -1,80 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.states
-{
-
- [DefaultProperty("effects")]
-
- /**
- * The Transition class holds information describing what to do when
- * changing from one state to another.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Transition
- {
- /**
- * constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Transition()
- {
- super();
- }
-
- /**
- * The state or states from which the view is leaving.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var fromState:String;
-
- /**
- * The state or states to which the view is going.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var toState:String;
-
-
- /**
- * The list of effects to play
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var effects:Array;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/basic-manifest.xml b/frameworks/projects/Effects/basic-manifest.xml
deleted file mode 100644
index 64a6c26..0000000
--- a/frameworks/projects/Effects/basic-manifest.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Fade" class="org.apache.flex.effects.Fade"/>
- <component id="Move" class="org.apache.flex.effects.Move"/>
- <component id="Resize" class="org.apache.flex.effects.Resize"/>
- <component id="Wipe" class="org.apache.flex.effects.Wipe"/>
- <component id="Sequence" class="org.apache.flex.effects.Sequence"/>
- <component id="Parallel" class="org.apache.flex.effects.Parallel"/>
- <component id="Transition" class="org.apache.flex.states.Transition" />
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/compile-asjs-config.xml b/frameworks/projects/Effects/compile-asjs-config.xml
deleted file mode 100644
index 8f64d55..0000000
--- a/frameworks/projects/Effects/compile-asjs-config.xml
+++ /dev/null
@@ -1,79 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- </library-path>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-classes>
- <class>EffectsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/compile-config.xml b/frameworks/projects/Effects/compile-config.xml
deleted file mode 100644
index a07b904..0000000
--- a/frameworks/projects/Effects/compile-config.xml
+++ /dev/null
@@ -1,78 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>EffectsClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/EffectsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/EffectsClasses.as b/frameworks/projects/Effects/src/main/flex/EffectsClasses.as
new file mode 100644
index 0000000..4b529e8
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/EffectsClasses.as
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class EffectsClasses
+{
+ import org.apache.flex.core.StatesWithTransitionsImpl; StatesWithTransitionsImpl;
+ import org.apache.flex.effects.Fade; Fade;
+ import org.apache.flex.effects.Move; Move;
+ import org.apache.flex.effects.PlatformWiper; PlatformWiper;
+ import org.apache.flex.effects.Tween; Tween;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
new file mode 100644
index 0000000..9549bc8
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/core/StatesWithTransitionsImpl.as
@@ -0,0 +1,346 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+
+ import org.apache.flex.core.IParent;
+ import org.apache.flex.core.IStatesObject;
+ import org.apache.flex.effects.Effect;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.states.AddItems;
+ import org.apache.flex.states.SetEventHandler;
+ import org.apache.flex.states.SetProperty;
+ import org.apache.flex.states.State;
+ import org.apache.flex.states.Transition;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ /**
+ * The StatesWithTransitionsImpl class implements a set of
+ * view state functionality that includes transitions between states.
+ * 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
+ * @productversion FlexJS 0.0
+ */
+ public class StatesWithTransitionsImpl extends EventDispatcher implements IStatesImpl, IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StatesWithTransitionsImpl()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ private var sawInitComplete:Boolean;
+
+ /**
+ * @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("currentStateChange", stateChangeHandler);
+ IEventDispatcher(_strand).addEventListener("initComplete", initialStateHandler);
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
+ private function initialStateHandler(event:org.apache.flex.events.Event):void
+ {
+ sawInitComplete = true;
+ stateChangeHandler(new ValueChangeEvent("currentStateChange", false, false, null,
+ IStatesObject(_strand).currentState));
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
+ private function stateChangeHandler(event:ValueChangeEvent):void
+ {
+ if (!sawInitComplete)
+ return;
+
+ var doc:IStatesObject = _strand as IStatesObject;
+ var transitions:Array = doc.transitions;
+ if (transitions && transitions.length > 0)
+ {
+ for each (var t:Transition in transitions)
+ {
+ if (t.fromState == "*" || t.fromState == event.oldValue)
+ {
+ if (t.toState == "*" || t.toState == event.newValue)
+ {
+ transitionEffects = t.effects.slice();
+ for each (var e:Effect in transitionEffects)
+ {
+ e.captureStartValues();
+ }
+ break;
+ }
+ }
+ }
+ }
+ var arr:Array = doc.states;
+ var oldState:State;
+ var newState:State;
+ for each (var s:State in arr)
+ {
+ if (s.name == event.oldValue)
+ {
+ oldState = s;
+ break;
+ }
+ }
+ for each (s in arr)
+ {
+ if (s.name == event.newValue)
+ {
+ newState = s;
+ break;
+ }
+ }
+ if (oldState)
+ revert(oldState, newState);
+ if (newState)
+ apply(oldState, newState);
+ if (transitionEffects && transitionEffects.length > 0)
+ {
+ for each (e in transitionEffects)
+ {
+ e.captureEndValues();
+ }
+ }
+ var playingTransition:Boolean;
+ if (transitionEffects && transitionEffects.length > 0)
+ {
+ playingTransition = true;
+ for each (e in transitionEffects)
+ {
+ e.addEventListener(Effect.EFFECT_END, effectEndHandler);
+ e.play();
+ }
+ }
+ if (!playingTransition)
+ doc.dispatchEvent(new Event("stateChangeComplete"));
+ }
+
+ private var transitionEffects:Array;
+
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IStatesObject
+ */
+ private function effectEndHandler(event:Event):void
+ {
+ // in case of extraneous calls to effectEndHandler
+ if (transitionEffects == null)
+ return;
+
+ var n:int = transitionEffects.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ event.target.removeEventListener(Effect.EFFECT_END, effectEndHandler);
+ if (transitionEffects[i] == event.target)
+ transitionEffects.splice(i, 1);
+ }
+ if (transitionEffects.length == 0)
+ {
+ transitionEffects = null;
+ var doc:IStatesObject = _strand as IStatesObject;
+ doc.dispatchEvent(new Event("stateChangeComplete"));
+ }
+ }
+
+ private function isItemInState(child:Object, s:State):Boolean
+ {
+ if (s == null) return false;
+
+ var arr:Array = s.overrides;
+ for each (var o:Object in arr)
+ {
+ if (o is AddItems)
+ {
+ var ai:AddItems = AddItems(o);
+ if (ai.items == null)
+ {
+ ai.items = ai.itemsDescriptor.items as Array;
+ if (ai.items == null)
+ {
+ ai.items =
+ MXMLDataInterpreter.generateMXMLArray(ai.document,
+ null, ai.itemsDescriptor.descriptor);
+ ai.itemsDescriptor.items = ai.items;
+ }
+ }
+ for each (var item:IChild in ai.items)
+ {
+ if (item == child)
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private function revert(s:State, newState:State):void
+ {
+ var arr:Array = s.overrides;
+ for each (var o:Object in arr)
+ {
+ if (o is AddItems)
+ {
+ var ai:AddItems = AddItems(o);
+ var childrenAdded:Boolean = false;
+ for each (var item:IChild in ai.items)
+ {
+ if (!isItemInState(item, newState))
+ {
+ var parent:IParent = item.parent as IParent;
+ parent.removeElement(item);
+ childrenAdded = true;
+ }
+ }
+ if (childrenAdded && parent is IContainer)
+ IContainer(parent).childrenAdded();
+ }
+ else if (o is SetProperty)
+ {
+ var sp:SetProperty = SetProperty(o);
+ if (sp.target != null)
+ sp.document[sp.target][sp.name] = sp.previousValue;
+ else
+ sp.document[sp.name] = sp.previousValue;
+ }
+ else if (o is SetEventHandler)
+ {
+ var seh:SetEventHandler = SetEventHandler(o);
+ if (seh.target != null)
+ {
+ seh.document[seh.target].removeEventListener(seh.name, seh.handlerFunction);
+ }
+ else
+ {
+ seh.document.removeEventListener(seh.name, seh.handlerFunction);
+ }
+ }
+ }
+ }
+
+ private function apply(oldState:State, s:State):void
+ {
+ var arr:Array = s.overrides;
+ for each (var o:Object in arr)
+ {
+ if (o is AddItems)
+ {
+ var ai:AddItems = AddItems(o);
+ if (ai.items == null)
+ {
+ ai.items = ai.itemsDescriptor.items as Array;
+ if (ai.items == null)
+ {
+ ai.items =
+ MXMLDataInterpreter.generateMXMLArray(ai.document,
+ null, ai.itemsDescriptor.descriptor);
+ ai.itemsDescriptor.items = ai.items;
+ }
+ }
+ var childrenAdded:Boolean = false;
+ for each (var item:Object in ai.items)
+ {
+ if (!isItemInState(item, oldState))
+ {
+ var parent:IParent = ai.document as IParent;
+ if (ai.destination)
+ parent = parent[ai.destination] as IParent;
+ if (ai.relativeTo != null)
+ {
+ var child:Object = ai.document[ai.relativeTo];
+ if (ai.destination)
+ parent = IChild(child).parent as IParent;
+ var index:int = parent.getElementIndex(child);
+ if (ai.position == "after")
+ index++;
+ parent.addElementAt(item, index);
+ childrenAdded = true;
+ }
+ else
+ {
+ parent.addElement(item);
+ childrenAdded = true;
+ }
+ }
+ }
+ if (childrenAdded && parent is IContainer)
+ IContainer(parent).childrenAdded();
+ }
+ else if (o is SetProperty)
+ {
+ var sp:SetProperty = SetProperty(o);
+ if (sp.target != null)
+ {
+ sp.previousValue = sp.document[sp.target][sp.name];
+ sp.document[sp.target][sp.name] = sp.value;
+ }
+ else
+ {
+ sp.previousValue = sp.document[sp.name];
+ sp.document[sp.name] = sp.value;
+ }
+ }
+ else if (o is SetEventHandler)
+ {
+ var seh:SetEventHandler = SetEventHandler(o);
+ if (seh.target != null)
+ {
+ seh.document[seh.target].addEventListener(seh.name, seh.handlerFunction);
+ }
+ else
+ {
+ seh.document.addEventListener(seh.name, seh.handlerFunction);
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Effect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Effect.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Effect.as
new file mode 100644
index 0000000..7fabe6a
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Effect.as
@@ -0,0 +1,263 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.events.EventDispatcher;
+
+/**
+ * Effect is the base class for effects in FlexJS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Effect extends EventDispatcher implements IEffect
+{
+ //--------------------------------------------------------------------------
+ //
+ // Class constants
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * The <code>Effect.EFFECT_END</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>effectEnd</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType effectEnd
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const EFFECT_END:String = "effectEnd";
+
+ /**
+ * The <code>Effect.EFFECT_START</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>effectStart</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType effectStart
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const EFFECT_START:String = "effectStart";
+
+ /**
+ * The <code>Effect.EFFECT_STOP</code> constant defines the value of the
+ * event object's <code>type</code> property for a <code>effectStop</code> event.
+ *
+ * <p>The properties of the event object have the following values:</p>
+ * <table class="innertable">
+ * <tr><th>Property</th><th>Value</th></tr>
+ * <tr><td><code>bubbles</code></td><td>false</td></tr>
+ * <tr><td><code>cancelable</code></td><td>false</td></tr>
+ * <tr><td><code>currentTarget</code></td><td>The Object that defines the
+ * event listener that handles the event. For example, if you use
+ * <code>myButton.addEventListener()</code> to register an event listener,
+ * myButton is the value of the <code>currentTarget</code>. </td></tr>
+ * <tr><td><code>target</code></td><td>The Object that dispatched the event;
+ * it is not always the Object listening for the event.
+ * Use the <code>currentTarget</code> property to always access the
+ * Object listening for the event.</td></tr>
+ * </table>
+ *
+ * @eventType effectStop
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public static const EFFECT_STOP:String = "effectStop";
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Effect()
+ {
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // duration
+ //----------------------------------
+
+ private var _duration:Number = 500;
+ /**
+ * Duration of the animation, in milliseconds.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get duration():Number
+ {
+ return _duration;
+ }
+ public function set duration(value:Number):void
+ {
+ _duration = value;
+ }
+
+
+ /**
+ * Plays the effect in reverse,
+ * starting from the current position of the effect.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function reverse():void
+ {
+ }
+
+ /**
+ * Pauses the effect until you call the <code>resume()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function pause():void
+ {
+ }
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function play():void
+ {
+ }
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function stop():void
+ {
+ }
+
+ /**
+ * Resumes the effect after it has been paused
+ * by a call to the <code>pause()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function resume():void
+ {
+ }
+
+ /**
+ * @copy org.apache.flex.effects.IEffect#captureStartValues
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function captureStartValues():void
+ {
+ }
+
+ /**
+ * @copy org.apache.flex.effects.IEffect#captureEndValues
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function captureEndValues():void
+ {
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Fade.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Fade.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Fade.as
new file mode 100644
index 0000000..28f0d16
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Fade.as
@@ -0,0 +1,165 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+
+/**
+ * The Fade effect animates a UI component's alpha or opacity.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Fade extends Tween implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param target An object that will
+ * have its x and/or y property animated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Fade(target:IUIBase = null)
+ {
+ super();
+
+ this.actualTarget = target;
+ startValue = 0;
+ endValue = 1;
+
+ listener = this;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var actualTarget:IUIBase;
+
+ /**
+ * The target as the String id
+ * of a widget in an MXML Document.
+ */
+ public var target:String;
+
+ /**
+ * @private
+ * The change in alpha.
+ */
+ private var d:Number;
+
+ /**
+ * @private
+ * The starting value.
+ */
+ private var start:Number;
+
+ /**
+ * Starting alpha value. If NaN, the current alpha value is used
+ */
+ public var alphaFrom:Number;
+
+ /**
+ * Ending alpha value. If NaN, the current alpha value is not changed
+ */
+ public var alphaTo:Number;
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ if (target != null)
+ actualTarget = document[target];
+
+ if (isNaN(alphaFrom))
+ start = actualTarget.alpha;
+ else
+ start = alphaFrom;
+
+ if (isNaN(alphaTo))
+ d = 0;
+ else
+ d = alphaTo - start;
+
+ super.play();
+ }
+
+ public function onTweenUpdate(value:Number):void
+ {
+ if (d)
+ actualTarget.alpha = start + value * d;
+ }
+
+ public function onTweenEnd(value:Number):void
+ {
+ if (d)
+ actualTarget.alpha = start + d;
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/IEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/IEffect.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/IEffect.as
new file mode 100644
index 0000000..f5b940c
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/IEffect.as
@@ -0,0 +1,136 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.events.IEventDispatcher;
+
+/**
+ * IEffect is the lowest-level interface for effects in FlexJS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public interface IEffect extends IEventDispatcher
+{
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // duration
+ //----------------------------------
+
+ /**
+ * Duration of the animation, in milliseconds.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function get duration():Number;
+ function set duration(value:Number):void;
+
+
+ /**
+ * Plays the effect in reverse,
+ * starting from the current position of the effect.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function reverse():void;
+
+ /**
+ * Pauses the effect until you call the <code>resume()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function pause():void;
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function play():void;
+
+ /**
+ * Stops the tween, ending it without dispatching an event or calling
+ * the Tween's endFunction or <code>onTweenEnd()</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function stop():void;
+
+ /**
+ * Resumes the effect after it has been paused
+ * by a call to the <code>pause()</code> method.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function resume():void;
+
+ /**
+ * Tries to compute initial values
+ * for effect
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function captureStartValues():void;
+
+ /**
+ * Tries to compute final values
+ * for effect
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ function captureEndValues():void;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Move.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Move.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Move.as
new file mode 100644
index 0000000..2a42b19
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Move.as
@@ -0,0 +1,240 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+
+/**
+ * The Move effect animates a UI component's x or y position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Move extends Tween implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param target Object ID or reference to an object that will
+ * have its x and/or y property animated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Move(target:IUIBase = null)
+ {
+ super();
+
+ this.actualTarget = target;
+ startValue = 0;
+ endValue = 1;
+
+ listener = this;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The actual target.
+ */
+ private var actualTarget:IUIBase;
+
+ /**
+ * The target as the String id
+ * of a widget in an MXML Document.
+ */
+ public var target:String;
+
+ /**
+ * The change in x.
+ */
+ public var xBy:Number;
+
+ /**
+ * The change in y.
+ */
+ public var yBy:Number;
+
+ /**
+ * @private
+ * The starting x.
+ */
+ private var xStart:Number;
+
+ /**
+ * @private
+ * The starting y.
+ */
+ private var yStart:Number;
+
+ /**
+ * @private
+ * The total change for x.
+ */
+ private var xMove:Number;
+
+ /**
+ * @private
+ * The total change for y.
+ */
+ private var yMove:Number;
+
+ /**
+ * Starting x value. If NaN, the current x value is used
+ */
+ public var xFrom:Number;
+
+ /**
+ * Ending x value. If NaN, the current x value is not changed
+ */
+ public var xTo:Number;
+
+ /**
+ * Starting y value. If NaN, the current y value is used
+ */
+ public var yFrom:Number;
+
+ /**
+ * Ending y value. If NaN, the current y value is not changed
+ */
+ public var yTo:Number;
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ if (target != null)
+ actualTarget = document[target];
+
+ if (isNaN(xFrom))
+ xStart = actualTarget.x;
+ else
+ xStart = xFrom;
+
+ if (isNaN(xBy))
+ {
+ if (isNaN(xTo))
+ xMove = 0;
+ else
+ xMove = xTo - xStart;
+ }
+ else
+ xMove = xBy;
+
+ if (isNaN(yFrom))
+ yStart = actualTarget.y;
+ else
+ yStart = yFrom;
+ if (isNaN(yBy))
+ {
+ if (isNaN(yTo))
+ yMove = 0;
+ else
+ yMove = yTo - yStart;
+ }
+ else
+ yMove = yBy;
+
+ super.play();
+ }
+
+ public function onTweenUpdate(value:Number):void
+ {
+ if (xMove)
+ actualTarget.x = xStart + value * xMove;
+ if (yMove)
+ actualTarget.y = yStart + value * yMove;
+ }
+
+ public function onTweenEnd(value:Number):void
+ {
+ if (xMove)
+ actualTarget.x = xStart + xMove;
+ if (yMove)
+ actualTarget.y = yStart + yMove;
+
+ }
+
+ override public function captureStartValues():void
+ {
+ if (target != null)
+ {
+ actualTarget = document[target];
+ xFrom = actualTarget.x;
+ yFrom = actualTarget.y;
+ }
+ }
+
+ override public function captureEndValues():void
+ {
+ if (target != null)
+ {
+ actualTarget = document[target];
+ xTo = actualTarget.x;
+ yTo = actualTarget.y;
+ }
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
new file mode 100644
index 0000000..6d08012
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Parallel.as
@@ -0,0 +1,152 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+import org.apache.flex.events.Event;
+
+[DefaultProperty("children")]
+
+/**
+ * The Parallel effect animates set of effects at the
+ * same time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Parallel extends Effect implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Parallel()
+ {
+ super();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var target:IUIBase;
+
+ /**
+ * The children.
+ */
+ public var children:Array;
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ override public function set duration(value:Number):void
+ {
+ var n:int = children.length;
+ for (var i:int = 0; i < 0; i++)
+ {
+ children[i].duration = value;
+ }
+ super.duration = value;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ public function addChild(child:IEffect):void
+ {
+ if (!children)
+ children = [ child ];
+ else
+ children.push(child);
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ dispatchEvent(new Event(Effect.EFFECT_START));
+ current = 0;
+ var n:int = children.length;
+ for (var i:int = 0; i < n; i++)
+ playChildEffect(i);
+ }
+
+ private var current:int;
+
+ private function playChildEffect(index:int):void
+ {
+ var child:IEffect = children[index];
+ child.addEventListener(Effect.EFFECT_END, effectEndHandler);
+ child.play();
+ }
+
+ private function effectEndHandler(event:Event):void
+ {
+ current++;
+ if (current >= children.length)
+ dispatchEvent(new Event(Effect.EFFECT_END));
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
new file mode 100644
index 0000000..1e3b412
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/PlatformWiper.as
@@ -0,0 +1,138 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+COMPILE::AS3
+{
+ import flash.display.DisplayObject;
+ import flash.geom.Rectangle;
+}
+COMPILE::JS
+{
+ import org.apache.flex.geom.Rectangle;
+}
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+
+/**
+ * Helper class for Wipe effects.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class PlatformWiper
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function PlatformWiper()
+ {
+ super();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The target.
+ */
+ private var _target:IUIBase;
+
+ /**
+ * @private
+ * The old overflow value.
+ */
+ private var _overflow:String;
+
+ /**
+ * The object that will be clipped.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set target(value:IUIBase):void
+ {
+ COMPILE::AS3
+ {
+ if (value == null)
+ DisplayObject(_target).scrollRect = null;
+ _target = value;
+ }
+ COMPILE::JS
+ {
+ if (value == null)
+ {
+ if (_overflow == null)
+ delete _target.positioner.style["overflow"];
+ else
+ _target.positioner.style.overflow = _overflow;
+ }
+ _target = value;
+ if (value != null) {
+ _overflow = _target.positioner.style.overflow;
+ }
+ }
+ }
+
+ /**
+ * The visible rectangle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function set visibleRect(value:Rectangle):void
+ {
+ COMPILE::AS3
+ {
+ DisplayObject(_target).scrollRect = value;
+ }
+ COMPILE::JS
+ {
+ _target.positioner.style.height = value.height.toString() + 'px';
+ _target.positioner.style.overflow = 'hidden';
+ }
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Resize.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Resize.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Resize.as
new file mode 100644
index 0000000..2ee1e15
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Resize.as
@@ -0,0 +1,197 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+
+/**
+ * The Resize effect animates a UI component's width or height.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Resize extends Tween implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @param target Object ID or reference to an object that will
+ * have its x and/or y property animated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Resize(target:IUIBase = null)
+ {
+ super();
+
+ this.actualTarget = target;
+ startValue = 0;
+ endValue = 1;
+
+ listener = this;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var actualTarget:IUIBase;
+
+ /**
+ * The target as the String id
+ * of a widget in an MXML Document.
+ */
+ public var target:String;
+
+ /**
+ * The change in width.
+ */
+ public var widthBy:Number;
+
+ /**
+ * The change in height.
+ */
+ public var heightBy:Number;
+
+ /**
+ * @private
+ * The starting width.
+ */
+ private var widthStart:Number;
+
+ /**
+ * @private
+ * The starting height.
+ */
+ private var heightStart:Number;
+
+ /**
+ * Starting width value. If NaN, the current width value is used
+ */
+ public var widthFrom:Number;
+
+ /**
+ * Starting height value. If NaN, the current height value is used
+ */
+ public var heightFrom:Number;
+
+ /**
+ * Ending width value.
+ */
+ public var widthTo:Number;
+
+ /**
+ * Ending height value.
+ */
+ public var heightTo:Number;
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ if (target != null)
+ actualTarget = document[target];
+
+ if (isNaN(widthFrom))
+ widthStart = actualTarget.width;
+ if (isNaN(widthBy))
+ {
+ if (isNaN(widthTo))
+ widthBy = 0;
+ else
+ widthBy = widthTo - widthStart;
+ }
+
+ if (isNaN(heightFrom))
+ heightStart = actualTarget.height;
+ if (isNaN(heightBy))
+ {
+ if (isNaN(heightTo))
+ heightBy = 0;
+ else
+ heightBy = heightTo - heightStart;
+ }
+ super.play();
+ }
+
+ public function onTweenUpdate(value:Number):void
+ {
+ if (widthBy)
+ actualTarget.width = widthStart + value * widthBy;
+ if (heightBy)
+ actualTarget.height = heightStart + value * heightBy;
+ }
+
+ public function onTweenEnd(value:Number):void
+ {
+ if (widthBy)
+ actualTarget.width = widthStart + widthBy;
+ if (heightBy)
+ actualTarget.height = heightStart + heightBy;
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Sequence.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Sequence.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Sequence.as
new file mode 100644
index 0000000..f6c3343
--- /dev/null
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/effects/Sequence.as
@@ -0,0 +1,152 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.effects
+{
+
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IUIBase;
+import org.apache.flex.events.Event;
+
+[DefaultProperty("children")]
+
+/**
+ * The Sequence effect animates a set of effects one
+ * at a time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Sequence extends Effect implements IDocument
+{
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function Sequence()
+ {
+ super();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The document.
+ */
+ private var document:Object;
+
+ /**
+ * @private
+ * The target.
+ */
+ private var target:IUIBase;
+
+ /**
+ * The children.
+ */
+ public var children:Array;
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ override public function set duration(value:Number):void
+ {
+ var n:int = children.length;
+ for (var i:int = 0; i < 0; i++)
+ {
+ children[i].duration = value;
+ }
+ super.duration = value;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ public function addChild(child:IEffect):void
+ {
+ if (!children)
+ children = [ child ];
+ else
+ children.push(child);
+ }
+
+ /**
+ * @private
+ */
+ override public function play():void
+ {
+ dispatchEvent(new Event(Effect.EFFECT_START));
+ current = 0;
+ playChildEffect();
+ }
+
+ private var current:int;
+
+ private function playChildEffect():void
+ {
+ var child:IEffect = children[current];
+ child.addEventListener(Effect.EFFECT_END, effectEndHandler);
+ child.play();
+ }
+
+ private function effectEndHandler(event:Event):void
+ {
+ current++;
+ if (current >= children.length)
+ dispatchEvent(new Event(Effect.EFFECT_END));
+ else
+ playChildEffect();
+ }
+}
+
+}
[07/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for CreateJS
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
new file mode 100644
index 0000000..9fb19e8
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/ViewBase.as
@@ -0,0 +1,206 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs.core
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObject;
+ import org.apache.flex.core.ViewBase;
+ }
+
+ import org.apache.flex.core.IApplicationView;
+ import org.apache.flex.core.IParent;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStatesImpl;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.states.State;
+ }
+
+ COMPILE::AS3
+ public class ViewBase extends org.apache.flex.core.ViewBase
+ {
+
+ }
+
+ [DefaultProperty("mxmlContent")]
+ COMPILE::JS
+ public class ViewBase extends UIBase implements IParent, IApplicationView
+ {
+ public function ViewBase()
+ {
+ super();
+ }
+
+ override public function addedToParent():void
+ {
+ /* AJH needed?
+ MXMLDataInterpreter.generateMXMLProperties(this, MXMLProperties);
+ */
+ MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
+ }
+
+ public function get MXMLDescriptor():Array
+ {
+ return null;
+ }
+
+ /*
+ public function get MXMLProperties():Array
+ {
+ return null;
+ }
+ */
+
+ public var mxmlContent:Array;
+
+ private var _applicationModel:Object;
+
+ [Bindable("modelChanged")]
+ public function get applicationModel():Object
+ {
+ return _applicationModel;
+ }
+
+ public function set applicationModel(value:Object):void
+ {
+ _applicationModel = value;
+ dispatchEvent(new Event("modelChanged"));
+ }
+
+ private var _states:Array;
+
+ /**
+ * The array of view states. These should
+ * be instances of org.apache.flex.states.State.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get states():Array
+ {
+ return _states;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion Class
+ * @flexjsignorecoercion org.apache.flex.core.IBead
+ */
+ public function set states(value:Array):void
+ {
+ _states = value;
+ _currentState = _states[0].name;
+
+ try{
+ if (getBeadByType(IStatesImpl) == null)
+ {
+ var c:Class = ValuesManager.valuesImpl.getValue(this, "iStatesImpl") as Class;
+ var b:Object = new c();
+ addBead(b as IBead);
+ }
+ }
+ //TODO: Need to handle this case more gracefully
+ catch(e:Error)
+ {
+ }
+
+ }
+
+ /**
+ * <code>true</code> if the array of states
+ * contains a state with this name.
+ *
+ * @param state The state namem.
+ * @return True if state in state array
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function hasState(state:String):Boolean
+ {
+ for each (var s:State in _states)
+ {
+ if (s.name == state)
+ return true;
+ }
+ return false;
+ }
+
+ private var _currentState:String;
+
+ [Bindable("currentStateChange")]
+ /**
+ * The name of the current state.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get currentState():String
+ {
+ return _currentState;
+ }
+
+ /**
+ * @private
+ */
+ public function set currentState(value:String):void
+ {
+ var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
+ _currentState = value;
+ dispatchEvent(event);
+ }
+
+ private var _transitions:Array;
+
+ /**
+ * The array of transitions.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get transitions():Array
+ {
+ return _transitions;
+ }
+
+ /**
+ * @private
+ */
+ public function set transitions(value:Array):void
+ {
+ _transitions = value;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..35c65b3
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-asjs-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ </library-path>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+ <manifest>createjs-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <library-path>
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ </include-file>
+
+ <include-sources>
+ </include-sources>
+
+ <include-classes>
+ <class>CreateJSClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+ </include-namespaces>
+
+ <!--<target-player>${playerglobal.version}</target-player>-->
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/compile-config.xml b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..3aecfb2
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+ <manifest>createjs-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>CreateJSClasses</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml b/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
new file mode 100644
index 0000000..1c5a5ed
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/resources/createjs-manifest.xml
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+ <component id="Application" class="org.apache.flex.createjs.Application"/>
+ <component id="UIBase" class="org.apache.flex.createjs.core.UIBase"/>
+ <component id="ViewBase" class="org.apache.flex.createjs.core.ViewBase"/>
+ <component id="Label" class="org.apache.flex.createjs.Label"/>
+ <component id="TextButton" class="org.apache.flex.createjs.TextButton"/>
+ <component id="CheckBox" class="org.apache.flex.createjs.CheckBox"/>
+
+</componentPackage>
[12/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder changes
Posted by ah...@apache.org.
fix scripts after folder changes
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/84f558ff
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/84f558ff
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/84f558ff
Branch: refs/heads/develop
Commit: 84f558ff9a42b39dbc6c0e8489646b2a58a2b04d
Parents: 36435f3
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 17:15:48 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:50 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Formatters/build.xml | 65 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 6 +-
.../src/main/resources/compile-config.xml | 8 +--
3 files changed, 42 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/84f558ff/frameworks/projects/Formatters/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/build.xml b/frameworks/projects/Formatters/build.xml
index 5ea5c71..aab06cc 100644
--- a/frameworks/projects/Formatters/build.xml
+++ b/frameworks/projects/Formatters/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Formatters-${release.version}.swc" />
+ <property name="target.name.no.version" value="Formatters.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Formatters.swc">
</target>
@@ -41,55 +43,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Formatters.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Formatters.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in FormattersClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Formatters.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
+
<target name="compile-asjs">
- <echo message="Cross-compiling Formatters"/>
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -99,8 +102,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -111,13 +114,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Formatters.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -135,9 +139,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Formatters.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -146,11 +150,12 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
+
<target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
<include name="**/**"/>
</fileset>
</copy>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/84f558ff/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
index 6b9466f..caeadfd 100644
--- a/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Formatters/src/main/resources/compile-asjs-config.xml
@@ -45,8 +45,8 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/HTML.swc</path-element>
</library-path>
<namespaces>
@@ -57,7 +57,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/84f558ff/frameworks/projects/Formatters/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/src/main/resources/compile-config.xml b/frameworks/projects/Formatters/src/main/resources/compile-config.xml
index 96c7e48..b5445c9 100644
--- a/frameworks/projects/Formatters/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Formatters/src/main/resources/compile-config.xml
@@ -23,8 +23,8 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/HTML.swc</path-element>
</external-library-path>
<mxml>
@@ -54,7 +54,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -62,7 +62,7 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-classes>
[08/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for CreateJS
Posted by ah...@apache.org.
new folders for CreateJS
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/dd3df6f9
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/dd3df6f9
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/dd3df6f9
Branch: refs/heads/develop
Commit: dd3df6f9e648b7ed29d26777aa1ffc9da117bbdd
Parents: fd70a2c
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:33:37 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
frameworks/projects/CreateJS/as/defaults.css | 36 --
.../projects/CreateJS/as/src/CreateJSClasses.as | 33 --
.../src/org/apache/flex/createjs/Application.as | 120 -----
.../as/src/org/apache/flex/createjs/CheckBox.as | 124 -----
.../as/src/org/apache/flex/createjs/Label.as | 81 ----
.../src/org/apache/flex/createjs/TextButton.as | 118 -----
.../src/org/apache/flex/createjs/core/UIBase.as | 449 -------------------
.../org/apache/flex/createjs/core/ViewBase.as | 206 ---------
.../projects/CreateJS/compile-asjs-config.xml | 83 ----
frameworks/projects/CreateJS/compile-config.xml | 83 ----
.../projects/CreateJS/createjs-manifest.xml | 31 --
frameworks/projects/CreateJS/src/defaults.css | 36 ++
.../CreateJS/src/main/flex/CreateJSClasses.as | 33 ++
.../org/apache/flex/createjs/Application.as | 120 +++++
.../flex/org/apache/flex/createjs/CheckBox.as | 124 +++++
.../main/flex/org/apache/flex/createjs/Label.as | 81 ++++
.../flex/org/apache/flex/createjs/TextButton.as | 118 +++++
.../org/apache/flex/createjs/core/UIBase.as | 449 +++++++++++++++++++
.../org/apache/flex/createjs/core/ViewBase.as | 206 +++++++++
.../src/main/resources/compile-asjs-config.xml | 83 ++++
.../src/main/resources/compile-config.xml | 83 ++++
.../src/main/resources/createjs-manifest.xml | 31 ++
22 files changed, 1364 insertions(+), 1364 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/defaults.css b/frameworks/projects/CreateJS/as/defaults.css
deleted file mode 100644
index 55fa336..0000000
--- a/frameworks/projects/CreateJS/as/defaults.css
+++ /dev/null
@@ -1,36 +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.
- *
- */
-
-@namespace createjs "library://ns.apache.org/flexjs/createjs";
-
-@media -flex-flash
-{
-
-createjs|TextButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
-}
-
-createjs|CheckBox
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/CreateJSClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/CreateJSClasses.as b/frameworks/projects/CreateJS/as/src/CreateJSClasses.as
deleted file mode 100644
index eeafa52..0000000
--- a/frameworks/projects/CreateJS/as/src/CreateJSClasses.as
+++ /dev/null
@@ -1,33 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class CreateJSClasses
-{
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Application.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Application.as
deleted file mode 100644
index 06ae1fb..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Application.as
+++ /dev/null
@@ -1,120 +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.createjs
-{
- import org.apache.flex.core.ApplicationBase;
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IFlexInfo;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.IValuesImpl;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.createjs.core.ViewBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- COMPILE::JS
- {
- import org.apache.flex.core.WrappedHTMLElement;
- import createjs.DisplayObject;
- import createjs.Stage;
- }
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched at startup.
- */
- [Event(name="initialize", type="org.apache.flex.events.Event")]
-
- /**
- * CreateJS Application
- */
- public class Application extends org.apache.flex.core.Application implements IStrand, IFlexInfo
- {
- /**
- * FalconJX will inject html into the index.html file. Surround with
- * "inject_html" tag as follows:
- *
- * <inject_html>
- * <script src="https://code.createjs.com/easeljs-0.8.1.min.js"></script>
- * </inject_html>
- */
- public function Application()
- {
- super();
- }
-
- COMPILE::JS
- private var stage:Stage;
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion HTMLBodyElement
- * @flexjsignorecoercion HTMLCanvasElement
- */
- COMPILE::JS
- override public function start():void
- {
- var body:HTMLBodyElement;
- var canvas:HTMLCanvasElement;
-
- // For createjs, the application is the same as the canvas
- // and it provides convenient access to the stage.
-
- element = document.createElement('canvas') as WrappedHTMLElement;
- element.flexjs_wrapper = this;
- canvas = element as HTMLCanvasElement;
- canvas.id = 'flexjsCanvas';
- canvas.width = 700;
- canvas.height = 500;
-
- body = document.getElementsByTagName('body')[0] as HTMLBodyElement;
- body.appendChild(this.element);
-
- stage = new createjs.Stage('flexjsCanvas');
-
- /* AJH is this needed
- MXMLDataInterpreter.generateMXMLProperties(this,
- MXMLProperties);
- */
-
- dispatchEvent('initialize');
-
- initialView.applicationModel = this.model;
- addElement(initialView);
-
- dispatchEvent('viewChanged');
-
- stage.update();
- }
-
- /**
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- override public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- stage.addChild(c.element as DisplayObject);
- c.addedToParent();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/CheckBox.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/CheckBox.as
deleted file mode 100644
index 3ce2d50..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/CheckBox.as
+++ /dev/null
@@ -1,124 +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.createjs
-{
- COMPILE::AS3
- {
- import org.apache.flex.html.CheckBox;
- }
- COMPILE::JS
- {
- import createjs.Container;
- import createjs.Shape;
- import createjs.Stage;
- import createjs.Text;
-
- import org.apache.flex.createjs.core.UIBase;
- import org.apache.flex.core.WrappedHTMLElement;
- import org.apache.flex.events.Event;
- }
-
- COMPILE::AS3
- public class CheckBox extends org.apache.flex.html.CheckBox
- {
- }
-
- COMPILE::JS
- public class CheckBox extends UIBase
- {
- private var checkMark:Shape;
- private var checkMarkBackground:Shape;
- private var checkBoxLabel:Text;
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- override public function createElement():WrappedHTMLElement
- {
- checkMarkBackground = new createjs.Shape(null);
- checkMarkBackground.name = 'checkmarkbackground';
- checkMarkBackground.graphics.beginFill('red').
- drawRoundRect(0, 0, 40, 40, 8);
-
- checkMark = new createjs.Shape(null);
- checkMark.name = 'checkmark';
- checkMark.graphics.beginFill('white').drawRoundRect(0, 0, 32, 32, 6);
- checkMark.x = 4;
- checkMark.y = 4;
- checkMark.visible = false;
-
- checkBoxLabel = new createjs.Text('checkbox', '20px Arial', '#ff7700');
- checkBoxLabel.name = 'label';
- checkBoxLabel.textAlign = 'left';
- checkBoxLabel.textBaseline = 'middle';
- checkBoxLabel.x = 45;
- checkBoxLabel.y = 40 / 2;
-
- var container:createjs.Container = new createjs.Container();
- element = container as WrappedHTMLElement;
- container.name = 'checkbox';
- container.addChild(this.checkMarkBackground);
- container.addChild(this.checkBoxLabel);
- container.addChild(this.checkMark);
- container.onClick = clickHandler;
-
- this.positioner = this.element;
-
- return this.element;
- }
-
- public function get text():String
- {
- return checkBoxLabel.text;
- }
-
- public function set text(value:String):void
- {
- checkBoxLabel.text = value;
- }
-
- public function get selected():Boolean
- {
- return checkMark.visible;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- public function set selected(value:Boolean):void
- {
- checkMark.visible = value;
- var stage:Stage = (element as Container).getStage();
- if (stage)
- stage.update();
- }
-
-
- /**
- * @param event The event.
- */
- private function clickHandler(event:Event):void
- {
- selected = !selected;
- }
-
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Label.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Label.as
deleted file mode 100644
index 3540599..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/Label.as
+++ /dev/null
@@ -1,81 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.createjs
-{
- COMPILE::AS3
- {
- import org.apache.flex.html.Label;
- }
-
- COMPILE::JS
- {
- import createjs.Text;
- import createjs.Stage;
-
- import org.apache.flex.createjs.core.UIBase;
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- COMPILE::AS3
- public class Label extends org.apache.flex.html.Label
- {
-
- }
-
- COMPILE::JS
- public class Label extends UIBase
- {
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- override public function createElement():WrappedHTMLElement
- {
- var text:Text = new Text('default text', '20px Arial', '#ff7700');
- text.x = 0;
- text.y = 20;
- text.textBaseline = 'alphabetic';
-
- positioner = element = text as WrappedHTMLElement;
- return element;
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Text
- */
- public function get text():String
- {
- return (element as Text).text;
- }
-
- /**
- * @flexjsignorecoercion createjs.Text
- */
- public function set text(value:String):void
- {
- var text:Text = element as Text;
- text.text = value;
- var stage:Stage = text.getStage();
- if (stage)
- stage.update();
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/TextButton.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/TextButton.as
deleted file mode 100644
index f7a31f9..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/TextButton.as
+++ /dev/null
@@ -1,118 +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.createjs
-{
- COMPILE::AS3
- {
- import org.apache.flex.core.ITextModel;
- import org.apache.flex.html.Button;
- }
- COMPILE::JS
- {
- import createjs.Container;
- import createjs.Text;
- import createjs.Shape;
- import createjs.Stage;
-
- import org.apache.flex.createjs.core.UIBase;
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- COMPILE::AS3
- public class TextButton extends Button
- {
- public function TextButton()
- {
- super();
- }
-
- public function get text():String
- {
- return ITextModel(model).text;
- }
- public function set text(value:String):void
- {
- ITextModel(model).text = value;
- }
-
- public function get html():String
- {
- return ITextModel(model).html;
- }
- public function set html(value:String):void
- {
- ITextModel(model).html = value;
- }
-
- }
-
- COMPILE::JS
- public class TextButton extends UIBase
- {
- private var buttonBackground:Shape;
- private var buttonLabel:Text;
- private var button:Container;
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- override public function createElement():WrappedHTMLElement
- {
- buttonBackground = new createjs.Shape(null);
- buttonBackground.name = 'background';
- buttonBackground.graphics.beginFill('red').
- drawRoundRect(0, 0, 200, 60, 10);
-
- buttonLabel = new createjs.Text('button', 'bold 24px Arial',
- '#FFFFFF');
- buttonLabel.name = 'label';
- buttonLabel.textAlign = 'center';
- buttonLabel.textBaseline = 'middle';
- buttonLabel.x = 200 / 2;
- buttonLabel.y = 60 / 2;
-
- button = new createjs.Container();
- button.name = 'button';
- button.x = 50;
- button.y = 25;
- button.addChild(buttonBackground);
- button.addChild(buttonLabel);
-
- positioner = element = button as WrappedHTMLElement;
- element.flexjs_wrapper = this;
- return element;
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Text
- */
- public function get text():String
- {
- return buttonLabel.text;
- }
-
- /**
- * @flexjsignorecoercion createjs.Text
- */
- public function set text(value:String):void
- {
- buttonLabel.text = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/UIBase.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/UIBase.as
deleted file mode 100644
index 10f18ab..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/UIBase.as
+++ /dev/null
@@ -1,449 +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.createjs.core
-{
- import org.apache.flex.core.HTMLElementWrapper;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IFlexJSElement;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
-
- COMPILE::JS
- {
- import createjs.Container;
- import createjs.DisplayObject;
- import createjs.Stage;
- import org.apache.flex.core.WrappedHTMLElement;
- }
-
- public class UIBase extends HTMLElementWrapper implements IStrand, IEventDispatcher, IUIBase, IFlexJSElement
- {
- public function UIBase()
- {
- super();
- COMPILE::JS
- {
- createElement();
- }
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- (element as Container).addChild(c.element as DisplayObject);
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- (element as Container).addChildAt(c.element as DisplayObject, index);
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function getElementIndex(c:Object):int
- {
- return (element as Container).getChildIndex(c.element as DisplayObject);
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- (element as Container).removeChild(c.element as DisplayObject);
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function getElementAt(index:int):Object
- {
- return (element as Container).getChildAt(index);
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Container
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function get numElements():int
- {
- return (element as Container).numChildren;
- }
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- COMPILE::JS
- public function createElement():WrappedHTMLElement
- {
- element = new Container() as WrappedHTMLElement;
-
- positioner = this.element;
- return element;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function get x():Number
- {
- return (positioner as Container).x;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function set x(value:Number):void
- {
- var container:Container = positioner as Container;
- container.x = value;
- var stage:Stage = container.getStage();
- if (stage)
- stage.update();
- }
-
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function get y():Number
- {
- return (positioner as Container).y;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function set y(value:Number):void
- {
- var container:Container = positioner as Container;
- container.y = value;
- var stage:Stage = container.getStage();
- if (stage)
- stage.update();
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function get width():Number
- {
- return (positioner as Container).width;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function set width(value:Number):void
- {
- var container:Container = positioner as Container;
- container.width = value;
- var stage:Stage = container.getStage();
- if (stage)
- stage.update();
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function get height():Number
- {
- return (positioner as Container).height;
- }
-
- /**
- * @flexjsignorecoercion createjs.Container
- */
- COMPILE::JS
- public function set height(value:Number):void
- {
- var container:Container = positioner as Container;
- container.height = value;
- var stage:Stage = container.getStage();
- if (stage)
- stage.update();
- }
-
- COMPILE::AS3
- private var _width:Number = 0;
- COMPILE::AS3
- override public function get width():Number
- {
- return _width;
- }
-
- COMPILE::AS3
- override public function set width(value:Number):void
- {
- if (_width != value)
- {
- _width = value;
- dispatchEvent(new Event("widthChanged"));
- }
- }
- COMPILE::AS3
- protected function get $width():Number
- {
- return super.width;
- }
-
- COMPILE::AS3
- private var _height:Number = 0;
- COMPILE::AS3
- override public function get height():Number
- {
- return _height;
- }
- COMPILE::AS3
- override public function set height(value:Number):void
- {
- if (_height != value)
- {
- _height = value;
- dispatchEvent(new Event("heightChanged"));
- }
- }
- COMPILE::AS3
- protected function get $height():Number
- {
- return super.height;
- }
-
- COMPILE::AS3
- private var _model:IBeadModel;
- COMPILE::AS3
- public function get model():IBeadModel
- {
- return _model;
- }
- COMPILE::AS3
- public function set model(value:IBeadModel):void
- {
- if (_model != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("modelChanged"));
- }
- }
-
- private var _id:String;
- public function get id():String
- {
- return _id;
- }
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- // beads declared in MXML are added to the strand.
- // from AS, just call addBead()
- COMPILE::AS3
- public var beads:Array;
-
- COMPILE::AS3
- private var _beads:Vector.<IBead>;
- COMPILE::AS3
- override public function addBead(bead:IBead):void
- {
- if (!_beads)
- _beads = new Vector.<IBead>;
- _beads.push(bead);
- if (bead is IBeadModel)
- _model = bead as IBeadModel;
- bead.strand = this;
- }
-
- COMPILE::AS3
- public function getBeadByType(classOrInterface:Class):IBead
- {
- for each (var bead:IBead in _beads)
- {
- if (bead is classOrInterface)
- return bead;
- }
- return null;
- }
-
- COMPILE::AS3
- public function removeBead(value:IBead):IBead
- {
- var n:int = _beads.length;
- for (var i:int = 0; i < n; i++)
- {
- var bead:IBead = _beads[i];
- if (bead == value)
- {
- _beads.splice(i, 1);
- return bead;
- }
- }
- return null;
- }
-
- /**
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function get visible():Boolean
- {
- return (positioner as DisplayObject).visible;
- }
-
- /**
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function set visible(value:Boolean):void
- {
- var oldValue:Boolean = (positioner as DisplayObject).visible;
- if (value !== oldValue)
- {
- if (!value)
- {
- (positioner as DisplayObject).visible = value;
- dispatchEvent(new Event('hide'));
- }
- else
- {
- (positioner as DisplayObject).visible = value;
- dispatchEvent(new Event('show'));
- }
- dispatchEvent(new Event('visibleChanged'));
- }
- }
-
- /**
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function get alpha():Number
- {
- return (positioner as DisplayObject).alpha;
- }
-
- /**
- * @flexjsignorecoercion createjs.DisplayObject
- */
- COMPILE::JS
- public function set alpha(value:Number):void
- {
- (positioner as DisplayObject).alpha = value;
- }
-
- COMPILE::JS
- private var _positioner:WrappedHTMLElement;
-
- /**
- * The HTMLElement used to position the component.
- */
- COMPILE::JS
- public function get positioner():WrappedHTMLElement
- {
- return _positioner;
- }
-
- /**
- * @private
- */
- COMPILE::JS
- public function set positioner(value:WrappedHTMLElement):void
- {
- _positioner = value;
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion org.apache.flex.events.IEventDispatcher
- */
- public function get topMostEventDispatcher():IEventDispatcher
- {
- COMPILE::AS3
- {
- return null;
- }
- COMPILE::JS
- {
- var e:WrappedHTMLElement = document.body as WrappedHTMLElement;
- return e.flexjs_wrapper as IEventDispatcher;
- }
- }
-
- public function addedToParent():void
- {
-
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#element
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function get element():IFlexJSElement
- {
- return this;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as b/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
deleted file mode 100644
index 9fb19e8..0000000
--- a/frameworks/projects/CreateJS/as/src/org/apache/flex/createjs/core/ViewBase.as
+++ /dev/null
@@ -1,206 +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.createjs.core
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObject;
- import org.apache.flex.core.ViewBase;
- }
-
- import org.apache.flex.core.IApplicationView;
- import org.apache.flex.core.IParent;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- COMPILE::JS
- {
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IStatesImpl;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.states.State;
- }
-
- COMPILE::AS3
- public class ViewBase extends org.apache.flex.core.ViewBase
- {
-
- }
-
- [DefaultProperty("mxmlContent")]
- COMPILE::JS
- public class ViewBase extends UIBase implements IParent, IApplicationView
- {
- public function ViewBase()
- {
- super();
- }
-
- override public function addedToParent():void
- {
- /* AJH needed?
- MXMLDataInterpreter.generateMXMLProperties(this, MXMLProperties);
- */
- MXMLDataInterpreter.generateMXMLInstances(this, this, MXMLDescriptor);
- }
-
- public function get MXMLDescriptor():Array
- {
- return null;
- }
-
- /*
- public function get MXMLProperties():Array
- {
- return null;
- }
- */
-
- public var mxmlContent:Array;
-
- private var _applicationModel:Object;
-
- [Bindable("modelChanged")]
- public function get applicationModel():Object
- {
- return _applicationModel;
- }
-
- public function set applicationModel(value:Object):void
- {
- _applicationModel = value;
- dispatchEvent(new Event("modelChanged"));
- }
-
- private var _states:Array;
-
- /**
- * The array of view states. These should
- * be instances of org.apache.flex.states.State.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get states():Array
- {
- return _states;
- }
-
- /**
- * @private
- * @flexjsignorecoercion Class
- * @flexjsignorecoercion org.apache.flex.core.IBead
- */
- public function set states(value:Array):void
- {
- _states = value;
- _currentState = _states[0].name;
-
- try{
- if (getBeadByType(IStatesImpl) == null)
- {
- var c:Class = ValuesManager.valuesImpl.getValue(this, "iStatesImpl") as Class;
- var b:Object = new c();
- addBead(b as IBead);
- }
- }
- //TODO: Need to handle this case more gracefully
- catch(e:Error)
- {
- }
-
- }
-
- /**
- * <code>true</code> if the array of states
- * contains a state with this name.
- *
- * @param state The state namem.
- * @return True if state in state array
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function hasState(state:String):Boolean
- {
- for each (var s:State in _states)
- {
- if (s.name == state)
- return true;
- }
- return false;
- }
-
- private var _currentState:String;
-
- [Bindable("currentStateChange")]
- /**
- * The name of the current state.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get currentState():String
- {
- return _currentState;
- }
-
- /**
- * @private
- */
- public function set currentState(value:String):void
- {
- var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
- _currentState = value;
- dispatchEvent(event);
- }
-
- private var _transitions:Array;
-
- /**
- * The array of transitions.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get transitions():Array
- {
- return _transitions;
- }
-
- /**
- * @private
- */
- public function set transitions(value:Array):void
- {
- _transitions = value;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/compile-asjs-config.xml b/frameworks/projects/CreateJS/compile-asjs-config.xml
deleted file mode 100644
index 35c65b3..0000000
--- a/frameworks/projects/CreateJS/compile-asjs-config.xml
+++ /dev/null
@@ -1,83 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- </library-path>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>createjs-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <library-path>
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- </include-file>
-
- <include-sources>
- </include-sources>
-
- <include-classes>
- <class>CreateJSClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/createjs</uri>
- </include-namespaces>
-
- <!--<target-player>${playerglobal.version}</target-player>-->
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/compile-config.xml b/frameworks/projects/CreateJS/compile-config.xml
deleted file mode 100644
index 3aecfb2..0000000
--- a/frameworks/projects/CreateJS/compile-config.xml
+++ /dev/null
@@ -1,83 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/createjs</uri>
- <manifest>createjs-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>CreateJSClasses</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/createjs</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/createjs-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/createjs-manifest.xml b/frameworks/projects/CreateJS/createjs-manifest.xml
deleted file mode 100644
index 1c5a5ed..0000000
--- a/frameworks/projects/CreateJS/createjs-manifest.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
- <component id="Application" class="org.apache.flex.createjs.Application"/>
- <component id="UIBase" class="org.apache.flex.createjs.core.UIBase"/>
- <component id="ViewBase" class="org.apache.flex.createjs.core.ViewBase"/>
- <component id="Label" class="org.apache.flex.createjs.Label"/>
- <component id="TextButton" class="org.apache.flex.createjs.TextButton"/>
- <component id="CheckBox" class="org.apache.flex.createjs.CheckBox"/>
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/defaults.css b/frameworks/projects/CreateJS/src/defaults.css
new file mode 100644
index 0000000..55fa336
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/defaults.css
@@ -0,0 +1,36 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace createjs "library://ns.apache.org/flexjs/createjs";
+
+@media -flex-flash
+{
+
+createjs|TextButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.TextModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextButtonView");
+}
+
+createjs|CheckBox
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/CreateJSClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/CreateJSClasses.as b/frameworks/projects/CreateJS/src/main/flex/CreateJSClasses.as
new file mode 100644
index 0000000..eeafa52
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/CreateJSClasses.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class CreateJSClasses
+{
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
new file mode 100644
index 0000000..06ae1fb
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Application.as
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs
+{
+ import org.apache.flex.core.ApplicationBase;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IFlexInfo;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.IValuesImpl;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.createjs.core.ViewBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.core.WrappedHTMLElement;
+ import createjs.DisplayObject;
+ import createjs.Stage;
+ }
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched at startup.
+ */
+ [Event(name="initialize", type="org.apache.flex.events.Event")]
+
+ /**
+ * CreateJS Application
+ */
+ public class Application extends org.apache.flex.core.Application implements IStrand, IFlexInfo
+ {
+ /**
+ * FalconJX will inject html into the index.html file. Surround with
+ * "inject_html" tag as follows:
+ *
+ * <inject_html>
+ * <script src="https://code.createjs.com/easeljs-0.8.1.min.js"></script>
+ * </inject_html>
+ */
+ public function Application()
+ {
+ super();
+ }
+
+ COMPILE::JS
+ private var stage:Stage;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion HTMLBodyElement
+ * @flexjsignorecoercion HTMLCanvasElement
+ */
+ COMPILE::JS
+ override public function start():void
+ {
+ var body:HTMLBodyElement;
+ var canvas:HTMLCanvasElement;
+
+ // For createjs, the application is the same as the canvas
+ // and it provides convenient access to the stage.
+
+ element = document.createElement('canvas') as WrappedHTMLElement;
+ element.flexjs_wrapper = this;
+ canvas = element as HTMLCanvasElement;
+ canvas.id = 'flexjsCanvas';
+ canvas.width = 700;
+ canvas.height = 500;
+
+ body = document.getElementsByTagName('body')[0] as HTMLBodyElement;
+ body.appendChild(this.element);
+
+ stage = new createjs.Stage('flexjsCanvas');
+
+ /* AJH is this needed
+ MXMLDataInterpreter.generateMXMLProperties(this,
+ MXMLProperties);
+ */
+
+ dispatchEvent('initialize');
+
+ initialView.applicationModel = this.model;
+ addElement(initialView);
+
+ dispatchEvent('viewChanged');
+
+ stage.update();
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ override public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ stage.addChild(c.element as DisplayObject);
+ c.addedToParent();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
new file mode 100644
index 0000000..3ce2d50
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/CheckBox.as
@@ -0,0 +1,124 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.CheckBox;
+ }
+ COMPILE::JS
+ {
+ import createjs.Container;
+ import createjs.Shape;
+ import createjs.Stage;
+ import createjs.Text;
+
+ import org.apache.flex.createjs.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ import org.apache.flex.events.Event;
+ }
+
+ COMPILE::AS3
+ public class CheckBox extends org.apache.flex.html.CheckBox
+ {
+ }
+
+ COMPILE::JS
+ public class CheckBox extends UIBase
+ {
+ private var checkMark:Shape;
+ private var checkMarkBackground:Shape;
+ private var checkBoxLabel:Text;
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ override public function createElement():WrappedHTMLElement
+ {
+ checkMarkBackground = new createjs.Shape(null);
+ checkMarkBackground.name = 'checkmarkbackground';
+ checkMarkBackground.graphics.beginFill('red').
+ drawRoundRect(0, 0, 40, 40, 8);
+
+ checkMark = new createjs.Shape(null);
+ checkMark.name = 'checkmark';
+ checkMark.graphics.beginFill('white').drawRoundRect(0, 0, 32, 32, 6);
+ checkMark.x = 4;
+ checkMark.y = 4;
+ checkMark.visible = false;
+
+ checkBoxLabel = new createjs.Text('checkbox', '20px Arial', '#ff7700');
+ checkBoxLabel.name = 'label';
+ checkBoxLabel.textAlign = 'left';
+ checkBoxLabel.textBaseline = 'middle';
+ checkBoxLabel.x = 45;
+ checkBoxLabel.y = 40 / 2;
+
+ var container:createjs.Container = new createjs.Container();
+ element = container as WrappedHTMLElement;
+ container.name = 'checkbox';
+ container.addChild(this.checkMarkBackground);
+ container.addChild(this.checkBoxLabel);
+ container.addChild(this.checkMark);
+ container.onClick = clickHandler;
+
+ this.positioner = this.element;
+
+ return this.element;
+ }
+
+ public function get text():String
+ {
+ return checkBoxLabel.text;
+ }
+
+ public function set text(value:String):void
+ {
+ checkBoxLabel.text = value;
+ }
+
+ public function get selected():Boolean
+ {
+ return checkMark.visible;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ public function set selected(value:Boolean):void
+ {
+ checkMark.visible = value;
+ var stage:Stage = (element as Container).getStage();
+ if (stage)
+ stage.update();
+ }
+
+
+ /**
+ * @param event The event.
+ */
+ private function clickHandler(event:Event):void
+ {
+ selected = !selected;
+ }
+
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
new file mode 100644
index 0000000..3540599
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/Label.as
@@ -0,0 +1,81 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.html.Label;
+ }
+
+ COMPILE::JS
+ {
+ import createjs.Text;
+ import createjs.Stage;
+
+ import org.apache.flex.createjs.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ COMPILE::AS3
+ public class Label extends org.apache.flex.html.Label
+ {
+
+ }
+
+ COMPILE::JS
+ public class Label extends UIBase
+ {
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ override public function createElement():WrappedHTMLElement
+ {
+ var text:Text = new Text('default text', '20px Arial', '#ff7700');
+ text.x = 0;
+ text.y = 20;
+ text.textBaseline = 'alphabetic';
+
+ positioner = element = text as WrappedHTMLElement;
+ return element;
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Text
+ */
+ public function get text():String
+ {
+ return (element as Text).text;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Text
+ */
+ public function set text(value:String):void
+ {
+ var text:Text = element as Text;
+ text.text = value;
+ var stage:Stage = text.getStage();
+ if (stage)
+ stage.update();
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
new file mode 100644
index 0000000..f7a31f9
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/TextButton.as
@@ -0,0 +1,118 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs
+{
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.html.Button;
+ }
+ COMPILE::JS
+ {
+ import createjs.Container;
+ import createjs.Text;
+ import createjs.Shape;
+ import createjs.Stage;
+
+ import org.apache.flex.createjs.core.UIBase;
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ COMPILE::AS3
+ public class TextButton extends Button
+ {
+ public function TextButton()
+ {
+ super();
+ }
+
+ public function get text():String
+ {
+ return ITextModel(model).text;
+ }
+ public function set text(value:String):void
+ {
+ ITextModel(model).text = value;
+ }
+
+ public function get html():String
+ {
+ return ITextModel(model).html;
+ }
+ public function set html(value:String):void
+ {
+ ITextModel(model).html = value;
+ }
+
+ }
+
+ COMPILE::JS
+ public class TextButton extends UIBase
+ {
+ private var buttonBackground:Shape;
+ private var buttonLabel:Text;
+ private var button:Container;
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ override public function createElement():WrappedHTMLElement
+ {
+ buttonBackground = new createjs.Shape(null);
+ buttonBackground.name = 'background';
+ buttonBackground.graphics.beginFill('red').
+ drawRoundRect(0, 0, 200, 60, 10);
+
+ buttonLabel = new createjs.Text('button', 'bold 24px Arial',
+ '#FFFFFF');
+ buttonLabel.name = 'label';
+ buttonLabel.textAlign = 'center';
+ buttonLabel.textBaseline = 'middle';
+ buttonLabel.x = 200 / 2;
+ buttonLabel.y = 60 / 2;
+
+ button = new createjs.Container();
+ button.name = 'button';
+ button.x = 50;
+ button.y = 25;
+ button.addChild(buttonBackground);
+ button.addChild(buttonLabel);
+
+ positioner = element = button as WrappedHTMLElement;
+ element.flexjs_wrapper = this;
+ return element;
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Text
+ */
+ public function get text():String
+ {
+ return buttonLabel.text;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Text
+ */
+ public function set text(value:String):void
+ {
+ buttonLabel.text = value;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dd3df6f9/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
new file mode 100644
index 0000000..10f18ab
--- /dev/null
+++ b/frameworks/projects/CreateJS/src/main/flex/org/apache/flex/createjs/core/UIBase.as
@@ -0,0 +1,449 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.createjs.core
+{
+ import org.apache.flex.core.HTMLElementWrapper;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IFlexJSElement;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ COMPILE::JS
+ {
+ import createjs.Container;
+ import createjs.DisplayObject;
+ import createjs.Stage;
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
+
+ public class UIBase extends HTMLElementWrapper implements IStrand, IEventDispatcher, IUIBase, IFlexJSElement
+ {
+ public function UIBase()
+ {
+ super();
+ COMPILE::JS
+ {
+ createElement();
+ }
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ (element as Container).addChild(c.element as DisplayObject);
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ (element as Container).addChildAt(c.element as DisplayObject, index);
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function getElementIndex(c:Object):int
+ {
+ return (element as Container).getChildIndex(c.element as DisplayObject);
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ (element as Container).removeChild(c.element as DisplayObject);
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function getElementAt(index:int):Object
+ {
+ return (element as Container).getChildAt(index);
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function get numElements():int
+ {
+ return (element as Container).numChildren;
+ }
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ public function createElement():WrappedHTMLElement
+ {
+ element = new Container() as WrappedHTMLElement;
+
+ positioner = this.element;
+ return element;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function get x():Number
+ {
+ return (positioner as Container).x;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function set x(value:Number):void
+ {
+ var container:Container = positioner as Container;
+ container.x = value;
+ var stage:Stage = container.getStage();
+ if (stage)
+ stage.update();
+ }
+
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function get y():Number
+ {
+ return (positioner as Container).y;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function set y(value:Number):void
+ {
+ var container:Container = positioner as Container;
+ container.y = value;
+ var stage:Stage = container.getStage();
+ if (stage)
+ stage.update();
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function get width():Number
+ {
+ return (positioner as Container).width;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function set width(value:Number):void
+ {
+ var container:Container = positioner as Container;
+ container.width = value;
+ var stage:Stage = container.getStage();
+ if (stage)
+ stage.update();
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function get height():Number
+ {
+ return (positioner as Container).height;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.Container
+ */
+ COMPILE::JS
+ public function set height(value:Number):void
+ {
+ var container:Container = positioner as Container;
+ container.height = value;
+ var stage:Stage = container.getStage();
+ if (stage)
+ stage.update();
+ }
+
+ COMPILE::AS3
+ private var _width:Number = 0;
+ COMPILE::AS3
+ override public function get width():Number
+ {
+ return _width;
+ }
+
+ COMPILE::AS3
+ override public function set width(value:Number):void
+ {
+ if (_width != value)
+ {
+ _width = value;
+ dispatchEvent(new Event("widthChanged"));
+ }
+ }
+ COMPILE::AS3
+ protected function get $width():Number
+ {
+ return super.width;
+ }
+
+ COMPILE::AS3
+ private var _height:Number = 0;
+ COMPILE::AS3
+ override public function get height():Number
+ {
+ return _height;
+ }
+ COMPILE::AS3
+ override public function set height(value:Number):void
+ {
+ if (_height != value)
+ {
+ _height = value;
+ dispatchEvent(new Event("heightChanged"));
+ }
+ }
+ COMPILE::AS3
+ protected function get $height():Number
+ {
+ return super.height;
+ }
+
+ COMPILE::AS3
+ private var _model:IBeadModel;
+ COMPILE::AS3
+ public function get model():IBeadModel
+ {
+ return _model;
+ }
+ COMPILE::AS3
+ public function set model(value:IBeadModel):void
+ {
+ if (_model != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("modelChanged"));
+ }
+ }
+
+ private var _id:String;
+ public function get id():String
+ {
+ return _id;
+ }
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ // beads declared in MXML are added to the strand.
+ // from AS, just call addBead()
+ COMPILE::AS3
+ public var beads:Array;
+
+ COMPILE::AS3
+ private var _beads:Vector.<IBead>;
+ COMPILE::AS3
+ override public function addBead(bead:IBead):void
+ {
+ if (!_beads)
+ _beads = new Vector.<IBead>;
+ _beads.push(bead);
+ if (bead is IBeadModel)
+ _model = bead as IBeadModel;
+ bead.strand = this;
+ }
+
+ COMPILE::AS3
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in _beads)
+ {
+ if (bead is classOrInterface)
+ return bead;
+ }
+ return null;
+ }
+
+ COMPILE::AS3
+ public function removeBead(value:IBead):IBead
+ {
+ var n:int = _beads.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var bead:IBead = _beads[i];
+ if (bead == value)
+ {
+ _beads.splice(i, 1);
+ return bead;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function get visible():Boolean
+ {
+ return (positioner as DisplayObject).visible;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function set visible(value:Boolean):void
+ {
+ var oldValue:Boolean = (positioner as DisplayObject).visible;
+ if (value !== oldValue)
+ {
+ if (!value)
+ {
+ (positioner as DisplayObject).visible = value;
+ dispatchEvent(new Event('hide'));
+ }
+ else
+ {
+ (positioner as DisplayObject).visible = value;
+ dispatchEvent(new Event('show'));
+ }
+ dispatchEvent(new Event('visibleChanged'));
+ }
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function get alpha():Number
+ {
+ return (positioner as DisplayObject).alpha;
+ }
+
+ /**
+ * @flexjsignorecoercion createjs.DisplayObject
+ */
+ COMPILE::JS
+ public function set alpha(value:Number):void
+ {
+ (positioner as DisplayObject).alpha = value;
+ }
+
+ COMPILE::JS
+ private var _positioner:WrappedHTMLElement;
+
+ /**
+ * The HTMLElement used to position the component.
+ */
+ COMPILE::JS
+ public function get positioner():WrappedHTMLElement
+ {
+ return _positioner;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::JS
+ public function set positioner(value:WrappedHTMLElement):void
+ {
+ _positioner = value;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion org.apache.flex.events.IEventDispatcher
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ COMPILE::AS3
+ {
+ return null;
+ }
+ COMPILE::JS
+ {
+ var e:WrappedHTMLElement = document.body as WrappedHTMLElement;
+ return e.flexjs_wrapper as IEventDispatcher;
+ }
+ }
+
+ public function addedToParent():void
+ {
+
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#element
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function get element():IFlexJSElement
+ {
+ return this;
+ }
+
+ }
+}
[20/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/event.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/event.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/event.as
new file mode 100644
index 0000000..2a67d02
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/event.as
@@ -0,0 +1,83 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class event {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function event():void { }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @param var_args [*]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public static function trigger(instance:Object, eventName:String, ...var_args):Object /* undefined */ { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public static function clearInstanceListeners(instance:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @param handler [Function]
+ * @param opt_capture [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapsEventListener|null)}
+ */
+ public static function addDomListenerOnce(instance:Object, eventName:String, handler:Function /* Function */, opt_capture:Boolean = false):google.maps.MapsEventListener { return null; }
+
+ /**
+ * @param listener [(google.maps.MapsEventListener|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public static function removeListener(listener:google.maps.MapsEventListener):Object /* undefined */ { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @param handler [Function]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapsEventListener|null)}
+ */
+ public static function addListener(instance:Object, eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @param handler [Function]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapsEventListener|null)}
+ */
+ public static function addListenerOnce(instance:Object, eventName:String, handler:Function /* Function */):google.maps.MapsEventListener { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public static function clearListeners(instance:Object, eventName:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param instance [(Object|null)]
+ * @param eventName [string]
+ * @param handler [Function]
+ * @param opt_capture [(boolean|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MapsEventListener|null)}
+ */
+ public static function addDomListener(instance:Object, eventName:String, handler:Function /* Function */, opt_capture:Boolean = false):google.maps.MapsEventListener { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry.as
new file mode 100644
index 0000000..5d72731
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry.as
@@ -0,0 +1,33 @@
+package google.maps {
+
+import google.maps.geometry.spherical;
+import google.maps.geometry.encoding;
+import google.maps.geometry.poly;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class geometry {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function geometry():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var poly:google.maps.geometry.poly;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var encoding:google.maps.geometry.encoding;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var spherical:google.maps.geometry.spherical;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/encoding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/encoding.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/encoding.as
new file mode 100644
index 0000000..c88b290
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/encoding.as
@@ -0,0 +1,28 @@
+package google.maps.geometry {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class encoding {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function encoding():void { }
+
+ /**
+ * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public static function encodePath(path:Object):String { return null; }
+
+ /**
+ * @param encodedPath [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {(Array<(google.maps.LatLng|null)>|null)}
+ */
+ public static function decodePath(encodedPath:String):Array { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/poly.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/poly.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/poly.as
new file mode 100644
index 0000000..573db4d
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/poly.as
@@ -0,0 +1,34 @@
+package google.maps.geometry {
+
+import google.maps.LatLng;
+import google.maps.Polygon;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class poly {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function poly():void { }
+
+ /**
+ * @param point [(google.maps.LatLng|null)]
+ * @param polygon [(google.maps.Polygon|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public static function containsLocation(point:google.maps.LatLng, polygon:google.maps.Polygon):Boolean { return null; }
+
+ /**
+ * @param point [(google.maps.LatLng|null)]
+ * @param poly [(google.maps.Polygon|google.maps.Polyline|null)]
+ * @param opt_tolerance [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {boolean}
+ */
+ public static function isLocationOnEdge(point:google.maps.LatLng, poly:Object, opt_tolerance:Number = 0):Boolean { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/spherical.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/spherical.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/spherical.as
new file mode 100644
index 0000000..78dbb08
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/geometry/spherical.as
@@ -0,0 +1,86 @@
+package google.maps.geometry {
+
+import google.maps.LatLng;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class spherical {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function spherical():void { }
+
+ /**
+ * @param from [(google.maps.LatLng|null)]
+ * @param distance [number]
+ * @param heading [number]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public static function computeOffset(from:google.maps.LatLng, distance:Number, heading:Number, opt_radius:Number = 0):google.maps.LatLng { return null; }
+
+ /**
+ * @param from [(google.maps.LatLng|null)]
+ * @param to [(google.maps.LatLng|null)]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public static function computeDistanceBetween(from:google.maps.LatLng, to:google.maps.LatLng, opt_radius:Number = 0):Number { return 0; }
+
+ /**
+ * @param to [(google.maps.LatLng|null)]
+ * @param distance [number]
+ * @param heading [number]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public static function computeOffsetOrigin(to:google.maps.LatLng, distance:Number, heading:Number, opt_radius:Number = 0):google.maps.LatLng { return null; }
+
+ /**
+ * @param from [(google.maps.LatLng|null)]
+ * @param to [(google.maps.LatLng|null)]
+ * @param fraction [number]
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLng|null)}
+ */
+ public static function interpolate(from:google.maps.LatLng, to:google.maps.LatLng, fraction:Number):google.maps.LatLng { return null; }
+
+ /**
+ * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public static function computeLength(path:Object, opt_radius:Number = 0):Number { return 0; }
+
+ /**
+ * @param loop [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public static function computeSignedArea(loop:Object, opt_radius:Number = 0):Number { return 0; }
+
+ /**
+ * @param from [(google.maps.LatLng|null)]
+ * @param to [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public static function computeHeading(from:google.maps.LatLng, to:google.maps.LatLng):Number { return 0; }
+
+ /**
+ * @param path [(Array<(google.maps.LatLng|null)>|google.maps.MVCArray|null)]
+ * @param opt_radius [(number|undefined)]
+ * @see [google_maps_api_v3_11]
+ * @returns {number}
+ */
+ public static function computeArea(path:Object, opt_radius:Number = 0):Number { return 0; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio.as
new file mode 100644
index 0000000..25ebe7a
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio.as
@@ -0,0 +1,30 @@
+package google.maps {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class panoramio {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function panoramio():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PanoramioLayerOptions():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PanoramioMouseEvent():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PanoramioFeature():void { }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio/PanoramioLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio/PanoramioLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio/PanoramioLayer.as
new file mode 100644
index 0000000..a6bd5ff
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/panoramio/PanoramioLayer.as
@@ -0,0 +1,66 @@
+package google.maps.panoramio {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class PanoramioLayer extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.panoramio.PanoramioLayerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function PanoramioLayer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @param userId [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setUserId(userId:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param tag [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setTag(tag:String):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getUserId():String { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.panoramio.PanoramioLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getTag():String { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places.as
new file mode 100644
index 0000000..0706b50
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places.as
@@ -0,0 +1,103 @@
+package google.maps {
+
+import google.maps.places.RankBy;
+import google.maps.places.PlacesServiceStatus;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class places {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function places():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var RankBy:google.maps.places.RankBy;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var PlacesServiceStatus:google.maps.places.PlacesServiceStatus;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function TextSearchRequest():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PredictionSubstring():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function AutocompletionRequest():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PlaceDetailsRequest():void { }
+
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PredictionTerm():void { }
+
+
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function AutocompleteOptions():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function SearchBoxOptions():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PlacePhoto():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function QueryAutocompletePrediction():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function QueryAutocompletionRequest():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function AutocompletePrediction():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function PlaceSearchRequest():void { }
+
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function RadarSearchRequest():void { }
+
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/Autocomplete.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/Autocomplete.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/Autocomplete.as
new file mode 100644
index 0000000..e1bf0f0
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/Autocomplete.as
@@ -0,0 +1,55 @@
+package google.maps.places {
+
+import google.maps.MVCObject;
+import google.maps.LatLngBounds;
+import google.pseudo.HTMLInputElement;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class Autocomplete extends google.maps.MVCObject {
+
+ /**
+ * @param inputField [(HTMLInputElement|null)]
+ * @param opt_opts [(Object<?,string>|google.maps.places.AutocompleteOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function Autocomplete(inputField:HTMLInputElement, opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @param restrictions [(google.maps.places.ComponentRestrictions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setComponentRestrictions(restrictions:google.maps.places.ComponentRestrictions):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param bounds [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
+
+ /**
+ * @param types [(Array<string>|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setTypes(types:Array):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.places.PlaceResult|null)}
+ */
+ public function getPlace():google.maps.places.PlaceResult { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/AutocompleteService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/AutocompleteService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/AutocompleteService.as
new file mode 100644
index 0000000..48399b4
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/AutocompleteService.as
@@ -0,0 +1,32 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class AutocompleteService {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function AutocompleteService() {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.AutocompletionRequest|null)]
+ * @param callback [function ((Array<(google.maps.places.AutocompletePrediction|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getPlacePredictions(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.QueryAutocompletionRequest|null)]
+ * @param callback [function ((Array<(google.maps.places.QueryAutocompletePrediction|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getQueryPredictions(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/ComponentRestrictions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/ComponentRestrictions.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/ComponentRestrictions.as
new file mode 100644
index 0000000..7168e10
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/ComponentRestrictions.as
@@ -0,0 +1,22 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class ComponentRestrictions {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function ComponentRestrictions() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var country:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PhotoOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PhotoOptions.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PhotoOptions.as
new file mode 100644
index 0000000..b241e72
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PhotoOptions.as
@@ -0,0 +1,28 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PhotoOptions {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PhotoOptions() {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var maxWidth:Number;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var maxHeight:Number;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceAspectRating.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceAspectRating.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceAspectRating.as
new file mode 100644
index 0000000..f358773
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceAspectRating.as
@@ -0,0 +1,28 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlaceAspectRating {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlaceAspectRating() {
+ super();
+ }
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var rating:Number;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var type:String;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceGeometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceGeometry.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceGeometry.as
new file mode 100644
index 0000000..dedf940
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceGeometry.as
@@ -0,0 +1,31 @@
+package google.maps.places {
+
+import google.maps.LatLng;
+import google.maps.LatLngBounds;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlaceGeometry {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlaceGeometry() {
+ super();
+ }
+
+ /**
+ * @see JSType - [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var viewport:google.maps.LatLngBounds;
+
+ /**
+ * @see JSType - [(google.maps.LatLng|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var location:google.maps.LatLng;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceResult.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceResult.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceResult.as
new file mode 100644
index 0000000..141b4e9
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceResult.as
@@ -0,0 +1,142 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlaceResult {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlaceResult() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var icon:String;
+
+ /**
+ * @see JSType - [(Array((google.maps.places.PlaceReview|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var reviews:Array;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var website:String;
+
+ /**
+ * @see JSType - [(Array((google.maps.places.PlaceAspectRating|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var aspects:Array;
+
+ /**
+ * @see JSType - [boolean]
+ * @see [google_maps_api_v3_11]
+ */
+ public var permanently_closed:Boolean;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var review_summary:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var international_phone_number:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var url:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var reference:String;
+
+ /**
+ * @see JSType - [(google.maps.places.PlaceGeometry|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var geometry:google.maps.places.PlaceGeometry;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var price_level:Number;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var id:String;
+
+ /**
+ * @see JSType - [(Array((google.maps.places.PlacePhoto|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var photos:Array;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var vicinity:String;
+
+ /**
+ * @see JSType - [(Array(string)|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var html_attributions:Array;
+
+ /**
+ * @see JSType - [(Array((google.maps.GeocoderAddressComponent|null))|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var address_components:Array;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var name:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var formatted_address:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var formatted_phone_number:String;
+
+ /**
+ * @see JSType - [number]
+ * @see [google_maps_api_v3_11]
+ */
+ public var rating:Number;
+
+ /**
+ * @see JSType - [(Array(string)|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var types:Array;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceReview.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceReview.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceReview.as
new file mode 100644
index 0000000..daf9a63
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceReview.as
@@ -0,0 +1,40 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlaceReview {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlaceReview() {
+ super();
+ }
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var text:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var author_url:String;
+
+ /**
+ * @see JSType - [string]
+ * @see [google_maps_api_v3_11]
+ */
+ public var author_name:String;
+
+ /**
+ * @see JSType - [(Array(google.maps.places.PlaceAspectRating|null)|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public var aspects:Array;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceSearchPagination.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceSearchPagination.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceSearchPagination.as
new file mode 100644
index 0000000..376e07f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlaceSearchPagination.as
@@ -0,0 +1,28 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlaceSearchPagination {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlaceSearchPagination() {
+ super();
+ }
+
+ /**
+ * @see JSType - [boolean]
+ * @see [google_maps_api_v3_11]
+ */
+ public var hasNextPage:Boolean;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function nextPage():Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesService.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesService.as
new file mode 100644
index 0000000..e8c5a5a
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesService.as
@@ -0,0 +1,49 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlacesService {
+
+ /**
+ * @param attrContainer [(HTMLDivElement|google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function PlacesService(attrContainer:Object) {
+ super();
+ }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.PlaceDetailsRequest|null)]
+ * @param callback [function ((google.maps.places.PlaceResult|null), (google.maps.places.PlacesServiceStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function getDetails(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.RadarSearchRequest|null)]
+ * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function radarSearch(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.PlaceSearchRequest|null)]
+ * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null), (google.maps.places.PlaceSearchPagination|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function nearbySearch(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param request [(Object<?,string>|google.maps.places.TextSearchRequest|null)]
+ * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function textSearch(request:Object, callback:Object):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesServiceStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesServiceStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesServiceStatus.as
new file mode 100644
index 0000000..94b4702
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/PlacesServiceStatus.as
@@ -0,0 +1,52 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class PlacesServiceStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OVER_QUERY_LIMIT:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const REQUEST_DENIED:String = '4';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const ZERO_RESULTS:String = '';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_REQUEST:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '5';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/RankBy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/RankBy.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/RankBy.as
new file mode 100644
index 0000000..a744e12
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/RankBy.as
@@ -0,0 +1,24 @@
+package google.maps.places {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class RankBy {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const DISTANCE:Number = 0;
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const PROMINENCE:Number = 1;
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/SearchBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/SearchBox.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/SearchBox.as
new file mode 100644
index 0000000..20ae004
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/places/SearchBox.as
@@ -0,0 +1,42 @@
+package google.maps.places {
+
+import google.maps.MVCObject;
+import google.maps.LatLngBounds;
+import google.pseudo.Node;
+import google.pseudo.HTMLInputElement;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class SearchBox extends google.maps.MVCObject {
+
+ /**
+ * @param inputField [(HTMLInputElement|null)]
+ * @param opt_opts [(Object<?,string>|google.maps.places.SearchBoxOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function SearchBox(inputField:HTMLInputElement, opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Array<(google.maps.places.PlaceResult|null)>|null)}
+ */
+ public function getPlaces():Array { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.LatLngBounds|null)}
+ */
+ public function getBounds():google.maps.LatLngBounds { return null; }
+
+ /**
+ * @param bounds [(google.maps.LatLngBounds|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization.as
new file mode 100644
index 0000000..0547a3f
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization.as
@@ -0,0 +1,74 @@
+package google.maps {
+
+import google.maps.visualization.MapsEngineStatus;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class visualization {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function visualization():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var MapsEngineStatus:google.maps.visualization.MapsEngineStatus;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DemographicsLayerOptions():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function HeatmapLayerOptions():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DemographicsStyle():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function MapsEngineLayerOptions():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DemographicsPolygonOptions():void { }
+
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DemographicsQuery():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function MapsEngineLayerProperties():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeightedLocation():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function DemographicsPropertyStyle():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function MapsEngineMouseEvent():void { }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/DemographicsLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/DemographicsLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/DemographicsLayer.as
new file mode 100644
index 0000000..d4e8bc3
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/DemographicsLayer.as
@@ -0,0 +1,65 @@
+package google.maps.visualization {
+
+import google.maps.Map;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class DemographicsLayer {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.visualization.DemographicsLayerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function DemographicsLayer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.visualization.DemographicsQuery|null)}
+ */
+ public function getQuery():google.maps.visualization.DemographicsQuery { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.visualization.DemographicsLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param query [(google.maps.visualization.DemographicsQuery|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setQuery(query:google.maps.visualization.DemographicsQuery):Object /* undefined */ { return null; }
+
+ /**
+ * @param style [(Array<(google.maps.visualization.DemographicsStyle|null)>|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setStyle(style:Array):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(Array<(google.maps.visualization.DemographicsStyle|null)>|null)}
+ */
+ public function getStyle():Array { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/HeatmapLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/HeatmapLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/HeatmapLayer.as
new file mode 100644
index 0000000..8de2728
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/HeatmapLayer.as
@@ -0,0 +1,47 @@
+package google.maps.visualization {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+import google.maps.MVCArray;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class HeatmapLayer extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.visualization.HeatmapLayerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function HeatmapLayer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.MVCArray|null)}
+ */
+ public function getData():google.maps.MVCArray { return null; }
+
+ /**
+ * @param data [(Array<(google.maps.LatLng|google.maps.visualization.WeightedLocation|null)>|google.maps.MVCArray|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setData(data:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineLayer.as
new file mode 100644
index 0000000..561df98
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineLayer.as
@@ -0,0 +1,91 @@
+package google.maps.visualization {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class MapsEngineLayer extends google.maps.MVCObject {
+
+ /**
+ * @param options [(Object<?,string>|google.maps.visualization.MapsEngineLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function MapsEngineLayer(options:Object) {
+ super();
+ }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.visualization.MapsEngineStatus|null)}
+ */
+ public function getStatus():google.maps.visualization.MapsEngineStatus { return null; }
+
+ /**
+ * @param layerId [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setLayerId(layerId:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.visualization.MapsEngineLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param layerKey [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setLayerKey(layerKey:String):Object /* undefined */ { return null; }
+
+ /**
+ * @param mapId [string]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMapId(mapId:String):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getMapId():String { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.visualization.MapsEngineLayerProperties|null)}
+ */
+ public function getProperties():google.maps.visualization.MapsEngineLayerProperties { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getLayerKey():String { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {string}
+ */
+ public function getLayerId():String { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineStatus.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineStatus.as
new file mode 100644
index 0000000..68a2adc
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/visualization/MapsEngineStatus.as
@@ -0,0 +1,31 @@
+package google.maps.visualization {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class MapsEngineStatus {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const OK:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const UNKNOWN_ERROR:String = '3';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const INVALID_LAYER:String = '1';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather.as
new file mode 100644
index 0000000..d995229
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather.as
@@ -0,0 +1,60 @@
+package google.maps {
+
+import google.maps.weather.WindSpeedUnit;
+import google.maps.weather.LabelColor;
+import google.maps.weather.TemperatureUnit;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class weather {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function weather():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var TemperatureUnit:google.maps.weather.TemperatureUnit;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var LabelColor:google.maps.weather.LabelColor;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public var WindSpeedUnit:google.maps.weather.WindSpeedUnit;
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeatherMouseEvent():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeatherForecast():void { }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeatherConditions():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeatherFeature():void { }
+
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public static function WeatherLayerOptions():void { }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/CloudLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/CloudLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/CloudLayer.as
new file mode 100644
index 0000000..9914927
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/CloudLayer.as
@@ -0,0 +1,32 @@
+package google.maps.weather {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class CloudLayer extends google.maps.MVCObject {
+
+ /**
+ * @see [google_maps_api_v3_11]
+ */
+ public function CloudLayer() {
+ super();
+ }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/LabelColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/LabelColor.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/LabelColor.as
new file mode 100644
index 0000000..a46098b
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/LabelColor.as
@@ -0,0 +1,24 @@
+package google.maps.weather {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class LabelColor {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const WHITE:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const BLACK:String = '1';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/TemperatureUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/TemperatureUnit.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/TemperatureUnit.as
new file mode 100644
index 0000000..f7a49e1
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/TemperatureUnit.as
@@ -0,0 +1,24 @@
+package google.maps.weather {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class TemperatureUnit {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const CELSIUS:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const FAHRENHEIT:String = '2';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WeatherLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WeatherLayer.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WeatherLayer.as
new file mode 100644
index 0000000..b76c968
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WeatherLayer.as
@@ -0,0 +1,40 @@
+package google.maps.weather {
+
+import google.maps.Map;
+import google.maps.MVCObject;
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor extends google.maps.MVCObject */
+public class WeatherLayer extends google.maps.MVCObject {
+
+ /**
+ * @param opt_opts [(Object<?,string>|google.maps.weather.WeatherLayerOptions|null|undefined)]
+ * @see [google_maps_api_v3_11]
+ */
+ public function WeatherLayer(opt_opts:Object = null) {
+ super();
+ }
+
+ /**
+ * @param options [(Object<?,string>|google.maps.weather.WeatherLayerOptions|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setOptions(options:Object):Object /* undefined */ { return null; }
+
+ /**
+ * @param map [(google.maps.Map|null)]
+ * @see [google_maps_api_v3_11]
+ * @returns {undefined}
+ */
+ public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
+
+ /**
+ * @see [google_maps_api_v3_11]
+ * @returns {(google.maps.Map|null)}
+ */
+ public function getMap():google.maps.Map { return null; }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WindSpeedUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WindSpeedUnit.as b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WindSpeedUnit.as
new file mode 100644
index 0000000..a4aaaab
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/google/maps/weather/WindSpeedUnit.as
@@ -0,0 +1,31 @@
+package google.maps.weather {
+
+/**
+ * @see [google_maps_api_v3_11]
+ * @constructor */
+public class WindSpeedUnit {
+
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const METERS_PER_SECOND:String = '2';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const KILOMETERS_PER_HOUR:String = '1';
+
+ /**
+ * Generated doc for missing field JSDoc.
+ *
+ * @see [google_maps_api_v3_11]
+ */
+ public static const MILES_PER_HOUR:String = '3';
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/GoogleMap.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/GoogleMap.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/GoogleMap.as
new file mode 100644
index 0000000..a4e0fcb
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/GoogleMap.as
@@ -0,0 +1,133 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.maps.google
+{
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.maps.google.beads.GoogleMapView;
+ import org.apache.flex.maps.google.models.MapModel;
+
+ import google.maps.LatLng;
+ import google.maps.Marker;
+
+ [Event(name="ready", type="org.apache.flex.events.Event")]
+ [Event(name="centered", type="org.apache.flex.events.Event")]
+ [Event(name="boundsChanged", type="org.apache.flex.events.Event")]
+ [Event(name="zoomChanged", type="org.apache.flex.events.Event")]
+ [Event(name="dragEnd", type="org.apache.flex.events.Event")]
+ [Event(name="searchResult", type="org.apache.flex.events.Event")]
+ [Event(name="markerClicked", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * The Map class displays a Google Map centered on lat/lng coordinates. The Map uses
+ * the following bead type:
+ *
+ * org.apache.flex.maps.beads.MapView: Uses HTMLLoader to display the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignoreimport goog.bind
+ * @flexjsignoreimport google.maps.event
+ */
+ public class GoogleMap extends UIBase
+ {
+
+ public function GoogleMap()
+ {
+ super();
+
+ className = "Map";
+
+ var model:IBeadModel = getBeadByType(IBeadModel) as IBeadModel;
+ if (model == null) {
+ model = new MapModel();
+ addBead(model);
+ }
+ }
+
+ public function get token():String
+ {
+ return MapModel(model).token;
+ }
+ public function set token(value:String):void
+ {
+ MapModel(model).token = value;
+ }
+
+ public function get selectedMarker():Marker
+ {
+ return MapModel(model).selectedMarker;
+ }
+
+ public function get searchResults():Array
+ {
+ return MapModel(model).searchResults;
+ }
+
+ public function loadMap( centerLat:Number, centerLong:Number, zoom:Number ) : void
+ {
+ GoogleMapView(view).mapit(centerLat, centerLong, zoom);
+ }
+
+ public function setZoom(zoomLevel:Number):void
+ {
+ MapModel(model).zoom = zoomLevel;
+ }
+
+ public function centerOnAddress(address:String):void
+ {
+ GoogleMapView(view).centerOnAddress(address);
+ }
+
+ public function setCenter(location:LatLng):void
+ {
+ GoogleMapView(view).setCenter(location);
+ }
+
+ public function markCurrentLocation():void
+ {
+ GoogleMapView(view).markCurrentLocation();
+ }
+
+ public function markAddress(address:String):void
+ {
+ GoogleMapView(view).markAddress(address);
+ }
+
+ public function createMarker(location:LatLng):Marker
+ {
+ return GoogleMapView(view).createMarker(location);
+ }
+
+ public function nearbySearch(placeName:String):void
+ {
+ GoogleMapView(view).nearbySearch(placeName);
+ }
+
+ public function clearSearchResults():void
+ {
+ GoogleMapView(view).clearSearchResults();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
new file mode 100644
index 0000000..304c984
--- /dev/null
+++ b/frameworks/projects/GoogleMaps/src/main/flex/org/apache/flex/maps/google/beads/GoogleMapView.as
@@ -0,0 +1,866 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.maps.google.beads
+{
+ COMPILE::AS3 {
+ import flash.events.Event;
+ import flash.net.URLRequest;
+ import flash.filesystem.File;
+ import flash.filesystem.FileMode;
+ import flash.filesystem.FileStream;
+
+ import org.apache.flex.utils.HTMLLoader;
+ }
+
+ import org.apache.flex.core.BeadViewBase;
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.maps.google.GoogleMap;
+ import org.apache.flex.maps.google.models.MapModel;
+
+ COMPILE::JS {
+ import goog.bind;
+ }
+
+ import google.maps.event;
+ import google.maps.Geocoder;
+ import google.maps.GeocoderResult;
+ import google.maps.GeocoderStatus;
+ import google.maps.LatLng;
+ import google.maps.Map;
+ import google.maps.Marker;
+ import google.maps.places.PlaceResult;
+ import google.maps.places.PlacesService;
+ import google.maps.places.PlacesServiceStatus;
+
+ /**
+ * The MapView bead class displays a Google Map using HTMLLoader.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ public class GoogleMapView extends BeadViewBase implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function GoogleMapView()
+ {
+ super();
+ }
+
+ private var realMap:Map;
+ private var geocoder:Geocoder;
+ private var initialized:Boolean = false;
+ private var markers:Array;
+ private var searchResults:Array;
+ private var service:PlacesService;
+
+ 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
+ */
+ override public function set strand(value:IStrand):void
+ {
+ super.strand = value;
+ _strand = value;
+
+ var token:String = (_strand as GoogleMap).token;
+ var src:String = 'https://maps.googleapis.com/maps/api/js?v=3.exp';
+ if (token)
+ src += '&key=' + token;
+ src += '&libraries=geometry,places&callback=mapInit';
+
+ var script:HTMLScriptElement = document.createElement('script') as HTMLScriptElement;
+ script.type = 'text/javascript';
+ script.src = src;
+
+ window['mapView'] = this;
+ window['mapInit'] = function():void {
+ (this['mapView'] as GoogleMapView).finishInitialization();
+ }
+
+ document.head.appendChild(script);
+ }
+
+ /**
+ * Adjusts the map to the given coordinate and zoom level.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function mapit( centerLat:Number, centerLng:Number, zoom:Number ):void
+ {
+ if (!initialized) {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.currentCenter = new LatLng(centerLat, centerLng);
+ model.zoom = zoom;
+ var mapOptions:Object = new Object();
+ mapOptions['center'] = model.currentCenter;
+ mapOptions['zoom'] = zoom;
+
+ realMap = new Map((_strand as UIBase).element, mapOptions);
+ geocoder = null;
+
+ model.addEventListener("zoomChanged", handleModelChange);
+
+ google.maps.event.addListener(realMap, 'center_changed', goog.bind(centerChangeHandler, this));
+ google.maps.event.addListener(realMap, 'bounds_changed', goog.bind(boundsChangeHandler, this));
+ google.maps.event.addListener(realMap, 'zoom_changed', goog.bind(zoomChangeHandler, this));
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function finishInitialization():void
+ {
+ mapit(37.333, -121.900, 12);
+ initialized = true;
+ dispatchEvent(new Event('ready'));
+ }
+
+ /**
+ * Centers the map on the address given.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function centerOnAddress(value:String):void
+ {
+ if (geocoder == null) geocoder = new Geocoder();
+ geocoder.geocode({address:value}, positionHandler);
+ }
+
+ /**
+ * Sets the center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setCenter(location:LatLng):void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.currentCenter = new LatLng(location.lat(), location.lng());
+ realMap.setCenter(model.currentCenter);
+ }
+
+ /**
+ * Marks the current center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function markCurrentLocation():void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ createMarker(model.currentCenter as LatLng);
+ }
+
+ /**
+ * Finds the given address and places a marker on it. This function may be dropped
+ * since centerOnAddress + markCurrentLocation does the same thing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function markAddress(address:String):void
+ {
+ if (initialized) {
+ if (geocoder == null) geocoder = new Geocoder();
+ geocoder.geocode({address:address}, geocodeHandler);
+ }
+ }
+
+ /**
+ * Creates a marker for placement on the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion google.maps.Marker
+ */
+ public function createMarker(location:LatLng):Marker
+ {
+ var marker:Marker = new Marker({map:realMap, position:location});
+ // google.maps.event.addListener(marker, 'click', goog.bind(markerClicked, this));
+ marker.addListener('click', markerClicked);
+
+ return marker;
+ }
+
+ /**
+ * Performs a search near the center of map. The result is a set of
+ * markers displayed on the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function nearbySearch(placeName:String):void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+
+ if (markers == null) markers = [];
+ service = new PlacesService(realMap);
+ service.nearbySearch({location:model.currentCenter, radius:5000, name:placeName}, searchResultsHandler);
+ }
+
+ /**
+ * Clears the previous search results.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function clearSearchResults():void
+ {
+ if (markers) {
+ for(var i:int=0; i < markers.length; i++) {
+ var m:Marker = markers[i] as Marker;
+ m.setMap(null);
+ }
+ markers = null;
+ }
+ }
+
+ // Callbacks
+
+ /**
+ * @private
+ */
+ public function centerChangeHandler() : void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.currentCenter = realMap.getCenter();
+
+ var newEvent:Event = new Event('centered');
+ (_strand as IEventDispatcher).dispatchEvent(newEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function boundsChangeHandler():void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.currentCenter = realMap.getCenter();
+
+ var newEvent:Event = new Event('boundsChanged');
+ (_strand as IEventDispatcher).dispatchEvent(newEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function zoomChangeHandler():void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.currentCenter = realMap.getCenter();
+
+ var newEvent:Event = new Event('zoomChanged');
+ (_strand as IEventDispatcher).dispatchEvent(newEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function positionHandler(results:Array, status:String):void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ if (status == GeocoderStatus.OK) {
+ model.currentCenter = results[0].geometry.location;
+ realMap.setCenter(model.currentCenter);
+
+ // dispatch an event to indicate the map has been centered
+ }
+ }
+
+ /**
+ * @flexjsignorecoercion google.maps.Marker
+ * @flexjsignorecoercion google.maps.LatLng
+ */
+ public function geocodeHandler(results:Array, status:String):void
+ {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ if (status == GeocoderStatus.OK) {
+ model.currentCenter = results[0].geometry.location;
+ realMap.setCenter(model.currentCenter);
+
+ var marker:Marker = new Marker({map:realMap, position:model.currentCenter});
+ }
+ }
+
+ /**
+ * @private
+ */
+ public function searchResultsHandler(results:Array, status:String):void
+ {
+ searchResults = [];
+ if (status == PlacesServiceStatus.OK) {
+ for(var i:int=0; i < results.length; i++) {
+ /*var place:PlaceResult = new PlaceResult();
+ place.geometry.location = new LatLng(results[i].geometry.location.lat(), results[i].geometry.location.lng());
+ place.icon = results[i].icon;
+ place.id = results[i].id;
+ place.name = results[i].name;
+ place.reference = results[i].reference;
+ place.vicinity = results[i].vicinity;*/
+ var place:Object = results[i];
+ searchResults.push(place);
+
+ var marker:Marker = createMarker(place.geometry.location);
+ marker.setTitle(place.name);
+
+ markers.push(marker);
+ }
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.searchResults = searchResults;
+ }
+ }
+
+ // Event handlers
+
+ /**
+ * Handles changes to properties of the MapModel. When this value is
+ * changed, the map itself has its zoom changed. This will trigger an
+ * event on the map that will be handled by functions above.
+ */
+ public function handleModelChange(event:Event):void
+ {
+ if (event.type == "zoomChanged") {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ realMap.setZoom(model.zoom);
+ }
+ }
+
+ /**
+ * @flexjsignorecoercion google.maps.Marker
+ * @flexjsignorecoercion google.maps.LatLng
+ */
+ public function markerClicked(marker:Marker):void
+ {
+ var newMarker:Marker = new Marker({
+ position: marker["latLng"],
+ title: marker["title"],
+ map: realMap
+ });
+
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.selectedMarker = newMarker;
+
+ var newEvent:Event = new Event('markerClicked');
+ IEventDispatcher(_strand).dispatchEvent(newEvent);
+ }
+
+ } // end ::JS
+
+
+
+ /**
+ * The AS3 version of GoogleMapView is geared toward its use with HTMLLoader
+ * for AIR.
+ */
+ COMPILE::AS3
+ public class GoogleMapView extends BeadViewBase implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function GoogleMapView()
+ {
+ super();
+ }
+
+ private var _loader:HTMLLoader;
+ private var page:String;
+
+ /**
+ * @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;
+
+ _loader = new HTMLLoader();
+ _loader.x = 0;
+ _loader.y = 0;
+ _loader.width = UIBase(value).width;
+ _loader.height = UIBase(value).height;
+ _loader.placeLoadStringContentInApplicationSandbox = false;
+
+ IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
+ IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);
+
+ var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
+ model.addEventListener("zoomChanged", handleZoomChange);
+ model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
+
+ (_strand as UIBase).addChild(_loader);
+
+ var token:String = GoogleMap(_strand).token;
+ if (token)
+ page = pageTemplateStart + "&key=" + token + pageTemplateEnd;
+ else
+ page = pageTemplateStart + pageTemplateEnd;
+
+ var pathToFile:String;
+
+ if (page) {
+ pathToFile = File.applicationDirectory.resolvePath('flexjs_mapapi.html').nativePath;
+ var someFile:File = new File(pathToFile);
+ var writeStream:FileStream = new FileStream();
+ writeStream.open(someFile, FileMode.WRITE);
+ writeStream.writeUTFBytes(page);
+ writeStream.close();
+ }
+
+ _loader.load(new URLRequest("file://"+pathToFile));
+ _loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
+ }
+
+ private function completeHandler(event:flash.events.Event):void
+ {
+ if (_loader && page) {
+ _loader.window.map.center_changed = onMapCentered;
+ _loader.window.map.bounds_changed = onMapBoundsChanged;
+ _loader.window.map.zoom_changed = onMapZoomChanged;
+ _loader.window.map.dragend = onMapDragEnd;
+ _loader.window.map.draggable = true;
+
+ // custom event handlers
+ _loader.window.addEventListener("searchResults",onSearchResults);
+ _loader.window.addEventListener("markerClicked",onMarkerClicked);
+ }
+
+ IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
+ }
+
+ private function handleZoomChange(event:org.apache.flex.events.Event):void
+ {
+ if (_loader && page) {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ setZoom(model.zoom);
+ }
+ }
+
+ private function handleCurrentLocationChange(event:org.apache.flex.events.Event):void
+ {
+ if (_loader && page) {
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ setCenter(model.currentCenter);
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function handleSizeChange(event:org.apache.flex.events.Event):void
+ {
+ _loader.width = UIBase(_strand).width;
+ _loader.height = UIBase(_strand).height;
+ }
+
+ /**
+ * @private
+ */
+ private function onMapCentered():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapBoundsChanged():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapZoomChanged():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("zoomChanged") );
+ }
+
+ /**
+ * @private
+ */
+ private function onMapDragEnd():void
+ {
+ IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
+ }
+
+ /**
+ * @private
+ */
+ private function onSearchResults(event:*):void
+ {
+ var results:Array = [];
+ for(var i:int=0; i < event.results.length; i++) {
+ var place:Object = event.results[i];
+ results.push(place);
+ }
+
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.searchResults = results;
+ }
+
+ /**
+ * @private
+ */
+ private function onMarkerClicked(event:*):void
+ {
+ var marker:Marker = new Marker({
+ position: event.marker.getPosition(),
+ title: event.marker.getTitle(),
+ map: event.marker.getMap()
+ });
+
+ var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
+ model.selectedMarker = marker;
+
+ IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("markerClicked"));
+ }
+
+ /**
+ * Adjusts the map to the given coordinate and zoom level.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function mapit(lat:Number, lng:Number, zoomLevel:Number):void
+ {
+ if (_loader && page) {
+ _loader.window.mapit(lat, lng, zoomLevel);
+ }
+ }
+
+ /**
+ * Finds the given address and places a marker on it. This function may be dropped
+ * since centerOnAddress + markCurrentLocation does the same thing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function markAddress(address:String):void
+ {
+ if (_loader && page) {
+ _loader.window.codeaddress(address);
+ }
+ }
+
+ /**
+ * Centers the map on the address given.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function centerOnAddress(address:String):void
+ {
+ if (_loader && page) {
+ _loader.window.centeronaddress(address);
+ }
+ }
+
+ /**
+ * Marks the current center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function markCurrentLocation():void
+ {
+ if (_loader && page) {
+ _loader.window.markcurrentlocation();
+ }
+ }
+
+ /**
+ * Performs a search near the center of map. The result is a set of
+ * markers displayed on the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function nearbySearch(placeName:String):void
+ {
+ if (_loader && page) {
+ _loader.window.nearbysearch(placeName);
+ }
+ }
+
+ /**
+ * Creates a marker for placement on the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function createMarker(location:LatLng):Marker
+ {
+ return null;
+ }
+
+ /**
+ * Removes all of the markers from the map
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeAllMarkers():void
+ {
+ if (_loader && page) {
+ _loader.window.clearmarkers();
+ }
+ }
+
+ /**
+ * Sets the zoom factor of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setZoom(zoom:Number):void
+ {
+ if (_loader && page) {
+ _loader.window.map.setZoom(zoom);
+ }
+ }
+
+ /**
+ * Sets the center of the map.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setCenter( location:LatLng ):void
+ {
+ if (_loader && page) {
+ _loader.window.setCenter(location.lat, location.lng);
+ }
+ }
+
+ /**
+ * Clears the previous search results.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function clearSearchResults():void
+ {
+ // not implemented
+ }
+
+ /**
+ * @private
+ * This page definition is used with HTMLLoader to bring in the Google Maps
+ * API (a Google APP token is required).
+ */
+ private static var pageTemplateStart:String = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'+
+ '<html>\n'+
+ ' <head>\n'+
+ ' <style type="text/css">\n'+
+ ' html { height: 100%; }\n'+
+ ' body { height: 100%; margin: 0; padding: 0; background-color: #FFFFCC; }\n'+
+ ' #map-canvas { height: 100% }\n'+
+ ' </style>\n'+
+ ' <script type="text/javascript"'+
+ ' src="https://maps.googleapis.com/maps/api/js?v=3.exp';
+
+ private static var pageTemplateEnd:String = '&libraries=places">'+
+ ' </script>\n'+
+ ' <script type="text/javascript">\n'+
+ ' var map;'+
+ ' var geocoder;'+
+ ' var currentCenter;' +
+ ' var service;' +
+ ' var places;' +
+ ' var markers;'+
+ ' function mapit(lat, lng, zoomLevel) {' +
+ ' currentCenter = new google.maps.LatLng(lat, lng);'+
+ ' if (map == null) {' +
+ ' var mapOptions = {'+
+ ' center: currentCenter,'+
+ ' zoom: zoomLevel'+
+ ' };'+
+ ' map = new google.maps.Map(document.getElementById("map-canvas"),'+
+ ' mapOptions);' +
+ ' }' +
+ ' google.maps.event.addListener(map, "center_changed", function() {' +
+ ' currentCenter = map.getCenter();' +
+ ' });' +
+ ' google.maps.event.addListener(map, "bounds_changed", function() {' +
+ ' currentCenter = map.getCenter();' +
+ ' });' +
+ ' map.setCenter(currentCenter);'+
+ ' };' +
+ ' function setCenter(lat, lng) {' +
+ ' currentCenter = new google.maps.LatLng(lat,lng);' +
+ ' map.setCenter(currentCenter);' +
+ ' };'+
+ ' function codeaddress(address) {'+
+ ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
+ ' geocoder.geocode( { "address": address}, function(results, status) {'+
+ ' if (status == google.maps.GeocoderStatus.OK) {'+
+ ' currentCenter = results[0].geometry.location;'+
+ ' map.setCenter(currentCenter);'+
+ ' var marker = new google.maps.Marker({'+
+ ' map: map,'+
+ ' position: currentCenter,'+
+ ' });'+
+ ' } else {'+
+ ' alert("Geocode was not successful for the following reason: " + status);'+
+ ' }'+
+ ' });'+
+ ' };'+
+ ' function centeronaddress(address) {'+
+ ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
+ ' geocoder.geocode( { "address": address}, function(results, status) {'+
+ ' if (status == google.maps.GeocoderStatus.OK) {'+
+ ' currentCenter = results[0].geometry.location;'+
+ ' map.setCenter(currentCenter);' +
+ ' } else {'+
+ ' alert("Geocode was not successful for the following reason: " + status);'+
+ ' }'+
+ ' });'+
+ ' };'+
+ ' function markcurrentlocation() {'+
+ ' createMarker(currentCenter);'+
+ ' };' +
+ ' function createMarker(location) {' +
+ ' var marker = new google.maps.Marker({'+
+ ' map: map,'+
+ ' position: location,'+
+ ' });' +
+ ' google.maps.event.addListener(marker, "click", function() {' +
+ ' markerClicked(marker);' +
+ ' });'+
+ ' return marker;'+
+ ' };' +
+ ' function clearmarkers() {' +
+ ' if (markers) {' +
+ ' for(var i=0; i < markers.length; i++) {' +
+ ' markers[i].setMap(null);' +
+ ' }' +
+ ' markers = null;' +
+ ' }' +
+ ' };'+
+ ' function nearbysearch(placename) {' +
+ ' if (markers == null) markers = [];' +
+ ' service = new google.maps.places.PlacesService(map);'+
+ ' service.nearbySearch({"location": currentCenter,' +
+ ' "radius": 5000,' +
+ ' "name": placename}, function(results, status) {' +
+ ' places = results;' +
+ ' if (status == google.maps.places.PlacesServiceStatus.OK) {' +
+ ' for(var i=0; i < results.length; i++) {' +
+ ' var place = results[i];' +
+ ' var marker = createMarker(place.geometry.location);' +
+ ' marker.title = place.name;' +
+ ' markers.push(marker);' +
+ ' }' +
+ ' var event = document.createEvent("Event");' +
+ ' event.results = places;'+
+ ' event.initEvent("searchResults", true, true);' +
+ ' window.dispatchEvent(event);' +
+ ' }' +
+ ' });'+
+ ' };' +
+ ' function markerClicked(marker) {' +
+ ' var newEvent = document.createEvent("Event");' +
+ ' newEvent.marker = marker;' +
+ ' newEvent.initEvent("markerClicked", true, true);' +
+ ' window.dispatchEvent(newEvent);' +
+ ' };'+
+ ' function initialize() {'+
+ ' mapit(37.333, -121.900, 12);'+
+ ' };'+
+ ' google.maps.event.addDomListener(window, "load", initialize);'+
+ ' </script>\n'+
+ ' </head>\n'+
+ ' <body>\n'+
+ ' <div id="map-canvas"></div>\n'+
+ ' </body>\n'+
+ '</html>';
+ } // end ::AS3
+
+}
[47/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix
scripts after folder change
Posted by ah...@apache.org.
fix scripts after folder change
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ea6689b6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ea6689b6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ea6689b6
Branch: refs/heads/develop
Commit: ea6689b6d71942cb092822d5a723396871cea342
Parents: 9875cf8
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:54:31 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:53 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Reflection/build.xml | 72 +++++++++++---------
.../src/main/resources/compile-asjs-config.xml | 6 +-
.../src/main/resources/compile-config.xml | 8 +--
3 files changed, 46 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea6689b6/frameworks/projects/Reflection/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/build.xml b/frameworks/projects/Reflection/build.xml
index b88f21d..86ec620 100644
--- a/frameworks/projects/Reflection/build.xml
+++ b/frameworks/projects/Reflection/build.xml
@@ -28,6 +28,8 @@
<property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
+ <property name="target.name" value="Reflection-${release.version}.swc" />
+ <property name="target.name.no.version" value="Reflection.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Reflection.swc">
</target>
@@ -47,55 +49,56 @@
<target name="clean">
<delete failonerror="false">
<fileset dir="${FLEXJS_HOME}/frameworks/libs">
- <include name="Reflection.swc"/>
+ <include name="${target.name.no.version}"/>
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
</target>
<path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
</path>
-
+
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Reflection.swc"/>
+ <echo message="Compiling target/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
- <mkdir dir="${basedir}/js/out" />
-
+ <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
<taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
<!--
- Link in the classes (and their dependencies) for the MXML tags
- listed in this project's manifest.xml.
- Also link the additional classes (and their dependencies)
- listed in ReflectionClasses.as,
- because these aren't referenced by the manifest classes.
- Keep the standard metadata when compiling.
- Include the appropriate CSS files and assets in the SWC.
- Don't include any resources in the SWC.
- Write a bundle list of referenced resource bundles
- into the file bundles.properties in this directory.
- -->
+ Link in the classes (and their dependencies) for the MXML tags
+ listed in this project's manifest.xml.
+ Also link the additional classes (and their dependencies)
+ listed in CoreClasses.as,
+ because these aren't referenced by the manifest classes.
+ Keep the standard metadata when compiling.
+ Include the appropriate CSS files and assets in the SWC.
+ Don't include any resources in the SWC.
+ Write a bundle list of referenced resource bundles
+ into the file bundles.properties in this directory.
+ -->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Reflection.swc">
+ output="${basedir}/target/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-config.xml" />
+ <load-config filename="${basedir}/src/main/resources/compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
</compc>
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
-
- <target name="compile-asjs" >
- <echo message="Cross-compiling Reflection/asjs"/>
+
+ <target name="compile-asjs">
+ <echo message="Cross-compiling ${target.name}"/>
<echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
<java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
<jvmarg value="-Xmx384m" />
@@ -105,8 +108,8 @@
<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=${basedir}/js/out" />
- <arg value="-load-config=${basedir}/compile-asjs-config.xml" />
+ <arg value="-output=${basedir}/target/generated-sources/flexjs" />
+ <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
@@ -117,13 +120,14 @@
<arg value="-define=COMPILE::JS,true" />
</java>
</target>
-
+
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Reflection.swc"/>
+ <echo message="Compiling target/externs/${target.name}"/>
<echo message="FLEX_HOME: ${FLEX_HOME}"/>
<echo message="FALCON_HOME: ${FALCON_HOME}"/>
<!-- make JS output folder now so include-file doesn't error -->
<mkdir dir="${FLEXJS_HOME}/frameworks/externs"/>
+ <mkdir dir="${basedir}/target/externs"/>
<!-- Load the <compc> task. We can't do this at the <project> level -->
<!-- because targets that run before flexTasks.jar gets built would fail. -->
@@ -141,9 +145,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Reflection.swc">
+ output="${basedir}/target/externs/${target.name}">
<jvmarg line="${compc.jvm.args}"/>
- <load-config filename="compile-asjs-config.xml" />
+ <load-config filename="src/main/resources/compile-asjs-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.AIR_HOME=${env.AIR_HOME}" />
<arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" />
@@ -152,14 +156,16 @@
<arg value="-define=COMPILE::AS3,false" />
<arg value="-define=COMPILE::JS,true" />
</compc>
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
-
- <target name="copy-js" >
+
+ <target name="copy-js">
<copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
- <fileset dir="${basedir}/js/out">
- <include name="**/**" />
+ <fileset dir="${basedir}/target/generated-sources/flexjs">
+ <include name="**/**"/>
</fileset>
</copy>
</target>
+
</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea6689b6/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
index 92f5a0f..fa4300e 100644
--- a/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Reflection/src/main/resources/compile-asjs-config.xml
@@ -45,14 +45,14 @@
<!-- asjscompc won't 'link' these classes in, but will list their requires
if these swcs are on the external-library-path then their requires
will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../../../../externs/Core.swc</path-element>
</library-path>
<namespaces>
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -62,7 +62,7 @@
</include-file>
<include-sources>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</include-sources>
<include-classes>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ea6689b6/frameworks/projects/Reflection/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Reflection/src/main/resources/compile-config.xml b/frameworks/projects/Reflection/src/main/resources/compile-config.xml
index e02f6b2..89b7765 100644
--- a/frameworks/projects/Reflection/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Reflection/src/main/resources/compile-config.xml
@@ -23,7 +23,7 @@
<external-library-path>
<path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../../../../libs/Core.swc</path-element>
</external-library-path>
<mxml>
@@ -49,7 +49,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -57,11 +57,11 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
<include-sources>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</include-sources>
<include-namespaces>
[27/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for HTML5
Posted by ah...@apache.org.
new folders for HTML5
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1bfcf5d8
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1bfcf5d8
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1bfcf5d8
Branch: refs/heads/develop
Commit: 1bfcf5d890d50b7eee582c42c506830f16dde1d8
Parents: b5d922d
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 21:23:40 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:52 2016 -0800
----------------------------------------------------------------------
frameworks/projects/HTML5/as/defaults.css | 68 ----------------
.../projects/HTML5/as/src/HTML5Classes.as | 33 --------
.../as/src/org/apache/flex/html5/Button.as | 26 ------
.../as/src/org/apache/flex/html5/CheckBox.as | 26 ------
.../as/src/org/apache/flex/html5/ComboBox.as | 26 ------
.../src/org/apache/flex/html5/DropDownList.as | 26 ------
.../HTML5/as/src/org/apache/flex/html5/Label.as | 33 --------
.../HTML5/as/src/org/apache/flex/html5/List.as | 33 --------
.../as/src/org/apache/flex/html5/RadioButton.as | 26 ------
.../as/src/org/apache/flex/html5/TextArea.as | 26 ------
.../as/src/org/apache/flex/html5/TextButton.as | 30 -------
.../as/src/org/apache/flex/html5/TextInput.as | 25 ------
.../projects/HTML5/compile-asjs-config.xml | 70 -----------------
frameworks/projects/HTML5/compile-config.xml | 83 --------------------
frameworks/projects/HTML5/html5-manifest.xml | 35 ---------
.../HTML5/src/main/flex/HTML5Classes.as | 33 ++++++++
.../main/flex/org/apache/flex/html5/Button.as | 26 ++++++
.../main/flex/org/apache/flex/html5/CheckBox.as | 26 ++++++
.../main/flex/org/apache/flex/html5/ComboBox.as | 26 ++++++
.../flex/org/apache/flex/html5/DropDownList.as | 26 ++++++
.../main/flex/org/apache/flex/html5/Label.as | 33 ++++++++
.../src/main/flex/org/apache/flex/html5/List.as | 33 ++++++++
.../flex/org/apache/flex/html5/RadioButton.as | 26 ++++++
.../main/flex/org/apache/flex/html5/TextArea.as | 26 ++++++
.../flex/org/apache/flex/html5/TextButton.as | 30 +++++++
.../flex/org/apache/flex/html5/TextInput.as | 25 ++++++
.../src/main/resources/compile-asjs-config.xml | 70 +++++++++++++++++
.../HTML5/src/main/resources/compile-config.xml | 83 ++++++++++++++++++++
.../HTML5/src/main/resources/defaults.css | 68 ++++++++++++++++
.../HTML5/src/main/resources/html5-manifest.xml | 35 +++++++++
30 files changed, 566 insertions(+), 566 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/defaults.css b/frameworks/projects/HTML5/as/defaults.css
deleted file mode 100644
index 696fa2d..0000000
--- a/frameworks/projects/HTML5/as/defaults.css
+++ /dev/null
@@ -1,68 +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.
- *
- */
-
-@namespace h5 "library://ns.apache.org/flexjs/html5";
-
-
-@media -flex-flash
-{
-
-/* HTML5 */
-
-h5|TextButton
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextToggleButtonView");
-}
-
-h5|TextInput
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.TextInputWithBorderView");
-}
-
-h5|CheckBox
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
-}
-
-h5|RadioButton
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
- IBeadView: ClassReference("org.apache.flex.html.beads.RadioButtonView");
-}
-
-h5|List
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
-}
-
-h5|DropDownList
-{
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
- IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
-}
-
-h5|ComboBox
-{
- IBeadView: ClassReference("org.apache.flex.html.beads.ComboBoxView");
- IBeadModel: ClassReference("org.apache.flex.html.beads.models.ComboBoxModel");
- IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/HTML5Classes.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/HTML5Classes.as b/frameworks/projects/HTML5/as/src/HTML5Classes.as
deleted file mode 100644
index 0e9c1fb..0000000
--- a/frameworks/projects/HTML5/as/src/HTML5Classes.as
+++ /dev/null
@@ -1,33 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class HTML5Classes
-{
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Button.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Button.as
deleted file mode 100644
index 41a81ab..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Button.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.Button;
-
- public class Button extends org.apache.flex.html.Button
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/CheckBox.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/CheckBox.as
deleted file mode 100644
index 8af13ac..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/CheckBox.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.CheckBox;
-
- public class CheckBox extends org.apache.flex.html.CheckBox
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/ComboBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/ComboBox.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/ComboBox.as
deleted file mode 100644
index 2c10af6..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/ComboBox.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.ComboBox;
-
- public class ComboBox extends org.apache.flex.html.ComboBox
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/DropDownList.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/DropDownList.as
deleted file mode 100644
index 41dea1a..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/DropDownList.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.DropDownList;
-
- public class DropDownList extends org.apache.flex.html.DropDownList
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Label.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Label.as
deleted file mode 100644
index d6ee5d2..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/Label.as
+++ /dev/null
@@ -1,33 +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.html5
-{
- import org.apache.flex.html.Label;
-
- /**
- * 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.
- */
- public class Label extends org.apache.flex.html.Label
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/List.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/List.as
deleted file mode 100644
index 8c501bd..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/List.as
+++ /dev/null
@@ -1,33 +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.html5
-{
- import org.apache.flex.html.List;
-
- /**
- * 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.
- */
- public class List extends org.apache.flex.html.List
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/RadioButton.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/RadioButton.as
deleted file mode 100644
index f3f1fa7..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/RadioButton.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.RadioButton;
-
- public class RadioButton extends org.apache.flex.html.RadioButton
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextArea.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextArea.as
deleted file mode 100644
index 59363f7..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextArea.as
+++ /dev/null
@@ -1,26 +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.html5
-{
- import org.apache.flex.html.TextArea;
-
- public class TextArea extends org.apache.flex.html.TextArea
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextButton.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextButton.as
deleted file mode 100644
index d92bf03..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextButton.as
+++ /dev/null
@@ -1,30 +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.html5
-{
- import org.apache.flex.html.TextButton;
-
- public class TextButton extends org.apache.flex.html.TextButton
- {
- public function TextButton()
- {
- super();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextInput.as b/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextInput.as
deleted file mode 100644
index 91d1eb9..0000000
--- a/frameworks/projects/HTML5/as/src/org/apache/flex/html5/TextInput.as
+++ /dev/null
@@ -1,25 +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.html5
-{
- import org.apache.flex.html.TextInput;
-
- public class TextInput extends org.apache.flex.html.TextInput
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/compile-asjs-config.xml b/frameworks/projects/HTML5/compile-asjs-config.xml
deleted file mode 100644
index 0e2439c..0000000
--- a/frameworks/projects/HTML5/compile-asjs-config.xml
+++ /dev/null
@@ -1,70 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path>
- <!-- asjscompc won't 'link' these classes in, but will list their requires
- if these swcs are on the external-library-path then their requires
- will not be listed -->
- <path-element>../../externs/Core.swc</path-element>
- <path-element>../../externs/HTML.swc</path-element>
- </library-path>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-sources>
- <path-element>as/src</path-element>
- </include-sources>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/html5</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/compile-config.xml b/frameworks/projects/HTML5/compile-config.xml
deleted file mode 100644
index f2ece61..0000000
--- a/frameworks/projects/HTML5/compile-config.xml
+++ /dev/null
@@ -1,83 +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.
-
--->
-<flex-config>
-
- <compiler>
- <accessible>false</accessible>
-
- <external-library-path>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>../../libs/Core.swc</path-element>
- <path-element>../../libs/HTML.swc</path-element>
- </external-library-path>
-
- <mxml>
- <children-as-data>true</children-as-data>
- </mxml>
- <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>
-
- <keep-as3-metadata>
- <name>Bindable</name>
- <name>Managed</name>
- <name>ChangeEvent</name>
- <name>NonCommittingChangeEvent</name>
- <name>Transient</name>
- </keep-as3-metadata>
-
- <locale/>
-
- <library-path/>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/html5</uri>
- <manifest>html5-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <source-path>
- <path-element>as/src</path-element>
- </source-path>
-
- <warn-no-constructor>false</warn-no-constructor>
- </compiler>
-
- <include-file>
- <name>defaults.css</name>
- <path>as/defaults.css</path>
- </include-file>
- <include-file>
- <name>js/out/*</name>
- <path>js/out/*</path>
- </include-file>
-
- <include-classes>
- <class>HTML5Classes</class>
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/html5</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/html5-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/html5-manifest.xml b/frameworks/projects/HTML5/html5-manifest.xml
deleted file mode 100644
index bb0a281..0000000
--- a/frameworks/projects/HTML5/html5-manifest.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-
-
-<componentPackage>
-
-
- <component id="Label" class="org.apache.flex.html5.Label"/>
- <component id="TextButton" class="org.apache.flex.html5.TextButton"/>
- <component id="TextInput" class="org.apache.flex.html5.TextInput"/>
- <component id="TextArea" class="org.apache.flex.html5.TextArea"/>
- <component id="CheckBox" class="org.apache.flex.html5.CheckBox"/>
- <component id="RadioButton" class="org.apache.flex.html5.RadioButton"/>
- <component id="List" class="org.apache.flex.html5.List"/>
- <component id="DropDownList" class="org.apache.flex.html5.DropDownList"/>
- <component id="ComboBox" class="org.apache.flex.html5.ComboBox"/>
-
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/HTML5Classes.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/HTML5Classes.as b/frameworks/projects/HTML5/src/main/flex/HTML5Classes.as
new file mode 100644
index 0000000..0e9c1fb
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/HTML5Classes.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+
+/**
+ * @private
+ * This class is used to link additional classes into rpc.swc
+ * beyond those that are found by dependecy analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class HTML5Classes
+{
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Button.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Button.as
new file mode 100644
index 0000000..41a81ab
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Button.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.Button;
+
+ public class Button extends org.apache.flex.html.Button
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/CheckBox.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/CheckBox.as
new file mode 100644
index 0000000..8af13ac
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/CheckBox.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.CheckBox;
+
+ public class CheckBox extends org.apache.flex.html.CheckBox
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/ComboBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/ComboBox.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/ComboBox.as
new file mode 100644
index 0000000..2c10af6
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/ComboBox.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.ComboBox;
+
+ public class ComboBox extends org.apache.flex.html.ComboBox
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/DropDownList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/DropDownList.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/DropDownList.as
new file mode 100644
index 0000000..41dea1a
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/DropDownList.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.DropDownList;
+
+ public class DropDownList extends org.apache.flex.html.DropDownList
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Label.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Label.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Label.as
new file mode 100644
index 0000000..d6ee5d2
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/Label.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.Label;
+
+ /**
+ * 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.
+ */
+ public class Label extends org.apache.flex.html.Label
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/List.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/List.as
new file mode 100644
index 0000000..8c501bd
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/List.as
@@ -0,0 +1,33 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.List;
+
+ /**
+ * 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.
+ */
+ public class List extends org.apache.flex.html.List
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/RadioButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/RadioButton.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/RadioButton.as
new file mode 100644
index 0000000..f3f1fa7
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/RadioButton.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.RadioButton;
+
+ public class RadioButton extends org.apache.flex.html.RadioButton
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextArea.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextArea.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextArea.as
new file mode 100644
index 0000000..59363f7
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextArea.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.TextArea;
+
+ public class TextArea extends org.apache.flex.html.TextArea
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextButton.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextButton.as
new file mode 100644
index 0000000..d92bf03
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextButton.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.html5
+{
+ import org.apache.flex.html.TextButton;
+
+ public class TextButton extends org.apache.flex.html.TextButton
+ {
+ public function TextButton()
+ {
+ super();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextInput.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextInput.as b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextInput.as
new file mode 100644
index 0000000..91d1eb9
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/flex/org/apache/flex/html5/TextInput.as
@@ -0,0 +1,25 @@
+//
+// 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.html5
+{
+ import org.apache.flex.html.TextInput;
+
+ public class TextInput extends org.apache.flex.html.TextInput
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml b/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..0e2439c
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/resources/compile-asjs-config.xml
@@ -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.
+
+-->
+<flex-config>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path>
+ <!-- asjscompc won't 'link' these classes in, but will list their requires
+ if these swcs are on the external-library-path then their requires
+ will not be listed -->
+ <path-element>../../externs/Core.swc</path-element>
+ <path-element>../../externs/HTML.swc</path-element>
+ </library-path>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-sources>
+ <path-element>as/src</path-element>
+ </include-sources>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/compile-config.xml b/frameworks/projects/HTML5/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..f2ece61
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/resources/compile-config.xml
@@ -0,0 +1,83 @@
+<!--
+
+ 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>
+
+ <compiler>
+ <accessible>false</accessible>
+
+ <external-library-path>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>../../libs/Core.swc</path-element>
+ <path-element>../../libs/HTML.swc</path-element>
+ </external-library-path>
+
+ <mxml>
+ <children-as-data>true</children-as-data>
+ </mxml>
+ <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>
+
+ <keep-as3-metadata>
+ <name>Bindable</name>
+ <name>Managed</name>
+ <name>ChangeEvent</name>
+ <name>NonCommittingChangeEvent</name>
+ <name>Transient</name>
+ </keep-as3-metadata>
+
+ <locale/>
+
+ <library-path/>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+ <manifest>html5-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <source-path>
+ <path-element>as/src</path-element>
+ </source-path>
+
+ <warn-no-constructor>false</warn-no-constructor>
+ </compiler>
+
+ <include-file>
+ <name>defaults.css</name>
+ <path>as/defaults.css</path>
+ </include-file>
+ <include-file>
+ <name>js/out/*</name>
+ <path>js/out/*</path>
+ </include-file>
+
+ <include-classes>
+ <class>HTML5Classes</class>
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/defaults.css b/frameworks/projects/HTML5/src/main/resources/defaults.css
new file mode 100644
index 0000000..696fa2d
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/resources/defaults.css
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+@namespace h5 "library://ns.apache.org/flexjs/html5";
+
+
+@media -flex-flash
+{
+
+/* HTML5 */
+
+h5|TextButton
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.CSSTextToggleButtonView");
+}
+
+h5|TextInput
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.TextInputWithBorderView");
+}
+
+h5|CheckBox
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.CheckBoxView");
+}
+
+h5|RadioButton
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ValueToggleButtonModel");
+ IBeadView: ClassReference("org.apache.flex.html.beads.RadioButtonView");
+}
+
+h5|List
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+}
+
+h5|DropDownList
+{
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ArraySelectionModel");
+ IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
+}
+
+h5|ComboBox
+{
+ IBeadView: ClassReference("org.apache.flex.html.beads.ComboBoxView");
+ IBeadModel: ClassReference("org.apache.flex.html.beads.models.ComboBoxModel");
+ IPopUp: ClassReference("org.apache.flex.html.supportClasses.DropDownListList");
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1bfcf5d8/frameworks/projects/HTML5/src/main/resources/html5-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/src/main/resources/html5-manifest.xml b/frameworks/projects/HTML5/src/main/resources/html5-manifest.xml
new file mode 100644
index 0000000..bb0a281
--- /dev/null
+++ b/frameworks/projects/HTML5/src/main/resources/html5-manifest.xml
@@ -0,0 +1,35 @@
+<?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.
+
+-->
+
+
+<componentPackage>
+
+
+ <component id="Label" class="org.apache.flex.html5.Label"/>
+ <component id="TextButton" class="org.apache.flex.html5.TextButton"/>
+ <component id="TextInput" class="org.apache.flex.html5.TextInput"/>
+ <component id="TextArea" class="org.apache.flex.html5.TextArea"/>
+ <component id="CheckBox" class="org.apache.flex.html5.CheckBox"/>
+ <component id="RadioButton" class="org.apache.flex.html5.RadioButton"/>
+ <component id="List" class="org.apache.flex.html5.List"/>
+ <component id="DropDownList" class="org.apache.flex.html5.DropDownList"/>
+ <component id="ComboBox" class="org.apache.flex.html5.ComboBox"/>
+
+</componentPackage>
[03/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - move
effects folders
Posted by ah...@apache.org.
move effects folders
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/bbf9301e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/bbf9301e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/bbf9301e
Branch: refs/heads/develop
Commit: bbf9301e753fe4598831be1cb50be957fe23ba5d
Parents: 7fee2a2
Author: Alex Harui <ah...@apache.org>
Authored: Tue Feb 2 16:57:42 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:49 2016 -0800
----------------------------------------------------------------------
.../projects/Effects/as/src/EffectsClasses.as | 38 --
.../flex/core/StatesWithTransitionsImpl.as | 346 ----------
.../as/src/org/apache/flex/effects/Effect.as | 263 --------
.../as/src/org/apache/flex/effects/Fade.as | 165 -----
.../as/src/org/apache/flex/effects/IEffect.as | 136 ----
.../as/src/org/apache/flex/effects/Move.as | 240 -------
.../as/src/org/apache/flex/effects/Parallel.as | 152 -----
.../org/apache/flex/effects/PlatformWiper.as | 138 ----
.../as/src/org/apache/flex/effects/Resize.as | 197 ------
.../as/src/org/apache/flex/effects/Sequence.as | 152 -----
.../as/src/org/apache/flex/effects/Tween.as | 665 -------------------
.../as/src/org/apache/flex/effects/Wipe.as | 156 -----
.../as/src/org/apache/flex/states/Transition.as | 80 ---
frameworks/projects/Effects/basic-manifest.xml | 32 -
.../projects/Effects/compile-asjs-config.xml | 79 ---
frameworks/projects/Effects/compile-config.xml | 78 ---
.../Effects/src/main/flex/EffectsClasses.as | 38 ++
.../flex/core/StatesWithTransitionsImpl.as | 346 ++++++++++
.../main/flex/org/apache/flex/effects/Effect.as | 263 ++++++++
.../main/flex/org/apache/flex/effects/Fade.as | 165 +++++
.../flex/org/apache/flex/effects/IEffect.as | 136 ++++
.../main/flex/org/apache/flex/effects/Move.as | 240 +++++++
.../flex/org/apache/flex/effects/Parallel.as | 152 +++++
.../org/apache/flex/effects/PlatformWiper.as | 138 ++++
.../main/flex/org/apache/flex/effects/Resize.as | 197 ++++++
.../flex/org/apache/flex/effects/Sequence.as | 152 +++++
.../main/flex/org/apache/flex/effects/Tween.as | 665 +++++++++++++++++++
.../main/flex/org/apache/flex/effects/Wipe.as | 156 +++++
.../flex/org/apache/flex/states/Transition.as | 80 +++
.../src/main/resources/basic-manifest.xml | 32 +
.../src/main/resources/compile-asjs-config.xml | 79 +++
.../src/main/resources/compile-config.xml | 78 +++
32 files changed, 2917 insertions(+), 2917 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/EffectsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/EffectsClasses.as b/frameworks/projects/Effects/as/src/EffectsClasses.as
deleted file mode 100644
index 4b529e8..0000000
--- a/frameworks/projects/Effects/as/src/EffectsClasses.as
+++ /dev/null
@@ -1,38 +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
-{
-
-/**
- * @private
- * This class is used to link additional classes into rpc.swc
- * beyond those that are found by dependecy analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class EffectsClasses
-{
- import org.apache.flex.core.StatesWithTransitionsImpl; StatesWithTransitionsImpl;
- import org.apache.flex.effects.Fade; Fade;
- import org.apache.flex.effects.Move; Move;
- import org.apache.flex.effects.PlatformWiper; PlatformWiper;
- import org.apache.flex.effects.Tween; Tween;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/core/StatesWithTransitionsImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/core/StatesWithTransitionsImpl.as b/frameworks/projects/Effects/as/src/org/apache/flex/core/StatesWithTransitionsImpl.as
deleted file mode 100644
index 9549bc8..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/core/StatesWithTransitionsImpl.as
+++ /dev/null
@@ -1,346 +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
-{
-
- import org.apache.flex.core.IParent;
- import org.apache.flex.core.IStatesObject;
- import org.apache.flex.effects.Effect;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.states.AddItems;
- import org.apache.flex.states.SetEventHandler;
- import org.apache.flex.states.SetProperty;
- import org.apache.flex.states.State;
- import org.apache.flex.states.Transition;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- /**
- * The StatesWithTransitionsImpl class implements a set of
- * view state functionality that includes transitions between states.
- * 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
- * @productversion FlexJS 0.0
- */
- public class StatesWithTransitionsImpl extends EventDispatcher implements IStatesImpl, IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StatesWithTransitionsImpl()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- private var sawInitComplete:Boolean;
-
- /**
- * @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("currentStateChange", stateChangeHandler);
- IEventDispatcher(_strand).addEventListener("initComplete", initialStateHandler);
- }
-
- /**
- * @private
- * @flexjsignorecoercion org.apache.flex.core.IStatesObject
- */
- private function initialStateHandler(event:org.apache.flex.events.Event):void
- {
- sawInitComplete = true;
- stateChangeHandler(new ValueChangeEvent("currentStateChange", false, false, null,
- IStatesObject(_strand).currentState));
- }
-
- /**
- * @private
- * @flexjsignorecoercion org.apache.flex.core.IStatesObject
- */
- private function stateChangeHandler(event:ValueChangeEvent):void
- {
- if (!sawInitComplete)
- return;
-
- var doc:IStatesObject = _strand as IStatesObject;
- var transitions:Array = doc.transitions;
- if (transitions && transitions.length > 0)
- {
- for each (var t:Transition in transitions)
- {
- if (t.fromState == "*" || t.fromState == event.oldValue)
- {
- if (t.toState == "*" || t.toState == event.newValue)
- {
- transitionEffects = t.effects.slice();
- for each (var e:Effect in transitionEffects)
- {
- e.captureStartValues();
- }
- break;
- }
- }
- }
- }
- var arr:Array = doc.states;
- var oldState:State;
- var newState:State;
- for each (var s:State in arr)
- {
- if (s.name == event.oldValue)
- {
- oldState = s;
- break;
- }
- }
- for each (s in arr)
- {
- if (s.name == event.newValue)
- {
- newState = s;
- break;
- }
- }
- if (oldState)
- revert(oldState, newState);
- if (newState)
- apply(oldState, newState);
- if (transitionEffects && transitionEffects.length > 0)
- {
- for each (e in transitionEffects)
- {
- e.captureEndValues();
- }
- }
- var playingTransition:Boolean;
- if (transitionEffects && transitionEffects.length > 0)
- {
- playingTransition = true;
- for each (e in transitionEffects)
- {
- e.addEventListener(Effect.EFFECT_END, effectEndHandler);
- e.play();
- }
- }
- if (!playingTransition)
- doc.dispatchEvent(new Event("stateChangeComplete"));
- }
-
- private var transitionEffects:Array;
-
- /**
- * @private
- * @flexjsignorecoercion org.apache.flex.core.IStatesObject
- */
- private function effectEndHandler(event:Event):void
- {
- // in case of extraneous calls to effectEndHandler
- if (transitionEffects == null)
- return;
-
- var n:int = transitionEffects.length;
- for (var i:int = 0; i < n; i++)
- {
- event.target.removeEventListener(Effect.EFFECT_END, effectEndHandler);
- if (transitionEffects[i] == event.target)
- transitionEffects.splice(i, 1);
- }
- if (transitionEffects.length == 0)
- {
- transitionEffects = null;
- var doc:IStatesObject = _strand as IStatesObject;
- doc.dispatchEvent(new Event("stateChangeComplete"));
- }
- }
-
- private function isItemInState(child:Object, s:State):Boolean
- {
- if (s == null) return false;
-
- var arr:Array = s.overrides;
- for each (var o:Object in arr)
- {
- if (o is AddItems)
- {
- var ai:AddItems = AddItems(o);
- if (ai.items == null)
- {
- ai.items = ai.itemsDescriptor.items as Array;
- if (ai.items == null)
- {
- ai.items =
- MXMLDataInterpreter.generateMXMLArray(ai.document,
- null, ai.itemsDescriptor.descriptor);
- ai.itemsDescriptor.items = ai.items;
- }
- }
- for each (var item:IChild in ai.items)
- {
- if (item == child)
- return true;
- }
- }
- }
- return false;
- }
-
- private function revert(s:State, newState:State):void
- {
- var arr:Array = s.overrides;
- for each (var o:Object in arr)
- {
- if (o is AddItems)
- {
- var ai:AddItems = AddItems(o);
- var childrenAdded:Boolean = false;
- for each (var item:IChild in ai.items)
- {
- if (!isItemInState(item, newState))
- {
- var parent:IParent = item.parent as IParent;
- parent.removeElement(item);
- childrenAdded = true;
- }
- }
- if (childrenAdded && parent is IContainer)
- IContainer(parent).childrenAdded();
- }
- else if (o is SetProperty)
- {
- var sp:SetProperty = SetProperty(o);
- if (sp.target != null)
- sp.document[sp.target][sp.name] = sp.previousValue;
- else
- sp.document[sp.name] = sp.previousValue;
- }
- else if (o is SetEventHandler)
- {
- var seh:SetEventHandler = SetEventHandler(o);
- if (seh.target != null)
- {
- seh.document[seh.target].removeEventListener(seh.name, seh.handlerFunction);
- }
- else
- {
- seh.document.removeEventListener(seh.name, seh.handlerFunction);
- }
- }
- }
- }
-
- private function apply(oldState:State, s:State):void
- {
- var arr:Array = s.overrides;
- for each (var o:Object in arr)
- {
- if (o is AddItems)
- {
- var ai:AddItems = AddItems(o);
- if (ai.items == null)
- {
- ai.items = ai.itemsDescriptor.items as Array;
- if (ai.items == null)
- {
- ai.items =
- MXMLDataInterpreter.generateMXMLArray(ai.document,
- null, ai.itemsDescriptor.descriptor);
- ai.itemsDescriptor.items = ai.items;
- }
- }
- var childrenAdded:Boolean = false;
- for each (var item:Object in ai.items)
- {
- if (!isItemInState(item, oldState))
- {
- var parent:IParent = ai.document as IParent;
- if (ai.destination)
- parent = parent[ai.destination] as IParent;
- if (ai.relativeTo != null)
- {
- var child:Object = ai.document[ai.relativeTo];
- if (ai.destination)
- parent = IChild(child).parent as IParent;
- var index:int = parent.getElementIndex(child);
- if (ai.position == "after")
- index++;
- parent.addElementAt(item, index);
- childrenAdded = true;
- }
- else
- {
- parent.addElement(item);
- childrenAdded = true;
- }
- }
- }
- if (childrenAdded && parent is IContainer)
- IContainer(parent).childrenAdded();
- }
- else if (o is SetProperty)
- {
- var sp:SetProperty = SetProperty(o);
- if (sp.target != null)
- {
- sp.previousValue = sp.document[sp.target][sp.name];
- sp.document[sp.target][sp.name] = sp.value;
- }
- else
- {
- sp.previousValue = sp.document[sp.name];
- sp.document[sp.name] = sp.value;
- }
- }
- else if (o is SetEventHandler)
- {
- var seh:SetEventHandler = SetEventHandler(o);
- if (seh.target != null)
- {
- seh.document[seh.target].addEventListener(seh.name, seh.handlerFunction);
- }
- else
- {
- seh.document.addEventListener(seh.name, seh.handlerFunction);
- }
- }
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Effect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Effect.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Effect.as
deleted file mode 100644
index 7fabe6a..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Effect.as
+++ /dev/null
@@ -1,263 +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.effects
-{
-
-import org.apache.flex.events.EventDispatcher;
-
-/**
- * Effect is the base class for effects in FlexJS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Effect extends EventDispatcher implements IEffect
-{
- //--------------------------------------------------------------------------
- //
- // Class constants
- //
- //--------------------------------------------------------------------------
-
- /**
- * The <code>Effect.EFFECT_END</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>effectEnd</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType effectEnd
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const EFFECT_END:String = "effectEnd";
-
- /**
- * The <code>Effect.EFFECT_START</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>effectStart</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType effectStart
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const EFFECT_START:String = "effectStart";
-
- /**
- * The <code>Effect.EFFECT_STOP</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>effectStop</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * </table>
- *
- * @eventType effectStop
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const EFFECT_STOP:String = "effectStop";
-
-
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Effect()
- {
- }
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // duration
- //----------------------------------
-
- private var _duration:Number = 500;
- /**
- * Duration of the animation, in milliseconds.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get duration():Number
- {
- return _duration;
- }
- public function set duration(value:Number):void
- {
- _duration = value;
- }
-
-
- /**
- * Plays the effect in reverse,
- * starting from the current position of the effect.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function reverse():void
- {
- }
-
- /**
- * Pauses the effect until you call the <code>resume()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function pause():void
- {
- }
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function play():void
- {
- }
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function stop():void
- {
- }
-
- /**
- * Resumes the effect after it has been paused
- * by a call to the <code>pause()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function resume():void
- {
- }
-
- /**
- * @copy org.apache.flex.effects.IEffect#captureStartValues
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function captureStartValues():void
- {
- }
-
- /**
- * @copy org.apache.flex.effects.IEffect#captureEndValues
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function captureEndValues():void
- {
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Fade.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Fade.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Fade.as
deleted file mode 100644
index 28f0d16..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Fade.as
+++ /dev/null
@@ -1,165 +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.effects
-{
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-
-/**
- * The Fade effect animates a UI component's alpha or opacity.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Fade extends Tween implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param target An object that will
- * have its x and/or y property animated.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Fade(target:IUIBase = null)
- {
- super();
-
- this.actualTarget = target;
- startValue = 0;
- endValue = 1;
-
- listener = this;
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The target.
- */
- private var actualTarget:IUIBase;
-
- /**
- * The target as the String id
- * of a widget in an MXML Document.
- */
- public var target:String;
-
- /**
- * @private
- * The change in alpha.
- */
- private var d:Number;
-
- /**
- * @private
- * The starting value.
- */
- private var start:Number;
-
- /**
- * Starting alpha value. If NaN, the current alpha value is used
- */
- public var alphaFrom:Number;
-
- /**
- * Ending alpha value. If NaN, the current alpha value is not changed
- */
- public var alphaTo:Number;
-
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- if (target != null)
- actualTarget = document[target];
-
- if (isNaN(alphaFrom))
- start = actualTarget.alpha;
- else
- start = alphaFrom;
-
- if (isNaN(alphaTo))
- d = 0;
- else
- d = alphaTo - start;
-
- super.play();
- }
-
- public function onTweenUpdate(value:Number):void
- {
- if (d)
- actualTarget.alpha = start + value * d;
- }
-
- public function onTweenEnd(value:Number):void
- {
- if (d)
- actualTarget.alpha = start + d;
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/IEffect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/IEffect.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/IEffect.as
deleted file mode 100644
index f5b940c..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/IEffect.as
+++ /dev/null
@@ -1,136 +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.effects
-{
-
-import org.apache.flex.events.IEventDispatcher;
-
-/**
- * IEffect is the lowest-level interface for effects in FlexJS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public interface IEffect extends IEventDispatcher
-{
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // duration
- //----------------------------------
-
- /**
- * Duration of the animation, in milliseconds.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function get duration():Number;
- function set duration(value:Number):void;
-
-
- /**
- * Plays the effect in reverse,
- * starting from the current position of the effect.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function reverse():void;
-
- /**
- * Pauses the effect until you call the <code>resume()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function pause():void;
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function play():void;
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function stop():void;
-
- /**
- * Resumes the effect after it has been paused
- * by a call to the <code>pause()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function resume():void;
-
- /**
- * Tries to compute initial values
- * for effect
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function captureStartValues():void;
-
- /**
- * Tries to compute final values
- * for effect
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- function captureEndValues():void;
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Move.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Move.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Move.as
deleted file mode 100644
index 2a42b19..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Move.as
+++ /dev/null
@@ -1,240 +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.effects
-{
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-
-/**
- * The Move effect animates a UI component's x or y position.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Move extends Tween implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param target Object ID or reference to an object that will
- * have its x and/or y property animated.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Move(target:IUIBase = null)
- {
- super();
-
- this.actualTarget = target;
- startValue = 0;
- endValue = 1;
-
- listener = this;
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The actual target.
- */
- private var actualTarget:IUIBase;
-
- /**
- * The target as the String id
- * of a widget in an MXML Document.
- */
- public var target:String;
-
- /**
- * The change in x.
- */
- public var xBy:Number;
-
- /**
- * The change in y.
- */
- public var yBy:Number;
-
- /**
- * @private
- * The starting x.
- */
- private var xStart:Number;
-
- /**
- * @private
- * The starting y.
- */
- private var yStart:Number;
-
- /**
- * @private
- * The total change for x.
- */
- private var xMove:Number;
-
- /**
- * @private
- * The total change for y.
- */
- private var yMove:Number;
-
- /**
- * Starting x value. If NaN, the current x value is used
- */
- public var xFrom:Number;
-
- /**
- * Ending x value. If NaN, the current x value is not changed
- */
- public var xTo:Number;
-
- /**
- * Starting y value. If NaN, the current y value is used
- */
- public var yFrom:Number;
-
- /**
- * Ending y value. If NaN, the current y value is not changed
- */
- public var yTo:Number;
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- if (target != null)
- actualTarget = document[target];
-
- if (isNaN(xFrom))
- xStart = actualTarget.x;
- else
- xStart = xFrom;
-
- if (isNaN(xBy))
- {
- if (isNaN(xTo))
- xMove = 0;
- else
- xMove = xTo - xStart;
- }
- else
- xMove = xBy;
-
- if (isNaN(yFrom))
- yStart = actualTarget.y;
- else
- yStart = yFrom;
- if (isNaN(yBy))
- {
- if (isNaN(yTo))
- yMove = 0;
- else
- yMove = yTo - yStart;
- }
- else
- yMove = yBy;
-
- super.play();
- }
-
- public function onTweenUpdate(value:Number):void
- {
- if (xMove)
- actualTarget.x = xStart + value * xMove;
- if (yMove)
- actualTarget.y = yStart + value * yMove;
- }
-
- public function onTweenEnd(value:Number):void
- {
- if (xMove)
- actualTarget.x = xStart + xMove;
- if (yMove)
- actualTarget.y = yStart + yMove;
-
- }
-
- override public function captureStartValues():void
- {
- if (target != null)
- {
- actualTarget = document[target];
- xFrom = actualTarget.x;
- yFrom = actualTarget.y;
- }
- }
-
- override public function captureEndValues():void
- {
- if (target != null)
- {
- actualTarget = document[target];
- xTo = actualTarget.x;
- yTo = actualTarget.y;
- }
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Parallel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Parallel.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Parallel.as
deleted file mode 100644
index 6d08012..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Parallel.as
+++ /dev/null
@@ -1,152 +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.effects
-{
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-import org.apache.flex.events.Event;
-
-[DefaultProperty("children")]
-
-/**
- * The Parallel effect animates set of effects at the
- * same time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Parallel extends Effect implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Parallel()
- {
- super();
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The target.
- */
- private var target:IUIBase;
-
- /**
- * The children.
- */
- public var children:Array;
-
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- */
- override public function set duration(value:Number):void
- {
- var n:int = children.length;
- for (var i:int = 0; i < 0; i++)
- {
- children[i].duration = value;
- }
- super.duration = value;
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- public function addChild(child:IEffect):void
- {
- if (!children)
- children = [ child ];
- else
- children.push(child);
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- dispatchEvent(new Event(Effect.EFFECT_START));
- current = 0;
- var n:int = children.length;
- for (var i:int = 0; i < n; i++)
- playChildEffect(i);
- }
-
- private var current:int;
-
- private function playChildEffect(index:int):void
- {
- var child:IEffect = children[index];
- child.addEventListener(Effect.EFFECT_END, effectEndHandler);
- child.play();
- }
-
- private function effectEndHandler(event:Event):void
- {
- current++;
- if (current >= children.length)
- dispatchEvent(new Event(Effect.EFFECT_END));
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/PlatformWiper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/PlatformWiper.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/PlatformWiper.as
deleted file mode 100644
index 1e3b412..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/PlatformWiper.as
+++ /dev/null
@@ -1,138 +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.effects
-{
-
-COMPILE::AS3
-{
- import flash.display.DisplayObject;
- import flash.geom.Rectangle;
-}
-COMPILE::JS
-{
- import org.apache.flex.geom.Rectangle;
-}
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-
-/**
- * Helper class for Wipe effects.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class PlatformWiper
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function PlatformWiper()
- {
- super();
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The target.
- */
- private var _target:IUIBase;
-
- /**
- * @private
- * The old overflow value.
- */
- private var _overflow:String;
-
- /**
- * The object that will be clipped.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set target(value:IUIBase):void
- {
- COMPILE::AS3
- {
- if (value == null)
- DisplayObject(_target).scrollRect = null;
- _target = value;
- }
- COMPILE::JS
- {
- if (value == null)
- {
- if (_overflow == null)
- delete _target.positioner.style["overflow"];
- else
- _target.positioner.style.overflow = _overflow;
- }
- _target = value;
- if (value != null) {
- _overflow = _target.positioner.style.overflow;
- }
- }
- }
-
- /**
- * The visible rectangle.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set visibleRect(value:Rectangle):void
- {
- COMPILE::AS3
- {
- DisplayObject(_target).scrollRect = value;
- }
- COMPILE::JS
- {
- _target.positioner.style.height = value.height.toString() + 'px';
- _target.positioner.style.overflow = 'hidden';
- }
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Resize.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Resize.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Resize.as
deleted file mode 100644
index 2ee1e15..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Resize.as
+++ /dev/null
@@ -1,197 +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.effects
-{
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-
-/**
- * The Resize effect animates a UI component's width or height.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Resize extends Tween implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param target Object ID or reference to an object that will
- * have its x and/or y property animated.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Resize(target:IUIBase = null)
- {
- super();
-
- this.actualTarget = target;
- startValue = 0;
- endValue = 1;
-
- listener = this;
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The target.
- */
- private var actualTarget:IUIBase;
-
- /**
- * The target as the String id
- * of a widget in an MXML Document.
- */
- public var target:String;
-
- /**
- * The change in width.
- */
- public var widthBy:Number;
-
- /**
- * The change in height.
- */
- public var heightBy:Number;
-
- /**
- * @private
- * The starting width.
- */
- private var widthStart:Number;
-
- /**
- * @private
- * The starting height.
- */
- private var heightStart:Number;
-
- /**
- * Starting width value. If NaN, the current width value is used
- */
- public var widthFrom:Number;
-
- /**
- * Starting height value. If NaN, the current height value is used
- */
- public var heightFrom:Number;
-
- /**
- * Ending width value.
- */
- public var widthTo:Number;
-
- /**
- * Ending height value.
- */
- public var heightTo:Number;
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- if (target != null)
- actualTarget = document[target];
-
- if (isNaN(widthFrom))
- widthStart = actualTarget.width;
- if (isNaN(widthBy))
- {
- if (isNaN(widthTo))
- widthBy = 0;
- else
- widthBy = widthTo - widthStart;
- }
-
- if (isNaN(heightFrom))
- heightStart = actualTarget.height;
- if (isNaN(heightBy))
- {
- if (isNaN(heightTo))
- heightBy = 0;
- else
- heightBy = heightTo - heightStart;
- }
- super.play();
- }
-
- public function onTweenUpdate(value:Number):void
- {
- if (widthBy)
- actualTarget.width = widthStart + value * widthBy;
- if (heightBy)
- actualTarget.height = heightStart + value * heightBy;
- }
-
- public function onTweenEnd(value:Number):void
- {
- if (widthBy)
- actualTarget.width = widthStart + widthBy;
- if (heightBy)
- actualTarget.height = heightStart + heightBy;
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Sequence.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Sequence.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Sequence.as
deleted file mode 100644
index f6c3343..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Sequence.as
+++ /dev/null
@@ -1,152 +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.effects
-{
-
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IUIBase;
-import org.apache.flex.events.Event;
-
-[DefaultProperty("children")]
-
-/**
- * The Sequence effect animates a set of effects one
- * at a time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Sequence extends Effect implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Sequence()
- {
- super();
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The target.
- */
- private var target:IUIBase;
-
- /**
- * The children.
- */
- public var children:Array;
-
-
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- */
- override public function set duration(value:Number):void
- {
- var n:int = children.length;
- for (var i:int = 0; i < 0; i++)
- {
- children[i].duration = value;
- }
- super.duration = value;
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- public function addChild(child:IEffect):void
- {
- if (!children)
- children = [ child ];
- else
- children.push(child);
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- dispatchEvent(new Event(Effect.EFFECT_START));
- current = 0;
- playChildEffect();
- }
-
- private var current:int;
-
- private function playChildEffect():void
- {
- var child:IEffect = children[current];
- child.addEventListener(Effect.EFFECT_END, effectEndHandler);
- child.play();
- }
-
- private function effectEndHandler(event:Event):void
- {
- current++;
- if (current >= children.length)
- dispatchEvent(new Event(Effect.EFFECT_END));
- else
- playChildEffect();
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Tween.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Tween.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Tween.as
deleted file mode 100644
index 3b9415e..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Tween.as
+++ /dev/null
@@ -1,665 +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.effects
-{
-
-import org.apache.flex.core.IEffectTimer;
-import org.apache.flex.core.ValuesManager;
-import org.apache.flex.events.ValueEvent;
-import org.apache.flex.events.Event;
-import org.apache.flex.events.EventDispatcher;
-
-/**
- * Tween is the underlying animation class for the effects in FlexJS.
- *
- * The Tween class defines a tween, a property animation performed
- * on a target object over a period of time.
- * That animation can be a change in position, such as performed by
- * the Move effect; a change in size, as performed by the Resize or
- * Zoom effects; a change in visibility, as performed by the Fade or
- * Dissolve effects; or other types of animations.
- *
- * <p>A Tween instance accepts the <code>startValue</code>,
- * <code>endValue</code>, and <code>duration</code> properties,
- * and an optional easing function to define the animation.</p>
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Tween extends Effect
-{
- //--------------------------------------------------------------------------
- //
- // Class constants
- //
- //--------------------------------------------------------------------------
-
- /**
- * The <code>Tween.TWEEN_END</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>tweenEnd</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * <tr><td><code>value</code></td><td>The value passed to the
- * <code>onTweenEnd()</code> method.</td></tr>
- * </table>
- *
- * @see org.apache.flex.effects.Effect
- * @see org.apache.flex.effects.TweenEffect
- * @see org.apache.flex.events.EffectEvent
- * @eventType tweenEnd
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const TWEEN_END:String = "tweenEnd";
-
- /**
- * The <code>Tween.TWEEN_START</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>tweenStart</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * <tr><td><code>value</code></td><td>The value passed to the
- * <code>onTweenUpdate()</code> method.</td></tr>
- * </table>
- *
- * @eventType tweenStart
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const TWEEN_START:String = "tweenStart";
-
- /**
- * The <code>Tween.TWEEN_UPDATE</code> constant defines the value of the
- * event object's <code>type</code> property for a <code>tweenUpdate</code> event.
- *
- * <p>The properties of the event object have the following values:</p>
- * <table class="innertable">
- * <tr><th>Property</th><th>Value</th></tr>
- * <tr><td><code>bubbles</code></td><td>false</td></tr>
- * <tr><td><code>cancelable</code></td><td>false</td></tr>
- * <tr><td><code>currentTarget</code></td><td>The Object that defines the
- * event listener that handles the event. For example, if you use
- * <code>myButton.addEventListener()</code> to register an event listener,
- * myButton is the value of the <code>currentTarget</code>. </td></tr>
- * <tr><td><code>target</code></td><td>The Object that dispatched the event;
- * it is not always the Object listening for the event.
- * Use the <code>currentTarget</code> property to always access the
- * Object listening for the event.</td></tr>
- * <tr><td><code>value</code></td><td>The value passed to the
- * <code>onTweenUpdate()</code> method.</td></tr>
- * </table>
- *
- * @eventType tweenUpdate
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public static const TWEEN_UPDATE:String = "tweenUpdate";
-
-
- //--------------------------------------------------------------------------
- //
- // Class variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * The list of tweens that are currently playing.
- */
- public static var activeTweens:Object = {};
-
- private static var timer:IEffectTimer;
-
- private static var currentID:int = 1;
-
- //--------------------------------------------------------------------------
- //
- // Class properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // currentTime
- //----------------------------------
-
- /**
- * Used by effects to get the current effect time tick.
- */
- public static var currentTime:Number = NaN;
-
- //--------------------------------------------------------------------------
- //
- // Class methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- */
- private static function addTween(tween:Tween):void
- {
- tween.id = currentID++;
-
- activeTweens[tween.id] = tween;
-
- if (!timer)
- {
- timer = ValuesManager.valuesImpl.newInstance(tween, "iEffectTimer") as IEffectTimer;
- timer.addEventListener("update", updateHandler);
- }
- currentTime = timer.start();
-
- tween.startTime = tween.previousUpdateTime = currentTime;
- }
-
-
- /**
- * @private
- */
- private static function removeTween(tween:Tween):void
- {
- delete activeTweens[tween.id];
- if (activeTweens.length == 0)
- timer.stop();
- }
-
- /**
- * @private
- */
- private static function updateHandler(event:ValueEvent):void
- {
- var oldTime:Number = currentTime;
-
- // the IEFfectTimer can control the current time
- // if it wants. This can be useful for automated
- // testing.
- currentTime = event.value as Number;
-
- for (var id:String in activeTweens)
- {
- var tween:Tween = Tween(activeTweens[id]);
- tween.update();
- }
- }
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Tween()
- {
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- */
- private var id:int = -1;
-
- /**
- * @private
- */
- private var _doSeek:Boolean = false;
-
- /**
- * @private
- */
- private var _isPlaying:Boolean = true;
-
- /**
- * @private
- */
- private var _doReverse:Boolean = false;
-
- /**
- * @private
- */
- private var startTime:Number;
-
- /**
- * @private
- */
- private var previousUpdateTime:Number;
-
- /**
- * @private
- */
- private var userEquation:Function;
-
- /**
- * Final value of the animation.
- */
- public var endValue:Number;
-
- /**
- * Initial value of the animation.
- */
- public var startValue:Number;
-
- /**
- * @private
- */
- private var started:Boolean = false;
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // listener
- //----------------------------------
-
- /**
- * Object that is notified at each interval of the animation.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var listener:Object;
-
- //----------------------------------
- // playheadTime
- //----------------------------------
-
- /**
- * @private
- * Storage for the playheadTime property.
- */
- private var _playheadTime:Number = 0;
-
- /**
- * @private
- * The current millisecond position in the tween.
- * This value is between 0 and duration.
- * Use the seek() method to change the position of the tween.
- */
- private function get playheadTime():Number
- {
- return _playheadTime;
- }
-
- //----------------------------------
- // playReversed
- //----------------------------------
-
- /**
- * @private
- * Storage for the playReversed property.
- */
- private var _invertValues:Boolean = false;
-
- /**
- * @private
- * Starts playing reversed from start of tween.
- * Setting this property to <code>true</code>
- * inverts the values returned by the tween.
- * Using reverse inverts the values and only plays
- * for as much time that has already elapsed.
- */
- private function get playReversed():Boolean
- {
- return _invertValues;
- }
-
- /**
- * @private
- */
- private function set playReversed(value:Boolean):void
- {
- _invertValues = value;
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
-
- /**
- * Sets the easing function for the animation.
- * The easing function is used to interpolate between
- * the <code>startValue</code> value and the <code>endValue</code>.
- * A trivial easing function does linear interpolation,
- * but more sophisticated easing functions create the illusion of
- * acceleration and deceleration, which makes the animation seem
- * more natural.
- *
- * <p>If no easing function is specified, an easing function based
- * on the <code>Math.sin()</code> method is used.</p>
- *
- * <p>The easing function follows the function signature
- * popularized by Robert Penner.
- * The function accepts four arguments.
- * The first argument is the "current time",
- * where the animation start time is 0.
- * The second argument is a the initial value
- * at the beginning of the animation (a Number).
- * The third argument is the ending value
- * minus the initial value.
- * The fourth argument is the duration of the animation.
- * The return value is the interpolated value for the current time
- * (usually a value between the initial value and the ending value).</p>
- *
- * <p>Flex includes a set of easing functions
- * in the mx.effects.easing package.</p>
- *
- * @param easingFunction Function that implements the easing equation.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function set easingFunction(value:Function):void
- {
- userEquation = value;
- }
-
- /**
- * Interrupt the tween, jump immediately to the end of the tween,
- * and invoke the <code>onTweenEnd()</code> callback function.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function endTween():void
- {
- var event:ValueEvent = new ValueEvent(Tween.TWEEN_END);
- var value:Object = getCurrentValue(duration);
-
- event.value = value;
-
- dispatchEvent(event);
-
- listener.onTweenEnd(value);
-
- dispatchEvent(new Event(Effect.EFFECT_END));
-
- // If tween has been added, id >= 0
- // but if duration = 0, this might not be the case.
- if (id >= 0) {
- Tween.removeTween(this);
- id = -1;
- }
- }
-
- /**
- * @private
- * Returns true if the tween has ended.
- */
- protected function update():Boolean
- {
- var tweenEnded:Boolean = false;
-
- // If user specified a minimum frames per second, we can't guarantee
- // that we'll be called often enough to satisfy that request.
- // However, we can avoid skipping over part of the animation.
- // If this callback arrives too late, adjust the animation startTime,
- // so that the animation starts up 'maxDelay' milliseconds
- // after its last update.
- /*
- if (intervalTime - previousUpdateTime > maxDelay)
- {
- startTime += intervalTime - previousUpdateTime - maxDelay;
- }
- */
- previousUpdateTime = currentTime;
-
- if (_isPlaying || _doSeek)
- {
-
- var elapsedTime:Number = currentTime - startTime;
- _playheadTime = elapsedTime;
-
- var currentValue:Object =
- getCurrentValue(elapsedTime);
-
- if (elapsedTime >= duration && !_doSeek)
- {
- endTween();
- tweenEnded = true;
- }
- else
- {
- if (!started)
- {
- var startEvent:ValueEvent = new ValueEvent(Tween.TWEEN_START);
- dispatchEvent(startEvent);
- started = true;
- }
-
- var event:ValueEvent =
- new ValueEvent(Tween.TWEEN_UPDATE);
- event.value = currentValue;
-
- dispatchEvent(event);
-
- listener.onTweenUpdate(currentValue);
- }
-
- _doSeek = false;
- }
- return tweenEnded;
- }
-
- /**
- * @private
- */
- protected function getCurrentValue(currentTime:Number):Object
- {
- if (duration == 0)
- {
- return endValue;
- }
-
- if (_invertValues)
- currentTime = duration - currentTime;
-
- return userEquation(currentTime, startValue,
- endValue - startValue,
- duration);
- }
-
- /**
- * @private
- */
- private function defaultEasingFunction(t:Number, b:Number,
- c:Number, d:Number):Number
- {
- return c / 2 * (Math.sin(Math.PI * (t / d - 0.5)) + 1) + b;
- }
-
- /**
- * Advances the tween effect to the specified position.
- *
- * @param playheadTime The position, in milliseconds, between 0
- * and the value of the <code>duration</code> property.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function seek(playheadTime:Number):void
- {
- // Set value between 0 and duration
- //playheadTime = Math.min(Math.max(playheadTime, 0), duration);
-
- var clockTime:Number = currentTime;
-
- // Reset the previous update time
- previousUpdateTime = clockTime;
-
- // Reset the start time
- startTime = clockTime - playheadTime;
-
- _doSeek = true;
-
- update();
- }
-
- /**
- * Plays the effect in reverse,
- * starting from the current position of the effect.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- override public function reverse():void
- {
- if (_isPlaying)
- {
- _doReverse = false;
- seek(duration - _playheadTime);
- _invertValues = !_invertValues;
- }
- else
- {
- _doReverse = !_doReverse;
- }
- }
-
- /**
- * Pauses the effect until you call the <code>resume()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- override public function pause():void
- {
- _isPlaying = false;
- }
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- override public function play():void
- {
- if (userEquation == null)
- userEquation = defaultEasingFunction;
- Tween.addTween(this);
- }
-
- /**
- * Stops the tween, ending it without dispatching an event or calling
- * the Tween's endFunction or <code>onTweenEnd()</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- override public function stop():void
- {
- if (id >= 0) {
- Tween.removeTween(this);
- id = -1;
- }
- }
-
- /**
- * Resumes the effect after it has been paused
- * by a call to the <code>pause()</code> method.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- override public function resume():void
- {
- _isPlaying = true;
-
- startTime = currentTime - _playheadTime;
- if (_doReverse)
- {
- reverse();
- _doReverse = false;
- }
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bbf9301e/frameworks/projects/Effects/as/src/org/apache/flex/effects/Wipe.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Wipe.as b/frameworks/projects/Effects/as/src/org/apache/flex/effects/Wipe.as
deleted file mode 100644
index fe83935..0000000
--- a/frameworks/projects/Effects/as/src/org/apache/flex/effects/Wipe.as
+++ /dev/null
@@ -1,156 +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.effects
-{
-
-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.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Wipe extends Tween implements IDocument
-{
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @param target Object ID or reference to an object that will
- * have its x and/or y property animated.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function Wipe(target:IUIBase = null)
- {
- super();
-
- this.actualTarget = target;
-
- listener = this;
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The document.
- */
- private var document:Object;
-
- /**
- * @private
- * The target.
- */
- private var actualTarget:IUIBase;
-
- /**
- * The target as the String id
- * of a widget in an MXML Document.
- */
- public var target:String;
-
- /**
- * The direction of the Wipe. "up" means the top will be the last
- * part to disappear. "down" will reveal from the top down.
- */
- public var direction:String;
-
- private var wiper:PlatformWiper = new PlatformWiper();
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- */
- override public function play():void
- {
- if (target != null)
- actualTarget = document[target];
-
-
- wiper.target = actualTarget;
- if (direction == "up")
- {
- startValue = actualTarget.height;
- endValue = 0;
- }
- else
- {
- startValue = 0;
- endValue = actualTarget.height;
- // WipeDown makes something appear
- actualTarget.visible = true;
- wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, 0);
- }
-
- super.play();
- }
-
- public function onTweenUpdate(value:Number):void
- {
- trace(actualTarget, value);
- wiper.visibleRect = new Rectangle(0, 0, actualTarget.width, value);
- }
-
- public function onTweenEnd(value:Number):void
- {
- // WipeUp makes something disappear
- if (direction == "up")
- actualTarget.visible = false;
- wiper.target = null;
- }
-}
-
-}
[50/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix up
FB projects
Posted by ah...@apache.org.
fix up FB projects
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/17e9ced2
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/17e9ced2
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/17e9ced2
Branch: refs/heads/develop
Commit: 17e9ced260d4567416592056760fb0d88afc704c
Parents: 7e71972
Author: Alex Harui <ah...@apache.org>
Authored: Wed Feb 3 09:48:54 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Feb 3 10:01:54 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Binding/.actionScriptProperties | 2 +-
frameworks/projects/Charts/.actionScriptProperties | 2 +-
frameworks/projects/Collections/.actionScriptProperties | 2 +-
frameworks/projects/Core/.actionScriptProperties | 2 +-
frameworks/projects/CreateJS/.actionScriptProperties | 2 +-
frameworks/projects/DragDrop/.actionScriptProperties | 2 +-
frameworks/projects/Effects/.actionScriptProperties | 2 +-
frameworks/projects/Formatters/.actionScriptProperties | 2 +-
frameworks/projects/GoogleMaps/.actionScriptProperties | 2 +-
frameworks/projects/Graphics/.actionScriptProperties | 2 +-
frameworks/projects/HTML/.actionScriptProperties | 2 +-
frameworks/projects/JQuery/.actionScriptProperties | 2 +-
frameworks/projects/Mobile/.actionScriptProperties | 4 ++--
frameworks/projects/Network/.actionScriptProperties | 2 +-
14 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Binding/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/.actionScriptProperties b/frameworks/projects/Binding/.actionScriptProperties
index 8a2a557..749472a 100644
--- a/frameworks/projects/Binding/.actionScriptProperties
+++ b/frameworks/projects/Binding/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Binding.as" projectUUID="cdd94532-d7f6-40f0-b19c-de82c6e44011" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Charts/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/.actionScriptProperties b/frameworks/projects/Charts/.actionScriptProperties
index b415b56..fe4d75b 100644
--- a/frameworks/projects/Charts/.actionScriptProperties
+++ b/frameworks/projects/Charts/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Charts.as" projectUUID="e231d754-8754-4562-8230-026f11fb4e02" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Collections/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/.actionScriptProperties b/frameworks/projects/Collections/.actionScriptProperties
index af39df1..cb3b098 100644
--- a/frameworks/projects/Collections/.actionScriptProperties
+++ b/frameworks/projects/Collections/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Collections.as" projectUUID="03015f5b-acd3-493a-a697-34c3d1e91c89" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Core/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/.actionScriptProperties b/frameworks/projects/Core/.actionScriptProperties
index ade669e..29d2237 100644
--- a/frameworks/projects/Core/.actionScriptProperties
+++ b/frameworks/projects/Core/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Core.as" projectUUID="be5b3edf-e159-406d-a592-1f8d39993fea" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/CreateJS/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/.actionScriptProperties b/frameworks/projects/CreateJS/.actionScriptProperties
index 7a49a92..895d315 100644
--- a/frameworks/projects/CreateJS/.actionScriptProperties
+++ b/frameworks/projects/CreateJS/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="CreateJS.as" projectUUID="7d9af24d-d32d-4e14-b0ee-f799e604c2bc" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/DragDrop/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/.actionScriptProperties b/frameworks/projects/DragDrop/.actionScriptProperties
index b818fcb..31bdd0c 100644
--- a/frameworks/projects/DragDrop/.actionScriptProperties
+++ b/frameworks/projects/DragDrop/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="DragDrop.as" projectUUID="8736dc4b-71dc-4f2c-9181-5295a09b7c7e" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Effects/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/.actionScriptProperties b/frameworks/projects/Effects/.actionScriptProperties
index 629fa74..ee9e89c 100644
--- a/frameworks/projects/Effects/.actionScriptProperties
+++ b/frameworks/projects/Effects/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Effects.as" projectUUID="c7b22e99-ecef-48e3-90be-f80d3bc54d5f" version="11">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Formatters/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/.actionScriptProperties b/frameworks/projects/Formatters/.actionScriptProperties
index b9b3dbf..e2839d7 100644
--- a/frameworks/projects/Formatters/.actionScriptProperties
+++ b/frameworks/projects/Formatters/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Formatters.as" projectUUID="187f4b92-5fcd-4cee-ac61-58362a56ba1b" version="11">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/GoogleMaps/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/.actionScriptProperties b/frameworks/projects/GoogleMaps/.actionScriptProperties
index b9ddd2f..f4f70d3 100644
--- a/frameworks/projects/GoogleMaps/.actionScriptProperties
+++ b/frameworks/projects/GoogleMaps/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="GoogleMaps.as" projectUUID="7d907ea6-da29-4573-9741-08d2cf0f85d6" version="11">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Graphics/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/.actionScriptProperties b/frameworks/projects/Graphics/.actionScriptProperties
index a081489..ca982d7 100644
--- a/frameworks/projects/Graphics/.actionScriptProperties
+++ b/frameworks/projects/Graphics/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Graphics.as" projectUUID="ff3e0531-b7c9-4b0c-9146-05c27a47f837" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/HTML/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/.actionScriptProperties b/frameworks/projects/HTML/.actionScriptProperties
index 1803939..de24800 100644
--- a/frameworks/projects/HTML/.actionScriptProperties
+++ b/frameworks/projects/HTML/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="HTML.as" projectUUID="10468643-4626-481f-ba6b-3f035ccbbabb" version="11">
- <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US -define=COMPILE::AS3,true -define=COMPILE::JS,false" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/JQuery/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/.actionScriptProperties b/frameworks/projects/JQuery/.actionScriptProperties
index 378cc06..358adba 100644
--- a/frameworks/projects/JQuery/.actionScriptProperties
+++ b/frameworks/projects/JQuery/.actionScriptProperties
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="JQuery.as" projectUUID="edaaba36-aa7e-491c-a242-f619527ec54d" version="11">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Mobile/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/.actionScriptProperties b/frameworks/projects/Mobile/.actionScriptProperties
index dc216aa..4a3db46 100644
--- a/frameworks/projects/Mobile/.actionScriptProperties
+++ b/frameworks/projects/Mobile/.actionScriptProperties
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+src/main/flex<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Mobile.as" projectUUID="b4358e31-bd95-4301-a3d3-f0e67881b93b" version="11">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="0">
<libraryPathEntry kind="4" path="">
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/17e9ced2/frameworks/projects/Network/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Network/.actionScriptProperties b/frameworks/projects/Network/.actionScriptProperties
index 034e154..5aaef5b 100644
--- a/frameworks/projects/Network/.actionScriptProperties
+++ b/frameworks/projects/Network/.actionScriptProperties
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+src/main/flex<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="Network.as" projectUUID="9a67bdd4-1c63-4e33-b469-1af43c3cdf12" version="11">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" removeUnusedRSL="true" sourceFolderPath="as/src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
<compilerSourcePath/>
[23/51] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - new
folders for GoogleMaps
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places.as
deleted file mode 100644
index 0706b50..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places.as
+++ /dev/null
@@ -1,103 +0,0 @@
-package google.maps {
-
-import google.maps.places.RankBy;
-import google.maps.places.PlacesServiceStatus;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class places {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function places():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var RankBy:google.maps.places.RankBy;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var PlacesServiceStatus:google.maps.places.PlacesServiceStatus;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function TextSearchRequest():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PredictionSubstring():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function AutocompletionRequest():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PlaceDetailsRequest():void { }
-
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PredictionTerm():void { }
-
-
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function AutocompleteOptions():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function SearchBoxOptions():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PlacePhoto():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function QueryAutocompletePrediction():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function QueryAutocompletionRequest():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function AutocompletePrediction():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function PlaceSearchRequest():void { }
-
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function RadarSearchRequest():void { }
-
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/Autocomplete.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/Autocomplete.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/Autocomplete.as
deleted file mode 100644
index e1bf0f0..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/Autocomplete.as
+++ /dev/null
@@ -1,55 +0,0 @@
-package google.maps.places {
-
-import google.maps.MVCObject;
-import google.maps.LatLngBounds;
-import google.pseudo.HTMLInputElement;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class Autocomplete extends google.maps.MVCObject {
-
- /**
- * @param inputField [(HTMLInputElement|null)]
- * @param opt_opts [(Object<?,string>|google.maps.places.AutocompleteOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function Autocomplete(inputField:HTMLInputElement, opt_opts:Object = null) {
- super();
- }
-
- /**
- * @param restrictions [(google.maps.places.ComponentRestrictions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setComponentRestrictions(restrictions:google.maps.places.ComponentRestrictions):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @param bounds [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
-
- /**
- * @param types [(Array<string>|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setTypes(types:Array):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.places.PlaceResult|null)}
- */
- public function getPlace():google.maps.places.PlaceResult { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/AutocompleteService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/AutocompleteService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/AutocompleteService.as
deleted file mode 100644
index 48399b4..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/AutocompleteService.as
+++ /dev/null
@@ -1,32 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class AutocompleteService {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function AutocompleteService() {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.AutocompletionRequest|null)]
- * @param callback [function ((Array<(google.maps.places.AutocompletePrediction|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getPlacePredictions(request:Object, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.QueryAutocompletionRequest|null)]
- * @param callback [function ((Array<(google.maps.places.QueryAutocompletePrediction|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getQueryPredictions(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/ComponentRestrictions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/ComponentRestrictions.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/ComponentRestrictions.as
deleted file mode 100644
index 7168e10..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/ComponentRestrictions.as
+++ /dev/null
@@ -1,22 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class ComponentRestrictions {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function ComponentRestrictions() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var country:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PhotoOptions.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PhotoOptions.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PhotoOptions.as
deleted file mode 100644
index b241e72..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PhotoOptions.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PhotoOptions {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PhotoOptions() {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var maxWidth:Number;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var maxHeight:Number;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceAspectRating.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceAspectRating.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceAspectRating.as
deleted file mode 100644
index f358773..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceAspectRating.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlaceAspectRating {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PlaceAspectRating() {
- super();
- }
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var rating:Number;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var type:String;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceGeometry.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceGeometry.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceGeometry.as
deleted file mode 100644
index dedf940..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceGeometry.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps.places {
-
-import google.maps.LatLng;
-import google.maps.LatLngBounds;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlaceGeometry {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PlaceGeometry() {
- super();
- }
-
- /**
- * @see JSType - [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- */
- public var viewport:google.maps.LatLngBounds;
-
- /**
- * @see JSType - [(google.maps.LatLng|null)]
- * @see [google_maps_api_v3_11]
- */
- public var location:google.maps.LatLng;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceResult.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceResult.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceResult.as
deleted file mode 100644
index 141b4e9..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceResult.as
+++ /dev/null
@@ -1,142 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlaceResult {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PlaceResult() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var icon:String;
-
- /**
- * @see JSType - [(Array((google.maps.places.PlaceReview|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var reviews:Array;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var website:String;
-
- /**
- * @see JSType - [(Array((google.maps.places.PlaceAspectRating|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var aspects:Array;
-
- /**
- * @see JSType - [boolean]
- * @see [google_maps_api_v3_11]
- */
- public var permanently_closed:Boolean;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var review_summary:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var international_phone_number:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var url:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var reference:String;
-
- /**
- * @see JSType - [(google.maps.places.PlaceGeometry|null)]
- * @see [google_maps_api_v3_11]
- */
- public var geometry:google.maps.places.PlaceGeometry;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var price_level:Number;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var id:String;
-
- /**
- * @see JSType - [(Array((google.maps.places.PlacePhoto|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var photos:Array;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var vicinity:String;
-
- /**
- * @see JSType - [(Array(string)|null)]
- * @see [google_maps_api_v3_11]
- */
- public var html_attributions:Array;
-
- /**
- * @see JSType - [(Array((google.maps.GeocoderAddressComponent|null))|null)]
- * @see [google_maps_api_v3_11]
- */
- public var address_components:Array;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var name:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var formatted_address:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var formatted_phone_number:String;
-
- /**
- * @see JSType - [number]
- * @see [google_maps_api_v3_11]
- */
- public var rating:Number;
-
- /**
- * @see JSType - [(Array(string)|null)]
- * @see [google_maps_api_v3_11]
- */
- public var types:Array;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceReview.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceReview.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceReview.as
deleted file mode 100644
index daf9a63..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceReview.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlaceReview {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PlaceReview() {
- super();
- }
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var text:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var author_url:String;
-
- /**
- * @see JSType - [string]
- * @see [google_maps_api_v3_11]
- */
- public var author_name:String;
-
- /**
- * @see JSType - [(Array(google.maps.places.PlaceAspectRating|null)|null)]
- * @see [google_maps_api_v3_11]
- */
- public var aspects:Array;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceSearchPagination.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceSearchPagination.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceSearchPagination.as
deleted file mode 100644
index 376e07f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlaceSearchPagination.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlaceSearchPagination {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function PlaceSearchPagination() {
- super();
- }
-
- /**
- * @see JSType - [boolean]
- * @see [google_maps_api_v3_11]
- */
- public var hasNextPage:Boolean;
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function nextPage():Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesService.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesService.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesService.as
deleted file mode 100644
index e8c5a5a..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesService.as
+++ /dev/null
@@ -1,49 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlacesService {
-
- /**
- * @param attrContainer [(HTMLDivElement|google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- */
- public function PlacesService(attrContainer:Object) {
- super();
- }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.PlaceDetailsRequest|null)]
- * @param callback [function ((google.maps.places.PlaceResult|null), (google.maps.places.PlacesServiceStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function getDetails(request:Object, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.RadarSearchRequest|null)]
- * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function radarSearch(request:Object, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.PlaceSearchRequest|null)]
- * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null), (google.maps.places.PlaceSearchPagination|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function nearbySearch(request:Object, callback:Object):Object /* undefined */ { return null; }
-
- /**
- * @param request [(Object<?,string>|google.maps.places.TextSearchRequest|null)]
- * @param callback [function ((Array<(google.maps.places.PlaceResult|null)>|null), (google.maps.places.PlacesServiceStatus|null)): ?]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function textSearch(request:Object, callback:Object):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesServiceStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesServiceStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesServiceStatus.as
deleted file mode 100644
index 94b4702..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/PlacesServiceStatus.as
+++ /dev/null
@@ -1,52 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class PlacesServiceStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OVER_QUERY_LIMIT:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const REQUEST_DENIED:String = '4';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const ZERO_RESULTS:String = '';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_REQUEST:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '5';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/RankBy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/RankBy.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/RankBy.as
deleted file mode 100644
index a744e12..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/RankBy.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps.places {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class RankBy {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const DISTANCE:Number = 0;
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const PROMINENCE:Number = 1;
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/places/SearchBox.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/places/SearchBox.as b/frameworks/projects/GoogleMaps/as/src/google/maps/places/SearchBox.as
deleted file mode 100644
index 20ae004..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/places/SearchBox.as
+++ /dev/null
@@ -1,42 +0,0 @@
-package google.maps.places {
-
-import google.maps.MVCObject;
-import google.maps.LatLngBounds;
-import google.pseudo.Node;
-import google.pseudo.HTMLInputElement;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class SearchBox extends google.maps.MVCObject {
-
- /**
- * @param inputField [(HTMLInputElement|null)]
- * @param opt_opts [(Object<?,string>|google.maps.places.SearchBoxOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function SearchBox(inputField:HTMLInputElement, opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Array<(google.maps.places.PlaceResult|null)>|null)}
- */
- public function getPlaces():Array { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.LatLngBounds|null)}
- */
- public function getBounds():google.maps.LatLngBounds { return null; }
-
- /**
- * @param bounds [(google.maps.LatLngBounds|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setBounds(bounds:google.maps.LatLngBounds):Object /* undefined */ { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization.as b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization.as
deleted file mode 100644
index 0547a3f..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization.as
+++ /dev/null
@@ -1,74 +0,0 @@
-package google.maps {
-
-import google.maps.visualization.MapsEngineStatus;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class visualization {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function visualization():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var MapsEngineStatus:google.maps.visualization.MapsEngineStatus;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DemographicsLayerOptions():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function HeatmapLayerOptions():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DemographicsStyle():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function MapsEngineLayerOptions():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DemographicsPolygonOptions():void { }
-
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DemographicsQuery():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function MapsEngineLayerProperties():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeightedLocation():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function DemographicsPropertyStyle():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function MapsEngineMouseEvent():void { }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/DemographicsLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/DemographicsLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/DemographicsLayer.as
deleted file mode 100644
index d4e8bc3..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/DemographicsLayer.as
+++ /dev/null
@@ -1,65 +0,0 @@
-package google.maps.visualization {
-
-import google.maps.Map;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class DemographicsLayer {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.visualization.DemographicsLayerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function DemographicsLayer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.visualization.DemographicsQuery|null)}
- */
- public function getQuery():google.maps.visualization.DemographicsQuery { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.visualization.DemographicsLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param query [(google.maps.visualization.DemographicsQuery|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setQuery(query:google.maps.visualization.DemographicsQuery):Object /* undefined */ { return null; }
-
- /**
- * @param style [(Array<(google.maps.visualization.DemographicsStyle|null)>|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setStyle(style:Array):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(Array<(google.maps.visualization.DemographicsStyle|null)>|null)}
- */
- public function getStyle():Array { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/HeatmapLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/HeatmapLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/HeatmapLayer.as
deleted file mode 100644
index 8de2728..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/HeatmapLayer.as
+++ /dev/null
@@ -1,47 +0,0 @@
-package google.maps.visualization {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-import google.maps.MVCArray;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class HeatmapLayer extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.visualization.HeatmapLayerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function HeatmapLayer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.MVCArray|null)}
- */
- public function getData():google.maps.MVCArray { return null; }
-
- /**
- * @param data [(Array<(google.maps.LatLng|google.maps.visualization.WeightedLocation|null)>|google.maps.MVCArray|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setData(data:Object):Object /* undefined */ { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineLayer.as
deleted file mode 100644
index 561df98..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineLayer.as
+++ /dev/null
@@ -1,91 +0,0 @@
-package google.maps.visualization {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class MapsEngineLayer extends google.maps.MVCObject {
-
- /**
- * @param options [(Object<?,string>|google.maps.visualization.MapsEngineLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- */
- public function MapsEngineLayer(options:Object) {
- super();
- }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.visualization.MapsEngineStatus|null)}
- */
- public function getStatus():google.maps.visualization.MapsEngineStatus { return null; }
-
- /**
- * @param layerId [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setLayerId(layerId:String):Object /* undefined */ { return null; }
-
- /**
- * @param options [(Object<?,string>|google.maps.visualization.MapsEngineLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param layerKey [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setLayerKey(layerKey:String):Object /* undefined */ { return null; }
-
- /**
- * @param mapId [string]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMapId(mapId:String):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getMapId():String { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.visualization.MapsEngineLayerProperties|null)}
- */
- public function getProperties():google.maps.visualization.MapsEngineLayerProperties { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getLayerKey():String { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {string}
- */
- public function getLayerId():String { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineStatus.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineStatus.as b/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineStatus.as
deleted file mode 100644
index 68a2adc..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/visualization/MapsEngineStatus.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps.visualization {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class MapsEngineStatus {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const OK:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const UNKNOWN_ERROR:String = '3';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const INVALID_LAYER:String = '1';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather.as
deleted file mode 100644
index d995229..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather.as
+++ /dev/null
@@ -1,60 +0,0 @@
-package google.maps {
-
-import google.maps.weather.WindSpeedUnit;
-import google.maps.weather.LabelColor;
-import google.maps.weather.TemperatureUnit;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class weather {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function weather():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var TemperatureUnit:google.maps.weather.TemperatureUnit;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var LabelColor:google.maps.weather.LabelColor;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public var WindSpeedUnit:google.maps.weather.WindSpeedUnit;
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeatherMouseEvent():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeatherForecast():void { }
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeatherConditions():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeatherFeature():void { }
-
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public static function WeatherLayerOptions():void { }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/CloudLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/CloudLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/CloudLayer.as
deleted file mode 100644
index 9914927..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/CloudLayer.as
+++ /dev/null
@@ -1,32 +0,0 @@
-package google.maps.weather {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class CloudLayer extends google.maps.MVCObject {
-
- /**
- * @see [google_maps_api_v3_11]
- */
- public function CloudLayer() {
- super();
- }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/LabelColor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/LabelColor.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/LabelColor.as
deleted file mode 100644
index a46098b..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/LabelColor.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps.weather {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class LabelColor {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const WHITE:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const BLACK:String = '1';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/TemperatureUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/TemperatureUnit.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/TemperatureUnit.as
deleted file mode 100644
index f7a49e1..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/TemperatureUnit.as
+++ /dev/null
@@ -1,24 +0,0 @@
-package google.maps.weather {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class TemperatureUnit {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const CELSIUS:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const FAHRENHEIT:String = '2';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WeatherLayer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WeatherLayer.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WeatherLayer.as
deleted file mode 100644
index b76c968..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WeatherLayer.as
+++ /dev/null
@@ -1,40 +0,0 @@
-package google.maps.weather {
-
-import google.maps.Map;
-import google.maps.MVCObject;
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor extends google.maps.MVCObject */
-public class WeatherLayer extends google.maps.MVCObject {
-
- /**
- * @param opt_opts [(Object<?,string>|google.maps.weather.WeatherLayerOptions|null|undefined)]
- * @see [google_maps_api_v3_11]
- */
- public function WeatherLayer(opt_opts:Object = null) {
- super();
- }
-
- /**
- * @param options [(Object<?,string>|google.maps.weather.WeatherLayerOptions|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setOptions(options:Object):Object /* undefined */ { return null; }
-
- /**
- * @param map [(google.maps.Map|null)]
- * @see [google_maps_api_v3_11]
- * @returns {undefined}
- */
- public function setMap(map:google.maps.Map):Object /* undefined */ { return null; }
-
- /**
- * @see [google_maps_api_v3_11]
- * @returns {(google.maps.Map|null)}
- */
- public function getMap():google.maps.Map { return null; }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WindSpeedUnit.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WindSpeedUnit.as b/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WindSpeedUnit.as
deleted file mode 100644
index a4aaaab..0000000
--- a/frameworks/projects/GoogleMaps/as/src/google/maps/weather/WindSpeedUnit.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package google.maps.weather {
-
-/**
- * @see [google_maps_api_v3_11]
- * @constructor */
-public class WindSpeedUnit {
-
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const METERS_PER_SECOND:String = '2';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const KILOMETERS_PER_HOUR:String = '1';
-
- /**
- * Generated doc for missing field JSDoc.
- *
- * @see [google_maps_api_v3_11]
- */
- public static const MILES_PER_HOUR:String = '3';
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/GoogleMap.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/GoogleMap.as b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/GoogleMap.as
deleted file mode 100644
index a4e0fcb..0000000
--- a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/GoogleMap.as
+++ /dev/null
@@ -1,133 +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.maps.google
-{
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.maps.google.beads.GoogleMapView;
- import org.apache.flex.maps.google.models.MapModel;
-
- import google.maps.LatLng;
- import google.maps.Marker;
-
- [Event(name="ready", type="org.apache.flex.events.Event")]
- [Event(name="centered", type="org.apache.flex.events.Event")]
- [Event(name="boundsChanged", type="org.apache.flex.events.Event")]
- [Event(name="zoomChanged", type="org.apache.flex.events.Event")]
- [Event(name="dragEnd", type="org.apache.flex.events.Event")]
- [Event(name="searchResult", type="org.apache.flex.events.Event")]
- [Event(name="markerClicked", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * The Map class displays a Google Map centered on lat/lng coordinates. The Map uses
- * the following bead type:
- *
- * org.apache.flex.maps.beads.MapView: Uses HTMLLoader to display the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignoreimport goog.bind
- * @flexjsignoreimport google.maps.event
- */
- public class GoogleMap extends UIBase
- {
-
- public function GoogleMap()
- {
- super();
-
- className = "Map";
-
- var model:IBeadModel = getBeadByType(IBeadModel) as IBeadModel;
- if (model == null) {
- model = new MapModel();
- addBead(model);
- }
- }
-
- public function get token():String
- {
- return MapModel(model).token;
- }
- public function set token(value:String):void
- {
- MapModel(model).token = value;
- }
-
- public function get selectedMarker():Marker
- {
- return MapModel(model).selectedMarker;
- }
-
- public function get searchResults():Array
- {
- return MapModel(model).searchResults;
- }
-
- public function loadMap( centerLat:Number, centerLong:Number, zoom:Number ) : void
- {
- GoogleMapView(view).mapit(centerLat, centerLong, zoom);
- }
-
- public function setZoom(zoomLevel:Number):void
- {
- MapModel(model).zoom = zoomLevel;
- }
-
- public function centerOnAddress(address:String):void
- {
- GoogleMapView(view).centerOnAddress(address);
- }
-
- public function setCenter(location:LatLng):void
- {
- GoogleMapView(view).setCenter(location);
- }
-
- public function markCurrentLocation():void
- {
- GoogleMapView(view).markCurrentLocation();
- }
-
- public function markAddress(address:String):void
- {
- GoogleMapView(view).markAddress(address);
- }
-
- public function createMarker(location:LatLng):Marker
- {
- return GoogleMapView(view).createMarker(location);
- }
-
- public function nearbySearch(placeName:String):void
- {
- GoogleMapView(view).nearbySearch(placeName);
- }
-
- public function clearSearchResults():void
- {
- GoogleMapView(view).clearSearchResults();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1d75577b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as b/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as
deleted file mode 100644
index 304c984..0000000
--- a/frameworks/projects/GoogleMaps/as/src/org/apache/flex/maps/google/beads/GoogleMapView.as
+++ /dev/null
@@ -1,866 +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.maps.google.beads
-{
- COMPILE::AS3 {
- import flash.events.Event;
- import flash.net.URLRequest;
- import flash.filesystem.File;
- import flash.filesystem.FileMode;
- import flash.filesystem.FileStream;
-
- import org.apache.flex.utils.HTMLLoader;
- }
-
- import org.apache.flex.core.BeadViewBase;
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.core.UIBase;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.maps.google.GoogleMap;
- import org.apache.flex.maps.google.models.MapModel;
-
- COMPILE::JS {
- import goog.bind;
- }
-
- import google.maps.event;
- import google.maps.Geocoder;
- import google.maps.GeocoderResult;
- import google.maps.GeocoderStatus;
- import google.maps.LatLng;
- import google.maps.Map;
- import google.maps.Marker;
- import google.maps.places.PlaceResult;
- import google.maps.places.PlacesService;
- import google.maps.places.PlacesServiceStatus;
-
- /**
- * The MapView bead class displays a Google Map using HTMLLoader.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- public class GoogleMapView extends BeadViewBase implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function GoogleMapView()
- {
- super();
- }
-
- private var realMap:Map;
- private var geocoder:Geocoder;
- private var initialized:Boolean = false;
- private var markers:Array;
- private var searchResults:Array;
- private var service:PlacesService;
-
- 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
- */
- override public function set strand(value:IStrand):void
- {
- super.strand = value;
- _strand = value;
-
- var token:String = (_strand as GoogleMap).token;
- var src:String = 'https://maps.googleapis.com/maps/api/js?v=3.exp';
- if (token)
- src += '&key=' + token;
- src += '&libraries=geometry,places&callback=mapInit';
-
- var script:HTMLScriptElement = document.createElement('script') as HTMLScriptElement;
- script.type = 'text/javascript';
- script.src = src;
-
- window['mapView'] = this;
- window['mapInit'] = function():void {
- (this['mapView'] as GoogleMapView).finishInitialization();
- }
-
- document.head.appendChild(script);
- }
-
- /**
- * Adjusts the map to the given coordinate and zoom level.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function mapit( centerLat:Number, centerLng:Number, zoom:Number ):void
- {
- if (!initialized) {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.currentCenter = new LatLng(centerLat, centerLng);
- model.zoom = zoom;
- var mapOptions:Object = new Object();
- mapOptions['center'] = model.currentCenter;
- mapOptions['zoom'] = zoom;
-
- realMap = new Map((_strand as UIBase).element, mapOptions);
- geocoder = null;
-
- model.addEventListener("zoomChanged", handleModelChange);
-
- google.maps.event.addListener(realMap, 'center_changed', goog.bind(centerChangeHandler, this));
- google.maps.event.addListener(realMap, 'bounds_changed', goog.bind(boundsChangeHandler, this));
- google.maps.event.addListener(realMap, 'zoom_changed', goog.bind(zoomChangeHandler, this));
- }
- }
-
- /**
- * @private
- */
- private function finishInitialization():void
- {
- mapit(37.333, -121.900, 12);
- initialized = true;
- dispatchEvent(new Event('ready'));
- }
-
- /**
- * Centers the map on the address given.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function centerOnAddress(value:String):void
- {
- if (geocoder == null) geocoder = new Geocoder();
- geocoder.geocode({address:value}, positionHandler);
- }
-
- /**
- * Sets the center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setCenter(location:LatLng):void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.currentCenter = new LatLng(location.lat(), location.lng());
- realMap.setCenter(model.currentCenter);
- }
-
- /**
- * Marks the current center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function markCurrentLocation():void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- createMarker(model.currentCenter as LatLng);
- }
-
- /**
- * Finds the given address and places a marker on it. This function may be dropped
- * since centerOnAddress + markCurrentLocation does the same thing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function markAddress(address:String):void
- {
- if (initialized) {
- if (geocoder == null) geocoder = new Geocoder();
- geocoder.geocode({address:address}, geocodeHandler);
- }
- }
-
- /**
- * Creates a marker for placement on the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion google.maps.Marker
- */
- public function createMarker(location:LatLng):Marker
- {
- var marker:Marker = new Marker({map:realMap, position:location});
- // google.maps.event.addListener(marker, 'click', goog.bind(markerClicked, this));
- marker.addListener('click', markerClicked);
-
- return marker;
- }
-
- /**
- * Performs a search near the center of map. The result is a set of
- * markers displayed on the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function nearbySearch(placeName:String):void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
-
- if (markers == null) markers = [];
- service = new PlacesService(realMap);
- service.nearbySearch({location:model.currentCenter, radius:5000, name:placeName}, searchResultsHandler);
- }
-
- /**
- * Clears the previous search results.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function clearSearchResults():void
- {
- if (markers) {
- for(var i:int=0; i < markers.length; i++) {
- var m:Marker = markers[i] as Marker;
- m.setMap(null);
- }
- markers = null;
- }
- }
-
- // Callbacks
-
- /**
- * @private
- */
- public function centerChangeHandler() : void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.currentCenter = realMap.getCenter();
-
- var newEvent:Event = new Event('centered');
- (_strand as IEventDispatcher).dispatchEvent(newEvent);
- }
-
- /**
- * @private
- */
- public function boundsChangeHandler():void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.currentCenter = realMap.getCenter();
-
- var newEvent:Event = new Event('boundsChanged');
- (_strand as IEventDispatcher).dispatchEvent(newEvent);
- }
-
- /**
- * @private
- */
- public function zoomChangeHandler():void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.currentCenter = realMap.getCenter();
-
- var newEvent:Event = new Event('zoomChanged');
- (_strand as IEventDispatcher).dispatchEvent(newEvent);
- }
-
- /**
- * @private
- */
- public function positionHandler(results:Array, status:String):void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- if (status == GeocoderStatus.OK) {
- model.currentCenter = results[0].geometry.location;
- realMap.setCenter(model.currentCenter);
-
- // dispatch an event to indicate the map has been centered
- }
- }
-
- /**
- * @flexjsignorecoercion google.maps.Marker
- * @flexjsignorecoercion google.maps.LatLng
- */
- public function geocodeHandler(results:Array, status:String):void
- {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- if (status == GeocoderStatus.OK) {
- model.currentCenter = results[0].geometry.location;
- realMap.setCenter(model.currentCenter);
-
- var marker:Marker = new Marker({map:realMap, position:model.currentCenter});
- }
- }
-
- /**
- * @private
- */
- public function searchResultsHandler(results:Array, status:String):void
- {
- searchResults = [];
- if (status == PlacesServiceStatus.OK) {
- for(var i:int=0; i < results.length; i++) {
- /*var place:PlaceResult = new PlaceResult();
- place.geometry.location = new LatLng(results[i].geometry.location.lat(), results[i].geometry.location.lng());
- place.icon = results[i].icon;
- place.id = results[i].id;
- place.name = results[i].name;
- place.reference = results[i].reference;
- place.vicinity = results[i].vicinity;*/
- var place:Object = results[i];
- searchResults.push(place);
-
- var marker:Marker = createMarker(place.geometry.location);
- marker.setTitle(place.name);
-
- markers.push(marker);
- }
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.searchResults = searchResults;
- }
- }
-
- // Event handlers
-
- /**
- * Handles changes to properties of the MapModel. When this value is
- * changed, the map itself has its zoom changed. This will trigger an
- * event on the map that will be handled by functions above.
- */
- public function handleModelChange(event:Event):void
- {
- if (event.type == "zoomChanged") {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- realMap.setZoom(model.zoom);
- }
- }
-
- /**
- * @flexjsignorecoercion google.maps.Marker
- * @flexjsignorecoercion google.maps.LatLng
- */
- public function markerClicked(marker:Marker):void
- {
- var newMarker:Marker = new Marker({
- position: marker["latLng"],
- title: marker["title"],
- map: realMap
- });
-
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.selectedMarker = newMarker;
-
- var newEvent:Event = new Event('markerClicked');
- IEventDispatcher(_strand).dispatchEvent(newEvent);
- }
-
- } // end ::JS
-
-
-
- /**
- * The AS3 version of GoogleMapView is geared toward its use with HTMLLoader
- * for AIR.
- */
- COMPILE::AS3
- public class GoogleMapView extends BeadViewBase implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function GoogleMapView()
- {
- super();
- }
-
- private var _loader:HTMLLoader;
- private var page:String;
-
- /**
- * @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;
-
- _loader = new HTMLLoader();
- _loader.x = 0;
- _loader.y = 0;
- _loader.width = UIBase(value).width;
- _loader.height = UIBase(value).height;
- _loader.placeLoadStringContentInApplicationSandbox = false;
-
- IEventDispatcher(_strand).addEventListener("widthChanged",handleSizeChange);
- IEventDispatcher(_strand).addEventListener("heightChanged",handleSizeChange);
-
- var model:IBeadModel = _strand.getBeadByType(IBeadModel) as IBeadModel;
- model.addEventListener("zoomChanged", handleZoomChange);
- model.addEventListener("currentLocationChanged", handleCurrentLocationChange);
-
- (_strand as UIBase).addChild(_loader);
-
- var token:String = GoogleMap(_strand).token;
- if (token)
- page = pageTemplateStart + "&key=" + token + pageTemplateEnd;
- else
- page = pageTemplateStart + pageTemplateEnd;
-
- var pathToFile:String;
-
- if (page) {
- pathToFile = File.applicationDirectory.resolvePath('flexjs_mapapi.html').nativePath;
- var someFile:File = new File(pathToFile);
- var writeStream:FileStream = new FileStream();
- writeStream.open(someFile, FileMode.WRITE);
- writeStream.writeUTFBytes(page);
- writeStream.close();
- }
-
- _loader.load(new URLRequest("file://"+pathToFile));
- _loader.addEventListener(flash.events.Event.COMPLETE, completeHandler);
- }
-
- private function completeHandler(event:flash.events.Event):void
- {
- if (_loader && page) {
- _loader.window.map.center_changed = onMapCentered;
- _loader.window.map.bounds_changed = onMapBoundsChanged;
- _loader.window.map.zoom_changed = onMapZoomChanged;
- _loader.window.map.dragend = onMapDragEnd;
- _loader.window.map.draggable = true;
-
- // custom event handlers
- _loader.window.addEventListener("searchResults",onSearchResults);
- _loader.window.addEventListener("markerClicked",onMarkerClicked);
- }
-
- IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("ready"));
- }
-
- private function handleZoomChange(event:org.apache.flex.events.Event):void
- {
- if (_loader && page) {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- setZoom(model.zoom);
- }
- }
-
- private function handleCurrentLocationChange(event:org.apache.flex.events.Event):void
- {
- if (_loader && page) {
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- setCenter(model.currentCenter);
- }
- }
-
- /**
- * @private
- */
- private function handleSizeChange(event:org.apache.flex.events.Event):void
- {
- _loader.width = UIBase(_strand).width;
- _loader.height = UIBase(_strand).height;
- }
-
- /**
- * @private
- */
- private function onMapCentered():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("centered") );
- }
-
- /**
- * @private
- */
- private function onMapBoundsChanged():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("boundsChanged") );
- }
-
- /**
- * @private
- */
- private function onMapZoomChanged():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("zoomChanged") );
- }
-
- /**
- * @private
- */
- private function onMapDragEnd():void
- {
- IEventDispatcher(_strand).dispatchEvent( new org.apache.flex.events.Event("dragEnd") );
- }
-
- /**
- * @private
- */
- private function onSearchResults(event:*):void
- {
- var results:Array = [];
- for(var i:int=0; i < event.results.length; i++) {
- var place:Object = event.results[i];
- results.push(place);
- }
-
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.searchResults = results;
- }
-
- /**
- * @private
- */
- private function onMarkerClicked(event:*):void
- {
- var marker:Marker = new Marker({
- position: event.marker.getPosition(),
- title: event.marker.getTitle(),
- map: event.marker.getMap()
- });
-
- var model:MapModel = _strand.getBeadByType(IBeadModel) as MapModel;
- model.selectedMarker = marker;
-
- IEventDispatcher(_strand).dispatchEvent(new org.apache.flex.events.Event("markerClicked"));
- }
-
- /**
- * Adjusts the map to the given coordinate and zoom level.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function mapit(lat:Number, lng:Number, zoomLevel:Number):void
- {
- if (_loader && page) {
- _loader.window.mapit(lat, lng, zoomLevel);
- }
- }
-
- /**
- * Finds the given address and places a marker on it. This function may be dropped
- * since centerOnAddress + markCurrentLocation does the same thing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function markAddress(address:String):void
- {
- if (_loader && page) {
- _loader.window.codeaddress(address);
- }
- }
-
- /**
- * Centers the map on the address given.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function centerOnAddress(address:String):void
- {
- if (_loader && page) {
- _loader.window.centeronaddress(address);
- }
- }
-
- /**
- * Marks the current center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function markCurrentLocation():void
- {
- if (_loader && page) {
- _loader.window.markcurrentlocation();
- }
- }
-
- /**
- * Performs a search near the center of map. The result is a set of
- * markers displayed on the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function nearbySearch(placeName:String):void
- {
- if (_loader && page) {
- _loader.window.nearbysearch(placeName);
- }
- }
-
- /**
- * Creates a marker for placement on the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function createMarker(location:LatLng):Marker
- {
- return null;
- }
-
- /**
- * Removes all of the markers from the map
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function removeAllMarkers():void
- {
- if (_loader && page) {
- _loader.window.clearmarkers();
- }
- }
-
- /**
- * Sets the zoom factor of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setZoom(zoom:Number):void
- {
- if (_loader && page) {
- _loader.window.map.setZoom(zoom);
- }
- }
-
- /**
- * Sets the center of the map.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setCenter( location:LatLng ):void
- {
- if (_loader && page) {
- _loader.window.setCenter(location.lat, location.lng);
- }
- }
-
- /**
- * Clears the previous search results.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function clearSearchResults():void
- {
- // not implemented
- }
-
- /**
- * @private
- * This page definition is used with HTMLLoader to bring in the Google Maps
- * API (a Google APP token is required).
- */
- private static var pageTemplateStart:String = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n'+
- '<html>\n'+
- ' <head>\n'+
- ' <style type="text/css">\n'+
- ' html { height: 100%; }\n'+
- ' body { height: 100%; margin: 0; padding: 0; background-color: #FFFFCC; }\n'+
- ' #map-canvas { height: 100% }\n'+
- ' </style>\n'+
- ' <script type="text/javascript"'+
- ' src="https://maps.googleapis.com/maps/api/js?v=3.exp';
-
- private static var pageTemplateEnd:String = '&libraries=places">'+
- ' </script>\n'+
- ' <script type="text/javascript">\n'+
- ' var map;'+
- ' var geocoder;'+
- ' var currentCenter;' +
- ' var service;' +
- ' var places;' +
- ' var markers;'+
- ' function mapit(lat, lng, zoomLevel) {' +
- ' currentCenter = new google.maps.LatLng(lat, lng);'+
- ' if (map == null) {' +
- ' var mapOptions = {'+
- ' center: currentCenter,'+
- ' zoom: zoomLevel'+
- ' };'+
- ' map = new google.maps.Map(document.getElementById("map-canvas"),'+
- ' mapOptions);' +
- ' }' +
- ' google.maps.event.addListener(map, "center_changed", function() {' +
- ' currentCenter = map.getCenter();' +
- ' });' +
- ' google.maps.event.addListener(map, "bounds_changed", function() {' +
- ' currentCenter = map.getCenter();' +
- ' });' +
- ' map.setCenter(currentCenter);'+
- ' };' +
- ' function setCenter(lat, lng) {' +
- ' currentCenter = new google.maps.LatLng(lat,lng);' +
- ' map.setCenter(currentCenter);' +
- ' };'+
- ' function codeaddress(address) {'+
- ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
- ' geocoder.geocode( { "address": address}, function(results, status) {'+
- ' if (status == google.maps.GeocoderStatus.OK) {'+
- ' currentCenter = results[0].geometry.location;'+
- ' map.setCenter(currentCenter);'+
- ' var marker = new google.maps.Marker({'+
- ' map: map,'+
- ' position: currentCenter,'+
- ' });'+
- ' } else {'+
- ' alert("Geocode was not successful for the following reason: " + status);'+
- ' }'+
- ' });'+
- ' };'+
- ' function centeronaddress(address) {'+
- ' if (!geocoder) geocoder = new google.maps.Geocoder();'+
- ' geocoder.geocode( { "address": address}, function(results, status) {'+
- ' if (status == google.maps.GeocoderStatus.OK) {'+
- ' currentCenter = results[0].geometry.location;'+
- ' map.setCenter(currentCenter);' +
- ' } else {'+
- ' alert("Geocode was not successful for the following reason: " + status);'+
- ' }'+
- ' });'+
- ' };'+
- ' function markcurrentlocation() {'+
- ' createMarker(currentCenter);'+
- ' };' +
- ' function createMarker(location) {' +
- ' var marker = new google.maps.Marker({'+
- ' map: map,'+
- ' position: location,'+
- ' });' +
- ' google.maps.event.addListener(marker, "click", function() {' +
- ' markerClicked(marker);' +
- ' });'+
- ' return marker;'+
- ' };' +
- ' function clearmarkers() {' +
- ' if (markers) {' +
- ' for(var i=0; i < markers.length; i++) {' +
- ' markers[i].setMap(null);' +
- ' }' +
- ' markers = null;' +
- ' }' +
- ' };'+
- ' function nearbysearch(placename) {' +
- ' if (markers == null) markers = [];' +
- ' service = new google.maps.places.PlacesService(map);'+
- ' service.nearbySearch({"location": currentCenter,' +
- ' "radius": 5000,' +
- ' "name": placename}, function(results, status) {' +
- ' places = results;' +
- ' if (status == google.maps.places.PlacesServiceStatus.OK) {' +
- ' for(var i=0; i < results.length; i++) {' +
- ' var place = results[i];' +
- ' var marker = createMarker(place.geometry.location);' +
- ' marker.title = place.name;' +
- ' markers.push(marker);' +
- ' }' +
- ' var event = document.createEvent("Event");' +
- ' event.results = places;'+
- ' event.initEvent("searchResults", true, true);' +
- ' window.dispatchEvent(event);' +
- ' }' +
- ' });'+
- ' };' +
- ' function markerClicked(marker) {' +
- ' var newEvent = document.createEvent("Event");' +
- ' newEvent.marker = marker;' +
- ' newEvent.initEvent("markerClicked", true, true);' +
- ' window.dispatchEvent(newEvent);' +
- ' };'+
- ' function initialize() {'+
- ' mapit(37.333, -121.900, 12);'+
- ' };'+
- ' google.maps.event.addDomListener(window, "load", initialize);'+
- ' </script>\n'+
- ' </head>\n'+
- ' <body>\n'+
- ' <div id="map-canvas"></div>\n'+
- ' </body>\n'+
- '</html>';
- } // end ::AS3
-
-}