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/01/11 21:55:45 UTC
[01/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Repository: flex-asjs
Updated Branches:
refs/heads/mavenfolders [created] 9282af811
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
new file mode 100644
index 0000000..bb74b2a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/SolidBorderUtil.as
@@ -0,0 +1,191 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.utils
+{
+import flash.display.Graphics;
+
+
+/**
+ * The SolidBorderUtil class is a utility class that draws a solid color
+ * border of a specified color, thickness and alpha. This class is used
+ * to composite Flash equivalents of JS entities and has no JS
+ * equivalent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::AS3
+public class SolidBorderUtil
+{
+ /**
+ * Draw a solid color border as specified. Will fill with
+ * the backgroundColor if specified. The border draws
+ * inside with given width/height.
+ *
+ * @param g The flash.display.DisplayObject#graphics
+ * @param x The x position
+ * @param y The y position
+ * @param width The width
+ * @param height The height
+ * @param color The color
+ * @param backgroundColor The optional fill color
+ * @param thickness The thickness of the border
+ * @param alpha The alpha
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function drawBorder(g:Graphics, x:Number, y:Number,
+ width:Number, height:Number,
+ color:uint, backgroundColor:Object = null,
+ thickness:int = 1, alpha:Number = 1.0,
+ ellipseWidth:Number = NaN, ellipseHeight:Number = NaN):void
+ {
+ g.lineStyle(); // don't draw the line, it tends to get aligned on half-pixels
+
+ if (thickness > 0)
+ {
+ g.beginFill(color, alpha);
+ if (!isNaN(ellipseWidth))
+ {
+ g.drawRoundRect(x, y, width, height, ellipseWidth, ellipseHeight);
+ g.drawRoundRect(x + thickness, y + thickness,
+ width - thickness * 2, height - thickness * 2,
+ ellipseWidth, ellipseHeight);
+ }
+ else
+ {
+ g.drawRect(x, y, width, height);
+ g.drawRect(x + thickness, y + thickness,
+ width - thickness * 2, height - thickness * 2);
+ }
+ g.endFill();
+ }
+
+ if (backgroundColor != null)
+ {
+ g.beginFill(uint(backgroundColor), alpha);
+
+ if (!isNaN(ellipseWidth))
+ g.drawRoundRect(x + thickness, y + thickness,
+ width - thickness * 2, height - thickness * 2,
+ ellipseWidth, ellipseHeight);
+ else
+ g.drawRect(x + thickness, y + thickness,
+ width - thickness * 2, height - thickness * 2);
+ g.endFill();
+ }
+ }
+
+ /**
+ * Draw a solid color border as specified. Only square corners
+ * are supported as the real usage for this is to handle
+ * CSS triangles. The border is drawn around the given
+ * width and height.
+ *
+ * @param g The flash.display.DisplayObject#graphics
+ * @param x The x position
+ * @param y The y position
+ * @param width The width
+ * @param height The height
+ * @param colorTop The rgba color (alpha is in highest order byte)
+ * @param colorRight The rgba color
+ * @param colorBottom The rgba color
+ * @param colorLeft The rgba color
+ * @param backgroundColor The optional fill color
+ * @param thicknessTop The thickness of the border
+ * @param thicknessRight The thickness of the border
+ * @param thicknessBottom The thickness of the border
+ * @param thicknessLeft The thickness of the border
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function drawDetailedBorder(g:Graphics, x:Number, y:Number,
+ width:Number, height:Number,
+ colorTop:uint, colorRight:uint, colorBottom:uint, colorLeft:uint,
+ thicknessTop:int = 0, thicknessRight:int = 0, thicknessBottom:int = 0, thicknessLeft:int = 0
+ ):void
+ {
+ g.lineStyle(); // don't draw the line, it tends to get aligned on half-pixels
+
+ var color:uint;
+ var alpha:Number;
+ if (thicknessTop > 0)
+ {
+ color = colorTop & 0xFFFFFF;
+ alpha = (colorTop >>> 24 & 0xFF) / 255;
+ g.beginFill(color, alpha);
+ g.moveTo(0, 0);
+ g.lineTo(width + thicknessRight + thicknessLeft, 0);
+ if (width > 0)
+ g.lineTo(width + thicknessLeft, thicknessTop);
+ g.lineTo(thicknessLeft, thicknessTop);
+ g.lineTo(0, 0);
+ g.endFill();
+ }
+ if (thicknessLeft > 0)
+ {
+ color = colorLeft & 0xFFFFFF;
+ alpha = (colorLeft >>> 24 & 0xFF) / 255;
+ g.beginFill(color, alpha);
+ g.moveTo(0, 0);
+ g.lineTo(thicknessLeft, thicknessTop);
+ if (height > 0)
+ g.lineTo(thicknessLeft, thicknessTop + height);
+ g.lineTo(0, height + thicknessBottom);
+ g.lineTo(0, 0);
+ g.endFill();
+ }
+ if (thicknessRight > 0)
+ {
+ color = colorRight & 0xFFFFFF;
+ alpha = (colorRight >>> 24 & 0xFF) / 255;
+ g.beginFill(color, alpha);
+ g.moveTo(width + thicknessRight + thicknessLeft, 0);
+ g.lineTo(width + thicknessRight + thicknessLeft, height + thicknessBottom + thicknessTop);
+ if (height > 0)
+ g.lineTo(width + thicknessLeft, height + thicknessTop);
+ g.lineTo(width + thicknessLeft, thicknessTop);
+ g.lineTo(width + thicknessRight + thicknessLeft, 0);
+ g.endFill();
+ }
+ if (thicknessBottom > 0)
+ {
+ color = colorBottom & 0xFFFFFF;
+ alpha = (colorBottom >>> 24 & 0xFF) / 255;
+ g.beginFill(color, alpha);
+ g.moveTo(0, height + thicknessBottom + thicknessTop);
+ g.lineTo(thicknessLeft, height + thicknessTop);
+ if (width > 0)
+ g.lineTo(width + thicknessLeft, height + thicknessTop);
+ g.lineTo(width + thicknessRight + thicknessLeft, height + thicknessBottom + thicknessTop);
+ g.lineTo(0, height + thicknessBottom + thicknessTop);
+ g.endFill();
+ }
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
new file mode 100644
index 0000000..fe170df
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/StringTrimmer.as
@@ -0,0 +1,176 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+ /**
+ * The StringTrimmer class is a collection of static functions that provide utility
+ * features for trimming whitespace off Strings.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class StringTrimmer
+ {
+ /**
+ * @private
+ */
+ public function StringTrimmer()
+ {
+ throw new Error("StringTrimmer should not be instantiated.");
+ }
+
+ /**
+ * Removes all whitespace characters from the beginning and end
+ * of the specified string.
+ *
+ * @param str The String whose whitespace should be trimmed.
+ *
+ * @return Updated String where whitespace was removed from the
+ * beginning and end.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function trim(str:String):String
+ {
+ if (str == null) return '';
+
+ var startIndex:int = 0;
+ while (isWhitespace(str.charAt(startIndex)))
+ ++startIndex;
+
+ var endIndex:int = str.length - 1;
+ while (isWhitespace(str.charAt(endIndex)))
+ --endIndex;
+
+ if (endIndex >= startIndex)
+ return str.slice(startIndex, endIndex + 1);
+ else
+ return "";
+ }
+
+ /**
+ * Removes all whitespace characters from the beginning and end
+ * of each element in an Array, where the Array is stored as a String.
+ *
+ * @param value The String whose whitespace should be trimmed.
+ *
+ * @param separator The String that delimits each Array element in the string.
+ *
+ * @return Array where whitespace was removed from the
+ * beginning and end of each element.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function splitAndTrim(value:String, delimiter:String):Array
+ {
+ if (value != "" && value != null)
+ {
+ var items:Array = value.split(delimiter);
+
+ var len:int = items.length;
+ for (var i:int = 0; i < len; i++)
+ {
+ items[i] = StringTrimmer.trim(items[i]);
+ }
+ return items;
+ }
+
+ return [];
+ }
+
+ /**
+ * Removes all whitespace characters from the beginning and end
+ * of each element in an Array, where the Array is stored as a String.
+ *
+ * @param value The String whose whitespace should be trimmed.
+ *
+ * @param separator The String that delimits each Array element in the string.
+ *
+ * @return Updated String where whitespace was removed from the
+ * beginning and end of each element.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function trimArrayElements(value:String, delimiter:String):String
+ {
+ if (value != "" && value != null)
+ {
+ var items:Array = splitAndTrim(value, delimiter);
+ if (items.length > 0)
+ {
+ value = items.join(delimiter);
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Returns <code>true</code> if the specified string is
+ * a single space, tab, carriage return, newline, or formfeed character.
+ *
+ * @param str The String that is is being queried.
+ *
+ * @return <code>true</code> if the specified string is
+ * a single space, tab, carriage return, newline, or formfeed character.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function isWhitespace(character:String):Boolean
+ {
+ switch (character)
+ {
+ case " ":
+ case "\t":
+ case "\r":
+ case "\n":
+ case "\f":
+ // non breaking space
+ case "\u00A0":
+ // line seperator
+ case "\u2028":
+ // paragraph seperator
+ case "\u2029":
+ // ideographic space
+ case "\u3000":
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
new file mode 100644
index 0000000..582d884
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Timer.as
@@ -0,0 +1,148 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+COMPILE::AS3
+{
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+}
+
+import org.apache.flex.events.Event;
+
+COMPILE::JS
+{
+ import org.apache.flex.events.EventDispatcher;
+}
+
+//--------------------------------------
+// Events
+//--------------------------------------
+
+/**
+ * Dispatched as requested via the delay and
+ * repeat count parameters in the constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+[Event(name="timer", type="org.apache.flex.events.Event")]
+
+/**
+ * The Timer class dispatches events based on a delay
+ * and repeat count.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::AS3
+public class Timer extends flash.utils.Timer
+{
+ /**
+ * Constructor.
+ *
+ * @param delay The number of milliseconds
+ * to wait before dispatching the event.
+ * @param repeatCount The number of times to dispatch
+ * the event. If 0, keep dispatching forever.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Timer(delay:Number, repeatCount:int = 0)
+ {
+ super(delay, repeatCount);
+ addEventListener("timer", interceptor, false, 9999);
+ }
+
+ private function interceptor(event:flash.events.Event):void
+ {
+ if (event is TimerEvent)
+ {
+ event.stopImmediatePropagation();
+ dispatchEvent(new Event("timer"));
+ }
+ }
+}
+
+COMPILE::JS
+public class Timer extends EventDispatcher
+{
+ /**
+ * Constructor.
+ *
+ * @param delay The number of milliseconds
+ * to wait before dispatching the event.
+ * @param repeatCount The number of times to dispatch
+ * the event. If 0, keep dispatching forever.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Timer(delay:Number, repeatCount:int = 0)
+ {
+ this.delay = delay;
+ this.repeatCount = repeatCount;
+ }
+
+ public var delay:Number;
+ public var repeatCount:int;
+
+ private var currentCount:int = 0;
+
+ private var timerInterval:int = -1;
+
+ public function reset():void
+ {
+ stop();
+ currentCount = 0;
+ }
+
+ public function stop():void
+ {
+ clearInterval(timerInterval);
+ timerInterval = -1;
+ }
+
+ public function start():void
+ {
+ timerInterval =
+ setInterval(timerHandler, delay);
+ }
+
+ private function timerHandler():void
+ {
+ currentCount++;
+ if (repeatCount > 0 && currentCount >= repeatCount) {
+ stop();
+ }
+
+ dispatchEvent(new Event('timer'));
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/UIUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/UIUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/UIUtils.as
new file mode 100644
index 0000000..2e14e12
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/UIUtils.as
@@ -0,0 +1,107 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.core.IPopUpHost;
+ import org.apache.flex.core.IUIBase;
+
+ /**
+ * The UIUtils class is a collection of static functions that provide utility
+ * features to UIBase objects.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class UIUtils
+ {
+ /**
+ * @private
+ */
+ public function UIUtils()
+ {
+ throw new Error("UIUtils should not be instantiated.");
+ }
+
+ /**
+ * Centers the given item relative to another item. Typically the item being centered is
+ * a child or sibling of the second item.
+ *
+ * @param item The component item being centered.
+ * @param relativeTo The component used as reference for the centering.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function center( item:IUIBase, relativeTo:IUIBase ):void
+ {
+ var xpos:Number = (relativeTo.width - item.width)/2;
+ var ypos:Number = (relativeTo.height - item.height)/2;
+
+ item.x = xpos;
+ item.y = ypos;
+ }
+
+ /**
+ * Given a component starting point, this function walks up the parent chain
+ * looking for a component that implements the IPopUpHost interface. The function
+ * either returns that component or null if no IPopUpHost can be found.
+ *
+ * @param start A component to start the search.
+ * @return A component that implements IPopUpHost or null.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function findPopUpHost(start:IUIBase):IPopUpHost
+ {
+ while( start != null && !(start is IPopUpHost) && start is IChild ) {
+ start = IChild(start).parent as IUIBase;
+ }
+
+ return start as IPopUpHost;
+ }
+
+ /**
+ * Removes the given component from the IPopUpHost.
+ *
+ * @param start A component to start the search.
+ * @return A component that implements IPopUpHost or null.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function removePopUp(popUp:IChild):void
+ {
+ var start:IUIBase = popUp.parent as IUIBase;
+ while( start != null && !(start is IPopUpHost) && start is IChild ) {
+ start = IChild(start).parent as IUIBase;
+ }
+ (start as IPopUpHost).removeElement(popUp);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
new file mode 100644
index 0000000..5a2469a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/ViewSourceContextMenuOption.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+COMPILE::AS3
+{
+ import flash.display.InteractiveObject;
+ import flash.events.ContextMenuEvent;
+ import flash.net.URLRequest;
+ import flash.net.navigateToURL;
+ import flash.ui.ContextMenu;
+ import flash.ui.ContextMenuItem;
+}
+
+import org.apache.flex.core.IBead;
+import org.apache.flex.core.IStrand;
+
+/**
+ * The ViewSourceContextMenuOption class is a class that
+ * implements the "View Source" option in Flash for a
+ * FlexJS application. There is no JS equivalent as
+ * browsers always display source.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class ViewSourceContextMenuOption implements IBead
+{
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ViewSourceContextMenuOption()
+ {
+ }
+
+ 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;
+
+ COMPILE::AS3
+ {
+ var menuHost:InteractiveObject = InteractiveObject(value);
+ var cm:ContextMenu = ContextMenu(menuHost.contextMenu);
+ if (!cm)
+ {
+ cm = new ContextMenu();
+ menuHost.contextMenu = cm;
+ }
+ var cmi:ContextMenuItem = new ContextMenuItem("View Source...");
+ cm.hideBuiltInItems();
+ cm.customItems.push(cmi);
+ cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, viewSource);
+ }
+ }
+
+ COMPILE::AS3
+ private function viewSource(e:ContextMenuEvent):void
+ {
+ var urlRequest:URLRequest = new URLRequest("srcview/index.html");
+ navigateToURL(urlRequest, "_blank");
+ }
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
new file mode 100644
index 0000000..3b3da0e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/dbg/DOMPathUtil.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils.dbg
+{
+ import flash.utils.Dictionary;
+ import flash.utils.getQualifiedClassName;
+
+ import org.apache.flex.core.IChild;
+
+ /**
+ * The DOMPathUtil class is a tracks instances of display objects
+ * and provides a unique string for each one based on its position
+ * in the tree of display objects. It is generally used for
+ * trace output. If you think you need this for production applications
+ * you might want to re-think your design.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class DOMPathUtil
+ {
+ /**
+ * @private
+ */
+ public function DOMPathUtil()
+ {
+ throw new Error("DOMPathUtil should not be instantiated.");
+ }
+
+ private static var dict:Dictionary = new Dictionary(true);
+ private static var counter:int = 0;
+
+ /**
+ * Returns a string for an object. IF the object is parented, it
+ * creates a string based on the DOMPathUtil of the parent.
+ *
+ * @param obj The object to generate a path/name for.
+ * @return The unique name based on the parents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function getPath(obj:Object):String
+ {
+ if (obj == null) return "";
+
+ var name:String = null;
+ if (dict[obj] == null)
+ {
+ try {
+ name = obj.id;
+ } catch (e:Error)
+ {
+ }
+ if (name == null)
+ {
+ name = getQualifiedClassName(obj);
+ var c:int = name.lastIndexOf(":");
+ if (c != -1)
+ name = name.substr(c + 1);
+ name += (counter++).toString();
+ }
+ dict[obj] = name;
+ }
+ name = dict[obj];
+
+ if (obj is IChild)
+ {
+ name = getPath(IChild(obj).parent) + "/" + name;
+ }
+ return name;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
new file mode 100644
index 0000000..c1842df
--- /dev/null
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -0,0 +1,41 @@
+<?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.core.Application"/>
+ <component id="SimpleCSSValuesImpl" class="org.apache.flex.core.SimpleCSSValuesImpl"/>
+ <component id="CSSFontFaceBead" class="org.apache.flex.core.CSSFontFaceBead" />
+ <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
+ <component id="BrowserScroller" class="org.apache.flex.core.BrowserScroller"/>
+ <component id="BrowserResizeHandler" class="org.apache.flex.core.BrowserResizeListener"/>
+ <component id="SimpleValuesImpl" class="org.apache.flex.core.SimpleValuesImpl"/>
+ <component id="MXMLDragInitiator" class="org.apache.flex.core.MXMLDragInitiator" />
+ <component id="CallLaterBead" class="org.apache.flex.core.CallLaterBead" />
+
+ <component id="BindableCSSStyles" class="org.apache.flex.core.BindableCSSStyles"/>
+ <component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
+ <component id="ParentDocumentBead" class="org.apache.flex.core.ParentDocumentBead"/>
+ <component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
+ <component id="ViewSourceContextMenuOption" class="org.apache.flex.utils.ViewSourceContextMenuOption" />
+
+ <component id="State" class="org.apache.flex.states.State"/>
+</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml b/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml
new file mode 100644
index 0000000..e601b79
--- /dev/null
+++ b/frameworks/projects/Core/src/main/resources/compile-as-to-js-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>
+ <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
+ <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
+ <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.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>
+
+ <namespaces>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <manifest>basic-manifest.xml</manifest>
+ </namespace>
+ </namespaces>
+
+ <locale/>
+
+ <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-classes>
+ <class>CoreClasses</class>
+ <!--<class>CoreASJSClasses</class>-->
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ </include-namespaces>
+
+ <target-player>11.1</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
new file mode 100644
index 0000000..977c1d4
--- /dev/null
+++ b/frameworks/projects/Core/src/main/resources/compile-asjs-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>
+ </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/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>CoreClasses</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/a903508e/frameworks/projects/Core/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-config.xml b/frameworks/projects/Core/src/main/resources/compile-config.xml
new file mode 100644
index 0000000..d9a038d
--- /dev/null
+++ b/frameworks/projects/Core/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>
+ </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-file>
+ <name>js/src/*</name>
+ <path>js/src/*</path>
+ </include-file>
+ -->
+
+ <include-classes>
+ <class>CoreClasses</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/a903508e/frameworks/projects/Core/src/main/resources/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-js-config.xml b/frameworks/projects/Core/src/main/resources/compile-js-config.xml
new file mode 100644
index 0000000..3c3784b
--- /dev/null
+++ b/frameworks/projects/Core/src/main/resources/compile-js-config.xml
@@ -0,0 +1,87 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT 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>
+ </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>
+ <path-element>asjs/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-file>
+ <name>js/src/*</name>
+ <path>js/src/*</path>
+ </include-file>
+ -->
+
+ <include-classes>
+ <class>CoreJSClasses</class>
+ <!-- leave out for now until we get Application to compile
+ <class>CoreASJSClasses</class>-->
+ </include-classes>
+
+ <include-namespaces>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+ <uri>library://ns.apache.org/flexjs/svg</uri>
+ </include-namespaces>
+
+ <target-player>${playerglobal.version}</target-player>
+
+
+</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/test/flex/FlexUnitFlexJSApplication.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/FlexUnitFlexJSApplication.mxml b/frameworks/projects/Core/src/test/flex/FlexUnitFlexJSApplication.mxml
new file mode 100644
index 0000000..a97b086
--- /dev/null
+++ b/frameworks/projects/Core/src/test/flex/FlexUnitFlexJSApplication.mxml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/flexjs/basic"
+ applicationComplete="runTests()"
+ >
+ <fx:Script>
+ <![CDATA[
+ import flexUnitTests.StrandTesterTest;
+ import flexUnitTests.StrandTester;
+
+ import org.flexunit.listeners.CIListener;
+ import org.flexunit.runner.FlexUnitCore;
+
+ public function runTests() : void
+ {
+ var core : FlexUnitCore = new FlexUnitCore();
+ core.addListener(new CIListener());
+ core.run(StrandTester);
+ }
+
+ ]]>
+ </fx:Script>
+ <js:valuesImpl>
+ <js:SimpleValuesImpl />
+ </js:valuesImpl>
+
+</js:Application>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/test/flex/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/build.xml b/frameworks/projects/Core/src/test/flex/build.xml
new file mode 100644
index 0000000..31d979b
--- /dev/null
+++ b/frameworks/projects/Core/src/test/flex/build.xml
@@ -0,0 +1,165 @@
+<?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.
+
+-->
+
+
+<project name="Core.test" default="main" basedir=".">
+ <property name="FLEXJS_HOME" location="../../../../.."/>
+
+ <property file="${FLEXJS_HOME}/env.properties"/>
+ <property environment="env"/>
+ <property file="${FLEXJS_HOME}/build.properties"/>
+ <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
+ <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
+
+ <condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
+ <os family="windows"/>
+ </condition>
+ <condition property="browser" value="/Applications/Safari.app/Contents/MacOS/Safari">
+ <os family="mac"/>
+ </condition>
+
+ <property name="report.dir" value="${basedir}/out" />
+
+ <available file="${FLEXJS_HOME}/../flex-flexunit"
+ type="dir"
+ property="FLEXUNIT_HOME"
+ value="${FLEXJS_HOME}/../flex-flexunit" />
+
+ <available file="${FLEXJS_HOME}/../flexunit"
+ type="dir"
+ property="FLEXUNIT_HOME"
+ value="${FLEXJS_HOME}/../flexunit" />
+
+ <available file="${env.FLEXUNIT_HOME}"
+ type="dir"
+ property="FLEXUNIT_HOME"
+ value="${env.FLEXUNIT_HOME}"/>
+
+ <available file="${FLEXUNIT_HOME}/FlexUnit4/target"
+ type="dir"
+ property="FLEXUNIT_LIBPATH1"
+ value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4/target/flexunit-4.3.0-20140410-as3_4.12.0.swc" />
+ <property name="FLEXUNIT_LIBPATH1" value="-library-path+=${FLEXUNIT_HOME}/flexunit" />
+
+ <available file="${FLEXUNIT_HOME}/FlexUnit4CIListener/target"
+ type="dir"
+ property="FLEXUNIT_LIBPATH2"
+ value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4CIListener/target" />
+ <property name="FLEXUNIT_LIBPATH2" value="-define=CONFIG::dummy,false" />
+
+ <available file="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target"
+ type="dir"
+ property="FLEXUNIT_CLASSPATH"
+ value="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target" />
+ <property name="FLEXUNIT_CLASSPATH" value="${FLEXUNIT_HOME}/flexunit" />
+
+ <target name="main" depends="clean,compile,test" description="Clean test of FlexJSUI.swc">
+ </target>
+
+ <target name="clean">
+ <delete failonerror="false">
+ <fileset dir="${basedir}">
+ <include name="FlexUnitFlexJSApplication.swf"/>
+ </fileset>
+ </delete>
+ <delete failonerror="false">
+ <fileset dir="${basedir}/js/out">
+ <include name="**/**"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <path id="lib.path">
+ <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+ </path>
+
+ <target name="compile" description="Compiles FlexUnitApplication.swf">
+ <echo message="Compiling FlexUnitFlexJSApplication.swf"/>
+ <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+ <echo message="FALCON_HOME: ${FALCON_HOME}"/>
+ <echo message="FLEXUNIT_HOME: ${FLEXUNIT_HOME}"/>
+
+ <!-- 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 FlexJSUIClasses.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.
+ -->
+ <mxmlc fork="true"
+ file="${basedir}/FlexUnitFlexJSApplication.mxml"
+ output="${basedir}/FlexUnitFlexJSApplication.swf">
+ <jvmarg line="${mxmlc.jvm.args}"/>
+ <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
+ <arg value="-debug" />
+ <arg value="-define=COMPILE::AS3,true" />
+ <arg value="-define=COMPILE::JS,false" />
+ <arg value="-compiler.mxml.children-as-data" />
+ <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
+ <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
+ <arg value="-compiler.binding-value-change-event-type=valueChange" />
+ <arg value="+playerglobal.version=${playerglobal.version}" />
+ <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+ <arg value="-source-path+=${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
+ <arg value="-library-path+=${FLEXJS_HOME}/frameworks/libs" />
+ <arg value="${FLEXUNIT_LIBPATH1}" />
+ <arg value="${FLEXUNIT_LIBPATH2}" />
+ </mxmlc>
+ </target>
+
+ <target name="test">
+ <taskdef resource="flexUnitTasks.tasks">
+ <classpath>
+ <fileset dir="${FLEXUNIT_CLASSPATH}">
+ <include name="flexUnitTasks*.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+ <mkdir dir="${report.dir}" />
+ <flexunit
+ swf="${basedir}/FlexUnitFlexJSApplication.swf"
+ workingDir="${basedir}"
+ toDir="${report.dir}"
+ haltonfailure="false"
+ verbose="true"
+ localTrusted="true"
+ timeout="90000">
+ <source dir="${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
+ <library dir="${FLEXJS_HOME}/frameworks/libs" />
+ </flexunit>
+
+ <!-- Generate readable JUnit-style reports -->
+ <junitreport todir="${report.dir}">
+ <fileset dir="${report.dir}">
+ <include name="TEST-*.xml" />
+ </fileset>
+ <report format="frames" todir="${report.dir}/html" />
+ </junitreport>
+
+ </target>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.as
new file mode 100644
index 0000000..df62e31
--- /dev/null
+++ b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTester.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 flexUnitTests
+{
+ [Suite]
+ [RunWith("org.flexunit.runners.Suite")]
+ public class StrandTester
+ {
+ public var strandTesterTest:StrandTesterTest;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
new file mode 100644
index 0000000..97a84a3
--- /dev/null
+++ b/frameworks/projects/Core/src/test/flex/flexUnitTests/StrandTesterTest.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package flexUnitTests
+{
+ import flexunit.framework.Assert;
+
+ import org.apache.flex.core.Strand;
+
+ public class StrandTesterTest
+ {
+ [Before]
+ public function setUp():void
+ {
+ }
+
+ [After]
+ public function tearDown():void
+ {
+ }
+
+ [BeforeClass]
+ public static function setUpBeforeClass():void
+ {
+ }
+
+ [AfterClass]
+ public static function tearDownAfterClass():void
+ {
+ }
+
+ [Test]
+ public function testIdProperty():void
+ {
+ var strand:Strand = new Strand();
+ strand.id = "foo";
+ Assert.assertEquals("Error testing Srand.id", strand.id, "foo");
+ }
+ }
+}
\ No newline at end of file
[19/20] git commit: [flex-asjs] [refs/heads/mavenfolders] - go back
to not using version in copies of swcs in frameworks/libs. Updating the
version in the compile-config is painful since it isn't processed by Ant
Posted by ah...@apache.org.
go back to not using version in copies of swcs in frameworks/libs. Updating the version in the compile-config is painful since it isn't processed by Ant
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/63249503
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/63249503
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/63249503
Branch: refs/heads/mavenfolders
Commit: 6324950312852714686511b24cfcfbd66d778bb1
Parents: 72c9cb8
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 11 12:51:43 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 11 12:51:43 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Core/build.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/63249503/frameworks/projects/Core/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/build.xml b/frameworks/projects/Core/build.xml
index 4a768d7..8e92f15 100644
--- a/frameworks/projects/Core/build.xml
+++ b/frameworks/projects/Core/build.xml
@@ -29,6 +29,7 @@
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
<property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/>
<property name="target.name" value="Core-${release.version}.swc" />
+ <property name="target.name.no.version" value="Core.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Core.swc">
</target>
@@ -91,7 +92,7 @@
<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}" />
+ <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
</target>
<target name="compile-asjs">
@@ -157,7 +158,7 @@
<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}" />
+ <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
</target>
<target name="copy-js">
[09/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/UIUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/UIUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/UIUtils.as
deleted file mode 100644
index 2e14e12..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/UIUtils.as
+++ /dev/null
@@ -1,107 +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.utils
-{
- import org.apache.flex.core.IChild;
- import org.apache.flex.core.IPopUpHost;
- import org.apache.flex.core.IUIBase;
-
- /**
- * The UIUtils class is a collection of static functions that provide utility
- * features to UIBase objects.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class UIUtils
- {
- /**
- * @private
- */
- public function UIUtils()
- {
- throw new Error("UIUtils should not be instantiated.");
- }
-
- /**
- * Centers the given item relative to another item. Typically the item being centered is
- * a child or sibling of the second item.
- *
- * @param item The component item being centered.
- * @param relativeTo The component used as reference for the centering.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function center( item:IUIBase, relativeTo:IUIBase ):void
- {
- var xpos:Number = (relativeTo.width - item.width)/2;
- var ypos:Number = (relativeTo.height - item.height)/2;
-
- item.x = xpos;
- item.y = ypos;
- }
-
- /**
- * Given a component starting point, this function walks up the parent chain
- * looking for a component that implements the IPopUpHost interface. The function
- * either returns that component or null if no IPopUpHost can be found.
- *
- * @param start A component to start the search.
- * @return A component that implements IPopUpHost or null.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function findPopUpHost(start:IUIBase):IPopUpHost
- {
- while( start != null && !(start is IPopUpHost) && start is IChild ) {
- start = IChild(start).parent as IUIBase;
- }
-
- return start as IPopUpHost;
- }
-
- /**
- * Removes the given component from the IPopUpHost.
- *
- * @param start A component to start the search.
- * @return A component that implements IPopUpHost or null.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function removePopUp(popUp:IChild):void
- {
- var start:IUIBase = popUp.parent as IUIBase;
- while( start != null && !(start is IPopUpHost) && start is IChild ) {
- start = IChild(start).parent as IUIBase;
- }
- (start as IPopUpHost).removeElement(popUp);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/ViewSourceContextMenuOption.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/ViewSourceContextMenuOption.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/ViewSourceContextMenuOption.as
deleted file mode 100644
index 5a2469a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/ViewSourceContextMenuOption.as
+++ /dev/null
@@ -1,97 +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.utils
-{
-
-COMPILE::AS3
-{
- import flash.display.InteractiveObject;
- import flash.events.ContextMenuEvent;
- import flash.net.URLRequest;
- import flash.net.navigateToURL;
- import flash.ui.ContextMenu;
- import flash.ui.ContextMenuItem;
-}
-
-import org.apache.flex.core.IBead;
-import org.apache.flex.core.IStrand;
-
-/**
- * The ViewSourceContextMenuOption class is a class that
- * implements the "View Source" option in Flash for a
- * FlexJS application. There is no JS equivalent as
- * browsers always display source.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class ViewSourceContextMenuOption implements IBead
-{
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ViewSourceContextMenuOption()
- {
- }
-
- 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;
-
- COMPILE::AS3
- {
- var menuHost:InteractiveObject = InteractiveObject(value);
- var cm:ContextMenu = ContextMenu(menuHost.contextMenu);
- if (!cm)
- {
- cm = new ContextMenu();
- menuHost.contextMenu = cm;
- }
- var cmi:ContextMenuItem = new ContextMenuItem("View Source...");
- cm.hideBuiltInItems();
- cm.customItems.push(cmi);
- cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, viewSource);
- }
- }
-
- COMPILE::AS3
- private function viewSource(e:ContextMenuEvent):void
- {
- var urlRequest:URLRequest = new URLRequest("srcview/index.html");
- navigateToURL(urlRequest, "_blank");
- }
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/dbg/DOMPathUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/dbg/DOMPathUtil.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/dbg/DOMPathUtil.as
deleted file mode 100644
index 3b3da0e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/dbg/DOMPathUtil.as
+++ /dev/null
@@ -1,95 +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.utils.dbg
-{
- import flash.utils.Dictionary;
- import flash.utils.getQualifiedClassName;
-
- import org.apache.flex.core.IChild;
-
- /**
- * The DOMPathUtil class is a tracks instances of display objects
- * and provides a unique string for each one based on its position
- * in the tree of display objects. It is generally used for
- * trace output. If you think you need this for production applications
- * you might want to re-think your design.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class DOMPathUtil
- {
- /**
- * @private
- */
- public function DOMPathUtil()
- {
- throw new Error("DOMPathUtil should not be instantiated.");
- }
-
- private static var dict:Dictionary = new Dictionary(true);
- private static var counter:int = 0;
-
- /**
- * Returns a string for an object. IF the object is parented, it
- * creates a string based on the DOMPathUtil of the parent.
- *
- * @param obj The object to generate a path/name for.
- * @return The unique name based on the parents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function getPath(obj:Object):String
- {
- if (obj == null) return "";
-
- var name:String = null;
- if (dict[obj] == null)
- {
- try {
- name = obj.id;
- } catch (e:Error)
- {
- }
- if (name == null)
- {
- name = getQualifiedClassName(obj);
- var c:int = name.lastIndexOf(":");
- if (c != -1)
- name = name.substr(c + 1);
- name += (counter++).toString();
- }
- dict[obj] = name;
- }
- name = dict[obj];
-
- if (obj is IChild)
- {
- name = getPath(IChild(obj).parent) + "/" + name;
- }
- return name;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/tests/FlexUnitFlexJSApplication.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/tests/FlexUnitFlexJSApplication.mxml b/frameworks/projects/Core/as/tests/FlexUnitFlexJSApplication.mxml
deleted file mode 100644
index a97b086..0000000
--- a/frameworks/projects/Core/as/tests/FlexUnitFlexJSApplication.mxml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-
-<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:js="library://ns.apache.org/flexjs/basic"
- applicationComplete="runTests()"
- >
- <fx:Script>
- <![CDATA[
- import flexUnitTests.StrandTesterTest;
- import flexUnitTests.StrandTester;
-
- import org.flexunit.listeners.CIListener;
- import org.flexunit.runner.FlexUnitCore;
-
- public function runTests() : void
- {
- var core : FlexUnitCore = new FlexUnitCore();
- core.addListener(new CIListener());
- core.run(StrandTester);
- }
-
- ]]>
- </fx:Script>
- <js:valuesImpl>
- <js:SimpleValuesImpl />
- </js:valuesImpl>
-
-</js:Application>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/tests/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/tests/build.xml b/frameworks/projects/Core/as/tests/build.xml
deleted file mode 100644
index 31d979b..0000000
--- a/frameworks/projects/Core/as/tests/build.xml
+++ /dev/null
@@ -1,165 +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.
-
--->
-
-
-<project name="Core.test" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../../../../.."/>
-
- <property file="${FLEXJS_HOME}/env.properties"/>
- <property environment="env"/>
- <property file="${FLEXJS_HOME}/build.properties"/>
- <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
- <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-
- <condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
- <os family="windows"/>
- </condition>
- <condition property="browser" value="/Applications/Safari.app/Contents/MacOS/Safari">
- <os family="mac"/>
- </condition>
-
- <property name="report.dir" value="${basedir}/out" />
-
- <available file="${FLEXJS_HOME}/../flex-flexunit"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${FLEXJS_HOME}/../flex-flexunit" />
-
- <available file="${FLEXJS_HOME}/../flexunit"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${FLEXJS_HOME}/../flexunit" />
-
- <available file="${env.FLEXUNIT_HOME}"
- type="dir"
- property="FLEXUNIT_HOME"
- value="${env.FLEXUNIT_HOME}"/>
-
- <available file="${FLEXUNIT_HOME}/FlexUnit4/target"
- type="dir"
- property="FLEXUNIT_LIBPATH1"
- value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4/target/flexunit-4.3.0-20140410-as3_4.12.0.swc" />
- <property name="FLEXUNIT_LIBPATH1" value="-library-path+=${FLEXUNIT_HOME}/flexunit" />
-
- <available file="${FLEXUNIT_HOME}/FlexUnit4CIListener/target"
- type="dir"
- property="FLEXUNIT_LIBPATH2"
- value="-library-path+=${FLEXUNIT_HOME}/FlexUnit4CIListener/target" />
- <property name="FLEXUNIT_LIBPATH2" value="-define=CONFIG::dummy,false" />
-
- <available file="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target"
- type="dir"
- property="FLEXUNIT_CLASSPATH"
- value="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target" />
- <property name="FLEXUNIT_CLASSPATH" value="${FLEXUNIT_HOME}/flexunit" />
-
- <target name="main" depends="clean,compile,test" description="Clean test of FlexJSUI.swc">
- </target>
-
- <target name="clean">
- <delete failonerror="false">
- <fileset dir="${basedir}">
- <include name="FlexUnitFlexJSApplication.swf"/>
- </fileset>
- </delete>
- <delete failonerror="false">
- <fileset dir="${basedir}/js/out">
- <include name="**/**"/>
- </fileset>
- </delete>
- </target>
-
- <path id="lib.path">
- <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
- </path>
-
- <target name="compile" description="Compiles FlexUnitApplication.swf">
- <echo message="Compiling FlexUnitFlexJSApplication.swf"/>
- <echo message="FLEX_HOME: ${FLEX_HOME}"/>
- <echo message="FALCON_HOME: ${FALCON_HOME}"/>
- <echo message="FLEXUNIT_HOME: ${FLEXUNIT_HOME}"/>
-
- <!-- 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 FlexJSUIClasses.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.
- -->
- <mxmlc fork="true"
- file="${basedir}/FlexUnitFlexJSApplication.mxml"
- output="${basedir}/FlexUnitFlexJSApplication.swf">
- <jvmarg line="${mxmlc.jvm.args}"/>
- <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
- <arg value="-debug" />
- <arg value="-define=COMPILE::AS3,true" />
- <arg value="-define=COMPILE::JS,false" />
- <arg value="-compiler.mxml.children-as-data" />
- <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-type=valueChange" />
- <arg value="+playerglobal.version=${playerglobal.version}" />
- <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
- <arg value="-source-path+=${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
- <arg value="-library-path+=${FLEXJS_HOME}/frameworks/libs" />
- <arg value="${FLEXUNIT_LIBPATH1}" />
- <arg value="${FLEXUNIT_LIBPATH2}" />
- </mxmlc>
- </target>
-
- <target name="test">
- <taskdef resource="flexUnitTasks.tasks">
- <classpath>
- <fileset dir="${FLEXUNIT_CLASSPATH}">
- <include name="flexUnitTasks*.jar" />
- </fileset>
- </classpath>
- </taskdef>
- <mkdir dir="${report.dir}" />
- <flexunit
- swf="${basedir}/FlexUnitFlexJSApplication.swf"
- workingDir="${basedir}"
- toDir="${report.dir}"
- haltonfailure="false"
- verbose="true"
- localTrusted="true"
- timeout="90000">
- <source dir="${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
- <library dir="${FLEXJS_HOME}/frameworks/libs" />
- </flexunit>
-
- <!-- Generate readable JUnit-style reports -->
- <junitreport todir="${report.dir}">
- <fileset dir="${report.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report format="frames" todir="${report.dir}/html" />
- </junitreport>
-
- </target>
-</project>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/tests/flexUnitTests/StrandTester.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/tests/flexUnitTests/StrandTester.as b/frameworks/projects/Core/as/tests/flexUnitTests/StrandTester.as
deleted file mode 100644
index df62e31..0000000
--- a/frameworks/projects/Core/as/tests/flexUnitTests/StrandTester.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 flexUnitTests
-{
- [Suite]
- [RunWith("org.flexunit.runners.Suite")]
- public class StrandTester
- {
- public var strandTesterTest:StrandTesterTest;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/tests/flexUnitTests/StrandTesterTest.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/tests/flexUnitTests/StrandTesterTest.as b/frameworks/projects/Core/as/tests/flexUnitTests/StrandTesterTest.as
deleted file mode 100644
index 97a84a3..0000000
--- a/frameworks/projects/Core/as/tests/flexUnitTests/StrandTesterTest.as
+++ /dev/null
@@ -1,55 +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 flexUnitTests
-{
- import flexunit.framework.Assert;
-
- import org.apache.flex.core.Strand;
-
- public class StrandTesterTest
- {
- [Before]
- public function setUp():void
- {
- }
-
- [After]
- public function tearDown():void
- {
- }
-
- [BeforeClass]
- public static function setUpBeforeClass():void
- {
- }
-
- [AfterClass]
- public static function tearDownAfterClass():void
- {
- }
-
- [Test]
- public function testIdProperty():void
- {
- var strand:Strand = new Strand();
- strand.id = "foo";
- Assert.assertEquals("Error testing Srand.id", strand.id, "foo");
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/basic-manifest.xml b/frameworks/projects/Core/basic-manifest.xml
deleted file mode 100644
index c1842df..0000000
--- a/frameworks/projects/Core/basic-manifest.xml
+++ /dev/null
@@ -1,41 +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.core.Application"/>
- <component id="SimpleCSSValuesImpl" class="org.apache.flex.core.SimpleCSSValuesImpl"/>
- <component id="CSSFontFaceBead" class="org.apache.flex.core.CSSFontFaceBead" />
- <component id="ViewBase" class="org.apache.flex.core.ViewBase"/>
- <component id="BrowserScroller" class="org.apache.flex.core.BrowserScroller"/>
- <component id="BrowserResizeHandler" class="org.apache.flex.core.BrowserResizeListener"/>
- <component id="SimpleValuesImpl" class="org.apache.flex.core.SimpleValuesImpl"/>
- <component id="MXMLDragInitiator" class="org.apache.flex.core.MXMLDragInitiator" />
- <component id="CallLaterBead" class="org.apache.flex.core.CallLaterBead" />
-
- <component id="BindableCSSStyles" class="org.apache.flex.core.BindableCSSStyles"/>
- <component id="SimpleCSSStyles" class="org.apache.flex.core.SimpleCSSStyles"/>
- <component id="ParentDocumentBead" class="org.apache.flex.core.ParentDocumentBead"/>
- <component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
- <component id="ViewSourceContextMenuOption" class="org.apache.flex.utils.ViewSourceContextMenuOption" />
-
- <component id="State" class="org.apache.flex.states.State"/>
-</componentPackage>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/compile-as-to-js-config.xml b/frameworks/projects/Core/compile-as-to-js-config.xml
deleted file mode 100644
index e601b79..0000000
--- a/frameworks/projects/Core/compile-as-to-js-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>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
- <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.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>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <locale/>
-
- <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-classes>
- <class>CoreClasses</class>
- <!--<class>CoreASJSClasses</class>-->
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>11.1</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/compile-asjs-config.xml b/frameworks/projects/Core/compile-asjs-config.xml
deleted file mode 100644
index 977c1d4..0000000
--- a/frameworks/projects/Core/compile-asjs-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>
- </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/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>CoreClasses</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/a903508e/frameworks/projects/Core/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/compile-config.xml b/frameworks/projects/Core/compile-config.xml
deleted file mode 100644
index d9a038d..0000000
--- a/frameworks/projects/Core/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>
- </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-file>
- <name>js/src/*</name>
- <path>js/src/*</path>
- </include-file>
- -->
-
- <include-classes>
- <class>CoreClasses</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/a903508e/frameworks/projects/Core/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/compile-js-config.xml b/frameworks/projects/Core/compile-js-config.xml
deleted file mode 100644
index 3c3784b..0000000
--- a/frameworks/projects/Core/compile-js-config.xml
+++ /dev/null
@@ -1,87 +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>
- </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>
- <path-element>asjs/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-file>
- <name>js/src/*</name>
- <path>js/src/*</path>
- </include-file>
- -->
-
- <include-classes>
- <class>CoreJSClasses</class>
- <!-- leave out for now until we get Application to compile
- <class>CoreASJSClasses</class>-->
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <uri>library://ns.apache.org/flexjs/svg</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
new file mode 100644
index 0000000..d43ea81
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 dependency analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class CoreClasses
+{
+ import org.apache.flex.core.BeadViewBase; BeadViewBase;
+ import org.apache.flex.core.BrowserWindow; BrowserWindow;
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.CSSShape; CSSShape;
+ import org.apache.flex.core.CSSSprite; CSSSprite;
+ import org.apache.flex.core.CSSTextField; CSSTextField;
+ import org.apache.flex.core.StyleableCSSTextField; StyleableCSSTextField;
+ }
+ import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
+ import org.apache.flex.core.FilledRectangle; FilledRectangle;
+ import org.apache.flex.core.IAlertModel; IAlertModel;
+ import org.apache.flex.core.IBead; IBead;
+ import org.apache.flex.core.IBeadController; IBeadController;
+ import org.apache.flex.core.IBeadLayout; IBeadLayout;
+ import org.apache.flex.core.IBeadModel; IBeadModel;
+ import org.apache.flex.core.IBeadView; IBeadView;
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.IBorderModel; IBorderModel;
+ }
+ import org.apache.flex.core.IChild; IChild;
+ import org.apache.flex.core.IChrome; IChrome;
+ import org.apache.flex.core.IComboBoxModel; IComboBoxModel;
+ import org.apache.flex.core.IContainer; IContainer;
+ import org.apache.flex.core.IContainerView; IContainerView;
+ import org.apache.flex.core.IContentView; IContentView;
+ import org.apache.flex.core.IContentViewHost; IContentViewHost;
+ import org.apache.flex.core.IDataProviderItemRendererMapper; IDataProviderItemRendererMapper;
+ import org.apache.flex.core.IDocument; IDocument;
+ import org.apache.flex.core.IFormatBead; IFormatBead;
+ import org.apache.flex.core.IImageModel; IImageModel;
+ import org.apache.flex.core.IItemRendererProvider; IItemRendererProvider;
+ import org.apache.flex.core.ILayoutChild; ILayoutChild;
+ import org.apache.flex.core.ILayoutHost; ILayoutHost;
+ import org.apache.flex.core.IListPresentationModel; IListPresentationModel;
+ import org.apache.flex.core.IPanelModel; IPanelModel;
+ import org.apache.flex.core.IParent; IParent;
+ import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
+ import org.apache.flex.core.IPopUp; IPopUp;
+ import org.apache.flex.core.IRangeModel; IRangeModel;
+ import org.apache.flex.core.IRollOverModel; IRollOverModel;
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
+ }
+ import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
+ import org.apache.flex.core.ISelectionModel; ISelectionModel;
+ import org.apache.flex.core.IStrand; IStrand;
+ import org.apache.flex.core.IStrandWithModel; IStrandWithModel;
+ import org.apache.flex.core.ITextModel; ITextModel;
+ import org.apache.flex.core.ITitleBarModel; ITitleBarModel;
+ import org.apache.flex.core.IToggleButtonModel; IToggleButtonModel;
+ import org.apache.flex.core.IUIBase; IUIBase;
+ import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
+ import org.apache.flex.core.IViewport; IViewport;
+ import org.apache.flex.core.IViewportModel; IViewportModel;
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.IViewportScroller; IViewportScroller;
+ }
+ import org.apache.flex.core.ListBase; ListBase;
+ import org.apache.flex.core.ListBaseStrandChildren; ListBaseStrandChildren;
+ import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
+ import org.apache.flex.core.SimpleApplication; SimpleApplication;
+ import org.apache.flex.core.DataBindingBase; DataBindingBase;
+ import org.apache.flex.core.UIBase; UIBase;
+ COMPILE::AS3
+ {
+ import org.apache.flex.core.UIButtonBase; UIButtonBase;
+ }
+ import org.apache.flex.events.CustomEvent; CustomEvent;
+ import org.apache.flex.events.Event; Event;
+ import org.apache.flex.events.EventDispatcher; EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
+ import org.apache.flex.events.MouseEvent; MouseEvent;
+ import org.apache.flex.events.ValueEvent; ValueEvent;
+ import org.apache.flex.events.utils.MouseUtils; MouseUtils;
+ import org.apache.flex.geom.Point; Point;
+ import org.apache.flex.geom.Rectangle; Rectangle;
+ import org.apache.flex.utils.BinaryData; BinaryData;
+ COMPILE::AS3
+ {
+ import org.apache.flex.utils.CSSBorderUtils; CSSBorderUtils;
+ }
+ import org.apache.flex.utils.CSSContainerUtils; CSSContainerUtils;
+ COMPILE::AS3
+ {
+ import org.apache.flex.utils.dbg.DOMPathUtil; DOMPathUtil;
+ }
+ import org.apache.flex.utils.EffectTimer; EffectTimer;
+ import org.apache.flex.utils.MixinManager; MixinManager;
+ COMPILE::AS3
+ {
+ import org.apache.flex.utils.PNGEncoder; PNGEncoder;
+ import org.apache.flex.utils.SolidBorderUtil; SolidBorderUtil;
+ import org.apache.flex.utils.StringTrimmer; StringTrimmer;
+}
+ import org.apache.flex.utils.Timer; Timer;
+ import org.apache.flex.utils.UIUtils; UIUtils;
+
+ import org.apache.flex.core.ClassFactory; ClassFactory;
+ import org.apache.flex.states.AddItems; AddItems;
+ import org.apache.flex.states.SetEventHandler; SetEventHandler;
+ import org.apache.flex.states.SetProperty; SetProperty;
+ import org.apache.flex.states.State; State;
+
+ import org.apache.flex.core.IDataGridModel; IDataGridModel;
+ import org.apache.flex.core.IDataGridPresentationModel; IDataGridPresentationModel;
+ import org.apache.flex.core.IDateChooserModel; IDateChooserModel;
+ import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
+ import org.apache.flex.utils.CSSUtils; CSSUtils;
+
+ COMPILE::JS
+ {
+ import org.apache.flex.utils.Language; Language;
+ }
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/CoreJSClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreJSClasses.as b/frameworks/projects/Core/src/main/flex/CoreJSClasses.as
new file mode 100644
index 0000000..6bb95de
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/CoreJSClasses.as
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 dependency analysis starting
+ * from the classes specified in manifest.xml.
+ */
+internal class CoreJSClasses
+{
+ import org.apache.flex.core.BeadViewBase; BeadViewBase;
+ import org.apache.flex.core.BrowserWindow; BrowserWindow;
+ import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
+ import org.apache.flex.core.FilledRectangle; FilledRectangle;
+ import org.apache.flex.core.IAlertModel; IAlertModel;
+ import org.apache.flex.core.IBead; IBead;
+ import org.apache.flex.core.IBeadController; IBeadController;
+ import org.apache.flex.core.IBeadLayout; IBeadLayout;
+ import org.apache.flex.core.IBeadModel; IBeadModel;
+ import org.apache.flex.core.IBeadView; IBeadView;
+ //import org.apache.flex.core.IBorderModel; IBorderModel;
+ import org.apache.flex.core.IChild; IChild;
+ import org.apache.flex.core.IChrome; IChrome;
+ import org.apache.flex.core.IComboBoxModel; IComboBoxModel;
+ import org.apache.flex.core.IContainer; IContainer;
+ import org.apache.flex.core.IContentView; IContentView;
+ import org.apache.flex.core.IDataProviderItemRendererMapper; IDataProviderItemRendererMapper;
+ import org.apache.flex.core.IDocument; IDocument;
+ import org.apache.flex.core.IFormatBead; IFormatBead;
+ //import org.apache.flex.core.IImageModel; IImageModel;
+ import org.apache.flex.core.ILayoutChild; ILayoutChild;
+ import org.apache.flex.core.ILayoutHost; ILayoutHost;
+ import org.apache.flex.core.IPanelModel; IPanelModel;
+ import org.apache.flex.core.IParent; IParent;
+ import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
+ import org.apache.flex.core.IPopUp; IPopUp;
+ import org.apache.flex.core.IRollOverModel; IRollOverModel;
+ //import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
+ import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
+ import org.apache.flex.core.ISelectionModel; ISelectionModel;
+ import org.apache.flex.core.IStrand; IStrand;
+ import org.apache.flex.core.IStrandWithModel; IStrandWithModel;
+ import org.apache.flex.core.ITextModel; ITextModel;
+ import org.apache.flex.core.ITitleBarModel; ITitleBarModel;
+ import org.apache.flex.core.IToggleButtonModel; IToggleButtonModel;
+ import org.apache.flex.core.IUIBase; IUIBase;
+ import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
+ import org.apache.flex.core.IViewport; IViewport;
+ import org.apache.flex.core.IViewportModel; IViewportModel;
+ //import org.apache.flex.core.IViewportScroller; IViewportScroller;
+ import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
+ import org.apache.flex.core.DataBindingBase; DataBindingBase;
+ import org.apache.flex.core.UIBase; UIBase;
+ //import org.apache.flex.core.UIButtonBase; UIButtonBase;
+ import org.apache.flex.events.CustomEvent; CustomEvent;
+ import org.apache.flex.events.Event; Event;
+ import org.apache.flex.events.EventDispatcher; EventDispatcher;
+ import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
+ import org.apache.flex.events.MouseEvent; MouseEvent;
+ import org.apache.flex.events.ValueEvent; ValueEvent;
+ import org.apache.flex.events.utils.MouseUtils; MouseUtils;
+ import org.apache.flex.geom.Point; Point;
+ import org.apache.flex.geom.Rectangle; Rectangle;
+ import org.apache.flex.utils.BinaryData; BinaryData;
+ import org.apache.flex.utils.EffectTimer; EffectTimer;
+ import org.apache.flex.utils.MixinManager; MixinManager;
+ //import org.apache.flex.utils.PNGEncoder; PNGEncoder;
+ //import org.apache.flex.utils.StringTrimmer; StringTrimmer;
+ import org.apache.flex.utils.Timer; Timer;
+ import org.apache.flex.utils.UIUtils; UIUtils;
+
+ import org.apache.flex.core.ClassFactory; ClassFactory;
+ import org.apache.flex.states.AddItems; AddItems;
+ import org.apache.flex.states.SetEventHandler; SetEventHandler;
+ import org.apache.flex.states.SetProperty; SetProperty;
+ import org.apache.flex.states.State; State;
+}
+
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
new file mode 100644
index 0000000..ac80b8c
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Application.as
@@ -0,0 +1,602 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+ import org.apache.flex.events.MouseEvent;
+ import org.apache.flex.events.utils.MouseEventConverter;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ COMPILE::AS3 {
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.StageAlign;
+ import flash.display.StageQuality;
+ import flash.display.StageScaleMode;
+ import flash.events.Event;
+ import flash.system.ApplicationDomain;
+ import flash.utils.getQualifiedClassName;
+ }
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched at startup. Attributes and sub-instances of
+ * the MXML document have been created and assigned.
+ * The component lifecycle is different
+ * than the Flex SDK. There is no creationComplete event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="initialize", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched at startup before the instances get created.
+ * Beads can call preventDefault and defer initialization.
+ * This event will be dispatched on every frame until no
+ * listeners call preventDefault(), then the initialize()
+ * method will be called.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="preinitialize", type="org.apache.flex.events.Event")]
+
+ /**
+ * Dispatched at startup after the initial view has been
+ * put on the display list. This event is sent before
+ * applicationComplete is dispatched.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="viewChanged", type="org.apache.flex.events.Event")]
+
+ /**
+ * 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="applicationComplete", type="org.apache.flex.events.Event")]
+ /**
+ * The Application class is the main class and entry point for a FlexJS
+ * application. This Application class is different than the
+ * Flex SDK's mx:Application or spark:Application in that it does not contain
+ * user interface elements. Those UI elements go in the views (ViewBase). This
+ * Application class expects there to be a main model, a controller, and
+ * an initial view.
+ *
+ * @see ViewBase
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Application extends ApplicationBase implements IStrand, IParent, IEventDispatcher
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Application()
+ {
+ super();
+
+ COMPILE::AS3 {
+ if (stage)
+ {
+ stage.align = StageAlign.TOP_LEFT;
+ stage.scaleMode = StageScaleMode.NO_SCALE;
+ // should be opt-in
+ //stage.quality = StageQuality.HIGH_16X16_LINEAR;
+ }
+
+ loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
+ }
+ }
+
+ COMPILE::AS3
+ private function initHandler(event:flash.events.Event):void
+ {
+ if (model is IBead) addBead(model as IBead);
+ if (controller is IBead) addBead(controller as IBead);
+
+ MouseEventConverter.setupAllConverters(stage);
+
+ for each (var bead:IBead in beads)
+ addBead(bead);
+
+ dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
+
+ if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
+ initialize();
+ else
+ addEventListener(flash.events.Event.ENTER_FRAME, enterFrameHandler);
+
+ }
+
+ COMPILE::AS3
+ private function enterFrameHandler(event:flash.events.Event):void
+ {
+ if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
+ {
+ removeEventListener(flash.events.Event.ENTER_FRAME, enterFrameHandler);
+ initialize();
+ }
+ }
+
+ /**
+ * This method gets called when all preinitialize handlers
+ * no longer call preventDefault();
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ protected function initialize():void
+ {
+
+ MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
+
+ dispatchEvent(new org.apache.flex.events.Event("initialize"));
+
+ if (initialView)
+ {
+ initialView.applicationModel = model;
+ this.addElement(initialView);
+ // if someone has installed a resize listener, fake an event to run it now
+ if (stage.hasEventListener("resize"))
+ stage.dispatchEvent(new flash.events.Event("resize"));
+ else if (initialView is ILayoutChild)
+ {
+ var ilc:ILayoutChild = initialView as ILayoutChild;
+ // otherwise, size once like this
+ if (!isNaN(ilc.percentWidth) && !isNaN(ilc.percentHeight))
+ ilc.setWidthAndHeight(stage.stageWidth, stage.stageHeight, true);
+ else if (!isNaN(ilc.percentWidth))
+ ilc.setWidth(stage.stageWidth);
+ else if (!isNaN(ilc.percentHeight))
+ ilc.setHeight(stage.stageHeight);
+ }
+ var bgColor:Object = ValuesManager.valuesImpl.getValue(this, "background-color");
+ if (bgColor != null)
+ {
+ var backgroundColor:uint = ValuesManager.valuesImpl.convertColor(bgColor);
+ graphics.beginFill(backgroundColor);
+ graphics.drawRect(0, 0, initialView.width, initialView.height);
+ graphics.endFill();
+ }
+ dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
+ }
+ dispatchEvent(new org.apache.flex.events.Event("applicationComplete"));
+ }
+
+ /**
+ * The org.apache.flex.core.IValuesImpl that will
+ * determine the default values and other values
+ * for the application. The most common choice
+ * is org.apache.flex.core.SimpleCSSValuesImpl.
+ *
+ * @see org.apache.flex.core.SimpleCSSValuesImpl
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set valuesImpl(value:IValuesImpl):void
+ {
+ ValuesManager.valuesImpl = value;
+ ValuesManager.valuesImpl.init(this);
+ }
+
+ /**
+ * The initial view.
+ *
+ * @see org.apache.flex.core.ViewBase
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Bindable("__NoChangeEvent__")]
+ public var initialView:IApplicationView;
+
+ /**
+ * The data model (for the initial view).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Bindable("__NoChangeEvent__")]
+ COMPILE::AS3
+ public var model:Object;
+
+ COMPILE::JS
+ private var _model:Object;
+
+ /**
+ * The data model (for the initial view).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Bindable("__NoChangeEvent__")]
+ COMPILE::JS
+ override public function get model():Object
+ {
+ return _model;
+ }
+
+ /**
+ * @private
+ */
+ [Bindable("__NoChangeEvent__")]
+ COMPILE::JS
+ override public function set model(value:Object):void
+ {
+ _model = value;
+ }
+
+ /**
+ * The controller. The controller typically watches
+ * the UI for events and updates the model accordingly.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var controller:Object;
+
+ /**
+ * An array of data that describes the MXML attributes
+ * and tags in an MXML document. This data is usually
+ * decoded by an MXMLDataInterpreter
+ *
+ * @see org.apache.flex.utils.MXMLDataInterpreter
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get MXMLDescriptor():Array
+ {
+ return null;
+ }
+
+ /**
+ * An method called by the compiler's generated
+ * code to kick off the setting of MXML attribute
+ * values and instantiation of child tags.
+ *
+ * The call has to be made in the generated code
+ * in order to ensure that the constructors have
+ * completed first.
+ *
+ * @param data The encoded data representing the
+ * MXML attributes.
+ *
+ * @see org.apache.flex.utils.MXMLDataInterpreter
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function generateMXMLAttributes(data:Array):void
+ {
+ MXMLDataInterpreter.generateMXMLProperties(this, data);
+ }
+
+ /**
+ * The array property that is used to add additional
+ * beads to an MXML tag. From ActionScript, just
+ * call addBead directly.
+ *
+ * @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.IStrand#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.IStrand#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.IStrand#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;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#addElement()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3 {
+ if (c is IUIBase)
+ {
+ addChild(IUIBase(c).element as DisplayObject);
+ IUIBase(c).addedToParent();
+ }
+ else
+ addChild(c as DisplayObject);
+ }
+ COMPILE::JS {
+ this.element.appendChild(c.element);
+ c.addedToParent();
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#addElementAt()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3 {
+ if (c is IUIBase)
+ {
+ addChildAt(IUIBase(c).element as DisplayObject, index);
+ IUIBase(c).addedToParent();
+ }
+ else
+ addChildAt(c as DisplayObject, index);
+ }
+ COMPILE::JS {
+ var children:NodeList = internalChildren();
+ if (index >= children.length)
+ addElement(c);
+ else
+ {
+ element.insertBefore(c.positioner,
+ children[index]);
+ c.addedToParent();
+ }
+
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#getElementAt()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getElementAt(index:int):Object
+ {
+ COMPILE::AS3 {
+ return getChildAt(index);
+ }
+ COMPILE::JS {
+ var children:NodeList = internalChildren();
+ return children[index].flexjs_wrapper;
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#getElementIndex()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getElementIndex(c:Object):int
+ {
+ COMPILE::AS3 {
+ if (c is IUIBase)
+ return getChildIndex(IUIBase(c).element as DisplayObject);
+
+ return getChildIndex(c as DisplayObject);
+ }
+ COMPILE::JS {
+ var children:NodeList = internalChildren();
+ var n:int = children.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ if (children[i] == c.element)
+ return i;
+ }
+ return -1;
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#removeElement()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3 {
+ if (c is IUIBase)
+ {
+ removeChild(IUIBase(c).element as DisplayObject);
+ }
+ else
+ removeChild(c as DisplayObject);
+ }
+ COMPILE::JS {
+ element.removeChild(c.element);
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#numElements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get numElements():int
+ {
+ COMPILE::AS3 {
+ return numChildren;
+ }
+ COMPILE::JS {
+ var children:NodeList = internalChildren();
+ return children.length;
+ }
+ }
+
+ /**
+ * @return {Object} The array of children.
+ */
+ COMPILE::JS
+ protected function internalChildren():NodeList
+ {
+ return element.childNodes;
+ };
+
+
+
+ /**
+ * @flexjsignorecoercion org.apache.flex.core.IBead
+ */
+ COMPILE::JS
+ public function start():void
+ {
+ element = document.getElementsByTagName('body')[0];
+ element.flexjs_wrapper = this;
+ element.className = 'Application';
+
+ MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
+
+ dispatchEvent('initialize');
+
+ if (model is IBead) addBead(model as IBead);
+ if (controller is IBead) addBead(controller as IBead);
+
+ initialView.applicationModel = model;
+ addElement(initialView);
+
+ if (initialView)
+ {
+ var baseView:UIBase = initialView as UIBase;
+ if (!isNaN(baseView.percentWidth) || !isNaN(baseView.percentHeight)) {
+ this.element.style.height = window.innerHeight.toString() + 'px';
+ this.element.style.width = window.innerWidth.toString() + 'px';
+ this.initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
+ }
+
+ dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
+ }
+ dispatchEvent(new org.apache.flex.events.Event("applicationComplete"));
+ };
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
new file mode 100644
index 0000000..70d6424
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ApplicationBase.as
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3 {
+ import flash.display.Sprite;
+ import flash.system.ApplicationDomain;
+ import flash.utils.getQualifiedClassName;
+ }
+
+ /**
+ * This is a platform-dependent base class
+ * for Application
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class ApplicationBase extends Sprite implements IFlexInfo
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ApplicationBase()
+ {
+ super();
+ }
+
+ private var _info:Object;
+
+ /**
+ * An Object containing information generated
+ * by the compiler that is useful at startup time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function info():Object
+ {
+ if (!_info)
+ {
+ var mainClassName:String = getQualifiedClassName(this);
+ var initClassName:String = "_" + mainClassName + "_FlexInit";
+ var c:Class = ApplicationDomain.currentDomain.getDefinition(initClassName) as Class;
+ _info = c.info();
+ }
+ return _info;
+ }
+ }
+
+ COMPILE::JS
+ public class ApplicationBase extends HTMLElementWrapper implements IFlexInfo
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ApplicationBase()
+ {
+ super();
+ }
+
+ private var _info:Object;
+
+ /**
+ * An Object containing information generated
+ * by the compiler that is useful at startup time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function info():Object
+ {
+ return _info;
+ }
+
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BeadViewBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BeadViewBase.as
new file mode 100644
index 0000000..a31af58
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BeadViewBase.as
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IBeadView;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.EventDispatcher;
+
+ /**
+ * The BeadViewBase class is the base class for most view beads.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BeadViewBase extends EventDispatcher implements IBeadView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BeadViewBase()
+ {
+ super();
+ }
+
+ /**
+ * The strand. Do not modify except
+ * via the strand setter. For reading only.
+ *
+ * Because Object.defineProperties in JS
+ * doesn't allow you to just override the setter
+ * (you have to override the getter as well even
+ * if it just calls the super getter) it is
+ * more efficient to expose this variable than
+ * have all of the layers of simple overrides.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var _strand:IStrand;
+
+ /**
+ * Get the strand for this bead
+ *
+ * Override this for whatever else you need to do when
+ * being hooked to the Strand
+ *
+ * @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 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;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
new file mode 100644
index 0000000..7137ade
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BindableCSSStyles.as
@@ -0,0 +1,134 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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;
+
+ /**
+ * The BindableCSSStyles class contains CSS style
+ * properties supported by SimpleCSSValuesImpl but
+ * dispatch change events when modified
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BindableCSSStyles extends EventDispatcher
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BindableCSSStyles()
+ {
+ super();
+ }
+
+ public var styleList:Object = {
+ "top": 1,
+ "bottom": 1,
+ "left": 1,
+ "right": 1,
+ "padding": 1,
+ "paddingLeft": 1,
+ "paddingRight": 1,
+ "paddingTop": 1,
+ "paddingBottom": 1,
+ "margin": 1,
+ "marginLeft": 1,
+ "marginRight": 1,
+ "marginTop": 1,
+ "marginBottom": 1,
+ "verticalAlign": 1,
+ "fontFamily": 1,
+ "fontSize": 1,
+ "color": 1,
+ "fontWeight": 1,
+ "fontStyle": 1,
+ "backgroundAlpha": 1,
+ "backgroundColor": 1,
+ "backgroundImage": 1,
+ "borderColor": 1,
+ "borderStyle": 1,
+ "borderRadius": 1,
+ "borderWidth": 1
+ };
+
+ [Bindable]
+ public var top:*;
+ [Bindable]
+ public var bottom:*;
+ [Bindable]
+ public var left:*;
+ [Bindable]
+ public var right:*;
+ [Bindable]
+ public var padding:*;
+ [Bindable]
+ public var paddingLeft:*;
+ [Bindable]
+ public var paddingRight:*;
+ [Bindable]
+ public var paddingTop:*;
+ [Bindable]
+ public var paddingBottom:*;
+ [Bindable]
+ public var margin:*;
+ [Bindable]
+ public var marginLeft:*;
+ [Bindable]
+ public var marginRight:*;
+ [Bindable]
+ public var marginTop:*;
+ [Bindable]
+ public var marginBottom:*;
+ [Bindable]
+ public var verticalAlign:*;
+ [Bindable]
+ public var fontFamily:*;
+ [Bindable]
+ public var fontSize:*;
+ [Bindable]
+ public var color:*;
+ [Bindable]
+ public var fontWeight:*;
+ [Bindable]
+ public var fontStyle:*;
+ [Bindable]
+ public var backgroundAlpha:*;
+ [Bindable]
+ public var backgroundColor:*;
+ [Bindable]
+ public var backgroundImage:*;
+ [Bindable]
+ public var borderColor:*;
+ [Bindable]
+ public var borderStyle:*;
+ [Bindable]
+ public var borderRadius:*;
+ [Bindable]
+ public var borderWidth:*;
+ }
+}
[05/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportModel.as
new file mode 100644
index 0000000..6de0cb8
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportModel.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.core
+{
+ import org.apache.flex.geom.Rectangle;
+
+ /**
+ * A Viewport is the area of a Container set aside for displaying
+ * content and any scrolling controls.
+ * The ViewportModel caches the offsets required to compute the size
+ * of the Viewport.
+ */
+ public interface IViewportModel extends IBead
+ {
+ /**
+ * Size of the borders.
+ */
+ function get borderMetrics():Rectangle;
+ function set borderMetrics(value:Rectangle):void;
+
+ /**
+ * Size of the chrome. A plain container doesn't have any chrome
+ * but a Panel's TitleBar and any ControlBar or StatusBar is
+ * considered chrome. Scrollbars used to scroll content are
+ * not factored into the viewport calculation. The Viewport
+ * is responsible for displaying any scrolling controls and
+ * deciding whether to further shrink the content area or
+ * have the scrollbars overlay the content.
+ */
+ function get chromeMetrics():Rectangle;
+ function set chromeMetrics(value:Rectangle):void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.as
new file mode 100644
index 0000000..5b0a4cb
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewportScroller.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 org.apache.flex.core
+{
+ /**
+ * The IViewportScroller interface describes an object that can be used to scroll
+ * or navigate around a system that uses an IViewport. This may be a traditional
+ * scroll bar, or it could be something completely different.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public interface IViewportScroller
+ {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ItemRendererClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ItemRendererClassFactory.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ItemRendererClassFactory.as
new file mode 100644
index 0000000..7401282
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ItemRendererClassFactory.as
@@ -0,0 +1,194 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.ClassFactory;
+ import org.apache.flex.core.IFactory;
+ import org.apache.flex.core.IItemRendererProvider;
+
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ [DefaultProperty("mxmlContent")]
+
+ /**
+ * The ItemRendererClassFactory class is the default implementation of
+ * IItemRendererClassFactory. This implementation checks for an itemRenderer
+ * property on the strand, then looks for a default definition in CSS, but
+ * also handles the renderer being defined in MXML in sub tags of the
+ * ItemRendererClassFactory. Other more advanced implementations could
+ * return different renderers based on the data item's type.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ItemRendererClassFactory extends Strand implements IItemRendererClassFactory, IDocument, IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ItemRendererClassFactory()
+ {
+ 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
+ * @flexjsignorecoercion Class
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ if (_strand is IItemRendererProvider && (_strand as IItemRendererProvider).hasItemRenderer) {
+ itemRendererFactory = (_strand as IItemRendererProvider).itemRenderer;
+ createFunction = createFromClass;
+ }
+ else {
+ var itemRendererClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iItemRenderer") as Class;
+ if (itemRendererClass) {
+ itemRendererFactory = new ClassFactory(itemRendererClass);
+ createFunction = createFromClass;
+ }
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.Application#MXMLDescriptor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get MXMLDescriptor():Array
+ {
+ return null;
+ }
+
+ /**
+ * The default property. Child tags in MXML documents get assigned
+ * to this property, but are actually encoded by the compiler into the MXMLDescriptor
+ * array. Therefore, setting this property from ActionScript will have no
+ * effect at runtime.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var mxmlContent:Array;
+
+ /**
+ * @copy org.apache.flex.core.IItemRendererClassFactory#createItemRenderer()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function createItemRenderer(parent:IItemRendererParent):IItemRenderer
+ {
+ return createFunction(parent);
+ }
+
+ /**
+ * This is the method that actually does the work for createItemRenderer. It
+ * defaults to creating an instance from child MXML tags, but if the strand
+ * has an item renderer property or style, it switches to generating instances
+ * of the item renderer specified by that property or style. And yes, since
+ * it is public, you could theoretically assign some other method that generates
+ * item renderer instances.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var createFunction:Function = createFromMXMLContent;
+
+ /**
+ * Creates an instance of an item renderer from child MXML tags.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ protected function createFromMXMLContent(parent:IItemRendererParent):IItemRenderer
+ {
+ return MXMLDataInterpreter.generateMXMLArray(document, parent as IParent, MXMLDescriptor)[0];
+ }
+
+ /**
+ * Stores the IFactory that will be used to generate item renderer instances if
+ * createFromClass is the createFunction.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var itemRendererFactory:IFactory;
+
+ /**
+ * Creates an instance of an item renderer from itemRendererFactory.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function createFromClass(parent:IItemRendererParent):IItemRenderer
+ {
+ var renderer:IItemRenderer = itemRendererFactory.newInstance();
+ renderer.itemRendererParent = parent;
+ return renderer;
+ }
+
+ private var document:Object;
+
+ /**
+ * @copy org.apache.flex.core.IDocument#setDocument()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
new file mode 100644
index 0000000..6380f2f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBase.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.core.IMXMLDocument;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.states.State;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ /**
+ * The ListBase class is the base class for most lists
+ * in FlexJS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ListBase extends UIBase implements IContentViewHost
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ListBase()
+ {
+ super();
+
+ _strandChildren = new ListBaseStrandChildren(this);
+ }
+
+ private var _strandChildren:ListBaseStrandChildren;
+
+ /**
+ * @private
+ */
+ public function get strandChildren():IParent
+ {
+ return _strandChildren;
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $numElements():int
+ {
+ return super.numElements();
+ }
+
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ super.addElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ super.addElementAt(c, index, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ super.removeElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $getElementIndex(c:Object):int
+ {
+ return super.getElementIndex(c);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $getElementAt(index:int):Object
+ {
+ return super.getElementAt(index);
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
new file mode 100644
index 0000000..3f77774
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ListBaseStrandChildren.as
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 ListBaseStrandChildren exists so that Lists are compatible with
+ * the ListView/ContainerView beads.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ListBaseStrandChildren implements IParent
+ {
+ /**
+ * Constructor.
+ *
+ * @flexjsignorecoercion org.apache.flex.core.ListBase
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ListBaseStrandChildren(owner:IParent)
+ {
+ super();
+
+ this.owner = owner as ListBase;
+ }
+
+ public var owner:ListBase;
+
+ /**
+ * @private
+ */
+ public function get numElements():int
+ {
+ return owner.$numElements();
+ }
+
+ /**
+ * @private
+ */
+ public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ owner.$addElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ owner.$addElementAt(c, index, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ owner.$removeElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function getElementIndex(c:Object):int
+ {
+ return owner.$getElementIndex(c);
+ }
+
+ /**
+ * @private
+ */
+ public function getElementAt(index:int):Object
+ {
+ return owner.$getElementAt(index);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/MXMLDragInitiator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/MXMLDragInitiator.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/MXMLDragInitiator.as
new file mode 100644
index 0000000..cb20f01
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/MXMLDragInitiator.as
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+
+ /**
+ * Indicates that acceptingDrop API has been called.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="acceptingDrop", type="org.apache.flex.events.Event")]
+
+ /**
+ * Indicates that acceptedDrop API has been called.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="acceptedDrop", type="org.apache.flex.events.Event")]
+
+ /**
+ * The MXMLDragInitiator is an IDragInitiator that
+ * dispatches events when the IDragInitiator methods
+ * are called to make it easier to handle in MXML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MXMLDragInitiator extends EventDispatcher implements IBead, IDragInitiator
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MXMLDragInitiator()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+ /**
+ *
+ * @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 dropTarget
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var dropTarget:Object;
+
+ /**
+ * The DropType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var dropType:String;
+
+ /**
+ * Handles the acceptingDrop API
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function acceptingDrop(dropTarget:Object, type:String):void
+ {
+ dispatchEvent(new Event("acceptingDrop"));
+ }
+
+ /**
+ * Handles the acceptedDrop API
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function acceptedDrop(dropTarget:Object, type:String):void
+ {
+ dispatchEvent(new Event("acceptedDrop"));
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ParentDocumentBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ParentDocumentBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ParentDocumentBead.as
new file mode 100644
index 0000000..1b0b0e7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ParentDocumentBead.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.core
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.core.IMXMLDocument;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.EventDispatcher;
+
+ /**
+ * The ParentDocumentBead class looks up the parent
+ * chain to find a parent that was written in MXML.
+ * Because it is usually rare for an application
+ * to need to know this information, an optional bead
+ * is used to compute it, instead of baking in the
+ * overhead of a recursive infrastucture to store
+ * this information. It is intended to be used
+ * as a bead in the top-level tag of an MXML document.
+ *
+ * @flexjsignoreimport org.apache.flex.core.IChild
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ParentDocumentBead extends EventDispatcher implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ParentDocumentBead()
+ {
+ super();
+ }
+
+ private var _strand:IStrand;
+
+ /**
+ * @copy org.apache.flex.core.IBead#strand
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ //TODO (aharui) watch for re-parenting
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new org.apache.flex.events.Event("idChanged"));
+ }
+ }
+
+ [Bindable("parentDocumentChange")]
+ /**
+ * @private
+ * @flexjsignorecoercion org.apache.flex.core.IChild
+ */
+ public function get parentDocument():Object
+ {
+ var child:IChild = _strand as IChild;
+ child = child.parent as IChild;
+ while (child)
+ {
+ if (child is IMXMLDocument)
+ {
+ var doc:IMXMLDocument = child as IMXMLDocument;
+ if (doc.MXMLDescriptor != null)
+ return doc;
+ }
+ child = child.parent as IChild;
+ }
+ return null;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
new file mode 100644
index 0000000..5d4d918
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleApplication.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.StageAlign;
+ import flash.display.StageQuality;
+ import flash.display.StageScaleMode;
+ import flash.events.Event;
+ import flash.system.ApplicationDomain;
+ import flash.utils.getQualifiedClassName;
+ }
+
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.MouseEvent;
+ import org.apache.flex.events.utils.MouseEventConverter;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ /**
+ * The SimpleApplication class can be used as the main class and entry point
+ * for low-level ActionScript-only FlexJS
+ * applications. It is not indended for use in MXML applications or most
+ * of the FlexJS components as they expect a certain application lifecycle
+ * in the org.apache.flex.core.Application class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SimpleApplication extends ApplicationBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function SimpleApplication()
+ {
+ super();
+ COMPILE::AS3
+ {
+ if (stage)
+ {
+ stage.align = StageAlign.TOP_LEFT;
+ stage.scaleMode = StageScaleMode.NO_SCALE;
+ // should be opt-in
+ //stage.quality = StageQuality.HIGH_16X16_LINEAR;
+ }
+
+ loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
+ }
+ }
+
+ COMPILE::AS3
+ private function initHandler(event:flash.events.Event):void
+ {
+ start();
+ }
+
+ /**
+ * The entry point. Override this and put all of your code in here.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function start():void
+ {
+ COMPILE::JS
+ {
+ this.element = document.getElementsByTagName('body')[0];
+ this.element.flexjs_wrapper = this;
+ this.element.className = 'SimpleApplication';
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
new file mode 100644
index 0000000..6e83b2d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSStyles.as
@@ -0,0 +1,106 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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;
+
+ /**
+ * The SimpleCSSStyles class contains CSS style
+ * properties supported by SimpleCSSValuesImpl.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SimpleCSSStyles
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function SimpleCSSStyles()
+ {
+ super();
+ }
+
+ public var styleList:Object = {
+ "top": 1,
+ "bottom": 1,
+ "left": 1,
+ "right": 1,
+ "padding": 1,
+ "paddingLeft": 1,
+ "paddingRight": 1,
+ "paddingTop": 1,
+ "paddingBottom": 1,
+ "margin": 1,
+ "marginLeft": 1,
+ "marginRight": 1,
+ "marginTop": 1,
+ "marginBottom": 1,
+ "verticalAlign": 1,
+ "fontFamily": 1,
+ "fontSize": 1,
+ "color": 1,
+ "fontWeight": 1,
+ "fontStyle": 1,
+ "backgroundAlpha": 1,
+ "backgroundColor": 1,
+ "backgroundImage": 1,
+ "borderColor": 1,
+ "borderStyle": 1,
+ "borderRadius": 1,
+ "borderWidth": 1
+ };
+
+ public var top:*;
+ public var bottom:*;
+ public var left:*;
+ public var right:*;
+ public var padding:*;
+ public var paddingLeft:*;
+ public var paddingRight:*;
+ public var paddingTop:*;
+ public var paddingBottom:*;
+ public var margin:*;
+ public var marginLeft:*;
+ public var marginRight:*;
+ public var marginTop:*;
+ public var marginBottom:*;
+ public var verticalAlign:*;
+ public var fontFamily:*;
+ public var fontSize:*;
+ public var color:*;
+ public var fontWeight:*;
+ public var fontStyle:*;
+ public var backgroundAlpha:*;
+ public var backgroundColor:*;
+ public var backgroundImage:*;
+ public var borderColor:*;
+ public var borderStyle:*;
+ public var borderRadius:*;
+ public var borderWidth:*;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
new file mode 100644
index 0000000..e64a517
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -0,0 +1,765 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.system.ApplicationDomain;
+ import flash.utils.getDefinitionByName;
+ import flash.utils.getQualifiedClassName;
+ import flash.utils.getQualifiedSuperclassName;
+ }
+
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.events.ValueEvent;
+ import org.apache.flex.utils.CSSUtils;
+
+ /**
+ * The SimpleCSSValuesImpl class implements a minimal set of
+ * CSS lookup rules that is sufficient for most applications.
+ * It does not support attribute selectors or descendant selectors
+ * or id selectors. It will filter on a custom -flex-flash
+ * media query but not other media queries. It can be
+ * replaced with other implementations that handle more complex
+ * selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SimpleCSSValuesImpl extends EventDispatcher implements IValuesImpl
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function SimpleCSSValuesImpl()
+ {
+ super();
+ }
+
+ private var mainClass:Object;
+
+ private var conditionCombiners:Object;
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#init()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function init(mainClass:Object):void
+ {
+ var styleClassName:String;
+ var c:Class;
+ if (!values)
+ {
+ values = {};
+ this.mainClass = mainClass;
+ var mainClassName:String = getQualifiedClassName(mainClass);
+ styleClassName = "_" + mainClassName + "_Styles";
+ c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
+ generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
+ }
+ c = mainClass.constructor as Class;
+ generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
+ if (hasEventListener("init"))
+ dispatchEvent(new ValueEvent("init", false, false, c["fontFaces"]));
+
+ var i:int = 1;
+ while (true)
+ {
+ var ffName:String = "factoryFunctions" + i.toString();
+ var ff:Object = c[ffName];
+ if (ff == null)
+ break;
+ generateCSSStyleDeclarations(c[ffName], c["data" + i.toString()]);
+ if (hasEventListener("init"))
+ dispatchEvent(new ValueEvent("init", false, false, c["fontFaces" + i.toString()]));
+ i++;
+ }
+ }
+
+ COMPILE::JS
+ public function init(mainClass:Object):void
+ {
+ var cssData:Array = mainClass.cssData;
+ var values:Object = this.values;
+ if (values == null)
+ values = {};
+
+ if (cssData) {
+ var n:int = cssData.length;
+ var i:int = 0;
+ while (i < n)
+ {
+ var numMQ:int = cssData[i++];
+ if (numMQ > 0)
+ {
+ // skip MediaQuery tests for now
+ i += numMQ;
+ }
+ var numSel:int = cssData[i++];
+ var props:Object = {};
+ for (var j:int = 0; j < numSel; j++)
+ {
+ var selName:String = cssData[i++];
+ if (values[selName])
+ props = values[selName];
+ values[selName] = props;
+ }
+ var numProps:int = cssData[i++];
+ for (j = 0; j < numProps; j++)
+ {
+ var propName:String = cssData[i++];
+ var propValue:Object = cssData[i++];
+ props[propName] = propValue;
+ }
+ }
+ }
+
+ this.values = values;
+ }
+
+ /**
+ * Process the encoded CSS data into data structures. Usually not called
+ * directly by application developers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function generateCSSStyleDeclarations(factoryFunctions:Object, arr:Array):void
+ {
+ if (factoryFunctions == null)
+ return;
+ if (arr == null)
+ return;
+
+ var declarationName:String = "";
+ var segmentName:String = "";
+ var n:int = arr.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var className:int = arr[i];
+ if (className == CSSClass.CSSSelector)
+ {
+ var selectorName:String = arr[++i];
+ segmentName = selectorName + segmentName;
+ if (declarationName != "")
+ declarationName += " ";
+ declarationName += segmentName;
+ segmentName = "";
+ }
+ else if (className == CSSClass.CSSCondition)
+ {
+ if (!conditionCombiners)
+ {
+ conditionCombiners = {};
+ conditionCombiners["class"] = ".";
+ conditionCombiners["id"] = "#";
+ conditionCombiners["pseudo"] = ':';
+ }
+ var conditionType:String = arr[++i];
+ var conditionName:String = arr[++i];
+ segmentName = segmentName + conditionCombiners[conditionType] + conditionName;
+ }
+ else if (className == CSSClass.CSSStyleDeclaration)
+ {
+ var factoryName:int = arr[++i]; // defaultFactory or factory
+ var defaultFactory:Boolean = factoryName == CSSFactory.DefaultFactory;
+ /*
+ if (defaultFactory)
+ {
+ mergedStyle = styleManager.getMergedStyleDeclaration(declarationName);
+ style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
+ }
+ else
+ {
+ style = styleManager.getStyleDeclaration(declarationName);
+ if (!style)
+ {
+ style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
+ if (factoryName == CSSFactory.Override)
+ newSelectors.push(style);
+ }
+ }
+ */
+ var mq:String = null;
+ var o:Object;
+ if (i < n - 2)
+ {
+ // peek ahead to see if there is a media query
+ if (arr[i + 1] == CSSClass.CSSMediaQuery)
+ {
+ mq = arr[i + 2];
+ i += 2;
+ declarationName = mq + "_" + declarationName;
+ }
+ }
+ var finalName:String;
+ var valuesFunction:Function;
+ var valuesObject:Object;
+ if (defaultFactory)
+ {
+ valuesFunction = factoryFunctions[declarationName];
+ valuesObject = new valuesFunction();
+ }
+ else
+ {
+ valuesFunction = factoryFunctions[declarationName];
+ valuesObject = new valuesFunction();
+ }
+ if (isValidStaticMediaQuery(mq))
+ {
+ finalName = fixNames(declarationName, mq);
+ o = values[finalName];
+ if (o == null)
+ values[finalName] = valuesObject;
+ else
+ {
+ valuesFunction["prototype"] = o;
+ values[finalName] = new valuesFunction();
+ }
+ }
+ declarationName = "";
+ }
+ }
+
+ }
+
+ private function isValidStaticMediaQuery(mq:String):Boolean
+ {
+ if (mq == null)
+ return true;
+
+ if (mq == "-flex-flash")
+ return true;
+
+ // TODO: (aharui) other media query
+
+ return false;
+ }
+
+ private function fixNames(s:String, mq:String):String
+ {
+ if (mq != null)
+ s = s.substr(mq.length + 1); // 1 more for the hyphen
+
+ if (s == "")
+ return "*";
+
+ var arr:Array = s.split(" ");
+ var n:int = arr.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var segmentName:String = arr[i];
+ if (segmentName.charAt(0) == "#" || segmentName.charAt(0) == ".")
+ continue;
+
+ var c:int = segmentName.lastIndexOf(".");
+ if (c > -1) // it is 0 for class selectors
+ {
+ segmentName = segmentName.substr(0, c) + "::" + segmentName.substr(c + 1);
+ arr[i] = segmentName;
+ }
+ }
+ return arr.join(" ");
+ }
+
+ /**
+ * The map of values. The format is not documented and it is not recommended
+ * to manipulate this structure directly.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var values:Object;
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#getValue()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+ {
+ var c:int = valueName.indexOf("-");
+ while (c != -1)
+ {
+ valueName = valueName.substr(0, c) +
+ valueName.charAt(c + 1).toUpperCase() +
+ valueName.substr(c + 2);
+ c = valueName.indexOf("-");
+ }
+
+ var value:*;
+ var o:Object;
+ var className:String;
+ var selectorName:String;
+
+ if (thisObject is IStyleableObject)
+ {
+ var styleable:IStyleableObject = IStyleableObject(thisObject);
+ if (styleable.style != null)
+ {
+ try {
+ value = styleable.style[valueName];
+ }
+ catch (e:Error) {
+ value = undefined;
+ }
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ if (styleable.id != null)
+ {
+ o = values["#" + styleable.id];
+ if (o)
+ {
+ value = o[valueName];
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ }
+ var classNames:String = styleable.className;
+ if (classNames)
+ {
+ var classNameList:Array = classNames.split(" ");
+ for each (className in classNameList)
+ {
+ if (state)
+ {
+ selectorName = className + ":" + state;
+ o = values["." + selectorName];
+ if (o)
+ {
+ value = o[valueName];
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ }
+
+ o = values["." + className];
+ if (o)
+ {
+ value = o[valueName];
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ }
+ }
+ }
+
+ COMPILE::AS3
+ {
+ className = getQualifiedClassName(thisObject);
+ }
+ COMPILE::JS
+ {
+ className = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
+ }
+ var thisInstance:Object = thisObject;
+ while (className != "Object")
+ {
+ if (state)
+ {
+ selectorName = className + ":" + state;
+ o = values[selectorName];
+ if (o)
+ {
+ value = o[valueName];
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ }
+
+ o = values[className];
+ if (o)
+ {
+ value = o[valueName];
+ if (value == "inherit")
+ return getInheritingValue(thisObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ COMPILE::AS3
+ {
+ className = getQualifiedSuperclassName(thisInstance);
+ thisInstance = getDefinitionByName(className);
+ }
+ COMPILE::JS
+ {
+ var constructorAsObject:Object = thisInstance["constructor"];
+ thisInstance = constructorAsObject.superClass_;
+ if (!thisInstance || !thisInstance.FLEXJS_CLASS_INFO)
+ break;
+
+ className = thisInstance.FLEXJS_CLASS_INFO.names[0].qName;
+ }
+ }
+
+ if (inheritingStyles[valueName] != null &&
+ thisObject is IChild)
+ {
+ var parentObject:Object = IChild(thisObject).parent;
+ if (parentObject)
+ return getValue(parentObject, valueName, state, attrs);
+ }
+
+ o = values["global"];
+ if (o)
+ {
+ value = o[valueName];
+ if (value !== undefined)
+ return value;
+ }
+ o = values["*"];
+ if(o)
+ {
+ return o[valueName];
+ }
+ return undefined;
+ }
+
+ private function getInheritingValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+ {
+ var value:*;
+ if (thisObject is IChild)
+ {
+ var parentObject:Object = IChild(thisObject).parent;
+ if (parentObject)
+ {
+ value = getValue(parentObject, valueName, state, attrs);
+ if (value == "inherit" || value === undefined)
+ return getInheritingValue(parentObject, valueName, state, attrs);
+ if (value !== undefined)
+ return value;
+ }
+ return undefined;
+ }
+ return "inherit";
+ }
+
+ /**
+ * A method that stores a value to be shared with other objects.
+ * It is global, not per instance. Fancier implementations
+ * may store shared values per-instance.
+ *
+ * @param thisObject An object associated with this value. Thiis
+ * parameter is ignored.
+ * @param valueName The name or key of the value being stored.
+ * @param The value to be stored.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setValue(thisObject:Object, valueName:String, value:*):void
+ {
+ var c:int = valueName.indexOf("-");
+ while (c != -1)
+ {
+ valueName = valueName.substr(0, c) +
+ valueName.charAt(c + 1).toUpperCase() +
+ valueName.substr(c + 2);
+ c = valueName.indexOf("-");
+ }
+ var oldValue:Object = values[valueName];
+ if (oldValue != value)
+ {
+ values[valueName] = value;
+ dispatchEvent(new ValueChangeEvent(ValueChangeEvent.VALUE_CHANGE, false, false, oldValue, value));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#newInstance()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+ {
+ var c:Class = getValue(thisObject, valueName, state, attrs);
+ if (c)
+ return new c();
+ return null;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#getInstance()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion Function
+ */
+ public function getInstance(valueName:String):Object
+ {
+ var o:Object = values["global"];
+ o = o[valueName];
+ COMPILE::AS3
+ {
+ var i:Class = o as Class;
+ }
+ COMPILE::JS
+ {
+ var i:Function = null;
+ if (typeof(o) === "function")
+ i = o as Function;
+ }
+ if (i)
+ {
+ o[valueName] = new i();
+ var d:IDocument = o[valueName] as IDocument;
+ if (d)
+ d.setDocument(mainClass);
+ }
+ return o;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#convertColor()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function convertColor(value:Object):uint
+ {
+ return CSSUtils.toColor(value);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#parseStyles()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function parseStyles(styles:String):Object
+ {
+ var obj:Object = {};
+ var parts:Array = styles.split(";");
+ for each (var part:String in parts)
+ {
+ var pieces:Array = part.split(":");
+ var value:String = pieces[1];
+ if (value == "null")
+ obj[pieces[0]] = null;
+ else if (value == "true")
+ obj[pieces[0]] = true;
+ else if (value == "false")
+ obj[pieces[0]] = false;
+ else
+ {
+ var n:Number = Number(value);
+ if (isNaN(n))
+ {
+ if (value.charAt(0) == "#")
+ {
+ obj[pieces[0]] = CSSUtils.toColor(value);
+ }
+ else
+ {
+ if (value.charAt(0) == "'")
+ value = value.substr(1, value.length - 2);
+ else if (value.charAt(0) == '"')
+ value = value.substr(1, value.length - 2);
+ obj[pieces[0]] = value;
+ }
+ }
+ else
+ obj[pieces[0]] = n;
+ }
+ }
+ return obj;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#addRule()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addRule(ruleName:String, values:Object):void
+ {
+ var asValues:Object = {};
+ for (var valueName:String in values)
+ {
+ var v:* = values[valueName];
+ var c:int = valueName.indexOf("-");
+ while (c != -1)
+ {
+ valueName = valueName.substr(0, c) +
+ valueName.charAt(c + 1).toUpperCase() +
+ valueName.substr(c + 2);
+ c = valueName.indexOf("-");
+ }
+ asValues[valueName] = v;
+ }
+ this.values[ruleName] = asValues;
+ }
+
+ /**
+ * A map of inheriting styles
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var inheritingStyles:Object = {
+ "color" : 1,
+ "fontFamily" : 1,
+ "fontSize" : 1,
+ "fontStyle" : 1,
+ "textAlign" : 1
+ }
+
+ /**
+ * The styles that apply to each UI widget
+ */
+ COMPILE::JS
+ public static var perInstanceStyles:Object = {
+ 'backgroundColor': 1,
+ 'backgroundImage': 1,
+ 'color': 1,
+ 'fontFamily': 1,
+ 'fontWeight': 1,
+ 'fontSize': 1,
+ 'fontStyle': 1
+ }
+
+
+ /**
+ * The styles that use color format #RRGGBB
+ */
+ COMPILE::JS
+ public static var colorStyles:Object = {
+ 'backgroundColor': 1,
+ 'borderColor': 1,
+ 'color': 1
+ }
+
+
+ /**
+ * The properties that enumerate that we skip
+ */
+ COMPILE::JS
+ public static var skipStyles:Object = {
+ 'constructor': 1
+ }
+
+
+
+ /**
+ * @param thisObject The object to apply styles to;
+ * @param styles The styles.
+ */
+ COMPILE::JS
+ public function applyStyles(thisObject:IUIBase, styles:Object):void
+ {
+ var styleList:Object = SimpleCSSValuesImpl.perInstanceStyles;
+ var colorStyles:Object = SimpleCSSValuesImpl.colorStyles;
+ var skipStyles:Object = SimpleCSSValuesImpl.skipStyles;
+ var listObj:Object = styles;
+ if (styles.styleList)
+ listObj = styles.styleList;
+ for (var p:String in listObj)
+ {
+ //if (styleList[p])
+ if (skipStyles[p])
+ continue;
+ var value:* = styles[p];
+ if (value === undefined)
+ continue;
+ if (typeof(value) == 'number') {
+ if (colorStyles[p])
+ value = '#' + value.toString(16);
+ else
+ value = value.toString() + 'px';
+ }
+ else if (p == 'backgroundImage') {
+ if (p.indexOf('url') !== 0)
+ value = 'url(' + value + ')';
+ }
+ thisObject.element.style[p] = value;
+ }
+ }
+ }
+}
+
+COMPILE::AS3
+class CSSClass
+{
+ public static const CSSSelector:int = 0;
+ public static const CSSCondition:int = 1;
+ public static const CSSStyleDeclaration:int = 2;
+ public static const CSSMediaQuery:int = 3;
+}
+
+COMPILE::AS3
+class CSSFactory
+{
+ public static const DefaultFactory:int = 0;
+ public static const Factory:int = 1;
+ public static const Override:int = 2;
+}
+
+COMPILE::AS3
+class CSSDataType
+{
+ public static const Native:int = 0;
+ public static const Definition:int = 1;
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleStatesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleStatesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleStatesImpl.as
new file mode 100644
index 0000000..4a27318
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleStatesImpl.as
@@ -0,0 +1,222 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.states.AddItems;
+ import org.apache.flex.states.SetEventHandler;
+ import org.apache.flex.states.SetProperty;
+ import org.apache.flex.states.State;
+
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.core.IParent;
+ import org.apache.flex.core.IStatesObject;
+ 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.utils.MXMLDataInterpreter;
+
+ /**
+ * The SimpleStatesImpl class implements a minimal set of
+ * view state functionality that is sufficient for most applications.
+ * It only supports AddItems and SetProperty changes at this time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SimpleStatesImpl extends EventDispatcher implements IStatesImpl, IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function SimpleStatesImpl()
+ {
+ 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 function initialStateHandler(event:org.apache.flex.events.Event):void
+ {
+ sawInitComplete = true;
+ stateChangeHandler(new ValueChangeEvent("currentStateChange", false, false, null,
+ IStatesObject(_strand).currentState));
+ }
+
+ private function stateChangeHandler(event:ValueChangeEvent):void
+ {
+ if (!sawInitComplete)
+ return;
+
+ var doc:IStatesObject = _strand as IStatesObject;
+ var arr:Array = doc.states;
+ for each (var s:State in arr)
+ {
+ if (s.name == event.oldValue)
+ {
+ revert(s);
+ break;
+ }
+ }
+ for each (s in arr)
+ {
+ if (s.name == event.newValue)
+ {
+ apply(s);
+ break;
+ }
+ }
+ doc.dispatchEvent(new Event("stateChangeComplete"));
+ }
+
+ private function revert(s:State):void
+ {
+ var arr:Array = s.overrides;
+ for each (var o:Object in arr)
+ {
+ if (o is AddItems)
+ {
+ var ai:AddItems = AddItems(o);
+ for each (var item:IChild in ai.items)
+ {
+ var parent:IParent = item.parent as IParent;
+ parent.removeElement(item);
+ }
+ if (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(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;
+ }
+ }
+ for each (var item:IChild in ai.items)
+ {
+ var parent:IParent = ai.document as IParent;
+ if (ai.destination != null)
+ parent = parent[ai.destination] as IParent;
+ if (ai.relativeTo != null)
+ {
+ var child:Object = ai.document[ai.relativeTo];
+ if (ai.destination == null)
+ parent = child.parent as IParent;
+ var index:int = parent.getElementIndex(child);
+ if (ai.position == "after")
+ index++;
+ parent.addElementAt(item, index);
+ }
+ else
+ {
+ parent.addElement(item);
+ }
+ }
+ if (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);
+ }
+ }
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleValuesImpl.as
new file mode 100644
index 0000000..527f59e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/SimpleValuesImpl.as
@@ -0,0 +1,188 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.events.EventDispatcher;
+ import org.apache.flex.events.ValueChangeEvent;
+
+ /**
+ * The SimpleValuesImpl class implements a simple lookup rules that is
+ * sufficient for many very simple applications. Every value
+ * is essential global and shared by other instances. Values
+ * are set via calls to setValue.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SimpleValuesImpl extends EventDispatcher implements IValuesImpl
+ {
+ public function SimpleValuesImpl()
+ {
+ super();
+ }
+
+ /**
+ * The map of values. The format is not documented and it is not recommended
+ * to manipulate this structure directly.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var values:Object;
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#getValue()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+ {
+ return values[valueName];
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#newInstance()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
+ {
+ var c:Class = values[valueName];
+ if (c)
+ return new c();
+ return null;
+ }
+
+ /**
+ * A method that stores a value to be shared with other objects.
+ * It is global, not per instance. Fancier implementations
+ * may store shared values per-instance.
+ *
+ * @param thisObject An object associated with this value. Thiis
+ * parameter is ignored.
+ * @param valueName The name or key of the value being stored.
+ * @param value The value to be stored.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setValue(thisObject:Object, valueName:String, value:Object):void
+ {
+ var oldValue:Object = values[valueName];
+ if (oldValue != value)
+ {
+ values[valueName] = value;
+ dispatchEvent(new ValueChangeEvent(ValueChangeEvent.VALUE_CHANGE, false, false, oldValue, value));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#getInstance()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getInstance(valueName:String):Object
+ {
+ return values[valueName];
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#init()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function init(mainClass:Object):void
+ {
+ // do nothing
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#convertColor()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function convertColor(value:Object):uint
+ {
+ if (!(value is String))
+ return uint(value);
+
+ var stringValue:String = value as String;
+ if (stringValue.charAt(0) == '#')
+ return uint(stringValue.substr(1));
+ return uint(stringValue);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#parseStyles()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function parseStyles(value:String):Object
+ {
+ value = value.replace(/;/g, ",");
+ return JSON.parse("{" + value + "}");
+ }
+
+ /**
+ * @copy org.apache.flex.core.IValuesImpl#addRule()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addRule(ruleName:String, values:Object):void
+ {
+ // ignore ruleName since all values are global
+ for (var p:String in values)
+ values[p] = values[p];
+ }
+
+ COMPILE::JS
+ public function applyStyles(thisObject:IUIBase, styles:Object):void
+ {
+ // to do or not needed?
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.as
new file mode 100644
index 0000000..1afe763
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StageProxy.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.core
+{
+ import flash.display.Stage;
+ import flash.events.Event;
+
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The StageProxy class wraps the stage and
+ * presents it as a FlexJS IEventDispatcher.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class StageProxy implements IEventDispatcher
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StageProxy(stage:Stage)
+ {
+ super();
+ _stage = stage;
+ _stage.addEventListener("removedFromStage", removedFromStageHandler);
+ }
+
+ private var _stage:Stage;
+
+ private function removedFromStageHandler(event:flash.events.Event):void
+ {
+ _stage.removeEventListener("removedFromStage", removedFromStageHandler);
+ dispatchEvent(new org.apache.flex.events.Event("removedFromStage"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#addEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReferences:Boolean = false):void
+ {
+ _stage.addEventListener(type, listener, useCapture);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
+ {
+ _stage.removeEventListener(type, listener, useCapture);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function dispatchEvent(event:flash.events.Event):Boolean
+ {
+ return _stage.dispatchEvent(event);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#willTriger()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function willTrigger(eventName:String):Boolean
+ {
+ return _stage.willTrigger(eventName);
+ }
+
+ /**
+ * @copy org.apache.flex.core.IEventDispatcher#hasEventListener()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function hasEventListener(eventName:String):Boolean
+ {
+ return _stage.hasEventListener(eventName);
+ }
+ }
+}
[03/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
new file mode 100644
index 0000000..71b45c6
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
@@ -0,0 +1,475 @@
+/**
+ * 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.events
+{
+
+ COMPILE::JS {
+ import goog.events.BrowserEvent;
+ }
+
+ /**
+ * @fileoverview A patched, standardized event object for browser events.
+ *
+ * <pre>
+ * The patched event object contains the following members:
+ * - type {string} Event type, e.g. 'click'
+ * - timestamp {Date} A date object for when the event was fired
+ * - target {Object} The element that actually triggered the event
+ * - currentTarget {Object} The element the listener is attached to
+ * - relatedTarget {Object} For mouseover and mouseout, the previous object
+ * - offsetX {number} X-coordinate relative to target
+ * - offsetY {number} Y-coordinate relative to target
+ * - clientX {number} X-coordinate relative to viewport
+ * - clientY {number} Y-coordinate relative to viewport
+ * - screenX {number} X-coordinate relative to the edge of the screen
+ * - screenY {number} Y-coordinate relative to the edge of the screen
+ * - button {number} Mouse button. Use isButton() to test.
+ * - keyCode {number} Key-code
+ * - ctrlKey {boolean} Was ctrl key depressed
+ * - altKey {boolean} Was alt key depressed
+ * - shiftKey {boolean} Was shift key depressed
+ * - metaKey {boolean} Was meta key depressed
+ * - defaultPrevented {boolean} Whether the default action has been prevented
+ * - state {Object} History state object
+ *
+ * NOTE: The keyCode member contains the raw browser keyCode. For normalized
+ * key and character code use {@link goog.events.KeyHandler}.
+ * </pre>
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ public class BrowserEvent
+ {
+
+ //--------------------------------------
+ // Property
+ //--------------------------------------
+
+ /**
+ * @type {?goog.events.BrowserEvent}
+ */
+ public var wrappedEvent:Object;
+
+ //--------------------------------------
+ // Function
+ //--------------------------------------
+
+ /**
+ * Was altKey key depressed.
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get altKey():Boolean
+ {
+ return wrappedEvent.altKey;
+ }
+
+ /**
+ * Which mouse button was pressed.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get button():uint
+ {
+ return wrappedEvent.button;
+ }
+
+ /**
+ * CharCode of key press.
+ * Native browser event.charCode || (type == 'keypress' ? event.keyCode : 0);
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get charCode():uint
+ {
+ return wrappedEvent.charCode;
+ }
+
+ /**
+ * X-coordinate relative to the window.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get clientX():Number
+ {
+ return wrappedEvent.clientX;
+ }
+
+ /**
+ * Y-coordinate relative to the window.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get clientY():Number
+ {
+ return wrappedEvent.clientY;
+ }
+
+ /**
+ * Was ctrl key depressed.
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get ctrlKey():Boolean
+ {
+ return wrappedEvent.ctrlKey;
+ }
+
+ /**
+ * The element the listener is attached to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get currentTarget():Object
+ {
+ var o:Object = wrappedEvent.currentTarget;
+
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+
+ /**
+ * Whether the default action has been prevented.
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get defaultPrevented():Boolean
+ {
+ return wrappedEvent.defaultPrevented;
+ }
+
+ /**
+ * The underlying browser event object.
+ * (for debugging purposes)
+ *
+ * @return The underlying browser event object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getBrowserEvent():Object
+ {
+ return wrappedEvent.getBrowserEvent();
+ }
+
+ /**
+ * Tests to see which button was pressed during the event. This is really only
+ * useful in IE and Gecko browsers. And in IE, it's only useful for
+ * mousedown/mouseup events, because click only fires for the left mouse button.
+ *
+ * Safari 2 only reports the left button being clicked, and uses the value '1'
+ * instead of 0. Opera only reports a mousedown event for the middle button, and
+ * no mouse events for the right button. Opera has default behavior for left and
+ * middle click that can only be overridden via a configuration setting.
+ *
+ * There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.
+ *
+ * @param button The button to test for.
+ * @return True if button was pressed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isButton(button:int):Boolean
+ {
+ return wrappedEvent.isButton(button);
+ }
+
+ /**
+ * Whether this has an "action"-producing mouse button.
+ *
+ * By definition, this includes left-click on windows/linux, and left-click
+ * without the ctrl key on Macs.
+ *
+ * @return The result.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isMouseActionButton():Boolean
+ {
+ return wrappedEvent.isMouseActionButton();
+ }
+
+ /**
+ * Keycode of key press.
+ * Native browser event.keyCode || 0;
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get keyCode():uint
+ {
+ return wrappedEvent.keyCode;
+ }
+
+ /**
+ * Whether the meta key was pressed at time of event.
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get metaKey():Boolean
+ {
+ return wrappedEvent.metaKey;
+ }
+
+ /**
+ * X-coordinate relative to target.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get offsetX():Number
+ {
+ return wrappedEvent.offsetX;
+ }
+
+ /**
+ * Y-coordinate relative to target.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get offsetY():Number
+ {
+ return wrappedEvent.offsetY;
+ }
+
+ /**
+ * Whether the default platform modifier key was pressed at time of event.
+ * (This is control for all platforms except Mac, where it's Meta.)
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get platformModifierKey():Boolean
+ {
+ return platformModifierKey;
+ }
+
+ /**
+ * Whether the default action has been prevented.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function preventDefault():void
+ {
+ wrappedEvent.preventDefault();
+ }
+
+ /**
+ * For mouseover and mouseout, the previous object.
+ * @type {object}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get relatedTarget():Object
+ {
+ var o:Object = wrappedEvent.relatedTarget;
+
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+
+ /**
+ * X-coordinate relative to the monitor.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get screenX():Number
+ {
+ return wrappedEvent.screenX;
+ }
+
+ /**
+ * Y-coordinate relative to the monitor.
+ * @type {number}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get screenY():Number
+ {
+ return wrappedEvent.screenY;
+ }
+
+ /**
+ * Was shiftKey key depressed.
+ * @type {boolean}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get shiftKey():Boolean
+ {
+ return wrappedEvent.shiftKey;
+ }
+
+ /**
+ * History state object, only set for PopState events where it's a copy of the
+ * state object provided to pushState or replaceState.
+ * @type {Object}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get state():Object
+ {
+ return wrappedEvent.state;
+ }
+
+ /**
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function stopImmediatePropagation():void
+ {
+ //wrappedEvent.stopImmediatePropagation(); // not in goog.events.BrowserEvent
+ wrappedEvent.stopPropagation();
+ }
+
+ /**
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function stopPropagation():void
+ {
+ wrappedEvent.stopPropagation();
+ }
+
+ /**
+ * The element that actually triggered the event.
+ * @type {object}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get target():Object
+ {
+ var o:Object = wrappedEvent.target;
+
+ if (o && o.flexjs_wrapper)
+ return o.flexjs_wrapper;
+ return o;
+ }
+
+ /**
+ * A date object for when the event was fired.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get timestamp():Date
+ {
+ return wrappedEvent.timestamp;
+ }
+
+ /**
+ * Event type, e.g. 'click'.
+ * @type {string}
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get type():String
+ {
+ return wrappedEvent.type;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/CustomEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/CustomEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/CustomEvent.as
new file mode 100644
index 0000000..a7921df
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/CustomEvent.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.events
+{
+
+ /**
+ * MXML auto-imports flash.events.Event which then requires
+ * full qualification to use org.apache.flex.events.Event.
+ * Use CustomEvent to skip all that extra typing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CustomEvent extends Event
+ {
+
+ //--------------------------------------
+ // 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 CustomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.as
new file mode 100644
index 0000000..e79762a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ElementEvents.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
+{
+
+ [ExcludeClass]
+ COMPILE::AS3
+ public class ElementEvents
+ {
+ }
+
+ COMPILE::JS
+ public class ElementEvents
+ {
+
+ //--------------------------------------
+ // Static Property
+ //--------------------------------------
+
+ static public const elementEvents:Object = {
+ 'click': 1,
+ 'change': 1,
+ 'keyup': 1,
+ 'keydown': 1,
+ 'load': 1,
+ 'mouseover': 1,
+ 'mouseout': 1,
+ 'mouseup': 1,
+ 'mousedown': 1,
+ 'mousemove': 1,
+ 'rollover': 1,
+ 'rollout': 1
+ };
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
new file mode 100644
index 0000000..765db3d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/Event.as
@@ -0,0 +1,128 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 flash.events.Event;
+ }
+
+ COMPILE::JS {
+ import goog.events.Event;
+ }
+
+ /**
+ * This class simply wraps flash.events.Event so that
+ * no flash packages are needed on the JS side.
+ * At runtime, this class is not always the event object
+ * that is dispatched. In most cases we are dispatching
+ * DOMEvents instead, so as long as you don't actually
+ * check the typeof(event) it will work
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class Event extends flash.events.Event
+ {
+
+ //--------------------------------------
+ // Static Property
+ //--------------------------------------
+
+ static public const CHANGE:String = "change";
+
+ //--------------------------------------
+ // 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 Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
+ {
+ super(type, bubbles, cancelable);
+ }
+
+ //--------------------------------------
+ // Property
+ //--------------------------------------
+
+ //--------------------------------------
+ // Function
+ //--------------------------------------
+
+ /**
+ * @private
+ */
+ public override function clone():flash.events.Event
+ {
+ return cloneEvent();
+ }
+
+ /**
+ * Create a copy/clone of the Event object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function cloneEvent():org.apache.flex.events.Event
+ {
+ return new org.apache.flex.events.Event(type, bubbles, cancelable);
+ }
+ }
+
+ COMPILE::JS
+ public class Event extends goog.events.Event {
+
+ public static const CHANGE:String = "change";
+
+ public function Event(type:String, target:Object = null) {
+ super(type, target);
+ }
+
+ public function init(type:String):void {
+ this.type = type;
+ }
+
+ /**
+ * Google Closure doesn't seem to support stopImmediatePropagation, but
+ * actually the HTMLElementWrapper fireListener override sends a
+ * BrowserEvent in most/all cases where folks need stopImmediatePropagation
+ * so we put this in here for compile time since it will exist in
+ * the BrowserEvent that does get sent around.
+ */
+ public function stopImmediatePropagation():void
+ {
+ // do nothing
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
new file mode 100644
index 0000000..ceec8ee
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/EventDispatcher.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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::JS
+ {
+ import goog.events;
+ import goog.events.EventTarget;
+ }
+
+ COMPILE::AS3
+ {
+ import flash.events.EventDispatcher;
+ }
+
+ /**
+ * This class simply wraps flash.events.EventDispatcher so that
+ * no flash packages are needed on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class EventDispatcher extends flash.events.EventDispatcher implements IEventDispatcher
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function EventDispatcher()
+ {
+ super();
+ }
+ }
+
+ COMPILE::JS
+ public class EventDispatcher extends goog.events.EventTarget implements IEventDispatcher
+ {
+ public function hasEventListener(type:String):Boolean
+ {
+ return goog.events.hasListener(this, type);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.as
new file mode 100644
index 0000000..6d8c684
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/IEventDispatcher.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.events
+{
+ COMPILE::AS3
+ {
+ import flash.events.IEventDispatcher;
+ }
+
+ /**
+ * This class simply wraps flash.events.EventDispatcher so that
+ * no flash packages are needed on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public interface IEventDispatcher extends flash.events.IEventDispatcher
+ {
+
+ }
+
+ COMPILE::JS
+ public interface IEventDispatcher
+ {
+ function addEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void;
+ function removeEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void;
+ //function hasEventListener(type:String):Boolean;
+ function dispatchEvent(event:Object):Boolean;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
new file mode 100644
index 0000000..756438f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/MouseEvent.as
@@ -0,0 +1,290 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 flash.events.MouseEvent;
+ }
+ COMPILE::JS
+ {
+ import window.MouseEvent;
+ }
+
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.geom.Point;
+ import org.apache.flex.utils.PointUtils;
+
+
+ /**
+ * Mouse events
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MouseEvent extends Event
+ {
+ private static function platformConstant(s:String):String
+ {
+ COMPILE::AS3
+ {
+ return s;
+ }
+ COMPILE::JS
+ {
+ return s.toLowerCase();
+ }
+ }
+
+ public static const MOUSE_DOWN:String = platformConstant("mouseDown");
+ public static const MOUSE_MOVE:String = platformConstant("mouseMove");
+ public static const MOUSE_UP:String = platformConstant("mouseUp");
+ public static const MOUSE_OUT:String = platformConstant("mouseOut");
+ public static const MOUSE_OVER:String = platformConstant("mouseOver");
+ public static const ROLL_OVER:String = platformConstant("rollOver");
+ public static const ROLL_OUT:String = platformConstant("rollOut");
+ public static const CLICK:String = "click";
+
+ /**
+ * 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 MouseEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
+ localX:Number = NaN, localY:Number = NaN,
+ relatedObject:Object = null,
+ ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
+ buttonDown:Boolean = false, delta:int = 0,
+ commandKey:Boolean = false, controlKey:Boolean = false,
+ clickCount:int = 0)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+ this.localX = localX;
+ this.localY = localY;
+ this.relatedObject = relatedObject;
+ this.ctrlKey = ctrlKey;
+ this.altKey = altKey;
+ this.shiftKey = shiftKey;
+ this.buttonDown = buttonDown;
+ this.delta = delta;
+ this.commandKey = commandKey;
+ this.controlKey = controlKey;
+ this.clickCount = clickCount;
+ }
+
+ private var _localX:Number;
+ public function get localX():Number
+ {
+ return _localX;
+ }
+ public function set localX(value:Number):void
+ {
+ _localX = value;
+ _stagePoint = null;
+ }
+
+ private var _localY:Number;
+ public function get localY():Number
+ {
+ return _localY;
+ }
+ public function set localY(value:Number):void
+ {
+ _localY = value;
+ _stagePoint = null;
+ }
+
+ public var relatedObject:Object;
+ public var ctrlKey:Boolean;
+ public var altKey:Boolean;
+ public var shiftKey:Boolean;
+ public var buttonDown:Boolean;
+ public var delta:int;
+ public var commandKey:Boolean;
+ public var controlKey:Boolean;
+ public var clickCount:int;
+
+ // these map directly to JS MouseEvent fields.
+ public function get clientX():Number
+ {
+ return screenX;
+ }
+ public function set clientX(value:Number):void
+ {
+ localX = value;
+ }
+ public function get clientY():Number
+ {
+ return screenY;
+ }
+ public function set clientY(value:Number):void
+ {
+ localY = value;
+ }
+
+ private var _stagePoint:Point;
+
+ public function get screenX():Number
+ {
+ if (!target) return localX;
+ if (!_stagePoint)
+ {
+ var localPoint:Point = new Point(localX, localY);
+ _stagePoint = PointUtils.localToGlobal(localPoint, target);
+ }
+ return _stagePoint.x;
+ }
+
+ public function get screenY():Number
+ {
+ if (!target) return localY;
+ if (!_stagePoint)
+ {
+ var localPoint:Point = new Point(localX, localY);
+ _stagePoint = PointUtils.localToGlobal(localPoint, target);
+ }
+ return _stagePoint.y;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::JS
+ private static function installRollOverMixin():Boolean
+ {
+ window.addEventListener(MOUSE_OVER,
+ mouseOverHandler, false);
+ return true;
+ }
+
+
+ /**
+ * @param e The event.
+ * RollOver/RollOut is entirely implemented in mouseOver because
+ * when a parent and child share an edge, you only get a mouseout
+ * for the child and not the parent and you need to send rollout
+ * to both. A similar issue exists for rollover.
+ */
+ COMPILE::JS
+ private static function mouseOverHandler(e:MouseEvent):void
+ {
+ var j:int;
+ var m:int;
+ var outs:Array;
+ var me:window.MouseEvent;
+ var parent:Object;
+ var target:Object = e.target.flexjs_wrapper;
+ if (target == null)
+ return; // probably over the html tag
+ var targets:Array = MouseEvent.targets;
+ var index:int = targets.indexOf(target);
+ if (index != -1) {
+ // get all children
+ outs = targets.slice(index + 1);
+ m = outs.length;
+ for (j = 0; j < m; j++) {
+ me = makeMouseEvent(
+ ROLL_OUT, e);
+ outs[j].element.dispatchEvent(me);
+ }
+ MouseEvent.targets = targets.slice(0, index + 1);
+ }
+ else {
+ var newTargets:Array = [target];
+ if (!('parent' in target))
+ parent = null;
+ else
+ parent = target.parent;
+ while (parent) {
+ index = targets.indexOf(parent);
+ if (index == -1) {
+ newTargets.unshift(parent);
+ if (!('parent' in parent))
+ break;
+ parent = parent.parent;
+ }
+ else {
+ outs = targets.slice(index + 1);
+ m = outs.length;
+ for (j = 0; j < m; j++) {
+ me = makeMouseEvent(
+ ROLL_OUT, e);
+ outs[j].element.dispatchEvent(me);
+ }
+ targets = targets.slice(0, index + 1);
+ break;
+ }
+ }
+ var n:int = newTargets.length;
+ for (var i:int = 0; i < n; i++) {
+ me = makeMouseEvent(
+ ROLL_OVER, e);
+ newTargets[i].element.dispatchEvent(me);
+ }
+ MouseEvent.targets = targets.concat(newTargets);
+ }
+ }
+
+
+ /**
+ */
+ COMPILE::JS
+ private static var rollOverMixin:Boolean =
+ installRollOverMixin();
+
+
+ /**
+ */
+ COMPILE::JS
+ private static var targets:Array = [];
+
+ /**
+ * @param {string} type The event type.
+ * @param {Event} e The mouse event.
+ * @return {MouseEvent} The new event.
+ */
+ COMPILE::JS
+ private static function makeMouseEvent(type:String, e:window.MouseEvent):window.MouseEvent
+ {
+ var out:window.MouseEvent = new window.MouseEvent(type);
+ out.initMouseEvent(type, false, false,
+ 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;
+ };
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueChangeEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueChangeEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueChangeEvent.as
new file mode 100644
index 0000000..45fabbd
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueChangeEvent.as
@@ -0,0 +1,129 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+
+ /**
+ * The ValueChangeEvent class replaces the PropertyChangeEvent as
+ * the default event for property changes used in the databinding
+ * subsystem.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ValueChangeEvent extends Event
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ValueChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
+ oldValue:Object = null, newValue:Object = null)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+ COMPILE::JS
+ {
+ super(type);
+ }
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ }
+
+ /**
+ * The value of the property before it was changed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var oldValue:Object;
+
+ /**
+ * The value of the property after it was changed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var newValue:Object;
+
+ /**
+ * The name of the property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var propertyName:String;
+
+ /**
+ * The object that owns the property.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var source:Object;
+
+ /**
+ * The default event type.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const VALUE_CHANGE:String = "valueChange";
+
+ /**
+ * A convenience method to create an instance of the ValueChangeEvent.
+ *
+ * @param source The source of the object.
+ * @param name The name of the event.
+ * @param oldValue The value before it was changed.
+ * @param newValue The value after it was changed.
+ * @return An instance of the ValueChangeEvent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function createUpdateEvent(source:Object, name:String, oldValue:Object, newValue:Object):ValueChangeEvent
+ {
+ var event:ValueChangeEvent = new ValueChangeEvent(VALUE_CHANGE, false, false, oldValue, newValue);
+ event.propertyName = name;
+ event.source = source;
+ return event;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueEvent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueEvent.as
new file mode 100644
index 0000000..6088680
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/ValueEvent.as
@@ -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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.events
+{
+
+ /**
+ * The ValueEvent class is used for dispatching an event
+ * that has one useful value
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ValueEvent extends Event
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ValueEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
+ value:Object = null)
+ {
+ COMPILE::AS3
+ {
+ super(type, bubbles, cancelable);
+ }
+
+ COMPILE::JS
+ {
+ super(type);
+ }
+
+ this.value = value;
+ }
+
+ /**
+ * The value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var value:Object;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
new file mode 100644
index 0000000..a969a44
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseEventConverter.as
@@ -0,0 +1,166 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+ import flash.events.Event;
+ import flash.events.IEventDispatcher;
+ import flash.events.MouseEvent;
+
+ import org.apache.flex.events.MouseEvent;
+
+ /**
+ * Mouse events conversion.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class MouseEventConverter
+ {
+ /**
+ * A map of events that are not converted, because there is no
+ * JS equivalent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static const UNCONVERTED_EVENTS:Object = { mouseWheel: 1 };
+
+ /**
+ * A method used to copy properties from flash.events.MouseEvent to
+ * org.apache.flex.events.Event. The set of properties can be
+ * different based on platform and runtime.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var convert:Function = flashConvert;
+
+ private static function flashConvert(event:flash.events.MouseEvent):org.apache.flex.events.MouseEvent
+ {
+ if (UNCONVERTED_EVENTS[event.type])
+ return null;
+
+ var newEvent:org.apache.flex.events.MouseEvent =
+ new org.apache.flex.events.MouseEvent(event.type, event.bubbles, event.cancelable,
+ event.localX, event.localY, event.relatedObject,
+ event.ctrlKey, event.altKey, event.shiftKey,
+ event.buttonDown, event.delta);
+
+ return newEvent;
+ }
+
+ private static function mouseEventConverter(event:flash.events.Event):void
+ {
+ if (event is flash.events.MouseEvent && (!(event is org.apache.flex.events.MouseEvent)))
+ {
+ var newEvent:org.apache.flex.events.MouseEvent =
+ convert(flash.events.MouseEvent(event));
+ if (newEvent)
+ {
+ // some events are not converted if there are no JS equivalents
+ event.stopImmediatePropagation();
+ event.target.dispatchEvent(newEvent);
+ }
+ else
+ trace("did not convert", event.type);
+ }
+ }
+
+ /**
+ * The list of events to convert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var allConvertedEvents:Array = [
+ flash.events.MouseEvent.CLICK,
+ flash.events.MouseEvent.MOUSE_DOWN,
+ flash.events.MouseEvent.MOUSE_UP,
+ flash.events.MouseEvent.ROLL_OVER,
+ flash.events.MouseEvent.ROLL_OUT,
+ flash.events.MouseEvent.MOUSE_OVER,
+ flash.events.MouseEvent.MOUSE_OUT,
+ flash.events.MouseEvent.MOUSE_MOVE
+ ];
+
+ /**
+ * The list of events to convert on each instance.
+ * Per-instance killers are needed for "out" events because
+ * they can be sent after the instance is removed from the
+ * display list so the main converter can't intercept them
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var perInstanceConvertedEvents:Array = [
+ flash.events.MouseEvent.MOUSE_UP,
+ flash.events.MouseEvent.ROLL_OUT,
+ flash.events.MouseEvent.MOUSE_OUT
+ ];
+
+ /**
+ * The event handler that converts the events.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var eventHandler:Function = mouseEventConverter;
+
+ /**
+ * Set up the top level converter.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function setupAllConverters(target:IEventDispatcher):void
+ {
+ for each (var eventType:String in allConvertedEvents)
+ target.addEventListener(eventType, eventHandler, true, 9999);
+ }
+
+ /**
+ * Set up some event handlers on each instance.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function setupInstanceConverters(target:IEventDispatcher):void
+ {
+ for each (var eventType:String in perInstanceConvertedEvents)
+ target.addEventListener(eventType, eventHandler, false, 9999);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseUtils.as
new file mode 100644
index 0000000..5dbc934
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/MouseUtils.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.events.utils
+{
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.MouseEvent;
+
+ /**
+ * This class maps common event functions for MouseEvent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class MouseUtils
+ {
+ public function MouseUtils()
+ {
+ }
+
+ /**
+ * Returns the event target.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ static public function eventTarget(event:Event):Object
+ {
+ return event.target;
+ }
+
+ /**
+ * Returns the localX value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ static public function localX(event:MouseEvent):Number
+ {
+ return event.localX;
+ }
+
+ /**
+ * Returns the localY value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ static public function localY(event:MouseEvent):Number
+ {
+ return event.localY;
+ }
+
+ /**
+ * Returns the globel X value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ static public function globalX(event:MouseEvent):Number
+ {
+ return event.screenX;
+ }
+
+ /**
+ * Returns the global Y value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ static public function globalY(event:MouseEvent):Number
+ {
+ return event.screenY;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
new file mode 100644
index 0000000..46d4464
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Point.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.geom
+{
+COMPILE::AS3
+{
+ import flash.geom.Point;
+}
+
+/**
+ * The Point class is a utility class for holding x and y values, not that you
+ * can't use it to hold a width and height value.
+ *
+ * The ActionScript version simply wraps flash.geom.Point to enable cross
+ * compilation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::AS3
+public class Point extends flash.geom.Point
+{
+ public function Point(x:Number = 0, y:Number = 0)
+ {
+ super(x, y);
+ }
+}
+
+/**
+ * The Point class is a utility class for holding x and y values, not that you
+ * can't use it to hold a width and height value.
+ *
+ * The ActionScript version simply wraps flash.geom.Point to enable cross
+ * compilation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::JS
+public class Point
+{
+ public function Point(x:Number = 0, y:Number = 0)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public var x:Number;
+ public var y:Number;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
new file mode 100644
index 0000000..a68c080
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.geom
+{
+COMPILE::AS3
+{
+ import flash.geom.Rectangle;
+}
+
+/**
+ * The Rectangle class is a utility class for holding four coordinates of
+ * a rectangle
+ *
+ * The ActionScript version simply wraps flash.geom.Rectangle to enable cross
+ * compilation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::AS3
+public class Rectangle extends flash.geom.Rectangle
+{
+ public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)
+ {
+ super(x, y, width, height);
+ }
+}
+
+/**
+ * The Rectangle class is a utility class for holding four coordinates of
+ * a rectangle
+ *
+ * The ActionScript version simply wraps flash.geom.Rectangle to enable cross
+ * compilation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+COMPILE::JS
+public class Rectangle
+{
+ public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)
+ {
+ left = x;
+ top = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public var left:Number;
+ public var top:Number;
+ public var width:Number;
+ public var height:Number;
+
+ public function get right():Number
+ {
+ return left + width;
+ }
+ public function set right(value:Number):void
+ {
+ width = value - left;
+ }
+
+ public function get bottom():Number
+ {
+ return top + height;
+ }
+ public function set bottom(value:Number):void
+ {
+ height = value - top;
+ }
+}
+
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.as
new file mode 100644
index 0000000..4c02934
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Size.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 org.apache.flex.geom
+{
+
+/**
+ * The Size class is a utility class for holding width and height values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class Size
+{
+ public function Size(width:Number = 0, height:Number = 0)
+ {
+ this.width = width;
+ this.height = height;
+ }
+
+ public var width:Number;
+ public var height:Number;
+}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/states/AddItems.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/states/AddItems.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/AddItems.as
new file mode 100644
index 0000000..7f780fa
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/AddItems.as
@@ -0,0 +1,101 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// shim the mx classes for states. Be careful about updates to the main SDK's
+// version as that will move the timestamp ahead of this one and then it will
+// take precedence over this one at link time.
+package org.apache.flex.states
+{
+ import org.apache.flex.core.IDocument;
+
+ [ExcludeClass]
+
+ /**
+ * The AddItems class is one of the classes in the
+ * view states subsystem. Note that the FlexJS
+ * versions are simply data structures interpreted
+ * by a central States implementation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class AddItems implements IDocument
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function AddItems()
+ {
+ super();
+ }
+
+ public var items:Array;
+
+ public var itemsDescriptorIndex:int;
+
+ public var itemsDescriptor:ItemAndDescriptor;
+
+ public var destination:String;
+
+ public var propertyName:String;
+
+ public var position:String;
+
+ public var relativeTo:String;
+
+ public var document:Object;
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ var data:Object = document.mxmlsd[itemsDescriptorIndex];
+ if (data is Array)
+ {
+ itemsDescriptor = new ItemAndDescriptor();
+ itemsDescriptor.descriptor = data as Array;
+ // replace the entry in the document so subsequent
+ // addItems know it is shared
+ document.mxmlsd[itemsDescriptorIndex] = itemsDescriptor;
+ }
+ else
+ itemsDescriptor = data as ItemAndDescriptor;
+ }
+
+ /**
+ * @private
+ * Initialize this object from a descriptor.
+ */
+ public function initializeFromObject(properties:Object):Object
+ {
+ for (var p:String in properties)
+ {
+ this[p] = properties[p];
+ }
+
+ return Object(this);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/states/ItemAndDescriptor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/states/ItemAndDescriptor.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/ItemAndDescriptor.as
new file mode 100644
index 0000000..308c86e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/ItemAndDescriptor.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.states
+{
+
+ [ExcludeClass]
+
+ /**
+ * A data structure to store an instance
+ * and its descriptor array.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ItemAndDescriptor
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function ItemAndDescriptor()
+ {
+ super();
+ }
+
+ /**
+ * The item or items created from the descriptor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var items:Object;
+
+ /**
+ * The descriptor used to create the item(s).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var descriptor:Array;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetEventHandler.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetEventHandler.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetEventHandler.as
new file mode 100644
index 0000000..f3b9ae1
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetEventHandler.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.
+//
+////////////////////////////////////////////////////////////////////////////////
+// shim the mx classes for states
+package org.apache.flex.states
+{
+ import org.apache.flex.core.IDocument;
+
+ [ExcludeClass]
+
+ /**
+ * The SetEventHandler class is one of the classes in the
+ * view states subsystem. Note that the FlexJS
+ * versions are simply data structures interpreted
+ * by a central States implementation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SetEventHandler implements IDocument
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function SetEventHandler()
+ {
+ super();
+ }
+
+ public var target:String;
+
+ public var name:String;
+
+ public var handlerFunction:Function;
+
+ public var document:Object;
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ * Initialize this object from a descriptor.
+ */
+ public function initializeFromObject(properties:Object):Object
+ {
+ for (var p:String in properties)
+ {
+ this[p] = properties[p];
+ }
+
+ return Object(this);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetProperty.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetProperty.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetProperty.as
new file mode 100644
index 0000000..b6c2e1a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/SetProperty.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.
+//
+////////////////////////////////////////////////////////////////////////////////
+// shim the mx classes for states
+package org.apache.flex.states
+{
+ import org.apache.flex.core.IDocument;
+
+ [ExcludeClass]
+
+ /**
+ * The SetProperty class is one of the classes in the
+ * view states subsystem. Note that the FlexJS
+ * versions are simply data structures interpreted
+ * by a central States implementation.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class SetProperty implements IDocument
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function SetProperty()
+ {
+ super();
+ }
+
+ public var target:String;
+
+ public var name:String;
+
+ public var value:*;
+
+ public var previousValue:*;
+
+ public var document:Object;
+
+ public function setDocument(document:Object, id:String = null):void
+ {
+ this.document = document;
+ }
+
+ /**
+ * @private
+ * Initialize this object from a descriptor.
+ */
+ public function initializeFromObject(properties:Object):Object
+ {
+ for (var p:String in properties)
+ {
+ this[p] = properties[p];
+ }
+
+ return Object(this);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/states/State.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/states/State.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/State.as
new file mode 100644
index 0000000..271e837
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/states/State.as
@@ -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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+// shim the mx classes for states
+package org.apache.flex.states
+{
+ /**
+ * The State class is one of the classes in the
+ * view states subsystem. It is used to declare a
+ * view state in an MXML document. This is one of the
+ * few classes in FlexJS that use the same name as
+ * a Flex SDK class because some of the IDEs and
+ * compilers are hard-coded to assume this name.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class State
+ {
+ /**
+ * Constructor.
+ *
+ * @param properties This parameter is not used in FlexJS and exists to make legacy compilers happy.
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function State(properties:Object = null)
+ {
+ super();
+ }
+
+ /**
+ * The name of the state.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var name:String;
+
+ /**
+ * Comma-delimited list of state groups of the state.
+ * It is not an array so don't use square brackets [].
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var stateGroups:String;
+
+ /**
+ * The array of overrides. This is normally set by the compiler.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var overrides:Array;
+ }
+}
[14/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IRollOverModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IRollOverModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IRollOverModel.as
deleted file mode 100644
index 788012a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IRollOverModel.as
+++ /dev/null
@@ -1,46 +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.IEventDispatcher;
-
- /**
- * The IRollOverModel interface describes the minimum set of properties
- * available to control that supports rollover highlighting of an item
- * within a set of items.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IRollOverModel extends IEventDispatcher, IBeadModel
- {
- /**
- * The index of the item that is currently under the mouse.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get rollOverIndex():int;
- function set rollOverIndex(value:int):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IScrollBarModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IScrollBarModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IScrollBarModel.as
deleted file mode 100644
index f4ee2fe..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IScrollBarModel.as
+++ /dev/null
@@ -1,58 +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 IScrollBarModel interface describes the minimum set of properties
- * available to control that let the user select from within a
- * range of numbers like ScrollBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public interface IScrollBarModel extends IRangeModel
- {
- /**
- * The size of the page. This generally is used to compute
- * the size of the thumb in the scrollbar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get pageSize():Number;
- function set pageSize(value:Number):void;
-
- /**
- * The change in value when clicking on above or below the thumb on
- * a scrollbar. Also used for pageUp/pageDown keys.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get pageStepSize():Number;
- function set pageStepSize(value:Number):void;
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectableItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectableItemRenderer.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectableItemRenderer.as
deleted file mode 100644
index 366a5dd..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectableItemRenderer.as
+++ /dev/null
@@ -1,95 +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.IEventDispatcher;
-
- /**
- * The IItemRenderer interface is the basic interface for item renderers.
- * More complex item renderers may implements extensions of this interface.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ISelectableItemRenderer extends IItemRenderer
- {
-
- /**
- * The property on the data item that the item renderer
- * should renderer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get labelField():String;
- function set labelField(value:String):void;
-
- /**
- * The index of the data item in the data provider.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get index():int;
- function set index(value:int):void;
-
- /**
- * <code>true</code> if the item renderer is rendering
- * an item that is selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selected():Boolean;
- function set selected(value:Boolean):void;
-
- /**
- * <code>true</code> if the item renderer is rendering
- * an item that is under the mouse pointer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get hovered():Boolean;
- function set hovered(value:Boolean):void;
-
- /**
- * <code>true</code> if the item renderer is rendering
- * an item that is under the mouse pointer and the
- * mouse button is down.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get down():Boolean;
- function set down(value:Boolean):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectionModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectionModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectionModel.as
deleted file mode 100644
index e918e47..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ISelectionModel.as
+++ /dev/null
@@ -1,100 +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.IEventDispatcher;
-
- /**
- * The ISelectionModel interface describes the minimum set of properties
- * available to control that let the user select from within a
- * set of items in a dataProvider. A more sophisticated model would
- * support multiple selection.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ISelectionModel extends IEventDispatcher, IBeadModel
- {
- /**
- * The set of choices displayed in the ComboBox's
- * dropdown. The dataProvider can be a simple
- * array or vector if the set of choices is not
- * going to be modified (except by wholesale
- * replacement of the dataProvider). To use
- * different kinds of data sets, you may need to
- * provide an alternate "mapping" bead that
- * iterates the dataProvider, generates item
- * renderers and assigns a data item to the
- * item renderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get dataProvider():Object;
- function set dataProvider(value:Object):void;
-
- /**
- * The index of the selected item in the
- * dataProvider. Values less than 0 can
- * have specific meanings but generally mean
- * that no item is selected because the
- * user has typed in a custom entry or has
- * yet to make a choice.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedIndex():int;
- function set selectedIndex(value:int):void;
-
- /**
- * The data item selected in the
- * dataProvider. null usually means
- * that the user has not selected a value
- * and has typed in a custom entry.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedItem():Object;
- function set selectedItem(value:Object):void;
-
- // TODO: this is probably not needed in a selection model
- // and should be in a scheme mapper model.
- /**
- * The property on the data item that the item renderer
- * should renderer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get labelField():String;
- function set labelField(value:String):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesImpl.as
deleted file mode 100644
index df5bdee..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesImpl.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.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IStatesImpl interface is a "marker" interface for the
- * implementation view states in a View like ViewBase. The
- * implementation watches for the currentState property to
- * change and executes changes accordingly.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStatesImpl extends IEventDispatcher, IBead
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
deleted file mode 100644
index 52bcdb6..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStatesObject.as
+++ /dev/null
@@ -1,74 +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.IEventDispatcher;
-
- /**
- * The IStatesObject interface is the interface for an
- * object that supports states.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStatesObject extends IEventDispatcher
- {
- /**
- * 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
- */
- function get states():Array;
-
- /**
- * The current state name
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get currentState():String;
-
- /**
- * @private
- */
- function set currentState(value:String):void;
-
- /**
- * The array of view state transitions.
- * These should
- * be instances of org.apache.flex.states.Transition.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get transitions():Array;
-
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStrand.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStrand.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStrand.as
deleted file mode 100644
index b6e8b20..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStrand.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- /**
- * The IStrand interface is the basic interface for a host component for
- * a set of plug-ins known as Beads.
- * In FlexJS, the recommended pattern is to break out optional functionality
- * into small plug-ins that can be re-used in other components, or replaced with
- * different implementations optimized for different things such as size,
- * performance, advanced features, debugging, etc.
- *
- * Beads are added to and removed from a Strand and can find and coordinate with
- * other beads on the strand.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStrand
- {
- /**
- * Add a bead to the strand.
- *
- * @param bead The bead to be added.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function addBead(bead:IBead):void;
-
- /**
- * Find a bead on the strand.
- *
- * @param classOrInterface The class or interface to use
- * to search for the bead
- * @return The bead.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getBeadByType(classOrInterface:Class):IBead;
-
- /**
- * Remove a bead from the strand.
- *
- * @param IBead bead The bead to be removed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function removeBead(bead:IBead):IBead;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStrandWithModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStrandWithModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStrandWithModel.as
deleted file mode 100644
index ca2fd3e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStrandWithModel.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.core
-{
- /**
- * The IStrand interface is the basic interface for a host component for
- * a set of plug-ins known as Beads.
- * In FlexJS, the recommended pattern is to break out optional functionality
- * into small plug-ins that can be re-used in other components, or replaced with
- * different implementations optimized for different things such as size,
- * performance, advanced features, debugging, etc.
- *
- * Beads are added to and removed from a Strand and can find and coordinate with
- * other beads on the strand.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStrandWithModel extends IStrand
- {
- /**
- * Each Strand has an model object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get model():Object;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleObject.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleObject.as
deleted file mode 100644
index f8b3862..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleObject.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.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IStyleObject interface is the interface for
- * objects that contain style properties.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStyleObject
- {
- /**
- * The object these properties apply to.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set object(value:IStyleableObject):void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleableObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleableObject.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleableObject.as
deleted file mode 100644
index ffa5999..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IStyleableObject.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.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IStyleableObject interface is the interface for
- * objects that support style properties.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IStyleableObject extends IEventDispatcher
- {
- /**
- * Get the className(s) that will be used to
- * choose class selectors in most CSS style
- * implementations. This property is called
- * styleName in the Flex SDK.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get className():String;
- function set className(value:String):void;
-
- /**
- * Get the id that will be used to
- * choose id selectors in most CSS style
- * implementations.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get id():String;
-
- /**
- * Get the object containing styles
- * for this object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get style():Object;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ITextModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ITextModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ITextModel.as
deleted file mode 100644
index 3ae624c..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ITextModel.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.core
-{
- /**
- * The ITextModel interface describes the minimum set of properties
- * available to control that displays text. More sophisticated controls
- * often have models that extend ITextModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ITextModel extends IBeadModel
- {
- /**
- * The text displayed in the control.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get text():String;
- function set text(value:String):void;
-
- /**
- * The html formatted text displayed in the control.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get html():String;
- function set html(value:String):void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ITitleBarModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ITitleBarModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ITitleBarModel.as
deleted file mode 100644
index a3577ee..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ITitleBarModel.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- /**
- * The ITitleBarModel interface describes the minimum set of properties
- * available to control that displays a title bar. More sophisticated controls
- * often have models that extend ITitleBarModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ITitleBarModel extends IBeadModel
- {
- [Bindable("titleChange")]
- /**
- * The title of the TitleBar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get title():String;
- function set title(value:String):void;
-
- [Bindable("htmlTitleChange")]
- /**
- * The title of the TitleBar as HTML.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get htmlTitle():String;
- function set htmlTitle(value:String):void;
-
- // TODO: Consider making this a bead instead.
- // Boolean flags should often be replaced by beads.
- // A different bead would add min/max/restore buttons.
- [Bindable("showCloseButtonChange")]
- /**
- * <code>true</code> if a close button
- * should also be in the title bar.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get showCloseButton():Boolean;
- function set showCloseButton(value:Boolean):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IToggleButtonModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IToggleButtonModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IToggleButtonModel.as
deleted file mode 100644
index 352087d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IToggleButtonModel.as
+++ /dev/null
@@ -1,67 +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 IToggleButtonModel interface describes the minimum set of properties
- * available to ToggleButton that displays a text label.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IToggleButtonModel extends IBeadModel
- {
- // TODO: Should extend ITextModel? Or should it
- // not assume there is a label?
- /**
- * The text displayed in the control.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get text():String;
- function set text(value:String):void;
-
- /**
- * The html formatted text displayed in the control.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get html():String;
- function set html(value:String):void;
-
- /**
- * <code>true</code> if the button is selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selected():Boolean;
- function set selected(value:Boolean):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IUIBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IUIBase.as
deleted file mode 100644
index 349e24f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IUIBase.as
+++ /dev/null
@@ -1,160 +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.IEventDispatcher;
-
- /**
- * The IUIBase interface is the basic interface for user interface components.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IUIBase extends IStrand, IEventDispatcher
- {
- /**
- * Each IUIBase has an element that is actually added to
- * the platform's display list DOM. It may not be the actual
- * component itself.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- function get element():IFlexJSElement;
-
- /**
- * Each IUIBase has an element that is actually added to
- * the platform's display list DOM. It may not be the actual
- * component itself.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- function get element():WrappedHTMLElement;
-
- /**
- * Each IUIBase has an element that is actually added to
- * the platform's display list DOM. It may not be the actual
- * component itself.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- function get positioner():WrappedHTMLElement;
-
- /**
- * Called by parent components when the component is
- * added via a call to addElement or addElementAt.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function addedToParent():void;
-
- /**
- * The alpha or opacity in the range of 0 to 1.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get alpha():Number;
- function set alpha(value:Number):void;
-
- /**
- * The x co-ordinate or left side position of the bounding box.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get x():Number;
- function set x(value:Number):void;
-
- /**
- * The y co-ordinate or top position of the bounding box.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get y():Number;
- function set y(value:Number):void;
-
- /**
- * The width of the bounding box.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get width():Number;
- function set width(value:Number):void;
-
- /**
- * The height of the bounding box.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get height():Number;
- function set height(value:Number):void;
-
- /**
- * Whether the component is visible.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get visible():Boolean;
- function set visible(value:Boolean):void;
-
- /**
- * The top most event dispatcher. Good for trying to capture
- * all input events.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get topMostEventDispatcher():IEventDispatcher;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IValueToggleButtonModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IValueToggleButtonModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IValueToggleButtonModel.as
deleted file mode 100644
index f776951..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IValueToggleButtonModel.as
+++ /dev/null
@@ -1,69 +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 IValueToggleButtonModel interface describes the minimum set of properties
- * available each ToggleButton in a group of ToggleButtons of which only one
- * can be selected at a time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IValueToggleButtonModel extends IToggleButtonModel
- {
- /**
- * A value associated with this instance of the ToggleButton.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get value():Object;
- function set value(newValue:Object):void;
-
- /**
- * The name of the group that this ToggleButton belongs to.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get groupName():String;
- function set groupName(value:String):void;
-
- /**
- * A value associated with the instance of the ToggleButton
- * that is currently selected. It may not be this ToggleButton.
- * This means that you can get the selected value from any
- * instance of a ToggleButton in the group.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedValue():Object;
- function set selectedValue(newValue:Object):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IValuesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IValuesImpl.as
deleted file mode 100644
index f50a4ba..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IValuesImpl.as
+++ /dev/null
@@ -1,153 +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 IValuesImpl interface is the basic interface for the subsystem that
- * provides default values to components. The most common implementation implements
- * a simple version of CSS and uses data structures compiled from CSS files.
- *
- * @see org.apache.flex.core.SimpleCSSValuesImpl
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IValuesImpl
- {
- /**
- * Returns a value for a given object based on a property name,
- * and optionally, the current state, and a set of property value pairs.
- *
- * @param thisObject The object to get the value for.
- * @param valueName The name of a property. e.g. fontFamily, color, etc.
- * @param state The name of a state. e.g. hovered, visited
- * @param attrs A map of property value pairs that may affect the returned value.
- * @return A value or undefined
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*;
-
- /**
- * Returns a new instance based on the value for a given object based on a property name,
- * and optionally, the current state, and a set of property value pairs. This is a way
- * to avoid using the Class type in AS code.
- *
- * @param thisObject The object to get the value for.
- * @param valueName The name of a property. e.g. fontFamily, color, etc.
- * @param state The name of a state. e.g. hovered, visited
- * @param attrs A map of property value pairs that may affect the returned value.
- * @return A value or undefined
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*;
-
- /**
- * Returns a shared instance, instantiating the shared instance if
- * it doesn't exist. Often used to share "managers"
- *
- * @param valueName The name of a shared instance. Often, the fully
- * qualified class name is used.
- * @return The shared instance.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getInstance(valueName:String):Object;
-
- /**
- * MXML Documents that support <fx:Style> blocks should call
- * init to install the styles for each instance.
- *
- * @param mainClass An instance that may have styles from an <fx:Style> block.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function init(mainClass:Object):void;
-
- /**
- * Converts a color value into a uint.
- *
- * @param value A string for a color. Typically it is
- * a color value like #ffffff or "red" in some cases.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function convertColor(value:Object):uint;
-
- /**
- * Converts an HTML-like style format into an object.
- *
- * @param value A string, such as "color:red;fontSize:10px".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function parseStyles(value:String):Object;
-
- /**
- * Add a style rule like a class selector.
- *
- * @param ruleName The name of the rule like '.myClassSelector'.
- * @param values Name/value pairs.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function addRule(ruleName:String, values:Object):void;
-
- /**
- * Applies a set of styles to an instance. This is used
- * by implementations that wrap internal elements to
- * propagate styles to the right internal elements.
- *
- * @param instance An instance to apply styles to.
- * @param styles An Object map of styles to apply.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- function applyStyles(instance:IUIBase, styles:Object):void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IViewport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewport.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IViewport.as
deleted file mode 100644
index a274f52..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewport.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.core
-{
- import org.apache.flex.geom.Size;
-
- /**
- * A Viewport is a window onto an area of content. A viewport is given space
- * in which to operate by a View bead. Viewports can control their area which
- * is specified by the IViewportModel, adding scrollbars or whatever scrolling
- * mechanism they want.
- */
- public interface IViewport extends IBead
- {
- /**
- * Get the actual parent of the container's content.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get contentView():IUIBase;
-
- /**
- * Sets the upper left position of the viewport
- * @param x The left position.
- * @param y The top position.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setPosition(x:Number, y:Number):void;
-
- /**
- * Size the content area based on any visible scrolling controls and
- * the given width and height. If width and/or height is NaN
- * then that dimension is being sized to content.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function layoutViewportBeforeContentLayout(width:Number, height:Number):void;
-
- /**
- * This method is invoked after layout is complete. If width and/or height is
- * sized to content, the viewport should determine that size and set the
- * content area size appropriately, and display any scrolling controls
- * before returning the resulting size of the viewport (which means the
- * area used up by both content area and scrolling controls).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function layoutViewportAfterContentLayout():Size;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportModel.as
deleted file mode 100644
index 6de0cb8..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportModel.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.core
-{
- import org.apache.flex.geom.Rectangle;
-
- /**
- * A Viewport is the area of a Container set aside for displaying
- * content and any scrolling controls.
- * The ViewportModel caches the offsets required to compute the size
- * of the Viewport.
- */
- public interface IViewportModel extends IBead
- {
- /**
- * Size of the borders.
- */
- function get borderMetrics():Rectangle;
- function set borderMetrics(value:Rectangle):void;
-
- /**
- * Size of the chrome. A plain container doesn't have any chrome
- * but a Panel's TitleBar and any ControlBar or StatusBar is
- * considered chrome. Scrollbars used to scroll content are
- * not factored into the viewport calculation. The Viewport
- * is responsible for displaying any scrolling controls and
- * deciding whether to further shrink the content area or
- * have the scrollbars overlay the content.
- */
- function get chromeMetrics():Rectangle;
- function set chromeMetrics(value:Rectangle):void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportScroller.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportScroller.as
deleted file mode 100644
index 5b0a4cb..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IViewportScroller.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 org.apache.flex.core
-{
- /**
- * The IViewportScroller interface describes an object that can be used to scroll
- * or navigate around a system that uses an IViewport. This may be a traditional
- * scroll bar, or it could be something completely different.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public interface IViewportScroller
- {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ItemRendererClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ItemRendererClassFactory.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ItemRendererClassFactory.as
deleted file mode 100644
index 7401282..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ItemRendererClassFactory.as
+++ /dev/null
@@ -1,194 +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.ClassFactory;
- import org.apache.flex.core.IFactory;
- import org.apache.flex.core.IItemRendererProvider;
-
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- [DefaultProperty("mxmlContent")]
-
- /**
- * The ItemRendererClassFactory class is the default implementation of
- * IItemRendererClassFactory. This implementation checks for an itemRenderer
- * property on the strand, then looks for a default definition in CSS, but
- * also handles the renderer being defined in MXML in sub tags of the
- * ItemRendererClassFactory. Other more advanced implementations could
- * return different renderers based on the data item's type.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ItemRendererClassFactory extends Strand implements IItemRendererClassFactory, IDocument, IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ItemRendererClassFactory()
- {
- 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
- * @flexjsignorecoercion Class
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- if (_strand is IItemRendererProvider && (_strand as IItemRendererProvider).hasItemRenderer) {
- itemRendererFactory = (_strand as IItemRendererProvider).itemRenderer;
- createFunction = createFromClass;
- }
- else {
- var itemRendererClass:Class = ValuesManager.valuesImpl.getValue(_strand, "iItemRenderer") as Class;
- if (itemRendererClass) {
- itemRendererFactory = new ClassFactory(itemRendererClass);
- createFunction = createFromClass;
- }
- }
- }
-
- /**
- * @copy org.apache.flex.core.Application#MXMLDescriptor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get MXMLDescriptor():Array
- {
- return null;
- }
-
- /**
- * The default property. Child tags in MXML documents get assigned
- * to this property, but are actually encoded by the compiler into the MXMLDescriptor
- * array. Therefore, setting this property from ActionScript will have no
- * effect at runtime.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var mxmlContent:Array;
-
- /**
- * @copy org.apache.flex.core.IItemRendererClassFactory#createItemRenderer()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function createItemRenderer(parent:IItemRendererParent):IItemRenderer
- {
- return createFunction(parent);
- }
-
- /**
- * This is the method that actually does the work for createItemRenderer. It
- * defaults to creating an instance from child MXML tags, but if the strand
- * has an item renderer property or style, it switches to generating instances
- * of the item renderer specified by that property or style. And yes, since
- * it is public, you could theoretically assign some other method that generates
- * item renderer instances.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var createFunction:Function = createFromMXMLContent;
-
- /**
- * Creates an instance of an item renderer from child MXML tags.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- protected function createFromMXMLContent(parent:IItemRendererParent):IItemRenderer
- {
- return MXMLDataInterpreter.generateMXMLArray(document, parent as IParent, MXMLDescriptor)[0];
- }
-
- /**
- * Stores the IFactory that will be used to generate item renderer instances if
- * createFromClass is the createFunction.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var itemRendererFactory:IFactory;
-
- /**
- * Creates an instance of an item renderer from itemRendererFactory.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function createFromClass(parent:IItemRendererParent):IItemRenderer
- {
- var renderer:IItemRenderer = itemRendererFactory.newInstance();
- renderer.itemRendererParent = parent;
- return renderer;
- }
-
- private var document:Object;
-
- /**
- * @copy org.apache.flex.core.IDocument#setDocument()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ListBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ListBase.as
deleted file mode 100644
index 6380f2f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ListBase.as
+++ /dev/null
@@ -1,126 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- import org.apache.flex.core.IMXMLDocument;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.states.State;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- /**
- * The ListBase class is the base class for most lists
- * in FlexJS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ListBase extends UIBase implements IContentViewHost
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ListBase()
- {
- super();
-
- _strandChildren = new ListBaseStrandChildren(this);
- }
-
- private var _strandChildren:ListBaseStrandChildren;
-
- /**
- * @private
- */
- public function get strandChildren():IParent
- {
- return _strandChildren;
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $numElements():int
- {
- return super.numElements();
- }
-
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- super.addElement(c, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- super.addElementAt(c, index, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- super.removeElement(c, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $getElementIndex(c:Object):int
- {
- return super.getElementIndex(c);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $getElementAt(index:int):Object
- {
- return super.getElementAt(index);
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ListBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ListBaseStrandChildren.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ListBaseStrandChildren.as
deleted file mode 100644
index 3f77774..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ListBaseStrandChildren.as
+++ /dev/null
@@ -1,100 +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 ListBaseStrandChildren exists so that Lists are compatible with
- * the ListView/ContainerView beads.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ListBaseStrandChildren implements IParent
- {
- /**
- * Constructor.
- *
- * @flexjsignorecoercion org.apache.flex.core.ListBase
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ListBaseStrandChildren(owner:IParent)
- {
- super();
-
- this.owner = owner as ListBase;
- }
-
- public var owner:ListBase;
-
- /**
- * @private
- */
- public function get numElements():int
- {
- return owner.$numElements();
- }
-
- /**
- * @private
- */
- public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- owner.$addElement(c, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- owner.$addElementAt(c, index, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- owner.$removeElement(c, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function getElementIndex(c:Object):int
- {
- return owner.$getElementIndex(c);
- }
-
- /**
- * @private
- */
- public function getElementAt(index:int):Object
- {
- return owner.$getElementAt(index);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/MXMLDragInitiator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/MXMLDragInitiator.as b/frameworks/projects/Core/as/src/org/apache/flex/core/MXMLDragInitiator.as
deleted file mode 100644
index cb20f01..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/MXMLDragInitiator.as
+++ /dev/null
@@ -1,131 +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.IBead;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
-
- /**
- * Indicates that acceptingDrop API has been called.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="acceptingDrop", type="org.apache.flex.events.Event")]
-
- /**
- * Indicates that acceptedDrop API has been called.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="acceptedDrop", type="org.apache.flex.events.Event")]
-
- /**
- * The MXMLDragInitiator is an IDragInitiator that
- * dispatches events when the IDragInitiator methods
- * are called to make it easier to handle in MXML.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MXMLDragInitiator extends EventDispatcher implements IBead, IDragInitiator
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function MXMLDragInitiator()
- {
- super();
- }
-
- private var _strand:IStrand;
- /**
- *
- * @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 dropTarget
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var dropTarget:Object;
-
- /**
- * The DropType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var dropType:String;
-
- /**
- * Handles the acceptingDrop API
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function acceptingDrop(dropTarget:Object, type:String):void
- {
- dispatchEvent(new Event("acceptingDrop"));
- }
-
- /**
- * Handles the acceptedDrop API
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function acceptedDrop(dropTarget:Object, type:String):void
- {
- dispatchEvent(new Event("acceptedDrop"));
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ParentDocumentBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ParentDocumentBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ParentDocumentBead.as
deleted file mode 100644
index 1b0b0e7..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ParentDocumentBead.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.core
-{
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IChild;
- import org.apache.flex.core.IMXMLDocument;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.EventDispatcher;
-
- /**
- * The ParentDocumentBead class looks up the parent
- * chain to find a parent that was written in MXML.
- * Because it is usually rare for an application
- * to need to know this information, an optional bead
- * is used to compute it, instead of baking in the
- * overhead of a recursive infrastucture to store
- * this information. It is intended to be used
- * as a bead in the top-level tag of an MXML document.
- *
- * @flexjsignoreimport org.apache.flex.core.IChild
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ParentDocumentBead extends EventDispatcher implements IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ParentDocumentBead()
- {
- super();
- }
-
- private var _strand:IStrand;
-
- /**
- * @copy org.apache.flex.core.IBead#strand
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- //TODO (aharui) watch for re-parenting
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new org.apache.flex.events.Event("idChanged"));
- }
- }
-
- [Bindable("parentDocumentChange")]
- /**
- * @private
- * @flexjsignorecoercion org.apache.flex.core.IChild
- */
- public function get parentDocument():Object
- {
- var child:IChild = _strand as IChild;
- child = child.parent as IChild;
- while (child)
- {
- if (child is IMXMLDocument)
- {
- var doc:IMXMLDocument = child as IMXMLDocument;
- if (doc.MXMLDescriptor != null)
- return doc;
- }
- child = child.parent as IChild;
- }
- return null;
- }
-
- }
-}
[04/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Strand.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Strand.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Strand.as
new file mode 100644
index 0000000..b0318d6
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/Strand.as
@@ -0,0 +1,182 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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;
+
+ /**
+ * The Strand class is the base class for non-display object
+ * that implement a strand.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class Strand extends EventDispatcher implements IStrand
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function Strand()
+ {
+ super();
+ }
+
+
+ private var _model:IBeadModel;
+
+ /**
+ * An IBeadModel that serves as the data model for the component.
+ * Note that there is no controller or view properties since
+ * this not a display object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get model():IBeadModel
+ {
+ if (_model == null)
+ {
+ // addbead will set _model
+ addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+ }
+ return _model;
+ }
+
+ /**
+ * @private
+ */
+ public function set model(value:IBeadModel):void
+ {
+ if (_model != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("modelChanged"));
+ }
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.Application#beads
+ *
+ * The beads are not automatically added to the
+ * strand. Subclasses must decide when to
+ * add the beads.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var beads:Array;
+
+ private var _beads:Vector.<IBead>;
+
+ /**
+ * @copy org.apache.flex.core.IStrand#addBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ 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;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IStrand#getBeadByType()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ 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.IStrand#removeBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ 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;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
new file mode 100644
index 0000000..79e2a7d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/StyleableCSSTextField.as
@@ -0,0 +1,201 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.display.DisplayObjectContainer;
+ import flash.text.Font;
+
+ import org.apache.flex.core.IStyleableObject;
+ import org.apache.flex.events.Event;
+
+ /**
+ * The StyleableCSSTextField class implements more CSS text styles in a TextField.
+ * This makes it easier to use one in a "shadow DOM" in a complex skin.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class StyleableCSSTextField extends CSSTextField implements IStyleableObject, IChild
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function StyleableCSSTextField()
+ {
+ super();
+ // this is the object passed into CSS lookups since it can
+ // have its own individual styles and isn't subordinate
+ // to a parent.
+ styleParent = this;
+ }
+
+ /**
+ * @private
+ * The CSSParent property is set if the CSSTextField
+ * is used in a SimpleButton-based instance because
+ * the parent property is null, defeating CSS lookup.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var CSSParent:Object;
+
+ override public function get parent():DisplayObjectContainer
+ {
+ if (CSSParent)
+ return CSSParent as DisplayObjectContainer;
+
+ return super.parent;
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _styles:Object;
+
+ /**
+ * The object that contains
+ * "styles" and other associated
+ * name-value pairs. You can
+ * also specify a string in
+ * HTML style attribute format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get style():Object
+ {
+ return _styles;
+ }
+
+ /**
+ * @private
+ */
+ public function set style(value:Object):void
+ {
+ if (_styles != value)
+ {
+ if (value is String)
+ {
+ _styles = ValuesManager.valuesImpl.parseStyles(value as String);
+ }
+ else
+ _styles = value;
+ dispatchEvent(new Event("stylesChanged"));
+ }
+ }
+
+ /**
+ * A list of type names. Often used for CSS
+ * type selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var typeNames:String;
+
+ private var _className:String;
+
+ /**
+ * The classname. Often used for CSS
+ * class selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get className():String
+ {
+ return _className;
+ }
+
+ /**
+ * @private
+ */
+ public function set className(value:String):void
+ {
+ if (_className != value)
+ {
+ _className = value;
+ dispatchEvent(new Event("classNameChanged"));
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function set text(value:String):void
+ {
+ super.text = value;
+ var font:String = ValuesManager.valuesImpl.getValue(this, "fontFamily") as String;
+ var embeddedFonts:Array = Font.enumerateFonts();
+ if (embeddedFonts.length)
+ embedFonts = isEmbedded(embeddedFonts, font);
+ }
+
+ private function isEmbedded(list:Array, name:String):Boolean
+ {
+ for each (var f:Font in list)
+ {
+ if (f.fontName == name)
+ return true;
+ }
+ return false;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
new file mode 100644
index 0000000..0cd6a7c
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@ -0,0 +1,1483 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObject;
+ import flash.display.Sprite;
+ import flash.display.Stage;
+ }
+
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.MouseEvent;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.events.utils.MouseEventConverter;
+
+ /**
+ * Set a different class for click events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="click", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for rollOver events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="rollOver", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for rollOut events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="rollOut", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for mouseDown events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="mouseDown", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for mouseUp events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="mouseUp", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for mouseMove events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="mouseMove", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for mouseOut events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="mouseOut", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * Set a different class for mouseOver events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="mouseOver", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * The UIBase class is the base class for most composite user interface
+ * components. For the Flash Player, Buttons and Text controls may
+ * have a different base class and therefore may not extend UIBase.
+ * However all user interface components should implement IUIBase.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class UIBase extends HTMLElementWrapper implements IStrandWithModel, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function UIBase()
+ {
+ super();
+
+ COMPILE::AS3
+ {
+ MouseEventConverter.setupInstanceConverters(this);
+ }
+
+ COMPILE::JS
+ {
+ createElement();
+ }
+ }
+
+ private var _explicitWidth:Number;
+
+ /**
+ * The explicitly set width (as opposed to measured width
+ * or percentage width).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get explicitWidth():Number
+ {
+ return _explicitWidth;
+ }
+
+ /**
+ * @private
+ */
+ public function set explicitWidth(value:Number):void
+ {
+ if (_explicitWidth == value)
+ return;
+
+ // width can be pixel or percent not both
+ if (!isNaN(value))
+ _percentWidth = NaN;
+
+ _explicitWidth = value;
+
+ dispatchEvent(new Event("explicitWidthChanged"));
+ }
+
+ private var _explicitHeight:Number;
+
+ /**
+ * The explicitly set width (as opposed to measured width
+ * or percentage width).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get explicitHeight():Number
+ {
+ return _explicitHeight;
+ }
+
+ /**
+ * @private
+ */
+ public function set explicitHeight(value:Number):void
+ {
+ if (_explicitHeight == value)
+ return;
+
+ // height can be pixel or percent not both
+ if (!isNaN(value))
+ _percentHeight = NaN;
+
+ _explicitHeight = value;
+
+ dispatchEvent(new Event("explicitHeightChanged"));
+ }
+
+ private var _percentWidth:Number;
+
+ /**
+ * The requested percentage width this component
+ * should have in the parent container. Note that
+ * the actual percentage may be different if the
+ * total is more than 100% or if there are other
+ * components with explicitly set widths.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get percentWidth():Number
+ {
+ return _percentWidth;
+ }
+
+ /**
+ * @private
+ */
+ public function set percentWidth(value:Number):void
+ {
+ COMPILE::AS3 {
+ if (_percentWidth == value)
+ return;
+
+ if (!isNaN(value))
+ _explicitWidth = NaN;
+
+ _percentWidth = value;
+ }
+ COMPILE::JS {
+ this._percentWidth = value;
+ this.positioner.style.width = value.toString() + '%';
+ if (!isNaN(value))
+ this._explicitWidth = NaN;
+ }
+
+ dispatchEvent(new Event("percentWidthChanged"));
+ }
+
+ private var _percentHeight:Number;
+
+ /**
+ * The requested percentage height this component
+ * should have in the parent container. Note that
+ * the actual percentage may be different if the
+ * total is more than 100% or if there are other
+ * components with explicitly set heights.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get percentHeight():Number
+ {
+ return _percentHeight;
+ }
+
+ /**
+ * @private
+ */
+ public function set percentHeight(value:Number):void
+ {
+ COMPILE::AS3 {
+ if (_percentHeight == value)
+ return;
+
+ if (!isNaN(value))
+ _explicitHeight = NaN;
+
+ _percentHeight = value;
+ }
+
+ COMPILE::JS {
+ this._percentHeight = value;
+ this.positioner.style.height = value.toString() + '%';
+ if (!isNaN(value))
+ this._explicitHeight = NaN;
+ }
+
+ dispatchEvent(new Event("percentHeightChanged"));
+ }
+
+ private var _width:Number;
+
+ [Bindable("widthChanged")]
+ [PercentProxy("percentWidth")]
+ /**
+ * The width of the component. If no width has been previously
+ * set the default width may be specified in the IValuesImpl
+ * or determined as the bounding box around all child
+ * components and graphics.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ override public function get width():Number
+ {
+ var w:Number = _width;
+ if (isNaN(w)) {
+ w = $width;
+ }
+ return w;
+ }
+
+ /**
+ * @flexjsignorecoercion String
+ */
+ COMPILE::JS
+ public function get width():Number
+ {
+ var pixels:Number;
+ var strpixels:String = positioner.style.width as String;
+ if (strpixels !== null && strpixels.indexOf('%') != -1)
+ pixels = NaN;
+ else
+ pixels = parseFloat(strpixels);
+ if (isNaN(pixels)) {
+ pixels = positioner.offsetWidth;
+ if (pixels === 0 && positioner.scrollWidth !== 0) {
+ // invisible child elements cause offsetWidth to be 0.
+ pixels = positioner.scrollWidth;
+ }
+ }
+ return pixels;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::AS3
+ override public function set width(value:Number):void
+ {
+ if (explicitWidth != value)
+ {
+ explicitWidth = value;
+ }
+
+ setWidth(value);
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::JS
+ public function set width(value:Number):void
+ {
+ if (explicitWidth != value)
+ {
+ explicitWidth = value;
+ }
+
+ setWidth(value);
+ }
+
+ /**
+ * Retrieve the low-level bounding box width.
+ * Not implemented in JS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function get $width():Number
+ {
+ return super.width;
+ }
+
+ private var _height:Number;
+
+ [Bindable("heightChanged")]
+ [PercentProxy("percentHeight")]
+ /**
+ * The height of the component. If no height has been previously
+ * set the default height may be specified in the IValuesImpl
+ * or determined as the bounding box around all child
+ * components and graphics.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ override public function get height():Number
+ {
+ var h:Number = _height;
+ if (isNaN(h)) {
+ h = $height;
+ }
+ return h;
+ }
+
+ /**
+ * @flexjsignorecoercion String
+ */
+ COMPILE::JS
+ public function get height():Number
+ {
+ var pixels:Number;
+ var strpixels:String = positioner.style.height as String;
+ if (strpixels !== null && strpixels.indexOf('%') != -1)
+ pixels = NaN;
+ else
+ pixels = parseFloat(strpixels);
+ if (isNaN(pixels)) {
+ pixels = positioner.offsetHeight;
+ if (pixels === 0 && positioner.scrollHeight !== 0) {
+ // invisible child elements cause offsetHeight to be 0.
+ pixels = positioner.scrollHeight;
+ }
+ }
+ return pixels;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::AS3
+ override public function set height(value:Number):void
+ {
+ if (explicitHeight != value)
+ {
+ explicitHeight = value;
+ }
+
+ setHeight(value);
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::JS
+ public function set height(value:Number):void
+ {
+ if (explicitHeight != value)
+ {
+ explicitHeight = value;
+ }
+
+ setHeight(value);
+ }
+
+ /**
+ * Retrieve the low-level bounding box height.
+ * Not implemented in JS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function get $height():Number
+ {
+ return super.height;
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setHeight(value:Number, noEvent:Boolean = false):void
+ {
+ if (_height != value)
+ {
+ _height = value;
+ COMPILE::JS
+ {
+ this.positioner.style.height = value.toString() + 'px';
+ }
+ if (!noEvent)
+ dispatchEvent(new Event("heightChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setWidth(value:Number, noEvent:Boolean = false):void
+ {
+ if (_width != value)
+ {
+ _width = value;
+ COMPILE::JS
+ {
+ this.positioner.style.width = value.toString() + 'px';
+ }
+ if (!noEvent)
+ dispatchEvent(new Event("widthChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setWidthAndHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
+ {
+ if (_width != newWidth)
+ {
+ _width = newWidth;
+ COMPILE::JS
+ {
+ this.positioner.style.width = newWidth.toString() + 'px';
+ }
+ if (!noEvent)
+ dispatchEvent(new Event("widthChanged"));
+ }
+ if (_height != newHeight)
+ {
+ _height = newHeight;
+ COMPILE::JS
+ {
+ this.positioner.style.height = newHeight.toString() + 'px';
+ }
+ if (!noEvent)
+ dispatchEvent(new Event("heightChanged"));
+ }
+ dispatchEvent(new Event("sizeChanged"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#isWidthSizedToContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isWidthSizedToContent():Boolean
+ {
+ if (!isNaN(_explicitWidth))
+ return false;
+ if (!isNaN(_percentWidth))
+ return false;
+ var left:* = ValuesManager.valuesImpl.getValue(this, "left");
+ var right:* = ValuesManager.valuesImpl.getValue(this, "right");
+ return (left === undefined || right === undefined);
+
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#isHeightSizedToContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isHeightSizedToContent():Boolean
+ {
+ if (!isNaN(_explicitHeight))
+ return false;
+ if (!isNaN(_percentHeight))
+ return false;
+ var top:* = ValuesManager.valuesImpl.getValue(this, "top");
+ var bottom:* = ValuesManager.valuesImpl.getValue(this, "bottom");
+ return (top === undefined || bottom === undefined);
+ }
+
+ private var _x:Number;
+
+ /**
+ * @private
+ */
+ COMPILE::AS3
+ override public function set x(value:Number):void
+ {
+ super.x = _x = value;
+ if (!style)
+ style = { left: value };
+ else
+ style.left = value;
+ }
+
+ COMPILE::JS
+ public function set x(value:Number):void
+ {
+ positioner.style.position = 'absolute';
+ positioner.style.left = value.toString() + 'px';
+ }
+
+ /**
+ * @flexjsignorecoercion String
+ */
+ COMPILE::JS
+ public function get x():Number
+ {
+ var strpixels:String = positioner.style.left as String;
+ var pixels:Number = parseFloat(strpixels);
+ if (isNaN(pixels))
+ pixels = positioner.offsetLeft;
+ return pixels;
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setX
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setX(value:Number):void
+ {
+ COMPILE::AS3
+ {
+ super.x = value;
+ }
+ COMPILE::JS
+ {
+ positioner.style.position = 'absolute';
+ positioner.style.left = value.toString() + 'px';
+ }
+ }
+
+ private var _y:Number;
+
+ /**
+ * @private
+ */
+ COMPILE::AS3
+ override public function set y(value:Number):void
+ {
+ super.y = _y = value;
+ if (!style)
+ style = { top: value };
+ else
+ style.top = value;
+ }
+
+ COMPILE::JS
+ public function set y(value:Number):void
+ {
+ positioner.style.position = 'absolute';
+ positioner.style.top = value.toString() + 'px';
+ }
+
+ /**
+ * @flexjsignorecoercion String
+ */
+ COMPILE::JS
+ public function get y():Number
+ {
+ var strpixels:String = positioner.style.top as String;
+ var pixels:Number = parseFloat(strpixels);
+ if (isNaN(pixels))
+ pixels = positioner.offsetTop;
+ return pixels;
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setY
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setY(value:Number):void
+ {
+ COMPILE::AS3
+ {
+ super.y = value;
+ }
+ COMPILE::JS
+ {
+ positioner.style.position = 'absolute';
+ positioner.style.top = value.toString() + 'px';
+ }
+ }
+
+ /**
+ * @private
+ */
+ [Bindable("visibleChanged")]
+ COMPILE::AS3
+ override public function set visible(value:Boolean):void
+ {
+ super.visible = value;
+ dispatchEvent(new Event(value?"show":"hide"));
+ dispatchEvent(new Event("visibleChanged"));
+ }
+
+ COMPILE::JS
+ private var displayStyleForLayout:String;
+
+ /**
+ * The display style is used for both visible
+ * and layout so is managed as a special case.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ public function setDisplayStyleForLayout(value:String):void
+ {
+ if (positioner.style.display !== 'none')
+ positioner.style.display = value;
+ else
+ displayStyleForLayout = value;
+ }
+
+ COMPILE::JS
+ public function get visible():Boolean
+ {
+ return positioner.style.display !== 'none';
+ }
+
+ COMPILE::JS
+ public function set visible(value:Boolean):void
+ {
+ var oldValue:Boolean = positioner.style.display !== 'none';
+ if (value !== oldValue)
+ {
+ if (!value)
+ {
+ displayStyleForLayout = positioner.style.display;
+ positioner.style.display = 'none';
+ dispatchEvent(new Event('hide'));
+ }
+ else
+ {
+ if (displayStyleForLayout)
+ positioner.style.display = displayStyleForLayout;
+ dispatchEvent(new Event('show'));
+ }
+ dispatchEvent(new Event('visibleChanged'));
+ }
+ }
+
+ /**
+ * @return The array of children.
+ * @flexjsignorecoercion Array
+ */
+ COMPILE::JS
+ public function internalChildren():Array
+ {
+ return element.childNodes as Array;
+ }
+
+ COMPILE::AS3
+ private var _model:IBeadModel;
+
+ /**
+ * An IBeadModel that serves as the data model for the component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public function get model():Object
+ {
+ if (_model == null)
+ {
+ // addbead will set _model
+ addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+ }
+ return _model;
+ }
+
+ /**
+ * @private
+ */
+ COMPILE::AS3
+ public function set model(value:Object):void
+ {
+ if (_model != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("modelChanged"));
+ }
+ }
+
+ private var _view:IBeadView;
+
+ /**
+ * An IBeadView that serves as the view for the component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion Class
+ */
+ public function get view():IBeadView
+ {
+ if (_view == null)
+ {
+ var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+ if (c)
+ {
+ if (c)
+ {
+ _view = (new c()) as IBeadView;
+ addBead(_view);
+ }
+ }
+ }
+ return _view;
+ }
+
+ /**
+ * @private
+ */
+ public function set view(value:IBeadView):void
+ {
+ if (_view != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("viewChanged"));
+ }
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _style:Object;
+
+ /**
+ * The object that contains
+ * "styles" and other associated
+ * name-value pairs. You can
+ * also specify a string in
+ * HTML style attribute format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get style():Object
+ {
+ return _style;
+ }
+
+ /**
+ * @private
+ * @flexjsignorecoercion String
+ */
+ public function set style(value:Object):void
+ {
+ if (_style != value)
+ {
+ if (value is String)
+ {
+ _style = ValuesManager.valuesImpl.parseStyles(value as String);
+ }
+ else
+ _style = value;
+ if (!isNaN(_y))
+ _style.top = _y;
+ if (!isNaN(_x))
+ _style.left = _x;
+ dispatchEvent(new Event("stylesChanged"));
+ }
+ }
+
+ /**
+ * A list of type names. Often used for CSS
+ * type selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var typeNames:String;
+
+ private var _className:String;
+
+ /**
+ * The classname. Often used for CSS
+ * class selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get className():String
+ {
+ return _className;
+ }
+
+ /**
+ * @private
+ */
+ public function set className(value:String):void
+ {
+ if (_className != value)
+ {
+ COMPILE::JS
+ {
+ element.className = typeNames ? value + ' ' + typeNames : value;
+ }
+ _className = value;
+ dispatchEvent(new Event("classNameChanged"));
+ }
+ }
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @copy org.apache.flex.core.Application#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.IStrand#addBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function addBead(bead:IBead):void
+ {
+ if (!_beads)
+ _beads = new Vector.<IBead>;
+ _beads.push(bead);
+ if (bead is IBeadModel)
+ _model = bead as IBeadModel;
+ else if (bead is IBeadView)
+ _view = bead as IBeadView;
+ bead.strand = this;
+
+ if (bead is IBeadView) {
+ IEventDispatcher(this).dispatchEvent(new Event("viewChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IStrand#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.IStrand#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;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#addElement()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3
+ {
+ if (c is IUIBase)
+ {
+ addChild(IUIBase(c).element as DisplayObject);
+ IUIBase(c).addedToParent();
+ }
+ else
+ addChild(c as DisplayObject);
+ }
+ COMPILE::JS
+ {
+ element.appendChild(c.positioner);
+ c.addedToParent();
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#addElementAt()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3
+ {
+ if (c is IUIBase)
+ {
+ addChildAt(IUIBase(c).element as DisplayObject, index);
+ IUIBase(c).addedToParent();
+ }
+ else
+ addChildAt(c as DisplayObject, index);
+ }
+ COMPILE::JS
+ {
+ var children:Array = internalChildren();
+ if (index >= children.length)
+ addElement(c);
+ else
+ {
+ element.insertBefore(c.positioner,
+ children[index]);
+ c.addedToParent();
+ }
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#getElementAt()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getElementAt(index:int):Object
+ {
+ COMPILE::AS3
+ {
+ return getChildAt(index);
+ }
+ COMPILE::JS
+ {
+ var children:Array = internalChildren();
+ return children[index].flexjs_wrapper;
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#getElementIndex()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function getElementIndex(c:Object):int
+ {
+ COMPILE::AS3
+ {
+ if (c is IUIBase)
+ return getChildIndex(IUIBase(c).element as DisplayObject);
+ else
+ return getChildIndex(c as DisplayObject);
+ }
+ COMPILE::JS
+ {
+ var children:Array = internalChildren();
+ var n:int = children.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ if (children[i] == c.element)
+ return i;
+ }
+ return -1;
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#removeElement()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ COMPILE::AS3
+ {
+ if (c is IUIBase)
+ removeChild(IUIBase(c).element as DisplayObject);
+ else
+ removeChild(c as DisplayObject);
+ }
+ COMPILE::JS
+ {
+ element.removeChild(c.element);
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#numElements
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get numElements():int
+ {
+ COMPILE::AS3
+ {
+ return numChildren;
+ }
+ COMPILE::JS
+ {
+ var children:Array = internalChildren();
+ return children.length;
+ }
+ }
+
+ /**
+ * The method called when added to a parent. This is a good
+ * time to set up beads.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion Class
+ * @flexjsignorecoercion Number
+ */
+ public function addedToParent():void
+ {
+ var c:Class;
+
+ COMPILE::JS
+ {
+ if (style)
+ ValuesManager.valuesImpl.applyStyles(this, style);
+ }
+
+ if (isNaN(_explicitWidth) && isNaN(_percentWidth))
+ {
+ var value:* = ValuesManager.valuesImpl.getValue(this,"width");
+ if (value !== undefined)
+ {
+ if (value is String)
+ {
+ var s:String = String(value);
+ if (s.indexOf("%") != -1)
+ _percentWidth = Number(s.substring(0, s.length - 1));
+ else
+ {
+ if (s.indexOf("px") != -1)
+ s = s.substring(0, s.length - 2);
+ _width = _explicitWidth = Number(s);
+ }
+ }
+ else
+ _width = _explicitWidth = value as Number;
+ }
+ }
+
+ if (isNaN(_explicitHeight) && isNaN(_percentHeight))
+ {
+ value = ValuesManager.valuesImpl.getValue(this,"height");
+ if (value !== undefined)
+ {
+ if (value is String)
+ {
+ s = String(value);
+ if (s.indexOf("%") != -1)
+ _percentHeight = Number(s.substring(0, s.length - 1));
+ else
+ {
+ if (s.indexOf("px") != -1)
+ s = s.substring(0, s.length - 2);
+ _height = _explicitHeight = Number(s);
+ }
+ }
+ else
+ _height = _explicitHeight = value as Number;
+ }
+ }
+
+ for each (var bead:IBead in beads)
+ addBead(bead);
+
+ if (getBeadByType(IBeadModel) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
+ if (c)
+ {
+ var model:IBeadModel = new c as IBeadModel;
+ if (model)
+ addBead(model);
+ }
+ }
+ if (_view == null && getBeadByType(IBeadView) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+ if (c)
+ {
+ var view:IBeadView = new c as IBeadView;
+ if (view)
+ addBead(view);
+ }
+ }
+ if (getBeadByType(IBeadController) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
+ if (c)
+ {
+ var controller:IBeadController = new c as IBeadController;
+ if (controller)
+ addBead(controller);
+ }
+ }
+ dispatchEvent(new Event("beadsAdded"));
+ }
+
+ /**
+ * A measurement bead, if one exists.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get measurementBead() : IMeasurementBead
+ {
+ var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
+ if( measurementBead == null ) {
+ addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
+ }
+
+ return measurementBead;
+ }
+
+ COMPILE::AS3
+ private var _stageProxy:StageProxy;
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion org.apache.flex.events.IEventDispatcher
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ COMPILE::AS3
+ {
+ if (!_stageProxy)
+ {
+ _stageProxy = new StageProxy(stage);
+ _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
+ }
+
+ return _stageProxy;
+ }
+ COMPILE::JS
+ {
+ var e:WrappedHTMLElement = document.body as WrappedHTMLElement;
+ return e.flexjs_wrapper as IEventDispatcher;
+ }
+ }
+
+ COMPILE::AS3
+ private function stageProxy_removedFromStageHandler(event:Event):void
+ {
+ _stageProxy = null;
+ }
+
+ /**
+ * Rebroadcast an event from a sub component from the component.
+ */
+ protected function repeaterListener(event:Event):void
+ {
+ dispatchEvent(event);
+ }
+
+ 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;
+ }
+
+ /**
+ * @return The actual element to be parented.
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ protected function createElement():WrappedHTMLElement
+ {
+ if (element == null)
+ element = document.createElement('div') as WrappedHTMLElement;
+ if (positioner == null)
+ positioner = element;
+ positioner.style.display = 'block';
+ positioner.style.position = 'relative';
+
+ element.flexjs_wrapper = this;
+
+ return positioner;
+ }
+
+
+ /**
+ * The HTMLElement used to position the component.
+ * @flexjsignorecoercion String
+ */
+ COMPILE::JS
+ public function get alpha():Number
+ {
+ var stralpha:String = positioner.style.opacity as String;
+ var alpha:Number = parseFloat(stralpha);
+ return alpha;
+ }
+
+ COMPILE::JS
+ public function set alpha(value:Number):void
+ {
+ positioner.style.opacity = value;
+ }
+
+ /**
+ * @param value The event containing new style properties.
+ */
+ COMPILE::JS
+ protected function styleChangeHandler(value:ValueChangeEvent):void
+ {
+ var newStyle:Object = {};
+ newStyle[value.propertyName] = value.newValue;
+ ValuesManager.valuesImpl.applyStyles(this, newStyle);
+ };
+
+ /**
+ * @param value The event containing new style properties.
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+ * @flexjsignorecoercion org.apache.flex.core.IUIBase
+ */
+ COMPILE::JS
+ public function get parent():IUIBase
+ {
+ var p:WrappedHTMLElement = this.positioner.parentNode as WrappedHTMLElement;
+ var wrapper:IUIBase = p ? p.flexjs_wrapper as IUIBase : null;
+ return wrapper;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
new file mode 100644
index 0000000..9a30809
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIButtonBase.as
@@ -0,0 +1,860 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.display.DisplayObject;
+ import flash.display.SimpleButton;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IBeadModel;
+ import org.apache.flex.core.IMeasurementBead;
+ 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.utils.MouseEventConverter;
+ import org.apache.flex.events.IEventDispatcher;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Set a different class for click events so that
+ * there aren't dependencies on the flash classes
+ * on the JS side.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="click", type="org.apache.flex.events.MouseEvent")]
+
+ /**
+ * The UIButtonBase class is the base class for most Buttons in a FlexJS
+ * application. In Flash, these buttons extend SimpleButton and therefore
+ * do not support all of the Sprite APIs.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class UIButtonBase extends SimpleButton implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function UIButtonBase(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+ {
+ super(upState, overState, downState, hitTestState);
+ // mouseChildren = true;
+ // mouseEnabled = true;
+ MouseEventConverter.setupInstanceConverters(this);
+ }
+
+ private var _x:Number;
+
+ /**
+ * @private
+ */
+ override public function set x(value:Number):void
+ {
+ if (super.x != value) {
+ super.x = _x = value;
+ if (!style)
+ style = { left: value };
+ else
+ style.left = value;
+ dispatchEvent(new Event("xChanged"));
+ }
+ }
+
+ private var _y:Number;
+
+ /**
+ * @private
+ */
+ override public function set y(value:Number):void
+ {
+ if (super.y != value) {
+ super.y = _y = value;
+ if (!style)
+ style = { top: value };
+ else
+ style.top = value;
+ dispatchEvent(new Event("yChanged"));
+ }
+ }
+
+ /**
+ * Retrieve the low-level bounding box y.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ protected function get $y():Number
+ {
+ return super.y;
+ }
+
+ private var _explicitWidth:Number;
+
+ /**
+ * The explicitly set width (as opposed to measured width
+ * or percentage width).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get explicitWidth():Number
+ {
+ if (isNaN(_explicitWidth))
+ {
+ var value:* = ValuesManager.valuesImpl.getValue(this, "width");
+ if (value !== undefined) {
+ _explicitWidth = Number(value);
+ }
+ }
+
+ return _explicitWidth;
+ }
+
+ /**
+ * @private
+ */
+ public function set explicitWidth(value:Number):void
+ {
+ if (_explicitWidth == value)
+ return;
+
+ // width can be pixel or percent not both
+ if (!isNaN(value))
+ _percentWidth = NaN;
+
+ _explicitWidth = value;
+
+ dispatchEvent(new Event("explicitWidthChanged"));
+ }
+
+ private var _explicitHeight:Number;
+
+ /**
+ * The explicitly set width (as opposed to measured width
+ * or percentage width).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get explicitHeight():Number
+ {
+ if (isNaN(_explicitHeight))
+ {
+ var value:* = ValuesManager.valuesImpl.getValue(this, "height");
+ if (value !== undefined) {
+ _explicitHeight = Number(value);
+ }
+ }
+
+ return _explicitHeight;
+ }
+
+ /**
+ * @private
+ */
+ public function set explicitHeight(value:Number):void
+ {
+ if (_explicitHeight == value)
+ return;
+
+ // height can be pixel or percent not both
+ if (!isNaN(value))
+ _percentHeight = NaN;
+
+ _explicitHeight = value;
+
+ dispatchEvent(new Event("explicitHeightChanged"));
+ }
+
+ private var _percentWidth:Number;
+
+ /**
+ * The requested percentage width this component
+ * should have in the parent container. Note that
+ * the actual percentage may be different if the
+ * total is more than 100% or if there are other
+ * components with explicitly set widths.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get percentWidth():Number
+ {
+ return _percentWidth;
+ }
+
+ /**
+ * @private
+ */
+ public function set percentWidth(value:Number):void
+ {
+ if (_percentWidth == value)
+ return;
+
+ if (!isNaN(value))
+ _explicitWidth = NaN;
+
+ _percentWidth = value;
+
+ dispatchEvent(new Event("percentWidthChanged"));
+ }
+
+ private var _percentHeight:Number;
+
+ /**
+ * The requested percentage height this component
+ * should have in the parent container. Note that
+ * the actual percentage may be different if the
+ * total is more than 100% or if there are other
+ * components with explicitly set heights.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get percentHeight():Number
+ {
+ return _percentHeight;
+ }
+
+ /**
+ * @private
+ */
+ public function set percentHeight(value:Number):void
+ {
+ if (_percentHeight == value)
+ return;
+
+ if (!isNaN(value))
+ _explicitHeight = NaN;
+
+ _percentHeight = value;
+
+ dispatchEvent(new Event("percentHeightChanged"));
+ }
+
+ private var _width:Number;
+
+ [PercentProxy("percentWidth")]
+ /**
+ * @copy org.apache.flex.core.UIBase#width
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function get width():Number
+ {
+ if (isNaN(explicitWidth))
+ {
+ var w:Number = _width;
+ if (isNaN(w)) w = $width;
+ return w;
+ }
+ else
+ return explicitWidth;
+ }
+
+ /**
+ * @private
+ */
+ override public function set width(value:Number):void
+ {
+ if (explicitWidth != value)
+ {
+ explicitWidth = value;
+ }
+
+ setWidth(value);
+ }
+
+ /**
+ * Retrieve the low-level bounding box width.
+ * Not implemented in JS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get $width():Number
+ {
+ return super.width;
+ }
+
+ private var _height:Number;
+
+ [PercentProxy("percentHeight")]
+ /**
+ * @copy org.apache.flex.core.UIBase#width
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function get height():Number
+ {
+ if (isNaN(explicitHeight))
+ {
+ var h:Number = _height;
+ if (isNaN(h)) h = $height;
+ return h;
+ }
+ else
+ return explicitHeight;
+ }
+
+ /**
+ * @private
+ */
+ override public function set height(value:Number):void
+ {
+ if (explicitHeight != value)
+ {
+ explicitHeight = value;
+ }
+
+ setHeight(value);
+ }
+
+ /**
+ * Retrieve the low-level bounding box height.
+ * Not implemented in JS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get $height():Number
+ {
+ return super.height;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#setHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setHeight(value:Number, noEvent:Boolean = false):void
+ {
+ if (_height != value)
+ {
+ _height = value;
+ if (!noEvent)
+ dispatchEvent(new Event("heightChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#setWidth
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setWidth(value:Number, noEvent:Boolean = false):void
+ {
+ if (_width != value)
+ {
+ _width = value;
+ if (!noEvent)
+ dispatchEvent(new Event("widthChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#setWidthAndHeight
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
+ {
+ if (_width != newWidth)
+ {
+ _width = newWidth;
+ if (_height == newHeight)
+ if (!noEvent)
+ dispatchEvent(new Event("widthChanged"));
+ }
+ if (_height != newHeight)
+ {
+ _height = newHeight;
+ if (!noEvent)
+ dispatchEvent(new Event("heightChanged"));
+ }
+ dispatchEvent(new Event("sizeChanged"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#isWidthSizedToContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isWidthSizedToContent():Boolean
+ {
+ return (isNaN(_explicitWidth) && isNaN(_percentWidth));
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setX
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setX(value:Number):void
+ {
+ super.x = value;
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#setY
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function setY(value:Number):void
+ {
+ super.y = value;
+ }
+
+ /**
+ * @private
+ */
+ [Bindable("visibleChanged")]
+ override public function set visible(value:Boolean):void
+ {
+ super.visible = value;
+ dispatchEvent(new Event(value?"show":"hide"));
+ dispatchEvent(new Event("visibleChanged"));
+ }
+
+ /**
+ * @copy org.apache.flex.core.ILayoutChild#isHeightSizedToContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function isHeightSizedToContent():Boolean
+ {
+ return (isNaN(_explicitHeight) && isNaN(_percentHeight));
+ }
+
+ private var _model:IBeadModel;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#model
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get model():Object
+ {
+ if (_model == null)
+ {
+ // addbead will set _model
+ addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
+ }
+ return _model;
+ }
+
+ /**
+ * @private
+ */
+ public function set model(value:Object):void
+ {
+ if (_model != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("modelChanged"));
+ }
+ }
+
+ private var _view:IBeadView;
+
+ /**
+ * An IBeadView that serves as the view for the component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get view():IBeadView
+ {
+ if (_view == null)
+ {
+ var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+ if (c)
+ {
+ _view = (new c()) as IBeadView;
+ addBead(_view);
+ }
+ }
+ return _view;
+ }
+
+ /**
+ * @private
+ */
+ public function set view(value:IBeadView):void
+ {
+ if (_view != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new Event("viewChanged"));
+ }
+ }
+
+ 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 _styles:Object;
+
+ /**
+ * The object that contains
+ * "styles" and other associated
+ * name-value pairs. You can
+ * also specify a string in
+ * HTML style attribute format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get style():Object
+ {
+ return _styles;
+ }
+
+ /**
+ * @private
+ */
+ public function set style(value:Object):void
+ {
+ if (value is String)
+ _styles = ValuesManager.valuesImpl.parseStyles(value as String);
+ else
+ _styles = value;
+ if (!isNaN(_y))
+ _styles.top = _y;
+ if (!isNaN(_x))
+ _styles.left = _x;
+ dispatchEvent(new Event("stylesChanged"));
+ }
+
+ /**
+ * The styles for this object formatted
+ * as an HTML style attribute. While this
+ * may be a convenient and less verbose
+ * way of specifying styles than using
+ * the style object, you run the risk of
+ * having a typo.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function set styleString(value:String):void
+ {
+ _styles = JSON.parse("{" + value + "}");
+ }
+
+ /**
+ * A list of type names. Often used for CSS
+ * type selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var typeNames:String;
+
+ private var _className:String;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#className
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get className():String
+ {
+ return _className;
+ }
+
+ /**
+ * @private
+ */
+ public function set className(value:String):void
+ {
+ if (_className != value)
+ {
+ _className = value;
+ dispatchEvent(new Event("classNameChanged"));
+ }
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#element
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get element():IFlexJSElement
+ {
+ return this;
+ }
+
+ /**
+ * @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;
+
+ private var strand:Vector.<IBead>;
+
+ /**
+ * @copy org.apache.flex.core.UIBase#addBead()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addBead(bead:IBead):void
+ {
+ if (!strand)
+ strand = new Vector.<IBead>;
+ strand.push(bead);
+ if (bead is IBeadModel)
+ _model = bead as IBeadModel;
+ else if (bead is IBeadView)
+ _view = bead as IBeadView;
+ 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
+ */
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in strand)
+ {
+ 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
+ */
+ public function removeBead(value:IBead):IBead
+ {
+ var n:int = strand.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var bead:IBead = strand[i];
+ if (bead == value)
+ {
+ strand.splice(i, 1);
+ return bead;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#addToParent()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function addedToParent():void
+ {
+ var c:Class;
+
+ for each (var bead:IBead in beads)
+ addBead(bead);
+
+ if (getBeadByType(IBeadModel) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
+ if (c)
+ {
+ var model:IBeadModel = new c as IBeadModel;
+ if (model)
+ addBead(model);
+ }
+ }
+ if (getBeadByType(IBeadView) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
+ if (c)
+ {
+ var view:IBeadView = new c as IBeadView;
+ if (view)
+ addBead(view);
+ }
+ }
+ if (getBeadByType(IBeadController) == null)
+ {
+ c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
+ if (c)
+ {
+ var controller:IBeadController = new c as IBeadController;
+ if (controller)
+ addBead(controller);
+ }
+ }
+
+ dispatchEvent(new Event("beadsAdded"));
+
+ }
+
+ /**
+ * @copy org.apache.flex.core.UIBase#measurementBead
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get measurementBead() : IMeasurementBead
+ {
+ var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
+ if( measurementBead == null ) {
+ addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
+ }
+
+ return measurementBead;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get topMostEventDispatcher():IEventDispatcher
+ {
+ if (!parent)
+ return null;
+ return IUIBase(parent).topMostEventDispatcher;
+ }
+
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ValuesManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ValuesManager.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ValuesManager.as
new file mode 100644
index 0000000..fc1b611
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ValuesManager.as
@@ -0,0 +1,72 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 ValuesManager class is one of the few Singleton classes in
+ * FlexJS. Instances of other things can be shared via IValuesImpl, but
+ * this class's API is its one static property where you get the
+ * instance of IValuesImpl by which other instances can be shared.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ValuesManager
+ {
+ /**
+ * Constructor. This class should not be instantiated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ValuesManager()
+ {
+ }
+
+ private static var _valuesImpl:IValuesImpl;
+
+ /**
+ * The implementation of IValuesImpl where you can
+ * get default values and shared instances.
+ *
+ * @see org.apache.flex.core.IValuesImpl
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function get valuesImpl():IValuesImpl
+ {
+ return _valuesImpl;
+ }
+
+ /**
+ * @private
+ */
+ public static function set valuesImpl(value:IValuesImpl):void
+ {
+ _valuesImpl = value;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
new file mode 100644
index 0000000..0230e57
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ViewBase.as
@@ -0,0 +1,98 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched at startup. Attributes and sub-instances of
+ * the MXML document have been created and assigned.
+ * The component lifecycle is different
+ * than the Flex SDK. There is no creationComplete event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="initComplete", type="org.apache.flex.events.Event")]
+
+ [DefaultProperty("mxmlContent")]
+
+ /**
+ * The ViewBase class is the base class for most views in a FlexJS
+ * application. It is generally used as the root tag of MXML
+ * documents and UI controls and containers are added to it.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ViewBase extends ContainerBase implements IPopUpHost, IApplicationView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ViewBase()
+ {
+ super();
+
+ className = "flexjs";
+ }
+
+ private var _applicationModel:Object;
+
+ [Bindable("modelChanged")]
+
+ /**
+ * A reference to the Application's model. Usually,
+ * a view is displaying the main model for an
+ * application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get applicationModel():Object
+ {
+ return _applicationModel;
+ }
+
+ /**
+ * @private
+ */
+ public function set applicationModel(value:Object):void
+ {
+ _applicationModel = value;
+ dispatchEvent(new Event("modelChanged"));
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/WrappedHTMLElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/WrappedHTMLElement.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/WrappedHTMLElement.as
new file mode 100644
index 0000000..e765e01
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/WrappedHTMLElement.as
@@ -0,0 +1,21 @@
+package org.apache.flex.core
+{
+ COMPILE::JS
+ public class WrappedHTMLElement extends HTMLElement
+ {
+
+ //--------------------------------------
+ // Property
+ //--------------------------------------
+
+ /**
+ * A pointer back to the instance that wrapped this element.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var flexjs_wrapper:Object;
+ }
+}
[08/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.as
new file mode 100644
index 0000000..f88201f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserResizeListener.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.core
+{
+COMPILE::AS3
+{
+ import flash.events.Event;
+ import flash.external.ExternalInterface;
+ import flash.utils.getQualifiedClassName;
+}
+
+ /**
+ * The BrowserResizeListener class listens for browser
+ * resizing and resizes the application accordingly.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BrowserResizeListener implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BrowserResizeListener()
+ {
+ }
+
+ private var app:Application;
+
+ /**
+ * Minimum height
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var minHeight:Number;
+
+ /**
+ * Minimum width
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var minWidth:Number;
+
+ /**
+ * @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
+ {
+ app = value as Application;
+ COMPILE::AS3
+ {
+ app.stage.addEventListener("resize", resizeHandler);
+ if (ExternalInterface.available && (!isNaN(minWidth) || !isNaN(minHeight)))
+ {
+ // Get application name. This assumes that the wrapper is using an
+ // object tag with the id that matches the application name
+ var appName:String = getQualifiedClassName(app);
+ var js:String = "var o = document.getElementById('" + appName + "');";
+ if (!isNaN(minWidth))
+ js += "o.style.minWidth = '" + minWidth.toString() + "px';";
+ if (!isNaN(minHeight))
+ js += "o.style.minHeight = '" + minHeight.toString() + "px';"
+ ExternalInterface.call("eval", js);
+ }
+ }
+ COMPILE::JS
+ {
+ window.addEventListener('resize',
+ this.resizeHandler, false);
+ if (!isNaN(this.minWidth))
+ document.body.style.minWidth = this.minWidth.toString() + 'px';
+ if (!isNaN(this.minHeight))
+ document.body.style.minHeight = this.minHeight.toString() + 'px';
+ document.body.style.overflow = 'auto';
+ }
+ }
+
+ private function resizeHandler(event:Event):void
+ {
+ COMPILE::AS3
+ {
+ var initialView:UIBase = app.initialView as UIBase;
+ if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
+ initialView.setWidthAndHeight(Math.max(minWidth, app.stage.stageWidth),
+ Math.max(minHeight, app.stage.stageHeight), true);
+ else if (!isNaN(initialView.percentWidth))
+ initialView.setWidth(Math.max(minWidth, app.stage.stageWidth));
+ else if (!isNaN(initialView.percentHeight))
+ initialView.setHeight(Math.max(minHeight, app.stage.stageHeight));
+ }
+ COMPILE::JS
+ {
+ var initialView:UIBase = app.initialView as UIBase;
+ var element:HTMLElement = app.element;
+ if (!isNaN(initialView.percentWidth) || !isNaN(initialView.percentHeight)) {
+ element.style.height = window.innerHeight.toString() + 'px';
+ element.style.width = window.innerWidth.toString() + 'px';
+ initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
new file mode 100644
index 0000000..670f503
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserScroller.as
@@ -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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ COMPILE::AS3
+ {
+ import flash.external.ExternalInterface;
+ import flash.utils.getQualifiedClassName;
+ }
+ import org.apache.flex.events.Event;
+
+ /**
+ * The BrowserScroller class enables browser scrollbars
+ * when the application is larger than the screen.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BrowserScroller implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BrowserScroller()
+ {
+ }
+
+ private var app:Application;
+
+ /**
+ * @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
+ {
+ app = value as Application;
+ app.addEventListener("viewChanged", viewChangedHandler);
+ }
+
+ private function viewChangedHandler(event:Event):void
+ {
+ COMPILE::AS3
+ {
+ if (ExternalInterface.available)
+ {
+ // Get application name. This assumes that the wrapper is using an
+ // object tag with the id that matches the application name
+ var appName:String = getQualifiedClassName(app);
+ var js:String = "var o = document.getElementById('" + appName + "');";
+ js += "o.width = " + app.initialView.width.toString() + ";";
+ js += "o.height = " + app.initialView.height.toString() + ";"
+ ExternalInterface.call("eval", js);
+ }
+ }
+ COMPILE::JS
+ {
+ app.element.style.overflow = 'auto';
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
new file mode 100644
index 0000000..ecaf8c3
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/BrowserWindow.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.net.navigateToURL;
+ import flash.net.URLRequest;
+ }
+
+ /**
+ * The BrowserWindow class opens a new browser window.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class BrowserWindow
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BrowserWindow()
+ {
+ }
+
+ public static function open(url:String, options:String):void
+ {
+ COMPILE::AS3
+ {
+ navigateToURL(new URLRequest(url), options);
+ }
+ COMPILE::JS
+ {
+ window.open(url, options);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
new file mode 100644
index 0000000..c601fd7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSFontFaceBead.as
@@ -0,0 +1,160 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.Loader;
+ import flash.system.LoaderContext;
+ import flash.events.Event;
+ import flash.events.IOErrorEvent;
+ import flash.events.SecurityErrorEvent;
+ import flash.net.URLRequest;
+ import flash.system.ApplicationDomain;
+ import flash.utils.getQualifiedClassName;
+
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.IEventDispatcher;
+ import org.apache.flex.events.ValueEvent;
+ }
+
+ /**
+ * The CSSFontFaceBead class is the class that loads swfs
+ * of converted fonts so they can be used in Flash.
+ * It is just a stub in JS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSFontFaceBead implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSFontFaceBead()
+ {
+ }
+
+ 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;
+ COMPILE::AS3
+ {
+ IEventDispatcher(ValuesManager.valuesImpl).addEventListener("init", initHandler);
+ IEventDispatcher(_strand).addEventListener("preinitialize", preinitHandler);
+ var mainClassName:String = getQualifiedClassName(value);
+ var styleClassName:String = "_" + mainClassName + "_Styles";
+ var c:Class = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
+ requestFonts(c["fontFaces"]);
+ }
+ }
+
+ COMPILE::AS3
+ private var loaders:Array;
+
+ COMPILE::AS3
+ private function initHandler(event:ValueEvent):void
+ {
+ var fontFaces:Array = event.value as Array;
+ if (fontFaces)
+ requestFonts(fontFaces);
+ }
+
+ COMPILE::AS3
+ private function requestFonts(fontFaces:Array):void
+ {
+ if (!loaders)
+ loaders = [];
+
+ if (!fontFaces || fontFaces.length == 0)
+ {
+ IEventDispatcher(_strand).removeEventListener("preinitialize", preinitHandler);
+ return;
+ }
+
+ for each (var url:String in fontFaces)
+ {
+ // swap swf in suffix
+ var c:int = url.lastIndexOf(".");
+ url = url.substr(0, c) + ".swf";
+ var foo:Loader = new Loader();
+ var bar:URLRequest = new URLRequest(url);
+ var ctx:LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain);
+ foo.load(bar, ctx);
+ foo.name = url;
+ foo.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, completeHandler);
+ foo.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
+ foo.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
+ loaders.push(foo.contentLoaderInfo);
+ }
+ }
+
+ COMPILE::AS3
+ private function completeHandler(event:flash.events.Event):void
+ {
+ removeTarget(event.target);
+ }
+
+ COMPILE::AS3
+ private function errorHandler(event:flash.events.Event):void
+ {
+ trace("error loading font from: ", event.target.name);
+ removeTarget(event.target);
+ }
+
+ COMPILE::AS3
+ private function removeTarget(target:Object):void
+ {
+ var n:int = loaders.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ if (loaders[i] === target)
+ {
+ loaders.splice(i, 1);
+ if (loaders.length == 0)
+ IEventDispatcher(_strand).removeEventListener("preinitialize", preinitHandler);
+ break;
+ }
+ }
+ }
+
+ COMPILE::AS3
+ private function preinitHandler(event:org.apache.flex.events.Event):void
+ {
+ event.preventDefault();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
new file mode 100644
index 0000000..2c09911
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSShape.as
@@ -0,0 +1,163 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.display.Graphics;
+ import flash.display.Shape;
+
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.CSSBorderUtils;
+
+ /**
+ * The Border class is a class used internally by many
+ * controls to draw a border. The border actually drawn
+ * is dictated by the IBeadView in the CSS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class CSSShape extends Shape implements IStyleableObject, IChild
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSShape()
+ {
+ super();
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _className:String;
+
+ /**
+ * The classname. Often used for CSS
+ * class selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get className():String
+ {
+ return _className;
+ }
+
+ /**
+ * @private
+ */
+ public function set className(value:String):void
+ {
+ if (_className != value)
+ {
+ _className = value;
+ dispatchEvent(new Event("classNameChanged"));
+ }
+ }
+
+ private var _styles:Object;
+
+ /**
+ * The object that contains
+ * "styles" and other associated
+ * name-value pairs. You can
+ * also specify a string in
+ * HTML style attribute format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get style():Object
+ {
+ return _styles;
+ }
+
+ /**
+ * @private
+ */
+ public function set style(value:Object):void
+ {
+ if (_styles != value)
+ {
+ if (value is String)
+ {
+ _styles = ValuesManager.valuesImpl.parseStyles(value as String);
+ }
+ else
+ _styles = value;
+ dispatchEvent(new Event("stylesChanged"));
+ }
+ }
+
+ public var state:String;
+
+ /**
+ * Draw the contents based on styles
+ *
+ * @param width The width.
+ * @param height The height.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function draw(w:Number, h:Number):void
+ {
+ CSSBorderUtils.draw(this.graphics, w, h, this, state, true);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
new file mode 100644
index 0000000..54d2638
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSSprite.as
@@ -0,0 +1,163 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.display.Graphics;
+ import flash.display.Sprite;
+
+ import org.apache.flex.core.IChild;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.CSSBorderUtils;
+
+ /**
+ * The Border class is a class used internally by many
+ * controls to draw a border. The border actually drawn
+ * is dictated by the IBeadView in the CSS.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class CSSSprite extends Sprite implements IStyleableObject, IChild
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSSprite()
+ {
+ super();
+ }
+
+ private var _id:String;
+
+ /**
+ * An id property for MXML documents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get id():String
+ {
+ return _id;
+ }
+
+ /**
+ * @private
+ */
+ public function set id(value:String):void
+ {
+ if (_id != value)
+ {
+ _id = value;
+ dispatchEvent(new Event("idChanged"));
+ }
+ }
+
+ private var _className:String;
+
+ /**
+ * The classname. Often used for CSS
+ * class selector lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get className():String
+ {
+ return _className;
+ }
+
+ /**
+ * @private
+ */
+ public function set className(value:String):void
+ {
+ if (_className != value)
+ {
+ _className = value;
+ dispatchEvent(new Event("classNameChanged"));
+ }
+ }
+
+ private var _styles:Object;
+
+ /**
+ * The object that contains
+ * "styles" and other associated
+ * name-value pairs. You can
+ * also specify a string in
+ * HTML style attribute format.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get style():Object
+ {
+ return _styles;
+ }
+
+ /**
+ * @private
+ */
+ public function set style(value:Object):void
+ {
+ if (_styles != value)
+ {
+ if (value is String)
+ {
+ _styles = ValuesManager.valuesImpl.parseStyles(value as String);
+ }
+ else
+ _styles = value;
+ dispatchEvent(new Event("stylesChanged"));
+ }
+ }
+
+ public var state:String;
+
+ /**
+ * Draw the contents based on styles
+ *
+ * @param width The width.
+ * @param height The height.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function draw(w:Number, h:Number):void
+ {
+ CSSBorderUtils.draw(this.graphics, w, h, this, state, true);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
new file mode 100644
index 0000000..99ae97e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CSSTextField.as
@@ -0,0 +1,163 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3 {
+ import flash.text.TextField;
+ import flash.text.TextFieldAutoSize;
+ import flash.text.TextFormat;
+ }
+
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.utils.CSSUtils;
+
+ /**
+ * The CSSTextField class implements CSS text styles in a TextField.
+ * Not every CSS text style is currently supported.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class CSSTextField extends TextField
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CSSTextField()
+ {
+ super();
+ }
+
+ /**
+ * @private
+ * The styleParent property is set if the CSSTextField
+ * is used in a SimpleButton-based instance because
+ * the parent property is null, defeating CSS lookup.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var styleParent:Object;
+
+ /**
+ * @private
+ * The CSS pseudo-state for lookups.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var styleState:String;
+
+ /**
+ * @private
+ * The parentDrawsBackground property is set if the CSSTextField
+ * shouldn't draw a background
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var parentDrawsBackground:Boolean;
+
+ /**
+ * @private
+ * The parentHandlesPadding property is set if the CSSTextField
+ * shouldn't worry about padding
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var parentHandlesPadding:Boolean;
+
+ /**
+ * @private
+ */
+ override public function set text(value:String):void
+ {
+ var sp:Object = parent;
+ if (styleParent)
+ sp = styleParent;
+ sp.addEventListener("classNameChanged", updateStyles);
+
+ var tf: TextFormat = new TextFormat();
+ tf.font = ValuesManager.valuesImpl.getValue(sp, "fontFamily", styleState) as String;
+ tf.size = ValuesManager.valuesImpl.getValue(sp, "fontSize", styleState);
+ tf.bold = ValuesManager.valuesImpl.getValue(sp, "fontWeight", styleState) == "bold";
+ tf.color = CSSUtils.toColor(ValuesManager.valuesImpl.getValue(sp, "color", styleState));
+ if (!parentHandlesPadding)
+ {
+ var padding:Object = ValuesManager.valuesImpl.getValue(sp, "padding", styleState);
+ var paddingLeft:Object = ValuesManager.valuesImpl.getValue(sp,"padding-left", styleState);
+ var paddingRight:Object = ValuesManager.valuesImpl.getValue(sp,"padding-right", styleState);
+ tf.leftMargin = CSSUtils.getLeftValue(paddingLeft, padding, width);
+ tf.rightMargin = CSSUtils.getRightValue(paddingRight, padding, width);
+ }
+ var align:Object = ValuesManager.valuesImpl.getValue(sp, "text-align", styleState);
+ if (align == "center")
+ {
+ autoSize = TextFieldAutoSize.NONE;
+ tf.align = "center";
+ }
+ else if (align == "right")
+ {
+ tf.align = "right";
+ autoSize = TextFieldAutoSize.NONE;
+ }
+ if (!parentDrawsBackground)
+ {
+ var backgroundColor:Object = ValuesManager.valuesImpl.getValue(sp, "background-color", styleState);
+ if (backgroundColor != null)
+ {
+ this.background = true;
+ this.backgroundColor = CSSUtils.toColor(backgroundColor);
+ }
+ }
+ defaultTextFormat = tf;
+ super.text = value;
+ }
+
+ private function updateStyles(event:Event):void
+ {
+ // force styles to be re-calculated
+ this.text = text;
+ }
+
+ }
+
+ COMPILE::JS
+ public class CSSTextField extends TextField
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
new file mode 100644
index 0000000..64f5ea3
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/CallLaterBead.as
@@ -0,0 +1,128 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObject;
+ import flash.events.Event;
+ }
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+
+ /**
+ * The CallLater bead implements ways for
+ * a method to be called after other code has
+ * finished running.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CallLaterBead implements IBead
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function CallLaterBead()
+ {
+ 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 calls:Array;
+
+ /**
+ * Calls a function after some amount of time.
+ *
+ * CallLater works a bit differently than in
+ * the Flex SDK. The Flex SDK version was
+ * could use the Flash Player's RENDER event
+ * to try to run code before the scren was
+ * updated. Since there is no deferred rendering
+ * in HTML/JS/CSS, this version of callLater
+ * is almost always going to run after the
+ * screen is updated.
+ *
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function callLater(fn:Function, args:Array = null, thisArg:Object = null):void
+ {
+ COMPILE::AS3
+ {
+ DisplayObject(_strand).addEventListener(Event.ENTER_FRAME, enterFrameHandler);
+ }
+ if (calls == null)
+ calls = [ {thisArg: thisArg, fn: fn, args: args } ];
+ else
+ calls.push({thisArg: thisArg, fn: fn, args: args });
+
+ COMPILE::JS
+ {
+ setTimeout(makeCalls, 0);
+ }
+ }
+
+ COMPILE::AS3
+ private function enterFrameHandler(event:Event):void
+ {
+ DisplayObject(_strand).removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
+ makeCalls();
+ }
+
+ private function makeCalls():void
+ {
+ var list:Array = calls;
+ var n:int = list.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ var call:Object = list.shift();
+ var fn:Function = call.fn;
+ fn.apply(call.thisArg, call.args);
+ }
+
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassFactory.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassFactory.as
new file mode 100644
index 0000000..8b1f254
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ClassFactory.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.core
+{
+ import org.apache.flex.core.IFactory;
+
+ /**
+ * The ClassFactory class is the basic implementation
+ * of an IFactory that will generate multiple
+ * instances of item renderers or custom classes.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ClassFactory implements IFactory
+ {
+ /**
+ * The class to instantiate.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var generator:Class;
+
+ /**
+ * Initial properties assigned to each instance.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public var properties:Object;
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function ClassFactory(generator:Class=null)
+ {
+ this.generator = generator;
+ }
+
+ /**
+ * @copy score.IFactory#newInstance()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function newInstance():*
+ {
+ var obj:* = new generator();
+
+ if (properties) {
+ for (var prop:String in properties) {
+ obj[prop] = properties[prop];
+ }
+ }
+
+ return obj;
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
new file mode 100644
index 0000000..2f7186f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBase.as
@@ -0,0 +1,443 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IMXMLDocument;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.ValueChangeEvent;
+ import org.apache.flex.states.State;
+ import org.apache.flex.utils.MXMLDataInterpreter;
+
+ /**
+ * Indicates that the state change has completed. All properties
+ * that need to change have been changed, and all transitinos
+ * that need to run have completed. However, any deferred work
+ * may not be completed, and the screen may not be updated until
+ * code stops executing.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="stateChangeComplete", type="org.apache.flex.events.Event")]
+
+ /**
+ * Indicates that the initialization of the container is complete.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="initComplete", type="org.apache.flex.events.Event")]
+
+ /**
+ * Indicates that the children of the container is have been added.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ [Event(name="childrenAdded", type="org.apache.flex.events.Event")]
+
+ [DefaultProperty("mxmlContent")]
+
+ /**
+ * The ContainerBase class is the base class for most containers
+ * in FlexJS. It is usable as the root tag of MXML
+ * documents and UI controls and containers are added to it.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ContainerBase extends UIBase implements IMXMLDocument, IStatesObject, IContainer, IContentViewHost
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ContainerBase()
+ {
+ super();
+
+ _strandChildren = new ContainerBaseStrandChildren(this);
+ }
+
+ private var _strandChildren:ContainerBaseStrandChildren;
+
+ /**
+ * @private
+ */
+ public function get strandChildren():IParent
+ {
+ return _strandChildren;
+ }
+
+ /**
+ * @copy org.apache.flex.core.IParent#getElementAt()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function getElementAt(index:int):Object
+ {
+ var contentView:IParent = view as IParent;
+ if (contentView != null) {
+ return contentView.getElementAt(index);
+ } else {
+ return super.getElementAt(index);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function getElementIndex(c:Object):int
+ {
+ var contentView:IParent = view as IParent;
+ if (contentView != null) {
+ return contentView.getElementIndex(c);
+ } else {
+ return super.getElementIndex(c);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ var contentView:IParent = view as IParent;
+ if (contentView != null) {
+ contentView.addElement(c, dispatchEvent);
+ if (dispatchEvent)
+ this.dispatchEvent(new Event("childrenAdded"));
+ }
+ else {
+ super.addElement(c);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ var contentView:IParent = view as IParent;
+ if (contentView != null) {
+ contentView.addElementAt(c, index, dispatchEvent);
+ if (dispatchEvent)
+ this.dispatchEvent(new Event("childrenAdded"));
+ }
+ else {
+ super.addElementAt(c, index);
+ }
+ }
+
+ /**
+ * @private
+ */
+ override public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ var contentView:IParent = view as IParent;
+ if (contentView != null) {
+ contentView.removeElement(c, dispatchEvent);
+ if (dispatchEvent)
+ this.dispatchEvent(new Event("childrenRemoved"));
+ }
+ else {
+ super.removeElement(c);
+ }
+ }
+
+ /**
+ * @private
+ */
+ public function childrenAdded():void
+ {
+ dispatchEvent(new Event("childrenAdded"));
+ }
+
+ /**
+ * A ContainerBase doesn't create its children until it is added to
+ * a parent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ override public function addedToParent():void
+ {
+ if (!_initialized)
+ {
+ // each MXML file can also have styles in fx:Style block
+ ValuesManager.valuesImpl.init(this);
+ }
+
+ super.addedToParent();
+
+ if (!_initialized)
+ {
+ MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
+
+ dispatchEvent(new Event("initBindings"));
+ dispatchEvent(new Event("initComplete"));
+ _initialized = true;
+ }
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $numElements():int
+ {
+ return super.numElements();
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ super.addElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ super.addElementAt(c, index, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ super.removeElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $getElementIndex(c:Object):int
+ {
+ return super.getElementIndex(c);
+ }
+
+ /**
+ * @private
+ * @suppress {undefinedNames}
+ * Support strandChildren.
+ */
+ public function $getElementAt(index:int):Object
+ {
+ return super.getElementAt(index);
+ }
+
+ private var _mxmlDescriptor:Array;
+ private var _mxmlDocument:Object = this;
+ private var _initialized:Boolean;
+
+ /**
+ * @copy org.apache.flex.core.Application#MXMLDescriptor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get MXMLDescriptor():Array
+ {
+ return _mxmlDescriptor;
+ }
+
+ /**
+ * @private
+ */
+ public function setMXMLDescriptor(document:Object, value:Array):void
+ {
+ _mxmlDocument = document;
+ _mxmlDescriptor = value;
+ }
+
+ /**
+ * @copy org.apache.flex.core.Application#generateMXMLAttributes()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function generateMXMLAttributes(data:Array):void
+ {
+ MXMLDataInterpreter.generateMXMLProperties(this, data);
+ }
+
+ /**
+ * @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public var mxmlContent:Array;
+
+ 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)
+ {
+ COMPILE::AS3
+ {
+ trace(e.message);
+ }
+ }
+
+ }
+
+ /**
+ * <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/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
new file mode 100644
index 0000000..d171288
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ContainerBaseStrandChildren.as
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 ContainerBaseStrandChildren class the provides a way for advanced
+ * components to place children directly into the strand unlike the
+ * addElement() APIs on the Container which place children into the contentView.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class ContainerBaseStrandChildren implements IParent
+ {
+ /**
+ * Constructor.
+ *
+ * @flexjsignorecoercion org.apache.flex.core.ContainerBase
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function ContainerBaseStrandChildren(owner:IParent)
+ {
+ super();
+
+ this.owner = owner as ContainerBase;
+ }
+
+ public var owner:ContainerBase;
+
+ /**
+ * @private
+ */
+ public function get numElements():int
+ {
+ return owner.$numElements();
+ }
+
+ /**
+ * @private
+ */
+ public function addElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ owner.$addElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+ {
+ owner.$addElementAt(c, index, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+ {
+ owner.$removeElement(c, dispatchEvent);
+ }
+
+ /**
+ * @private
+ */
+ public function getElementIndex(c:Object):int
+ {
+ return owner.$getElementIndex(c);
+ }
+
+ /**
+ * @private
+ */
+ public function getElementAt(index:int):Object
+ {
+ return owner.$getElementAt(index);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/DataBindingBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/DataBindingBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/DataBindingBase.as
new file mode 100644
index 0000000..c096232
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/DataBindingBase.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.core
+{
+ /**
+ * The DataBindingBase class is the base class for custom data binding
+ * implementations that can be cross-compiled.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class DataBindingBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function DataBindingBase()
+ {
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
new file mode 100644
index 0000000..2fcf8dd
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/FilledRectangle.as
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.Shape;
+ }
+
+ import org.apache.flex.core.UIBase;
+
+ /**
+ * The FilledRectangle class draws a simple filled
+ * rectangle without a border and with square corners.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class FilledRectangle extends UIBase
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function FilledRectangle()
+ {
+ super();
+
+ COMPILE::AS3
+ {
+ _shape = new flash.display.Shape();
+ this.addElement(_shape);
+ }
+ }
+
+ COMPILE::AS3
+ private var _shape:flash.display.Shape;
+
+ private var _fillColor:uint = 0x000000;
+
+ /**
+ * The color of the rectangle.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get fillColor():uint
+ {
+ return _fillColor;
+ }
+
+ /**
+ * @private
+ */
+ public function set fillColor(value:uint):void
+ {
+ _fillColor = value;
+ }
+
+ /**
+ * @private
+ */
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+ drawRect(0, 0, this.width, this.height);
+ }
+
+ /**
+ * 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
+ */
+ public function drawRect(x:Number, y:Number, width:Number, height:Number):void
+ {
+ COMPILE::AS3
+ {
+ _shape.graphics.clear();
+ _shape.graphics.beginFill(_fillColor);
+ _shape.graphics.drawRect(x, y, width, height);
+ _shape.graphics.endFill();
+ }
+ COMPILE::JS
+ {
+ element.style.position = 'absolute';
+ element.style.backgroundColor = '#' + _fillColor.toString(16);
+ if (!isNaN(x)) this.x = x;
+ if (!isNaN(y)) this.y = y;
+ if (!isNaN(width)) this.width = width;
+ if (!isNaN(height)) this.height = height;
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
new file mode 100644
index 0000000..bc8e224
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/HTMLElementWrapper.as
@@ -0,0 +1,247 @@
+package org.apache.flex.core
+{
+ COMPILE::AS3
+ {
+ import flash.display.Sprite;
+ }
+
+ COMPILE::JS
+ {
+ import window.Event;
+ import org.apache.flex.events.Event;
+ import org.apache.flex.events.BrowserEvent;
+ import org.apache.flex.events.ElementEvents;
+ import org.apache.flex.events.EventDispatcher;
+ import goog.events;
+ import goog.events.EventTarget;
+ }
+
+ COMPILE::AS3
+ public class HTMLElementWrapper extends Sprite
+ {
+ /**
+ * "abstract" method so we can override in JS
+ * @param bead The new bead.
+ */
+ public function addBead(bead:IBead):void
+ {
+ }
+ }
+
+ COMPILE::JS
+ public class HTMLElementWrapper extends EventDispatcher implements IStrand
+ {
+
+ //--------------------------------------
+ // Static Function
+ //--------------------------------------
+
+ /**
+ * @param listener The listener object to call {goog.events.Listener}.
+ * @param eventObject The event object to pass to the listener.
+ * @return Result of listener.
+ */
+ static public function fireListenerOverride(listener:Object, eventObject:BrowserEvent):Boolean
+ {
+ var e:BrowserEvent = new BrowserEvent();
+ e.wrappedEvent = eventObject;
+ return HTMLElementWrapper.googFireListener(listener, e);
+ }
+
+ /**
+ * Static initializer
+ */
+ static public function installOverride():Boolean
+ {
+ HTMLElementWrapper.googFireListener = goog.events.fireListener;
+ goog.events.fireListener = HTMLElementWrapper.fireListenerOverride;
+ return true;
+ }
+
+ //--------------------------------------
+ // Static Property
+ //--------------------------------------
+
+ static public var googFireListener:Function;
+
+ /**
+ * The properties that triggers the static initializer.
+ * Note, in JS, this property has to be declared
+ * after the installOverride.
+ */
+ static public var installedOverride:Boolean = installOverride();
+
+ //--------------------------------------
+ // Property
+ //--------------------------------------
+
+ private var _element:WrappedHTMLElement;
+
+ public function get element():WrappedHTMLElement
+ {
+ return _element;
+ }
+
+ public function set element(value:WrappedHTMLElement):void
+ {
+ _element = value;
+ }
+
+ /**
+ * allow access from overrides
+ */
+ protected var _model:IBeadModel;
+
+ /**
+ * @flexjsignorecoercion Class
+ * @flexjsignorecoercion org.apache.flex.core.IBeadModel
+ */
+ public function get model():Object
+ {
+ if (_model == null)
+ {
+ // addbead will set _model
+ var m:Class = org.apache.flex.core.ValuesManager.valuesImpl.
+ getValue(this, 'iBeadModel') as Class;
+ var b:IBeadModel = new m() as IBeadModel;
+ addBead(b);
+ }
+ return _model;
+ }
+
+ public function set model(value:Object):void
+ {
+ if (_model != value)
+ {
+ addBead(value as IBead);
+ dispatchEvent(new org.apache.flex.events.Event("modelChanged"));
+ }
+ }
+
+ protected var _beads:Vector.<IBead>;
+
+ //--------------------------------------
+ // Function
+ //--------------------------------------
+
+ /**
+ * @param bead The new bead.
+ */
+ 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;
+ }
+
+ /**
+ * @param classOrInterface The requested bead type.
+ * @return The bead.
+ */
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ var bead:IBead, i:uint, n:uint;
+
+ if (!_beads) return null;
+
+ n = _beads.length;
+
+ for (i = 0; i < n; i++)
+ {
+ bead = _beads[i];
+
+ if (bead is classOrInterface)
+ {
+ return bead;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @param bead The bead to remove.
+ * @return The bead.
+ */
+ public function removeBead(bead:IBead):IBead
+ {
+ var i:uint, n:uint, value:Object;
+
+ n = _beads.length;
+
+ for (i = 0; i < n; i++)
+ {
+ value = _beads[i];
+
+ if (bead === value)
+ {
+ _beads.splice(i, 1);
+
+ return bead;
+ }
+ }
+
+ return null;
+ }
+
+ override public function addEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void
+ {
+ var source:Object = getActualDispatcher_(type);
+ goog.events.listen(source, type, handler);
+ }
+
+ override public function removeEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void
+ {
+ var source:Object = getActualDispatcher_(type);
+ goog.events.unlisten(source, type, handler);
+ }
+
+ private function getActualDispatcher_(type:String):Object
+ {
+ var source:Object = this;
+ if (ElementEvents.elementEvents[type]) {
+ // mouse and keyboard events also dispatch off the element.
+ source = this.element;
+ }
+ return source;
+ }
+
+ override public function hasEventListener(type:String):Boolean
+ {
+ var source:Object = this.getActualDispatcher_(type);
+
+ return goog.events.hasListener(source, type);
+ }
+
+ override public function dispatchEvent(e:Object):Boolean
+ {
+ var t:String;
+ if (typeof(e) === 'string') {
+ t = e as String;
+ if (e === 'change')
+ e = new window.Event(t);
+ }
+ else {
+ t = e.type;
+ if (ElementEvents.elementEvents[t]) {
+ e = new window.Event(t);
+ }
+ }
+ var source:Object = this.getActualDispatcher_(t);
+ if (source == this)
+ return super.dispatchEvent(e);
+
+ return source.dispatchEvent(e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IAlertModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IAlertModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IAlertModel.as
new file mode 100644
index 0000000..75ba6d0
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IAlertModel.as
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IAlertModel interface describes the minimum set of properties
+ * available to an Alert control. More sophisticated Alert controls
+ * could have models that extend IAlertModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IAlertModel extends IEventDispatcher, IBeadModel
+ {
+ /**
+ * The title of the Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get title():String;
+ function set title(value:String):void;
+
+ /**
+ * The title of the Alert as HTML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get htmlTitle():String;
+ function set htmlTitle(value:String):void;
+
+ /**
+ * The message to be displayed by the Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get message():String;
+ function set message(value:String):void;
+
+ /**
+ * The message to be displayed by the Alert as HTML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get htmlMessage():String;
+ function set htmlMessage(value:String):void;
+
+ /**
+ * A bitmask of Alert constants that describe
+ * which buttons to show in the Alert..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get flags():uint;
+ function set flags(value:uint):void;
+
+ /**
+ * The label for the OK button in an Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get okLabel():String;
+ function set okLabel(value:String):void;
+
+ /**
+ * The label for the Cancel button in an Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get cancelLabel():String;
+ function set cancelLabel(value:String):void;
+
+ /**
+ * The label for the Yes button in an Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get yesLabel():String;
+ function set yesLabel(value:String):void;
+
+ /**
+ * The label for the No button in an Alert.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get noLabel():String;
+ function set noLabel(value:String):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IApplicationView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IApplicationView.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IApplicationView.as
new file mode 100755
index 0000000..c4eab58
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IApplicationView.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.core
+{
+ /**
+ * The IApplicationView interface is the interface for main
+ * view of the application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IApplicationView extends IUIBase, IStatesObject
+ {
+ /**
+ * The application model.
+ *
+ * @param value The subcomponent to add.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set applicationModel(value:Object):void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBead.as
new file mode 100644
index 0000000..c0c8991
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBead.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.core
+{
+ /**
+ * The IBead interface is the basic interface for plug-ins known as Beads.
+ * In FlexJS, the recommended pattern is to break out optional functionality
+ * into small plug-ins that can be re-used in other components, or replaced with
+ * different implementations optimized for different things such as size,
+ * performance, advanced features, debugging, etc.
+ *
+ * Beads are told what host component or "strand" they ae attached to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IBead
+ {
+ /**
+ * The host component for this bead.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set strand(value:IStrand):void
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadController.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadController.as
new file mode 100644
index 0000000..6dbe0a1
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadController.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.core
+{
+ /**
+ * The IBeadController interface is a "marker" interface for beads that
+ * are controllers. A marker interface has no addtional APIs.
+ * It is used to find the controller on the strand via calls to getBeadByType.
+ *
+ * @see org.apache.flex.core.IStrand#getBeadByType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IBeadController extends IBead
+ {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadLayout.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadLayout.as
new file mode 100644
index 0000000..a0dba9d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadLayout.as
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IBeadLayout interface is a "marker" interface for beads that
+ * manage the layout for a control. A marker interface has no addtional APIs.
+ * It is used to find the layout bead on the strand via calls to getBeadByType.
+ *
+ * @see org.apache.flex.core.IStrand#getBeadByType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IBeadLayout extends IBead
+ {
+ /**
+ * @return true if size changed
+ */
+ function layout():Boolean;
+ }
+}
[15/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridModel.as
deleted file mode 100644
index 5ac0584..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridModel.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 org.apache.flex.core
-{
- /**
- * The IDataGridModel interface describes the minimum set of properties
- * available to an DataGrid control. More sophisticated DataGrid controls
- * could have models that extend IDataGridModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDataGridModel extends ISelectionModel
- {
- /**
- * The set of DataGridColumns.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get columns():Array;
- function set columns(value:Array):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridPresentationModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridPresentationModel.as
deleted file mode 100644
index 7307148..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataGridPresentationModel.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.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IDataGridPresentationModel interfaces defines the data needed to
- * present a DataGrid.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDataGridPresentationModel extends IListPresentationModel
- {
- /**
- * The labels used for each column.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get columnLabels():Array;
- function set columnLabels(value:Array):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDataProviderItemRendererMapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataProviderItemRendererMapper.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDataProviderItemRendererMapper.as
deleted file mode 100644
index 20afbee..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDataProviderItemRendererMapper.as
+++ /dev/null
@@ -1,52 +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.IBead;
- import org.apache.flex.core.IItemRendererClassFactory;
-
- /**
- * The IDataProviderItemRendererMapper interface is the interface for beads
- * that know how to iterate through a dataProvider, generate item renderers,
- * and assign items from the dataProvider to those item renderers. In FlexJS,
- * a wide range of data providers are allowed, from simple Arrays and Vectors
- * on up to sophisticated data structures that dispatch change events.
- * Different IDataProviderItemRendererMapper implements are often required to
- * iterate through those different data structures.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDataProviderItemRendererMapper extends IBead
- {
- /**
- * IDataProviderItemRendererMapper use an IItemRendererClassFactory
- * to generate instances of item renderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get itemRendererFactory():IItemRendererClassFactory;
- function set itemRendererFactory(value:IItemRendererClassFactory):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDateChooserModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDateChooserModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDateChooserModel.as
deleted file mode 100644
index 7dea245..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDateChooserModel.as
+++ /dev/null
@@ -1,101 +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.IEventDispatcher;
-
- /**
- * The IDateChooserModel interface.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDateChooserModel extends IEventDispatcher, IBeadModel
- {
- /**
- * An array of strings used to name the days of the week with Sunday being the
- * first element of the array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get dayNames():Array;
- function set dayNames(value:Array):void;
-
- /**
- * An array of strings used to name the months of the year with January being
- * the first element of the array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get monthNames():Array;
- function set monthNames(value:Array):void;
-
- /**
- * The year currently displayed by the DateChooser.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get displayedYear():Number;
- function set displayedYear(value:Number):void;
-
- /**
- * The month currently displayed by the DateChooser.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get displayedMonth():Number;
- function set displayedMonth(value:Number):void;
-
- /**
- * The index of the first day of the week, Sunday = 0.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get firstDayOfWeek():Number;
- function set firstDayOfWeek(value:Number):void;
-
- /**
- * The currently selected date or null if no date has been selected.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedDate():Date;
- function set selectedDate(value:Date):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDocument.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDocument.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDocument.as
deleted file mode 100644
index 4eaab4e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDocument.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.core
-{
- /**
- * The IDocument interface is the basic interface for objects that can be
- * tags in an MXML document and need to know about the host document. It is
- * similar to the IMXMLObject interface in the Flex SDK.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDocument
- {
- /**
- * This method is called to notify an instance of what MXML document
- * it belongs to, if any, and what its assigned id is in that
- * document, if any.
- *
- * @param document The MXML document that hosts this component.
- * @param id The optional id of the component in the document.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setDocument(document:Object, id:String = null):void
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IDragInitiator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IDragInitiator.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IDragInitiator.as
deleted file mode 100644
index fa4ae22..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IDragInitiator.as
+++ /dev/null
@@ -1,67 +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 IDragInitiator interface is the basic interface for the object that
- * wants to know if a drop was accepted in a drag/drop operation.
- *
- * There are two methods instead of the usual one because in some scenarios
- * the drag initiator needs to prepare the data before it gets dropped.
- * For example, in a tree control, dragging from one node to another,
- * the tree should un-parent the node before it is moved to the
- * new parent node, so the tree would un-parent the node in acceptingDrop.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IDragInitiator
- {
- /**
- * This method is called to notify the dragInitiator
- * that you want to accept a drop.
- *
- * @param type The type of drop accepted. Allowed
- * values are in org.apache.flex.core.DropType.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function acceptingDrop(dropTarget:Object, type:String):void
-
- /**
- * This method is called to notify the dragInitiator
- * that you have accepted the drop.
- *
- * @param type The type of drop accepted. Allowed
- * values are in org.apache.flex.core.DropType.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function acceptedDrop(dropTarget:Object, type:String):void
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IEffectTimer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IEffectTimer.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IEffectTimer.as
deleted file mode 100644
index 7affda2..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IEffectTimer.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IEffectTimer interface is the basic interface for the
- * class that updates effects like tweens. Different
- * IEffectTimer implementations are tuned for various
- * runtime environments like mobile, Flash, desktop,
- * or even automated testing where the currentTime is
- * controlled so the animation updates its target at
- * predictable positions on the screen.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IEffectTimer extends IEventDispatcher
- {
- /**
- * Start getting update events.
- *
- * @return The current time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function start():int;
-
- /**
- * Stop getting update events. Current time
- * should theoretically keep advancing, but events
- * are not dispatched so most implementations
- * stop the platform timer (which can save battery
- * on mobile devices) because they know that
- * when start() is called they have a way of
- * getting the updated current time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function stop():void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IFactory.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IFactory.as
deleted file mode 100644
index 3a9665e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IFactory.as
+++ /dev/null
@@ -1,46 +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 IFactory interface is the basic interface used as the
- * type for properties that specify a factory for item renderers
- * and other scenarios where multiple copies of a custom
- * class are generated.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IFactory
- {
- /**
- * This method is called to generate a new instance of
- * an item renderer or other custom class.
- *
- * @return A new instance of an item renderer or other custom class.
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function newInstance():*;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexInfo.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexInfo.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexInfo.as
deleted file mode 100644
index e89da6f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexInfo.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.core
-{
- /**
- * The IFlexInfo interface is an interface used to signal to the compiler
- * that it should generate a data structure that contains information
- * about the application such as its size, mixins, locale, etc.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IFlexInfo
- {
- /**
- * The compiler overrides this getter to provide the data structure.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function info():Object
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexJSElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexJSElement.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexJSElement.as
deleted file mode 100644
index ae0cdb1..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IFlexJSElement.as
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.apache.flex.core
-{
- COMPILE::AS3
- public interface IFlexJSElement
- {
-
- }
-
- COMPILE::JS
- public interface IFlexJSElement
- {
-
- //--------------------------------------
- // Property
- //--------------------------------------
-
- /**
- * A pointer back to the instance that wrapped this element.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- //function get flexjs_wrapper():Object;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IFormatBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IFormatBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IFormatBead.as
deleted file mode 100644
index 016642b..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IFormatBead.as
+++ /dev/null
@@ -1,69 +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.IEventDispatcher;
-
- /**
- * The IFormatBead interface should be implemented by any bead that
- * provides a formatting service. When the bead instance is created it
- * should listen for change events and set its formattedString property
- * for later retrieveal.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IFormatBead extends IBead, IEventDispatcher
- {
- /**
- * The name of the property for the source to be formatted.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get propertyName():String;
- function set propertyName(value:String):void;
-
- /**
- * The name of the event to listen for, indicating that propertyName
- * property has changed. The default event is propertyName+"Changed".
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get eventName():String;
- function set eventName(value:String):void;
-
- /**
- * The formatted result.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get formattedString():String;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IImageModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IImageModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IImageModel.as
deleted file mode 100644
index 1551d0f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IImageModel.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.core
-{
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The IImageModel interface describes the minimum set of properties
- * available to an Image control. More sophisticated Image controls
- * could have models that extend IImageModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IImageModel extends IEventDispatcher, IBeadModel
- {
- /**
- * The source URL for the image. Embedding images is not
- * recommended for FlexJS as there is no embedding support
- * in the browsers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get source():String;
- function set source(value:String):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRenderer.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRenderer.as
deleted file mode 100644
index 7843e36..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRenderer.as
+++ /dev/null
@@ -1,57 +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.IEventDispatcher;
-
- /**
- * The IItemRenderer interface is the basic interface for item renderers.
- * More complex item renderers may implements extensions of this interface.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IItemRenderer extends IEventDispatcher
- {
- /**
- * The data item to be displayed by the item renderer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get data():Object;
- function set data(value:Object):void;
-
- /**
- * The parent component of the itemRenderer instance. This is the container that houses
- * all of the itemRenderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get itemRendererParent():Object;
- function set itemRendererParent(value:Object):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererClassFactory.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererClassFactory.as
deleted file mode 100644
index a12c1e5..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererClassFactory.as
+++ /dev/null
@@ -1,60 +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 IItemRendererClassFactory interface is the basic interface for beads
- * that generate instances of IItemRenderers. Note that this is not the same
- * as an org.apache.flex.core.IFactory which is a lower-level interface for generating
- * an instance of just about anything. IItemRendererClassFactory implementations
- * often use IFactory to generate the actual item renderer instance, but
- * the IItemRendererClassFactory bead allows for more computation about which
- * renderer to instantiate. For example, the default implementation
- * in org.apache.flex.core.ItemRendererClassFactory checks for an itemRenderer
- * property on the strand, then looks for a default definition in CSS, but
- * also handles the renderer being defined in MXML in sub tags of the
- * ItemRendererClassFactory. Other more advanced implementations could
- * return different renderers based on the data item's type.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IItemRendererClassFactory extends IBead
- {
- // TODO: add additional parameters like the data item and index
- /**
- * This method is called to generate another instance of an item renderer
- * and attach it to the given parent.
- *
- * @param parent The parent of the item renderer.
- * @return The item renderer.
- *
- * @see org.apache.flex.core.IItemRendererParent
- * @see org.apache.flex.core.IItemRenderer
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function createItemRenderer(parent:IItemRendererParent):IItemRenderer;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererParent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererParent.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererParent.as
deleted file mode 100644
index 18656ef..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererParent.as
+++ /dev/null
@@ -1,52 +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.IEventDispatcher;
-
- /**
- * The IItemRendererParent interface is the basic interface for the
- * container that parents item renderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IItemRendererParent extends IParent, IEventDispatcher
- {
- /**
- * The IItemRendererParent interface is the basic interface for the
- * container that parents item renderers.
- *
- * @param index The index of the data item.
- * @return The item renderer for the data item.
- *
- * @see org.apache.flex.core.IItemRenderer
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getItemRendererForIndex(index:int):IItemRenderer;
- function removeAllElements():void;
- function updateAllItemRenderers():void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererProvider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererProvider.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererProvider.as
deleted file mode 100644
index 0e85c14..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IItemRendererProvider.as
+++ /dev/null
@@ -1,58 +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.IFactory;
-
- /**
- * The IItemRendererProvider interface is implemented by classes that
- * provide a ClassFactory for itemRenderers.
- *
- * @see org.apache.flex.core.IItemRenderer
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IItemRendererProvider
- {
- /**
- * Returns whether or not the class has an itemRenderer set.
- * @return true if the itemRenderer has been set, false otherwise.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get hasItemRenderer():Boolean;
-
- /**
- * Returns the class factory that will generate instances of the itemRenderer.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get itemRenderer():IFactory;
- function set itemRenderer(value:IFactory):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutChild.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutChild.as
deleted file mode 100755
index dc710ef..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutChild.as
+++ /dev/null
@@ -1,175 +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
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObjectContainer;
- }
-
- /**
- * The IChild interface is the basic interface for a
- * component that is parented by another component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ILayoutChild extends IChild, IUIBase
- {
- /**
- * The requested percentage width of
- * this component in its container.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get percentWidth():Number;
- function set percentWidth(value:Number):void;
-
- /**
- * The requested percentage height of
- * this component in its container.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get percentHeight():Number;
- function set percentHeight(value:Number):void;
-
- /**
- * The width of this component
- * if set by the width property
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get explicitWidth():Number;
-
- /**
- * The height of this component
- * if set by the height property
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get explicitHeight():Number;
-
- /**
- * Sets the height of the component without
- * setting explicitHeight.
- *
- * @param value The new height.
- * @param noEvent True if no change event should be sent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setHeight(value:Number, noEvent:Boolean = false):void;
-
- /**
- * Sets the width of the component without
- * setting explicitWidth.
- *
- * @param value The new width.
- * @param noEvent True if no change event should be sent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setWidth(value:Number, noEvent:Boolean = false):void;
-
- /**
- * Sets the X value of the component without setting the 'left' style
- *
- * @param value The new x value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setX(value:Number):void;
-
- /**
- * Sets the Y value of the component without setting the 'top' style
- *
- * @param value The new y value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setY(value:Number):void;
-
- /**
- * Sets the width and height of the component
- * without setting explicitWidth or explicitHeight.
- * It also sends one change event. If both
- * values change it only sends heightCHange event.
- *
- * @param newWidth The new width.
- * @param newHeight The new height.
- * @param noEvent True if no change event should be sent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void;
-
- /**
- * True if no percentWidth or explicitWidth has been
- * assigned
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function isWidthSizedToContent():Boolean;
-
- /**
- * True if no percentHeight or explicitHeight has been
- * assigned
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function isHeightSizedToContent():Boolean;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutHost.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutHost.as
deleted file mode 100644
index 3f36723..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ILayoutHost.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 org.apache.flex.core
-{
- /**
- * The ILayoutHost interface is the basic interface for the
- * container views that have an IBeadLayout. The layout implementation
- * often needs to know certain things about other objects in
- * the view.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface ILayoutHost
- {
- /**
- * The container that parents all of the content.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get contentView():IParentIUIBase;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IListPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IListPresentationModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IListPresentationModel.as
deleted file mode 100644
index 445c3b4..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IListPresentationModel.as
+++ /dev/null
@@ -1,54 +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 IListPresentationModel interface holds key values for the display
- * of lists.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IListPresentationModel extends IBead
- {
- /**
- * The height of every row in the list.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get rowHeight():Number;
- function set rowHeight(value:Number):void;
-
- /**
- * The distance each row should be separated from the row above.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get separatorThickness():Number;
- function set separatorThickness(value:Number):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IMXMLDocument.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IMXMLDocument.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IMXMLDocument.as
deleted file mode 100644
index 6e31769..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IMXMLDocument.as
+++ /dev/null
@@ -1,66 +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 IMXMLDocument interface is an interface for a component that
- * supports being written in MXML.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IMXMLDocument
- {
- /**
- * @copy org.apache.flex.core.Application#MXMLDescriptor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get MXMLDescriptor():Array;
-
- /**
- * Set the descriptor for this MXML component
- *
- * @param document The MXML document.
- * @param value The descriptor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function setMXMLDescriptor(document:Object, value:Array):void;
-
- /**
- * @copy org.apache.flex.core.Application#generateMXMLAttributes()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function generateMXMLAttributes(data:Array):void
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IMeasurementBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IMeasurementBead.as
deleted file mode 100644
index 1722c2d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IMeasurementBead.as
+++ /dev/null
@@ -1,53 +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 IMeasurementBead interface is the basic interface for the
- * bead that can compute and report the measurements of the contents of
- * a component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IMeasurementBead extends IBead
- {
- /**
- * The measured width.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get measuredWidth():Number;
-
- /**
- * The measured height
.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get measuredHeight():Number;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IPanelModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IPanelModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IPanelModel.as
deleted file mode 100644
index 02ece38..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IPanelModel.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.core
-{
- /**
- * The IPanelModel interface describes the minimum set of properties
- * available to a Panel control. More sophisticated Panel controls
- * could have models that extend IPanelModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IPanelModel extends IBeadModel, ITitleBarModel
- {
- /**
- * The items in the org.apache.flex.html.ControlBar. Setting this property automatically
- * causes the ControlBar to display if you are using a View bead that supports it.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get controlBar():Array;
- function set controlBar(value:Array):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IParent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IParent.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IParent.as
deleted file mode 100755
index 2b49278..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IParent.as
+++ /dev/null
@@ -1,109 +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 IParent interface is the basic interface for a
- * component that contains subcomponents, including the
- * application class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IParent
- {
- /**
- * Add a component to the parent.
- *
- * @param c The subcomponent to add.
- * @param dispatchEvent Whether to dispatch an event after adding the child.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function addElement(c:Object, dispatchEvent:Boolean = true):void;
-
- /**
- * Add a component to the parent.
- *
- * @param c The subcomponent to add.
- * @param c The index where the subcomponent should be added.
- * @param dispatchEvent Whether to dispatch an event after adding the child.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void;
-
- /**
- * Gets the index of this subcomponent.
- *
- * @param c The subcomponent to add.
- * @return The index (zero-based).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getElementIndex(c:Object):int;
-
- /**
- * Remove a component from the parent.
- *
- * @param c The subcomponent to remove.
- * @param dispatchEvent Whether to dispatch an event after removing the child.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function removeElement(c:Object, dispatchEvent:Boolean = true):void;
-
- /**
- * The number of elements in the parent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get numElements():int;
-
- /**
- * Get a component from the parent.
- *
- * @param c The index of the subcomponent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function getElementAt(index:int):Object;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IParentIUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IParentIUIBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IParentIUIBase.as
deleted file mode 100755
index a262c36..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IParentIUIBase.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.core
-{
- /**
- * The IParentIUIBase interface is a convenience interface
- * for IUIBase components that contains subcomponents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IParentIUIBase extends IParent, IUIBase
- {
- COMPILE::JS
- {
- function internalChildren():Array;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUp.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUp.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUp.as
deleted file mode 100644
index 0ffc3b1..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUp.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.core
-{
- /**
- * The IPopUp interface is a "marker" interface for a component that
- * should be floated above other components that aren't an IPopUp.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IPopUp
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUpHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUpHost.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUpHost.as
deleted file mode 100755
index 65f1334..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IPopUpHost.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.core
-{
- /**
- * The IPopUpHost interface is a "marker" interface for a component that
- * parents components that implement IPopUp.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IPopUpHost extends IParent
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IRangeModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IRangeModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IRangeModel.as
deleted file mode 100644
index 42bf02a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IRangeModel.as
+++ /dev/null
@@ -1,95 +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 IRangeModel interface describes the minimum set of properties
- * available to control that let the user select from within a
- * range of numbers like NumericStepper and Slider. More sophisticated controls
- * could have models that extend IRangeModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IRangeModel extends IBeadModel
- {
- /**
- * The maximum value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get maximum():Number;
- function set maximum(value:Number):void;
-
- /**
- * The minimum value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get minimum():Number;
- function set minimum(value:Number):void;
-
- /**
- * The interval that the value is rounded to
- * when the user is drag selecting the value
- * or entering an arbitrary value. For example,
- * if the snapInterval is 0.5, then only integers
- * and values endnig in 0.5 are selectable.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get snapInterval():Number;
- function set snapInterval(value:Number):void;
-
- /**
- * The change in value by which the increment
- * and decrement buttons and arrow keys will
- * affect the curent value..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get stepSize():Number;
- function set stepSize(value:Number):void;
-
- /**
- * The current value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get value():Number;
- function set value(value:Number):void;
-}
-}
[16/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/CSSSprite.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSSprite.as b/frameworks/projects/Core/as/src/org/apache/flex/core/CSSSprite.as
deleted file mode 100644
index 54d2638..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSSprite.as
+++ /dev/null
@@ -1,163 +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 flash.display.Graphics;
- import flash.display.Sprite;
-
- import org.apache.flex.core.IChild;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.CSSBorderUtils;
-
- /**
- * The Border class is a class used internally by many
- * controls to draw a border. The border actually drawn
- * is dictated by the IBeadView in the CSS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class CSSSprite extends Sprite implements IStyleableObject, IChild
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSSprite()
- {
- super();
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _className:String;
-
- /**
- * The classname. Often used for CSS
- * class selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get className():String
- {
- return _className;
- }
-
- /**
- * @private
- */
- public function set className(value:String):void
- {
- if (_className != value)
- {
- _className = value;
- dispatchEvent(new Event("classNameChanged"));
- }
- }
-
- private var _styles:Object;
-
- /**
- * The object that contains
- * "styles" and other associated
- * name-value pairs. You can
- * also specify a string in
- * HTML style attribute format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get style():Object
- {
- return _styles;
- }
-
- /**
- * @private
- */
- public function set style(value:Object):void
- {
- if (_styles != value)
- {
- if (value is String)
- {
- _styles = ValuesManager.valuesImpl.parseStyles(value as String);
- }
- else
- _styles = value;
- dispatchEvent(new Event("stylesChanged"));
- }
- }
-
- public var state:String;
-
- /**
- * Draw the contents based on styles
- *
- * @param width The width.
- * @param height The height.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function draw(w:Number, h:Number):void
- {
- CSSBorderUtils.draw(this.graphics, w, h, this, state, true);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSTextField.as b/frameworks/projects/Core/as/src/org/apache/flex/core/CSSTextField.as
deleted file mode 100644
index 99ae97e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSTextField.as
+++ /dev/null
@@ -1,163 +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
-{
- COMPILE::AS3 {
- import flash.text.TextField;
- import flash.text.TextFieldAutoSize;
- import flash.text.TextFormat;
- }
-
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.CSSUtils;
-
- /**
- * The CSSTextField class implements CSS text styles in a TextField.
- * Not every CSS text style is currently supported.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class CSSTextField extends TextField
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSTextField()
- {
- super();
- }
-
- /**
- * @private
- * The styleParent property is set if the CSSTextField
- * is used in a SimpleButton-based instance because
- * the parent property is null, defeating CSS lookup.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var styleParent:Object;
-
- /**
- * @private
- * The CSS pseudo-state for lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var styleState:String;
-
- /**
- * @private
- * The parentDrawsBackground property is set if the CSSTextField
- * shouldn't draw a background
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var parentDrawsBackground:Boolean;
-
- /**
- * @private
- * The parentHandlesPadding property is set if the CSSTextField
- * shouldn't worry about padding
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var parentHandlesPadding:Boolean;
-
- /**
- * @private
- */
- override public function set text(value:String):void
- {
- var sp:Object = parent;
- if (styleParent)
- sp = styleParent;
- sp.addEventListener("classNameChanged", updateStyles);
-
- var tf: TextFormat = new TextFormat();
- tf.font = ValuesManager.valuesImpl.getValue(sp, "fontFamily", styleState) as String;
- tf.size = ValuesManager.valuesImpl.getValue(sp, "fontSize", styleState);
- tf.bold = ValuesManager.valuesImpl.getValue(sp, "fontWeight", styleState) == "bold";
- tf.color = CSSUtils.toColor(ValuesManager.valuesImpl.getValue(sp, "color", styleState));
- if (!parentHandlesPadding)
- {
- var padding:Object = ValuesManager.valuesImpl.getValue(sp, "padding", styleState);
- var paddingLeft:Object = ValuesManager.valuesImpl.getValue(sp,"padding-left", styleState);
- var paddingRight:Object = ValuesManager.valuesImpl.getValue(sp,"padding-right", styleState);
- tf.leftMargin = CSSUtils.getLeftValue(paddingLeft, padding, width);
- tf.rightMargin = CSSUtils.getRightValue(paddingRight, padding, width);
- }
- var align:Object = ValuesManager.valuesImpl.getValue(sp, "text-align", styleState);
- if (align == "center")
- {
- autoSize = TextFieldAutoSize.NONE;
- tf.align = "center";
- }
- else if (align == "right")
- {
- tf.align = "right";
- autoSize = TextFieldAutoSize.NONE;
- }
- if (!parentDrawsBackground)
- {
- var backgroundColor:Object = ValuesManager.valuesImpl.getValue(sp, "background-color", styleState);
- if (backgroundColor != null)
- {
- this.background = true;
- this.backgroundColor = CSSUtils.toColor(backgroundColor);
- }
- }
- defaultTextFormat = tf;
- super.text = value;
- }
-
- private function updateStyles(event:Event):void
- {
- // force styles to be re-calculated
- this.text = text;
- }
-
- }
-
- COMPILE::JS
- public class CSSTextField extends TextField
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/CallLaterBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/CallLaterBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/CallLaterBead.as
deleted file mode 100644
index 64f5ea3..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/CallLaterBead.as
+++ /dev/null
@@ -1,128 +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
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObject;
- import flash.events.Event;
- }
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IStrand;
-
- /**
- * The CallLater bead implements ways for
- * a method to be called after other code has
- * finished running.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CallLaterBead implements IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CallLaterBead()
- {
- 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 calls:Array;
-
- /**
- * Calls a function after some amount of time.
- *
- * CallLater works a bit differently than in
- * the Flex SDK. The Flex SDK version was
- * could use the Flash Player's RENDER event
- * to try to run code before the scren was
- * updated. Since there is no deferred rendering
- * in HTML/JS/CSS, this version of callLater
- * is almost always going to run after the
- * screen is updated.
- *
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function callLater(fn:Function, args:Array = null, thisArg:Object = null):void
- {
- COMPILE::AS3
- {
- DisplayObject(_strand).addEventListener(Event.ENTER_FRAME, enterFrameHandler);
- }
- if (calls == null)
- calls = [ {thisArg: thisArg, fn: fn, args: args } ];
- else
- calls.push({thisArg: thisArg, fn: fn, args: args });
-
- COMPILE::JS
- {
- setTimeout(makeCalls, 0);
- }
- }
-
- COMPILE::AS3
- private function enterFrameHandler(event:Event):void
- {
- DisplayObject(_strand).removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
- makeCalls();
- }
-
- private function makeCalls():void
- {
- var list:Array = calls;
- var n:int = list.length;
- for (var i:int = 0; i < n; i++)
- {
- var call:Object = list.shift();
- var fn:Function = call.fn;
- fn.apply(call.thisArg, call.args);
- }
-
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ClassFactory.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ClassFactory.as
deleted file mode 100644
index 8b1f254..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ClassFactory.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.core
-{
- import org.apache.flex.core.IFactory;
-
- /**
- * The ClassFactory class is the basic implementation
- * of an IFactory that will generate multiple
- * instances of item renderers or custom classes.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ClassFactory implements IFactory
- {
- /**
- * The class to instantiate.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var generator:Class;
-
- /**
- * Initial properties assigned to each instance.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var properties:Object;
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function ClassFactory(generator:Class=null)
- {
- this.generator = generator;
- }
-
- /**
- * @copy score.IFactory#newInstance()
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function newInstance():*
- {
- var obj:* = new generator();
-
- if (properties) {
- for (var prop:String in properties) {
- obj[prop] = properties[prop];
- }
- }
-
- return obj;
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBase.as
deleted file mode 100644
index 2f7186f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBase.as
+++ /dev/null
@@ -1,443 +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.IMXMLDocument;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.states.State;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- /**
- * Indicates that the state change has completed. All properties
- * that need to change have been changed, and all transitinos
- * that need to run have completed. However, any deferred work
- * may not be completed, and the screen may not be updated until
- * code stops executing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="stateChangeComplete", type="org.apache.flex.events.Event")]
-
- /**
- * Indicates that the initialization of the container is complete.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="initComplete", type="org.apache.flex.events.Event")]
-
- /**
- * Indicates that the children of the container is have been added.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="childrenAdded", type="org.apache.flex.events.Event")]
-
- [DefaultProperty("mxmlContent")]
-
- /**
- * The ContainerBase class is the base class for most containers
- * in FlexJS. It is usable as the root tag of MXML
- * documents and UI controls and containers are added to it.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ContainerBase extends UIBase implements IMXMLDocument, IStatesObject, IContainer, IContentViewHost
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ContainerBase()
- {
- super();
-
- _strandChildren = new ContainerBaseStrandChildren(this);
- }
-
- private var _strandChildren:ContainerBaseStrandChildren;
-
- /**
- * @private
- */
- public function get strandChildren():IParent
- {
- return _strandChildren;
- }
-
- /**
- * @copy org.apache.flex.core.IParent#getElementAt()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function getElementAt(index:int):Object
- {
- var contentView:IParent = view as IParent;
- if (contentView != null) {
- return contentView.getElementAt(index);
- } else {
- return super.getElementAt(index);
- }
- }
-
- /**
- * @private
- */
- override public function getElementIndex(c:Object):int
- {
- var contentView:IParent = view as IParent;
- if (contentView != null) {
- return contentView.getElementIndex(c);
- } else {
- return super.getElementIndex(c);
- }
- }
-
- /**
- * @private
- */
- override public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- var contentView:IParent = view as IParent;
- if (contentView != null) {
- contentView.addElement(c, dispatchEvent);
- if (dispatchEvent)
- this.dispatchEvent(new Event("childrenAdded"));
- }
- else {
- super.addElement(c);
- }
- }
-
- /**
- * @private
- */
- override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- var contentView:IParent = view as IParent;
- if (contentView != null) {
- contentView.addElementAt(c, index, dispatchEvent);
- if (dispatchEvent)
- this.dispatchEvent(new Event("childrenAdded"));
- }
- else {
- super.addElementAt(c, index);
- }
- }
-
- /**
- * @private
- */
- override public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- var contentView:IParent = view as IParent;
- if (contentView != null) {
- contentView.removeElement(c, dispatchEvent);
- if (dispatchEvent)
- this.dispatchEvent(new Event("childrenRemoved"));
- }
- else {
- super.removeElement(c);
- }
- }
-
- /**
- * @private
- */
- public function childrenAdded():void
- {
- dispatchEvent(new Event("childrenAdded"));
- }
-
- /**
- * A ContainerBase doesn't create its children until it is added to
- * a parent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function addedToParent():void
- {
- if (!_initialized)
- {
- // each MXML file can also have styles in fx:Style block
- ValuesManager.valuesImpl.init(this);
- }
-
- super.addedToParent();
-
- if (!_initialized)
- {
- MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
-
- dispatchEvent(new Event("initBindings"));
- dispatchEvent(new Event("initComplete"));
- _initialized = true;
- }
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $numElements():int
- {
- return super.numElements();
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- super.addElement(c, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- super.addElementAt(c, index, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- super.removeElement(c, dispatchEvent);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $getElementIndex(c:Object):int
- {
- return super.getElementIndex(c);
- }
-
- /**
- * @private
- * @suppress {undefinedNames}
- * Support strandChildren.
- */
- public function $getElementAt(index:int):Object
- {
- return super.getElementAt(index);
- }
-
- private var _mxmlDescriptor:Array;
- private var _mxmlDocument:Object = this;
- private var _initialized:Boolean;
-
- /**
- * @copy org.apache.flex.core.Application#MXMLDescriptor
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get MXMLDescriptor():Array
- {
- return _mxmlDescriptor;
- }
-
- /**
- * @private
- */
- public function setMXMLDescriptor(document:Object, value:Array):void
- {
- _mxmlDocument = document;
- _mxmlDescriptor = value;
- }
-
- /**
- * @copy org.apache.flex.core.Application#generateMXMLAttributes()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function generateMXMLAttributes(data:Array):void
- {
- MXMLDataInterpreter.generateMXMLProperties(this, data);
- }
-
- /**
- * @copy org.apache.flex.core.ItemRendererClassFactory#mxmlContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var mxmlContent:Array;
-
- 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)
- {
- COMPILE::AS3
- {
- trace(e.message);
- }
- }
-
- }
-
- /**
- * <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/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBaseStrandChildren.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBaseStrandChildren.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBaseStrandChildren.as
deleted file mode 100644
index d171288..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ContainerBaseStrandChildren.as
+++ /dev/null
@@ -1,99 +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 ContainerBaseStrandChildren class the provides a way for advanced
- * components to place children directly into the strand unlike the
- * addElement() APIs on the Container which place children into the contentView.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ContainerBaseStrandChildren implements IParent
- {
- /**
- * Constructor.
- *
- * @flexjsignorecoercion org.apache.flex.core.ContainerBase
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ContainerBaseStrandChildren(owner:IParent)
- {
- super();
-
- this.owner = owner as ContainerBase;
- }
-
- public var owner:ContainerBase;
-
- /**
- * @private
- */
- public function get numElements():int
- {
- return owner.$numElements();
- }
-
- /**
- * @private
- */
- public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- owner.$addElement(c, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- owner.$addElementAt(c, index, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- owner.$removeElement(c, dispatchEvent);
- }
-
- /**
- * @private
- */
- public function getElementIndex(c:Object):int
- {
- return owner.$getElementIndex(c);
- }
-
- /**
- * @private
- */
- public function getElementAt(index:int):Object
- {
- return owner.$getElementAt(index);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/DataBindingBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/DataBindingBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/DataBindingBase.as
deleted file mode 100644
index c096232..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/DataBindingBase.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.core
-{
- /**
- * The DataBindingBase class is the base class for custom data binding
- * implementations that can be cross-compiled.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class DataBindingBase
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function DataBindingBase()
- {
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/FilledRectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/FilledRectangle.as b/frameworks/projects/Core/as/src/org/apache/flex/core/FilledRectangle.as
deleted file mode 100644
index 2fcf8dd..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/FilledRectangle.as
+++ /dev/null
@@ -1,125 +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
-{
- COMPILE::AS3
- {
- import flash.display.Shape;
- }
-
- import org.apache.flex.core.UIBase;
-
- /**
- * The FilledRectangle class draws a simple filled
- * rectangle without a border and with square corners.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class FilledRectangle extends UIBase
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function FilledRectangle()
- {
- super();
-
- COMPILE::AS3
- {
- _shape = new flash.display.Shape();
- this.addElement(_shape);
- }
- }
-
- COMPILE::AS3
- private var _shape:flash.display.Shape;
-
- private var _fillColor:uint = 0x000000;
-
- /**
- * The color of the rectangle.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get fillColor():uint
- {
- return _fillColor;
- }
-
- /**
- * @private
- */
- public function set fillColor(value:uint):void
- {
- _fillColor = value;
- }
-
- /**
- * @private
- */
- override public function addedToParent():void
- {
- super.addedToParent();
- drawRect(0, 0, this.width, this.height);
- }
-
- /**
- * 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
- */
- public function drawRect(x:Number, y:Number, width:Number, height:Number):void
- {
- COMPILE::AS3
- {
- _shape.graphics.clear();
- _shape.graphics.beginFill(_fillColor);
- _shape.graphics.drawRect(x, y, width, height);
- _shape.graphics.endFill();
- }
- COMPILE::JS
- {
- element.style.position = 'absolute';
- element.style.backgroundColor = '#' + _fillColor.toString(16);
- if (!isNaN(x)) this.x = x;
- if (!isNaN(y)) this.y = y;
- if (!isNaN(width)) this.width = width;
- if (!isNaN(height)) this.height = height;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as b/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
deleted file mode 100644
index bc8e224..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/HTMLElementWrapper.as
+++ /dev/null
@@ -1,247 +0,0 @@
-package org.apache.flex.core
-{
- COMPILE::AS3
- {
- import flash.display.Sprite;
- }
-
- COMPILE::JS
- {
- import window.Event;
- import org.apache.flex.events.Event;
- import org.apache.flex.events.BrowserEvent;
- import org.apache.flex.events.ElementEvents;
- import org.apache.flex.events.EventDispatcher;
- import goog.events;
- import goog.events.EventTarget;
- }
-
- COMPILE::AS3
- public class HTMLElementWrapper extends Sprite
- {
- /**
- * "abstract" method so we can override in JS
- * @param bead The new bead.
- */
- public function addBead(bead:IBead):void
- {
- }
- }
-
- COMPILE::JS
- public class HTMLElementWrapper extends EventDispatcher implements IStrand
- {
-
- //--------------------------------------
- // Static Function
- //--------------------------------------
-
- /**
- * @param listener The listener object to call {goog.events.Listener}.
- * @param eventObject The event object to pass to the listener.
- * @return Result of listener.
- */
- static public function fireListenerOverride(listener:Object, eventObject:BrowserEvent):Boolean
- {
- var e:BrowserEvent = new BrowserEvent();
- e.wrappedEvent = eventObject;
- return HTMLElementWrapper.googFireListener(listener, e);
- }
-
- /**
- * Static initializer
- */
- static public function installOverride():Boolean
- {
- HTMLElementWrapper.googFireListener = goog.events.fireListener;
- goog.events.fireListener = HTMLElementWrapper.fireListenerOverride;
- return true;
- }
-
- //--------------------------------------
- // Static Property
- //--------------------------------------
-
- static public var googFireListener:Function;
-
- /**
- * The properties that triggers the static initializer.
- * Note, in JS, this property has to be declared
- * after the installOverride.
- */
- static public var installedOverride:Boolean = installOverride();
-
- //--------------------------------------
- // Property
- //--------------------------------------
-
- private var _element:WrappedHTMLElement;
-
- public function get element():WrappedHTMLElement
- {
- return _element;
- }
-
- public function set element(value:WrappedHTMLElement):void
- {
- _element = value;
- }
-
- /**
- * allow access from overrides
- */
- protected var _model:IBeadModel;
-
- /**
- * @flexjsignorecoercion Class
- * @flexjsignorecoercion org.apache.flex.core.IBeadModel
- */
- public function get model():Object
- {
- if (_model == null)
- {
- // addbead will set _model
- var m:Class = org.apache.flex.core.ValuesManager.valuesImpl.
- getValue(this, 'iBeadModel') as Class;
- var b:IBeadModel = new m() as IBeadModel;
- addBead(b);
- }
- return _model;
- }
-
- public function set model(value:Object):void
- {
- if (_model != value)
- {
- addBead(value as IBead);
- dispatchEvent(new org.apache.flex.events.Event("modelChanged"));
- }
- }
-
- protected var _beads:Vector.<IBead>;
-
- //--------------------------------------
- // Function
- //--------------------------------------
-
- /**
- * @param bead The new bead.
- */
- 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;
- }
-
- /**
- * @param classOrInterface The requested bead type.
- * @return The bead.
- */
- public function getBeadByType(classOrInterface:Class):IBead
- {
- var bead:IBead, i:uint, n:uint;
-
- if (!_beads) return null;
-
- n = _beads.length;
-
- for (i = 0; i < n; i++)
- {
- bead = _beads[i];
-
- if (bead is classOrInterface)
- {
- return bead;
- }
- }
-
- return null;
- }
-
- /**
- * @param bead The bead to remove.
- * @return The bead.
- */
- public function removeBead(bead:IBead):IBead
- {
- var i:uint, n:uint, value:Object;
-
- n = _beads.length;
-
- for (i = 0; i < n; i++)
- {
- value = _beads[i];
-
- if (bead === value)
- {
- _beads.splice(i, 1);
-
- return bead;
- }
- }
-
- return null;
- }
-
- override public function addEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void
- {
- var source:Object = getActualDispatcher_(type);
- goog.events.listen(source, type, handler);
- }
-
- override public function removeEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void
- {
- var source:Object = getActualDispatcher_(type);
- goog.events.unlisten(source, type, handler);
- }
-
- private function getActualDispatcher_(type:String):Object
- {
- var source:Object = this;
- if (ElementEvents.elementEvents[type]) {
- // mouse and keyboard events also dispatch off the element.
- source = this.element;
- }
- return source;
- }
-
- override public function hasEventListener(type:String):Boolean
- {
- var source:Object = this.getActualDispatcher_(type);
-
- return goog.events.hasListener(source, type);
- }
-
- override public function dispatchEvent(e:Object):Boolean
- {
- var t:String;
- if (typeof(e) === 'string') {
- t = e as String;
- if (e === 'change')
- e = new window.Event(t);
- }
- else {
- t = e.type;
- if (ElementEvents.elementEvents[t]) {
- e = new window.Event(t);
- }
- }
- var source:Object = this.getActualDispatcher_(t);
- if (source == this)
- return super.dispatchEvent(e);
-
- return source.dispatchEvent(e);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IAlertModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IAlertModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IAlertModel.as
deleted file mode 100644
index 75ba6d0..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IAlertModel.as
+++ /dev/null
@@ -1,135 +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.IEventDispatcher;
-
- /**
- * The IAlertModel interface describes the minimum set of properties
- * available to an Alert control. More sophisticated Alert controls
- * could have models that extend IAlertModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IAlertModel extends IEventDispatcher, IBeadModel
- {
- /**
- * The title of the Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get title():String;
- function set title(value:String):void;
-
- /**
- * The title of the Alert as HTML.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get htmlTitle():String;
- function set htmlTitle(value:String):void;
-
- /**
- * The message to be displayed by the Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get message():String;
- function set message(value:String):void;
-
- /**
- * The message to be displayed by the Alert as HTML.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get htmlMessage():String;
- function set htmlMessage(value:String):void;
-
- /**
- * A bitmask of Alert constants that describe
- * which buttons to show in the Alert..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get flags():uint;
- function set flags(value:uint):void;
-
- /**
- * The label for the OK button in an Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get okLabel():String;
- function set okLabel(value:String):void;
-
- /**
- * The label for the Cancel button in an Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get cancelLabel():String;
- function set cancelLabel(value:String):void;
-
- /**
- * The label for the Yes button in an Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get yesLabel():String;
- function set yesLabel(value:String):void;
-
- /**
- * The label for the No button in an Alert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get noLabel():String;
- function set noLabel(value:String):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.as
deleted file mode 100755
index c4eab58..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IApplicationView.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.core
-{
- /**
- * The IApplicationView interface is the interface for main
- * view of the application.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IApplicationView extends IUIBase, IStatesObject
- {
- /**
- * The application model.
- *
- * @param value The subcomponent to add.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set applicationModel(value:Object):void;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBead.as
deleted file mode 100644
index c0c8991..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBead.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.core
-{
- /**
- * The IBead interface is the basic interface for plug-ins known as Beads.
- * In FlexJS, the recommended pattern is to break out optional functionality
- * into small plug-ins that can be re-used in other components, or replaced with
- * different implementations optimized for different things such as size,
- * performance, advanced features, debugging, etc.
- *
- * Beads are told what host component or "strand" they ae attached to.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IBead
- {
- /**
- * The host component for this bead.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function set strand(value:IStrand):void
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadController.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadController.as
deleted file mode 100644
index 6dbe0a1..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadController.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.core
-{
- /**
- * The IBeadController interface is a "marker" interface for beads that
- * are controllers. A marker interface has no addtional APIs.
- * It is used to find the controller on the strand via calls to getBeadByType.
- *
- * @see org.apache.flex.core.IStrand#getBeadByType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IBeadController extends IBead
- {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadLayout.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadLayout.as
deleted file mode 100644
index a0dba9d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadLayout.as
+++ /dev/null
@@ -1,40 +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 IBeadLayout interface is a "marker" interface for beads that
- * manage the layout for a control. A marker interface has no addtional APIs.
- * It is used to find the layout bead on the strand via calls to getBeadByType.
- *
- * @see org.apache.flex.core.IStrand#getBeadByType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IBeadLayout extends IBead
- {
- /**
- * @return true if size changed
- */
- function layout():Boolean;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadModel.as
deleted file mode 100644
index 23e6251..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadModel.as
+++ /dev/null
@@ -1,39 +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.IEventDispatcher;
-
- /**
- * The IBeadModel interface is a "marker" interface for beads that
- * represent the data model for a control. A marker interface has no addtional APIs.
- * It is used to find the model bead on the strand via calls to getBeadByType.
- *
- * @see org.apache.flex.core.IStrand#getBeadByType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IBeadModel extends IBead, IEventDispatcher
- {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadView.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadView.as
deleted file mode 100644
index 215e911..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBeadView.as
+++ /dev/null
@@ -1,46 +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 IBeadView interface is the interface for beads that
- * represent the view for a control.
- * It is used to find the view bead on the strand via calls to getBeadByType.
- *
- * @see org.apache.flex.core.IStrand#getBeadByType
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IBeadView extends IBead
- {
- /**
- * The host component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get host():IUIBase
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IBorderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IBorderModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IBorderModel.as
deleted file mode 100644
index c746a8f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IBorderModel.as
+++ /dev/null
@@ -1,46 +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 flash.geom.Rectangle;
-
- /**
- * The IBorderModel interface is the basic interface for a data model for
- * drawing borders.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public interface IBorderModel extends IBead, IBeadModel
- {
- /**
- * The offsets from the edges of the host component where
- * the border should be drawn.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get offsets():Rectangle;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IChild.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IChild.as
deleted file mode 100755
index 6052094..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IChild.as
+++ /dev/null
@@ -1,59 +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
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObjectContainer;
- }
-
- /**
- * The IChild interface is the basic interface for a
- * component that is parented by another component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChild
- {
- /**
- * The parent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- function get parent():DisplayObjectContainer;
-
- /**
- * The parent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- function get parent():IUIBase;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IChrome.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IChrome.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IChrome.as
deleted file mode 100644
index e96fdc7..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IChrome.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.core
-{
- /**
- * The IChrome interface is a "marker" interface.
- * Items that implement IChrome are designating themselves as being attached
- * to their parent in a way that's different from normal content. For example,
- * to a Container, a child being added that's an IChrome implementor will be
- * added outside of the content area.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IChrome
- {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IComboBoxModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IComboBoxModel.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IComboBoxModel.as
deleted file mode 100644
index efe0460..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IComboBoxModel.as
+++ /dev/null
@@ -1,108 +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.IEventDispatcher;
-
- /**
- * The IComboBoxModel interface describes the minimum set of properties
- * available to a ComboBox control. More sophisticated ComboBox controls
- * could have models that extend IComboBoxModel.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IComboBoxModel extends IEventDispatcher, IBeadModel
- {
- // TODO: should extend ITextModel
- /**
- * The text displayed in the ComboBox.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get text():String;
- function set text(value:String):void;
-
- /**
- * The html formatted text displayed in the ComboBox.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get html():String;
- function set html(value:String):void;
-
- /**
- * The set of choices displayed in the ComboBox's
- * dropdown. The dataProvider can be a simple
- * array or vector if the set of choices is not
- * going to be modified (except by wholesale
- * replacement of the dataProvider). To use
- * different kinds of data sets, you may need to
- * provide an alternate "mapping" bead that
- * iterates the dataProvider, generates item
- * renderers and assigns a data item to the
- * item renderers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get dataProvider():Object;
- function set dataProvider(value:Object):void;
-
- /**
- * The index of the selected item in the
- * dataProvider. Values less than 0 can
- * have specific meanings but generally mean
- * that no item is selected because the
- * user has typed in a custom entry or has
- * yet to make a choice.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedIndex():int;
- function set selectedIndex(value:int):void;
-
- /**
- * The data item selected in the
- * dataProvider. null usually means
- * that the user has not selected a value
- * and has typed in a custom entry.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function get selectedItem():Object;
- function set selectedItem(value:Object):void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IContainer.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IContainer.as
deleted file mode 100644
index e3b6c9d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IContainer.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.core
-{
- /**
- * The IContainer interface is used to mark certain components as Containers.
- * While most components are containers in the sense that they are composited
- * from a set of child components, the term Container is commonly used in Flex
- * to denote components that take an arbitrary set or sets of children and do
- * not try to abstract away that fact.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IContainer extends IParent
- {
- /**
- * This method is called after children have been
- * added to the container so the container doesn't
- * have to re-layout as each child is added.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- function childrenAdded():void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IContainerView.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IContainerView.as
deleted file mode 100644
index ae07cb7..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IContainerView.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.core
-{
- /**
- * The IContainerView interface should be implemented by any view bead
- * that acts as the primary view for a ContainerBase-derived class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IContainerView extends IParent
- {
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IContentView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IContentView.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IContentView.as
deleted file mode 100644
index 42cc685..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IContentView.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.core
-{
- public interface IContentView
- {
- function get x():Number;
- function set x(value:Number):void;
-
- function get y():Number;
- function set y(value:Number):void;
-
- function get width():Number;
- function set width(value:Number):void;
-
- function get height():Number;
- function set height(value:Number):void;
-
- function addElement(value:Object, dispatchEvent:Boolean = true):void;
- function removeAllElements():void;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/IContentViewHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/IContentViewHost.as b/frameworks/projects/Core/as/src/org/apache/flex/core/IContentViewHost.as
deleted file mode 100644
index b7ff5ff..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/IContentViewHost.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 org.apache.flex.core
-{
- /**
- * This interface is implemented by components that provide
- * access to "behind the scenes" children that are not accessible
- * through the addElement()/removeElement() APIs.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public interface IContentViewHost extends IParent
- {
- function get strandChildren():IParent;
- }
-}
[12/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
deleted file mode 100644
index 0cd6a7c..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/UIBase.as
+++ /dev/null
@@ -1,1483 +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
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObject;
- import flash.display.Sprite;
- import flash.display.Stage;
- }
-
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.MouseEvent;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.events.utils.MouseEventConverter;
-
- /**
- * Set a different class for click events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="click", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for rollOver events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="rollOver", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for rollOut events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="rollOut", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for mouseDown events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="mouseDown", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for mouseUp events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="mouseUp", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for mouseMove events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="mouseMove", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for mouseOut events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="mouseOut", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * Set a different class for mouseOver events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="mouseOver", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * The UIBase class is the base class for most composite user interface
- * components. For the Flash Player, Buttons and Text controls may
- * have a different base class and therefore may not extend UIBase.
- * However all user interface components should implement IUIBase.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class UIBase extends HTMLElementWrapper implements IStrandWithModel, IEventDispatcher, IParentIUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function UIBase()
- {
- super();
-
- COMPILE::AS3
- {
- MouseEventConverter.setupInstanceConverters(this);
- }
-
- COMPILE::JS
- {
- createElement();
- }
- }
-
- private var _explicitWidth:Number;
-
- /**
- * The explicitly set width (as opposed to measured width
- * or percentage width).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get explicitWidth():Number
- {
- return _explicitWidth;
- }
-
- /**
- * @private
- */
- public function set explicitWidth(value:Number):void
- {
- if (_explicitWidth == value)
- return;
-
- // width can be pixel or percent not both
- if (!isNaN(value))
- _percentWidth = NaN;
-
- _explicitWidth = value;
-
- dispatchEvent(new Event("explicitWidthChanged"));
- }
-
- private var _explicitHeight:Number;
-
- /**
- * The explicitly set width (as opposed to measured width
- * or percentage width).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get explicitHeight():Number
- {
- return _explicitHeight;
- }
-
- /**
- * @private
- */
- public function set explicitHeight(value:Number):void
- {
- if (_explicitHeight == value)
- return;
-
- // height can be pixel or percent not both
- if (!isNaN(value))
- _percentHeight = NaN;
-
- _explicitHeight = value;
-
- dispatchEvent(new Event("explicitHeightChanged"));
- }
-
- private var _percentWidth:Number;
-
- /**
- * The requested percentage width this component
- * should have in the parent container. Note that
- * the actual percentage may be different if the
- * total is more than 100% or if there are other
- * components with explicitly set widths.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get percentWidth():Number
- {
- return _percentWidth;
- }
-
- /**
- * @private
- */
- public function set percentWidth(value:Number):void
- {
- COMPILE::AS3 {
- if (_percentWidth == value)
- return;
-
- if (!isNaN(value))
- _explicitWidth = NaN;
-
- _percentWidth = value;
- }
- COMPILE::JS {
- this._percentWidth = value;
- this.positioner.style.width = value.toString() + '%';
- if (!isNaN(value))
- this._explicitWidth = NaN;
- }
-
- dispatchEvent(new Event("percentWidthChanged"));
- }
-
- private var _percentHeight:Number;
-
- /**
- * The requested percentage height this component
- * should have in the parent container. Note that
- * the actual percentage may be different if the
- * total is more than 100% or if there are other
- * components with explicitly set heights.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get percentHeight():Number
- {
- return _percentHeight;
- }
-
- /**
- * @private
- */
- public function set percentHeight(value:Number):void
- {
- COMPILE::AS3 {
- if (_percentHeight == value)
- return;
-
- if (!isNaN(value))
- _explicitHeight = NaN;
-
- _percentHeight = value;
- }
-
- COMPILE::JS {
- this._percentHeight = value;
- this.positioner.style.height = value.toString() + '%';
- if (!isNaN(value))
- this._explicitHeight = NaN;
- }
-
- dispatchEvent(new Event("percentHeightChanged"));
- }
-
- private var _width:Number;
-
- [Bindable("widthChanged")]
- [PercentProxy("percentWidth")]
- /**
- * The width of the component. If no width has been previously
- * set the default width may be specified in the IValuesImpl
- * or determined as the bounding box around all child
- * components and graphics.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- override public function get width():Number
- {
- var w:Number = _width;
- if (isNaN(w)) {
- w = $width;
- }
- return w;
- }
-
- /**
- * @flexjsignorecoercion String
- */
- COMPILE::JS
- public function get width():Number
- {
- var pixels:Number;
- var strpixels:String = positioner.style.width as String;
- if (strpixels !== null && strpixels.indexOf('%') != -1)
- pixels = NaN;
- else
- pixels = parseFloat(strpixels);
- if (isNaN(pixels)) {
- pixels = positioner.offsetWidth;
- if (pixels === 0 && positioner.scrollWidth !== 0) {
- // invisible child elements cause offsetWidth to be 0.
- pixels = positioner.scrollWidth;
- }
- }
- return pixels;
- }
-
- /**
- * @private
- */
- COMPILE::AS3
- override public function set width(value:Number):void
- {
- if (explicitWidth != value)
- {
- explicitWidth = value;
- }
-
- setWidth(value);
- }
-
- /**
- * @private
- */
- COMPILE::JS
- public function set width(value:Number):void
- {
- if (explicitWidth != value)
- {
- explicitWidth = value;
- }
-
- setWidth(value);
- }
-
- /**
- * Retrieve the low-level bounding box width.
- * Not implemented in JS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function get $width():Number
- {
- return super.width;
- }
-
- private var _height:Number;
-
- [Bindable("heightChanged")]
- [PercentProxy("percentHeight")]
- /**
- * The height of the component. If no height has been previously
- * set the default height may be specified in the IValuesImpl
- * or determined as the bounding box around all child
- * components and graphics.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- override public function get height():Number
- {
- var h:Number = _height;
- if (isNaN(h)) {
- h = $height;
- }
- return h;
- }
-
- /**
- * @flexjsignorecoercion String
- */
- COMPILE::JS
- public function get height():Number
- {
- var pixels:Number;
- var strpixels:String = positioner.style.height as String;
- if (strpixels !== null && strpixels.indexOf('%') != -1)
- pixels = NaN;
- else
- pixels = parseFloat(strpixels);
- if (isNaN(pixels)) {
- pixels = positioner.offsetHeight;
- if (pixels === 0 && positioner.scrollHeight !== 0) {
- // invisible child elements cause offsetHeight to be 0.
- pixels = positioner.scrollHeight;
- }
- }
- return pixels;
- }
-
- /**
- * @private
- */
- COMPILE::AS3
- override public function set height(value:Number):void
- {
- if (explicitHeight != value)
- {
- explicitHeight = value;
- }
-
- setHeight(value);
- }
-
- /**
- * @private
- */
- COMPILE::JS
- public function set height(value:Number):void
- {
- if (explicitHeight != value)
- {
- explicitHeight = value;
- }
-
- setHeight(value);
- }
-
- /**
- * Retrieve the low-level bounding box height.
- * Not implemented in JS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function get $height():Number
- {
- return super.height;
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setHeight(value:Number, noEvent:Boolean = false):void
- {
- if (_height != value)
- {
- _height = value;
- COMPILE::JS
- {
- this.positioner.style.height = value.toString() + 'px';
- }
- if (!noEvent)
- dispatchEvent(new Event("heightChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setWidth
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setWidth(value:Number, noEvent:Boolean = false):void
- {
- if (_width != value)
- {
- _width = value;
- COMPILE::JS
- {
- this.positioner.style.width = value.toString() + 'px';
- }
- if (!noEvent)
- dispatchEvent(new Event("widthChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setWidthAndHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
- {
- if (_width != newWidth)
- {
- _width = newWidth;
- COMPILE::JS
- {
- this.positioner.style.width = newWidth.toString() + 'px';
- }
- if (!noEvent)
- dispatchEvent(new Event("widthChanged"));
- }
- if (_height != newHeight)
- {
- _height = newHeight;
- COMPILE::JS
- {
- this.positioner.style.height = newHeight.toString() + 'px';
- }
- if (!noEvent)
- dispatchEvent(new Event("heightChanged"));
- }
- dispatchEvent(new Event("sizeChanged"));
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#isWidthSizedToContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isWidthSizedToContent():Boolean
- {
- if (!isNaN(_explicitWidth))
- return false;
- if (!isNaN(_percentWidth))
- return false;
- var left:* = ValuesManager.valuesImpl.getValue(this, "left");
- var right:* = ValuesManager.valuesImpl.getValue(this, "right");
- return (left === undefined || right === undefined);
-
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#isHeightSizedToContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isHeightSizedToContent():Boolean
- {
- if (!isNaN(_explicitHeight))
- return false;
- if (!isNaN(_percentHeight))
- return false;
- var top:* = ValuesManager.valuesImpl.getValue(this, "top");
- var bottom:* = ValuesManager.valuesImpl.getValue(this, "bottom");
- return (top === undefined || bottom === undefined);
- }
-
- private var _x:Number;
-
- /**
- * @private
- */
- COMPILE::AS3
- override public function set x(value:Number):void
- {
- super.x = _x = value;
- if (!style)
- style = { left: value };
- else
- style.left = value;
- }
-
- COMPILE::JS
- public function set x(value:Number):void
- {
- positioner.style.position = 'absolute';
- positioner.style.left = value.toString() + 'px';
- }
-
- /**
- * @flexjsignorecoercion String
- */
- COMPILE::JS
- public function get x():Number
- {
- var strpixels:String = positioner.style.left as String;
- var pixels:Number = parseFloat(strpixels);
- if (isNaN(pixels))
- pixels = positioner.offsetLeft;
- return pixels;
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setX
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setX(value:Number):void
- {
- COMPILE::AS3
- {
- super.x = value;
- }
- COMPILE::JS
- {
- positioner.style.position = 'absolute';
- positioner.style.left = value.toString() + 'px';
- }
- }
-
- private var _y:Number;
-
- /**
- * @private
- */
- COMPILE::AS3
- override public function set y(value:Number):void
- {
- super.y = _y = value;
- if (!style)
- style = { top: value };
- else
- style.top = value;
- }
-
- COMPILE::JS
- public function set y(value:Number):void
- {
- positioner.style.position = 'absolute';
- positioner.style.top = value.toString() + 'px';
- }
-
- /**
- * @flexjsignorecoercion String
- */
- COMPILE::JS
- public function get y():Number
- {
- var strpixels:String = positioner.style.top as String;
- var pixels:Number = parseFloat(strpixels);
- if (isNaN(pixels))
- pixels = positioner.offsetTop;
- return pixels;
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setY
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setY(value:Number):void
- {
- COMPILE::AS3
- {
- super.y = value;
- }
- COMPILE::JS
- {
- positioner.style.position = 'absolute';
- positioner.style.top = value.toString() + 'px';
- }
- }
-
- /**
- * @private
- */
- [Bindable("visibleChanged")]
- COMPILE::AS3
- override public function set visible(value:Boolean):void
- {
- super.visible = value;
- dispatchEvent(new Event(value?"show":"hide"));
- dispatchEvent(new Event("visibleChanged"));
- }
-
- COMPILE::JS
- private var displayStyleForLayout:String;
-
- /**
- * The display style is used for both visible
- * and layout so is managed as a special case.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- public function setDisplayStyleForLayout(value:String):void
- {
- if (positioner.style.display !== 'none')
- positioner.style.display = value;
- else
- displayStyleForLayout = value;
- }
-
- COMPILE::JS
- public function get visible():Boolean
- {
- return positioner.style.display !== 'none';
- }
-
- COMPILE::JS
- public function set visible(value:Boolean):void
- {
- var oldValue:Boolean = positioner.style.display !== 'none';
- if (value !== oldValue)
- {
- if (!value)
- {
- displayStyleForLayout = positioner.style.display;
- positioner.style.display = 'none';
- dispatchEvent(new Event('hide'));
- }
- else
- {
- if (displayStyleForLayout)
- positioner.style.display = displayStyleForLayout;
- dispatchEvent(new Event('show'));
- }
- dispatchEvent(new Event('visibleChanged'));
- }
- }
-
- /**
- * @return The array of children.
- * @flexjsignorecoercion Array
- */
- COMPILE::JS
- public function internalChildren():Array
- {
- return element.childNodes as Array;
- }
-
- COMPILE::AS3
- private var _model:IBeadModel;
-
- /**
- * An IBeadModel that serves as the data model for the component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function get model():Object
- {
- if (_model == null)
- {
- // addbead will set _model
- addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
- }
- return _model;
- }
-
- /**
- * @private
- */
- COMPILE::AS3
- public function set model(value:Object):void
- {
- if (_model != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("modelChanged"));
- }
- }
-
- private var _view:IBeadView;
-
- /**
- * An IBeadView that serves as the view for the component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion Class
- */
- public function get view():IBeadView
- {
- if (_view == null)
- {
- var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
- {
- if (c)
- {
- _view = (new c()) as IBeadView;
- addBead(_view);
- }
- }
- }
- return _view;
- }
-
- /**
- * @private
- */
- public function set view(value:IBeadView):void
- {
- if (_view != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("viewChanged"));
- }
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _style:Object;
-
- /**
- * The object that contains
- * "styles" and other associated
- * name-value pairs. You can
- * also specify a string in
- * HTML style attribute format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get style():Object
- {
- return _style;
- }
-
- /**
- * @private
- * @flexjsignorecoercion String
- */
- public function set style(value:Object):void
- {
- if (_style != value)
- {
- if (value is String)
- {
- _style = ValuesManager.valuesImpl.parseStyles(value as String);
- }
- else
- _style = value;
- if (!isNaN(_y))
- _style.top = _y;
- if (!isNaN(_x))
- _style.left = _x;
- dispatchEvent(new Event("stylesChanged"));
- }
- }
-
- /**
- * A list of type names. Often used for CSS
- * type selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var typeNames:String;
-
- private var _className:String;
-
- /**
- * The classname. Often used for CSS
- * class selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get className():String
- {
- return _className;
- }
-
- /**
- * @private
- */
- public function set className(value:String):void
- {
- if (_className != value)
- {
- COMPILE::JS
- {
- element.className = typeNames ? value + ' ' + typeNames : value;
- }
- _className = value;
- dispatchEvent(new Event("classNameChanged"));
- }
- }
-
- /**
- * @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;
- }
-
- /**
- * @copy org.apache.flex.core.Application#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.IStrand#addBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function addBead(bead:IBead):void
- {
- if (!_beads)
- _beads = new Vector.<IBead>;
- _beads.push(bead);
- if (bead is IBeadModel)
- _model = bead as IBeadModel;
- else if (bead is IBeadView)
- _view = bead as IBeadView;
- bead.strand = this;
-
- if (bead is IBeadView) {
- IEventDispatcher(this).dispatchEvent(new Event("viewChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.IStrand#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.IStrand#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;
- }
-
- /**
- * @copy org.apache.flex.core.IParent#addElement()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3
- {
- if (c is IUIBase)
- {
- addChild(IUIBase(c).element as DisplayObject);
- IUIBase(c).addedToParent();
- }
- else
- addChild(c as DisplayObject);
- }
- COMPILE::JS
- {
- element.appendChild(c.positioner);
- c.addedToParent();
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#addElementAt()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3
- {
- if (c is IUIBase)
- {
- addChildAt(IUIBase(c).element as DisplayObject, index);
- IUIBase(c).addedToParent();
- }
- else
- addChildAt(c as DisplayObject, index);
- }
- COMPILE::JS
- {
- var children:Array = internalChildren();
- if (index >= children.length)
- addElement(c);
- else
- {
- element.insertBefore(c.positioner,
- children[index]);
- c.addedToParent();
- }
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#getElementAt()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getElementAt(index:int):Object
- {
- COMPILE::AS3
- {
- return getChildAt(index);
- }
- COMPILE::JS
- {
- var children:Array = internalChildren();
- return children[index].flexjs_wrapper;
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#getElementIndex()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getElementIndex(c:Object):int
- {
- COMPILE::AS3
- {
- if (c is IUIBase)
- return getChildIndex(IUIBase(c).element as DisplayObject);
- else
- return getChildIndex(c as DisplayObject);
- }
- COMPILE::JS
- {
- var children:Array = internalChildren();
- var n:int = children.length;
- for (var i:int = 0; i < n; i++)
- {
- if (children[i] == c.element)
- return i;
- }
- return -1;
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#removeElement()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3
- {
- if (c is IUIBase)
- removeChild(IUIBase(c).element as DisplayObject);
- else
- removeChild(c as DisplayObject);
- }
- COMPILE::JS
- {
- element.removeChild(c.element);
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#numElements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get numElements():int
- {
- COMPILE::AS3
- {
- return numChildren;
- }
- COMPILE::JS
- {
- var children:Array = internalChildren();
- return children.length;
- }
- }
-
- /**
- * The method called when added to a parent. This is a good
- * time to set up beads.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion Class
- * @flexjsignorecoercion Number
- */
- public function addedToParent():void
- {
- var c:Class;
-
- COMPILE::JS
- {
- if (style)
- ValuesManager.valuesImpl.applyStyles(this, style);
- }
-
- if (isNaN(_explicitWidth) && isNaN(_percentWidth))
- {
- var value:* = ValuesManager.valuesImpl.getValue(this,"width");
- if (value !== undefined)
- {
- if (value is String)
- {
- var s:String = String(value);
- if (s.indexOf("%") != -1)
- _percentWidth = Number(s.substring(0, s.length - 1));
- else
- {
- if (s.indexOf("px") != -1)
- s = s.substring(0, s.length - 2);
- _width = _explicitWidth = Number(s);
- }
- }
- else
- _width = _explicitWidth = value as Number;
- }
- }
-
- if (isNaN(_explicitHeight) && isNaN(_percentHeight))
- {
- value = ValuesManager.valuesImpl.getValue(this,"height");
- if (value !== undefined)
- {
- if (value is String)
- {
- s = String(value);
- if (s.indexOf("%") != -1)
- _percentHeight = Number(s.substring(0, s.length - 1));
- else
- {
- if (s.indexOf("px") != -1)
- s = s.substring(0, s.length - 2);
- _height = _explicitHeight = Number(s);
- }
- }
- else
- _height = _explicitHeight = value as Number;
- }
- }
-
- for each (var bead:IBead in beads)
- addBead(bead);
-
- if (getBeadByType(IBeadModel) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
- if (c)
- {
- var model:IBeadModel = new c as IBeadModel;
- if (model)
- addBead(model);
- }
- }
- if (_view == null && getBeadByType(IBeadView) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
- {
- var view:IBeadView = new c as IBeadView;
- if (view)
- addBead(view);
- }
- }
- if (getBeadByType(IBeadController) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- if (c)
- {
- var controller:IBeadController = new c as IBeadController;
- if (controller)
- addBead(controller);
- }
- }
- dispatchEvent(new Event("beadsAdded"));
- }
-
- /**
- * A measurement bead, if one exists.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get measurementBead() : IMeasurementBead
- {
- var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
- if( measurementBead == null ) {
- addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
- }
-
- return measurementBead;
- }
-
- COMPILE::AS3
- private var _stageProxy:StageProxy;
-
- /**
- * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion org.apache.flex.events.IEventDispatcher
- */
- public function get topMostEventDispatcher():IEventDispatcher
- {
- COMPILE::AS3
- {
- if (!_stageProxy)
- {
- _stageProxy = new StageProxy(stage);
- _stageProxy.addEventListener("removedFromStage", stageProxy_removedFromStageHandler);
- }
-
- return _stageProxy;
- }
- COMPILE::JS
- {
- var e:WrappedHTMLElement = document.body as WrappedHTMLElement;
- return e.flexjs_wrapper as IEventDispatcher;
- }
- }
-
- COMPILE::AS3
- private function stageProxy_removedFromStageHandler(event:Event):void
- {
- _stageProxy = null;
- }
-
- /**
- * Rebroadcast an event from a sub component from the component.
- */
- protected function repeaterListener(event:Event):void
- {
- dispatchEvent(event);
- }
-
- 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;
- }
-
- /**
- * @return The actual element to be parented.
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- */
- COMPILE::JS
- protected function createElement():WrappedHTMLElement
- {
- if (element == null)
- element = document.createElement('div') as WrappedHTMLElement;
- if (positioner == null)
- positioner = element;
- positioner.style.display = 'block';
- positioner.style.position = 'relative';
-
- element.flexjs_wrapper = this;
-
- return positioner;
- }
-
-
- /**
- * The HTMLElement used to position the component.
- * @flexjsignorecoercion String
- */
- COMPILE::JS
- public function get alpha():Number
- {
- var stralpha:String = positioner.style.opacity as String;
- var alpha:Number = parseFloat(stralpha);
- return alpha;
- }
-
- COMPILE::JS
- public function set alpha(value:Number):void
- {
- positioner.style.opacity = value;
- }
-
- /**
- * @param value The event containing new style properties.
- */
- COMPILE::JS
- protected function styleChangeHandler(value:ValueChangeEvent):void
- {
- var newStyle:Object = {};
- newStyle[value.propertyName] = value.newValue;
- ValuesManager.valuesImpl.applyStyles(this, newStyle);
- };
-
- /**
- * @param value The event containing new style properties.
- * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
- * @flexjsignorecoercion org.apache.flex.core.IUIBase
- */
- COMPILE::JS
- public function get parent():IUIBase
- {
- var p:WrappedHTMLElement = this.positioner.parentNode as WrappedHTMLElement;
- var wrapper:IUIBase = p ? p.flexjs_wrapper as IUIBase : null;
- return wrapper;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as
deleted file mode 100644
index 9a30809..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/UIButtonBase.as
+++ /dev/null
@@ -1,860 +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 flash.display.DisplayObject;
- import flash.display.SimpleButton;
-
- import org.apache.flex.core.IBead;
- import org.apache.flex.core.IBeadModel;
- import org.apache.flex.core.IMeasurementBead;
- 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.utils.MouseEventConverter;
- import org.apache.flex.events.IEventDispatcher;
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Set a different class for click events so that
- * there aren't dependencies on the flash classes
- * on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="click", type="org.apache.flex.events.MouseEvent")]
-
- /**
- * The UIButtonBase class is the base class for most Buttons in a FlexJS
- * application. In Flash, these buttons extend SimpleButton and therefore
- * do not support all of the Sprite APIs.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class UIButtonBase extends SimpleButton implements IStrandWithModel, IEventDispatcher, IUIBase, IStyleableObject, ILayoutChild, IFlexJSElement
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function UIButtonBase(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
- {
- super(upState, overState, downState, hitTestState);
- // mouseChildren = true;
- // mouseEnabled = true;
- MouseEventConverter.setupInstanceConverters(this);
- }
-
- private var _x:Number;
-
- /**
- * @private
- */
- override public function set x(value:Number):void
- {
- if (super.x != value) {
- super.x = _x = value;
- if (!style)
- style = { left: value };
- else
- style.left = value;
- dispatchEvent(new Event("xChanged"));
- }
- }
-
- private var _y:Number;
-
- /**
- * @private
- */
- override public function set y(value:Number):void
- {
- if (super.y != value) {
- super.y = _y = value;
- if (!style)
- style = { top: value };
- else
- style.top = value;
- dispatchEvent(new Event("yChanged"));
- }
- }
-
- /**
- * Retrieve the low-level bounding box y.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- protected function get $y():Number
- {
- return super.y;
- }
-
- private var _explicitWidth:Number;
-
- /**
- * The explicitly set width (as opposed to measured width
- * or percentage width).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get explicitWidth():Number
- {
- if (isNaN(_explicitWidth))
- {
- var value:* = ValuesManager.valuesImpl.getValue(this, "width");
- if (value !== undefined) {
- _explicitWidth = Number(value);
- }
- }
-
- return _explicitWidth;
- }
-
- /**
- * @private
- */
- public function set explicitWidth(value:Number):void
- {
- if (_explicitWidth == value)
- return;
-
- // width can be pixel or percent not both
- if (!isNaN(value))
- _percentWidth = NaN;
-
- _explicitWidth = value;
-
- dispatchEvent(new Event("explicitWidthChanged"));
- }
-
- private var _explicitHeight:Number;
-
- /**
- * The explicitly set width (as opposed to measured width
- * or percentage width).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get explicitHeight():Number
- {
- if (isNaN(_explicitHeight))
- {
- var value:* = ValuesManager.valuesImpl.getValue(this, "height");
- if (value !== undefined) {
- _explicitHeight = Number(value);
- }
- }
-
- return _explicitHeight;
- }
-
- /**
- * @private
- */
- public function set explicitHeight(value:Number):void
- {
- if (_explicitHeight == value)
- return;
-
- // height can be pixel or percent not both
- if (!isNaN(value))
- _percentHeight = NaN;
-
- _explicitHeight = value;
-
- dispatchEvent(new Event("explicitHeightChanged"));
- }
-
- private var _percentWidth:Number;
-
- /**
- * The requested percentage width this component
- * should have in the parent container. Note that
- * the actual percentage may be different if the
- * total is more than 100% or if there are other
- * components with explicitly set widths.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get percentWidth():Number
- {
- return _percentWidth;
- }
-
- /**
- * @private
- */
- public function set percentWidth(value:Number):void
- {
- if (_percentWidth == value)
- return;
-
- if (!isNaN(value))
- _explicitWidth = NaN;
-
- _percentWidth = value;
-
- dispatchEvent(new Event("percentWidthChanged"));
- }
-
- private var _percentHeight:Number;
-
- /**
- * The requested percentage height this component
- * should have in the parent container. Note that
- * the actual percentage may be different if the
- * total is more than 100% or if there are other
- * components with explicitly set heights.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get percentHeight():Number
- {
- return _percentHeight;
- }
-
- /**
- * @private
- */
- public function set percentHeight(value:Number):void
- {
- if (_percentHeight == value)
- return;
-
- if (!isNaN(value))
- _explicitHeight = NaN;
-
- _percentHeight = value;
-
- dispatchEvent(new Event("percentHeightChanged"));
- }
-
- private var _width:Number;
-
- [PercentProxy("percentWidth")]
- /**
- * @copy org.apache.flex.core.UIBase#width
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function get width():Number
- {
- if (isNaN(explicitWidth))
- {
- var w:Number = _width;
- if (isNaN(w)) w = $width;
- return w;
- }
- else
- return explicitWidth;
- }
-
- /**
- * @private
- */
- override public function set width(value:Number):void
- {
- if (explicitWidth != value)
- {
- explicitWidth = value;
- }
-
- setWidth(value);
- }
-
- /**
- * Retrieve the low-level bounding box width.
- * Not implemented in JS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get $width():Number
- {
- return super.width;
- }
-
- private var _height:Number;
-
- [PercentProxy("percentHeight")]
- /**
- * @copy org.apache.flex.core.UIBase#width
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- override public function get height():Number
- {
- if (isNaN(explicitHeight))
- {
- var h:Number = _height;
- if (isNaN(h)) h = $height;
- return h;
- }
- else
- return explicitHeight;
- }
-
- /**
- * @private
- */
- override public function set height(value:Number):void
- {
- if (explicitHeight != value)
- {
- explicitHeight = value;
- }
-
- setHeight(value);
- }
-
- /**
- * Retrieve the low-level bounding box height.
- * Not implemented in JS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get $height():Number
- {
- return super.height;
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#setHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setHeight(value:Number, noEvent:Boolean = false):void
- {
- if (_height != value)
- {
- _height = value;
- if (!noEvent)
- dispatchEvent(new Event("heightChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#setWidth
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setWidth(value:Number, noEvent:Boolean = false):void
- {
- if (_width != value)
- {
- _width = value;
- if (!noEvent)
- dispatchEvent(new Event("widthChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#setWidthAndHeight
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void
- {
- if (_width != newWidth)
- {
- _width = newWidth;
- if (_height == newHeight)
- if (!noEvent)
- dispatchEvent(new Event("widthChanged"));
- }
- if (_height != newHeight)
- {
- _height = newHeight;
- if (!noEvent)
- dispatchEvent(new Event("heightChanged"));
- }
- dispatchEvent(new Event("sizeChanged"));
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#isWidthSizedToContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isWidthSizedToContent():Boolean
- {
- return (isNaN(_explicitWidth) && isNaN(_percentWidth));
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setX
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setX(value:Number):void
- {
- super.x = value;
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#setY
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setY(value:Number):void
- {
- super.y = value;
- }
-
- /**
- * @private
- */
- [Bindable("visibleChanged")]
- override public function set visible(value:Boolean):void
- {
- super.visible = value;
- dispatchEvent(new Event(value?"show":"hide"));
- dispatchEvent(new Event("visibleChanged"));
- }
-
- /**
- * @copy org.apache.flex.core.ILayoutChild#isHeightSizedToContent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isHeightSizedToContent():Boolean
- {
- return (isNaN(_explicitHeight) && isNaN(_percentHeight));
- }
-
- private var _model:IBeadModel;
-
- /**
- * @copy org.apache.flex.core.UIBase#model
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get model():Object
- {
- if (_model == null)
- {
- // addbead will set _model
- addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
- }
- return _model;
- }
-
- /**
- * @private
- */
- public function set model(value:Object):void
- {
- if (_model != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("modelChanged"));
- }
- }
-
- private var _view:IBeadView;
-
- /**
- * An IBeadView that serves as the view for the component.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get view():IBeadView
- {
- if (_view == null)
- {
- var c:Class = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
- {
- _view = (new c()) as IBeadView;
- addBead(_view);
- }
- }
- return _view;
- }
-
- /**
- * @private
- */
- public function set view(value:IBeadView):void
- {
- if (_view != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("viewChanged"));
- }
- }
-
- 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 _styles:Object;
-
- /**
- * The object that contains
- * "styles" and other associated
- * name-value pairs. You can
- * also specify a string in
- * HTML style attribute format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get style():Object
- {
- return _styles;
- }
-
- /**
- * @private
- */
- public function set style(value:Object):void
- {
- if (value is String)
- _styles = ValuesManager.valuesImpl.parseStyles(value as String);
- else
- _styles = value;
- if (!isNaN(_y))
- _styles.top = _y;
- if (!isNaN(_x))
- _styles.left = _x;
- dispatchEvent(new Event("stylesChanged"));
- }
-
- /**
- * The styles for this object formatted
- * as an HTML style attribute. While this
- * may be a convenient and less verbose
- * way of specifying styles than using
- * the style object, you run the risk of
- * having a typo.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set styleString(value:String):void
- {
- _styles = JSON.parse("{" + value + "}");
- }
-
- /**
- * A list of type names. Often used for CSS
- * type selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var typeNames:String;
-
- private var _className:String;
-
- /**
- * @copy org.apache.flex.core.UIBase#className
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get className():String
- {
- return _className;
- }
-
- /**
- * @private
- */
- public function set className(value:String):void
- {
- if (_className != value)
- {
- _className = value;
- dispatchEvent(new Event("classNameChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#element
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get element():IFlexJSElement
- {
- return this;
- }
-
- /**
- * @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;
-
- private var strand:Vector.<IBead>;
-
- /**
- * @copy org.apache.flex.core.UIBase#addBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addBead(bead:IBead):void
- {
- if (!strand)
- strand = new Vector.<IBead>;
- strand.push(bead);
- if (bead is IBeadModel)
- _model = bead as IBeadModel;
- else if (bead is IBeadView)
- _view = bead as IBeadView;
- 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
- */
- public function getBeadByType(classOrInterface:Class):IBead
- {
- for each (var bead:IBead in strand)
- {
- 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
- */
- public function removeBead(value:IBead):IBead
- {
- var n:int = strand.length;
- for (var i:int = 0; i < n; i++)
- {
- var bead:IBead = strand[i];
- if (bead == value)
- {
- strand.splice(i, 1);
- return bead;
- }
- }
- return null;
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#addToParent()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addedToParent():void
- {
- var c:Class;
-
- for each (var bead:IBead in beads)
- addBead(bead);
-
- if (getBeadByType(IBeadModel) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadModel") as Class;
- if (c)
- {
- var model:IBeadModel = new c as IBeadModel;
- if (model)
- addBead(model);
- }
- }
- if (getBeadByType(IBeadView) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadView") as Class;
- if (c)
- {
- var view:IBeadView = new c as IBeadView;
- if (view)
- addBead(view);
- }
- }
- if (getBeadByType(IBeadController) == null)
- {
- c = ValuesManager.valuesImpl.getValue(this, "iBeadController") as Class;
- if (c)
- {
- var controller:IBeadController = new c as IBeadController;
- if (controller)
- addBead(controller);
- }
- }
-
- dispatchEvent(new Event("beadsAdded"));
-
- }
-
- /**
- * @copy org.apache.flex.core.UIBase#measurementBead
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get measurementBead() : IMeasurementBead
- {
- var measurementBead:IMeasurementBead = getBeadByType(IMeasurementBead) as IMeasurementBead;
- if( measurementBead == null ) {
- addBead(measurementBead = new (ValuesManager.valuesImpl.getValue(this, "iMeasurementBead")) as IMeasurementBead);
- }
-
- return measurementBead;
- }
-
- /**
- * @copy org.apache.flex.core.IUIBase#topMostEventDispatcher
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get topMostEventDispatcher():IEventDispatcher
- {
- if (!parent)
- return null;
- return IUIBase(parent).topMostEventDispatcher;
- }
-
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ValuesManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ValuesManager.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ValuesManager.as
deleted file mode 100644
index fc1b611..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ValuesManager.as
+++ /dev/null
@@ -1,72 +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 ValuesManager class is one of the few Singleton classes in
- * FlexJS. Instances of other things can be shared via IValuesImpl, but
- * this class's API is its one static property where you get the
- * instance of IValuesImpl by which other instances can be shared.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ValuesManager
- {
- /**
- * Constructor. This class should not be instantiated.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ValuesManager()
- {
- }
-
- private static var _valuesImpl:IValuesImpl;
-
- /**
- * The implementation of IValuesImpl where you can
- * get default values and shared instances.
- *
- * @see org.apache.flex.core.IValuesImpl
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function get valuesImpl():IValuesImpl
- {
- return _valuesImpl;
- }
-
- /**
- * @private
- */
- public static function set valuesImpl(value:IValuesImpl):void
- {
- _valuesImpl = value;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ViewBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ViewBase.as
deleted file mode 100644
index 0230e57..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ViewBase.as
+++ /dev/null
@@ -1,98 +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;
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched at startup. Attributes and sub-instances of
- * the MXML document have been created and assigned.
- * The component lifecycle is different
- * than the Flex SDK. There is no creationComplete event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="initComplete", type="org.apache.flex.events.Event")]
-
- [DefaultProperty("mxmlContent")]
-
- /**
- * The ViewBase class is the base class for most views in a FlexJS
- * application. It is generally used as the root tag of MXML
- * documents and UI controls and containers are added to it.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ViewBase extends ContainerBase implements IPopUpHost, IApplicationView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ViewBase()
- {
- super();
-
- className = "flexjs";
- }
-
- private var _applicationModel:Object;
-
- [Bindable("modelChanged")]
-
- /**
- * A reference to the Application's model. Usually,
- * a view is displaying the main model for an
- * application.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get applicationModel():Object
- {
- return _applicationModel;
- }
-
- /**
- * @private
- */
- public function set applicationModel(value:Object):void
- {
- _applicationModel = value;
- dispatchEvent(new Event("modelChanged"));
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/WrappedHTMLElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/WrappedHTMLElement.as b/frameworks/projects/Core/as/src/org/apache/flex/core/WrappedHTMLElement.as
deleted file mode 100644
index e765e01..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/WrappedHTMLElement.as
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.apache.flex.core
-{
- COMPILE::JS
- public class WrappedHTMLElement extends HTMLElement
- {
-
- //--------------------------------------
- // Property
- //--------------------------------------
-
- /**
- * A pointer back to the instance that wrapped this element.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var flexjs_wrapper:Object;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/BrowserEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/BrowserEvent.as b/frameworks/projects/Core/as/src/org/apache/flex/events/BrowserEvent.as
deleted file mode 100644
index 71b45c6..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/BrowserEvent.as
+++ /dev/null
@@ -1,475 +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.events
-{
-
- COMPILE::JS {
- import goog.events.BrowserEvent;
- }
-
- /**
- * @fileoverview A patched, standardized event object for browser events.
- *
- * <pre>
- * The patched event object contains the following members:
- * - type {string} Event type, e.g. 'click'
- * - timestamp {Date} A date object for when the event was fired
- * - target {Object} The element that actually triggered the event
- * - currentTarget {Object} The element the listener is attached to
- * - relatedTarget {Object} For mouseover and mouseout, the previous object
- * - offsetX {number} X-coordinate relative to target
- * - offsetY {number} Y-coordinate relative to target
- * - clientX {number} X-coordinate relative to viewport
- * - clientY {number} Y-coordinate relative to viewport
- * - screenX {number} X-coordinate relative to the edge of the screen
- * - screenY {number} Y-coordinate relative to the edge of the screen
- * - button {number} Mouse button. Use isButton() to test.
- * - keyCode {number} Key-code
- * - ctrlKey {boolean} Was ctrl key depressed
- * - altKey {boolean} Was alt key depressed
- * - shiftKey {boolean} Was shift key depressed
- * - metaKey {boolean} Was meta key depressed
- * - defaultPrevented {boolean} Whether the default action has been prevented
- * - state {Object} History state object
- *
- * NOTE: The keyCode member contains the raw browser keyCode. For normalized
- * key and character code use {@link goog.events.KeyHandler}.
- * </pre>
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::JS
- public class BrowserEvent
- {
-
- //--------------------------------------
- // Property
- //--------------------------------------
-
- /**
- * @type {?goog.events.BrowserEvent}
- */
- public var wrappedEvent:Object;
-
- //--------------------------------------
- // Function
- //--------------------------------------
-
- /**
- * Was altKey key depressed.
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get altKey():Boolean
- {
- return wrappedEvent.altKey;
- }
-
- /**
- * Which mouse button was pressed.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get button():uint
- {
- return wrappedEvent.button;
- }
-
- /**
- * CharCode of key press.
- * Native browser event.charCode || (type == 'keypress' ? event.keyCode : 0);
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get charCode():uint
- {
- return wrappedEvent.charCode;
- }
-
- /**
- * X-coordinate relative to the window.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get clientX():Number
- {
- return wrappedEvent.clientX;
- }
-
- /**
- * Y-coordinate relative to the window.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get clientY():Number
- {
- return wrappedEvent.clientY;
- }
-
- /**
- * Was ctrl key depressed.
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get ctrlKey():Boolean
- {
- return wrappedEvent.ctrlKey;
- }
-
- /**
- * The element the listener is attached to.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get currentTarget():Object
- {
- var o:Object = wrappedEvent.currentTarget;
-
- if (o && o.flexjs_wrapper)
- return o.flexjs_wrapper;
- return o;
- }
-
- /**
- * Whether the default action has been prevented.
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get defaultPrevented():Boolean
- {
- return wrappedEvent.defaultPrevented;
- }
-
- /**
- * The underlying browser event object.
- * (for debugging purposes)
- *
- * @return The underlying browser event object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getBrowserEvent():Object
- {
- return wrappedEvent.getBrowserEvent();
- }
-
- /**
- * Tests to see which button was pressed during the event. This is really only
- * useful in IE and Gecko browsers. And in IE, it's only useful for
- * mousedown/mouseup events, because click only fires for the left mouse button.
- *
- * Safari 2 only reports the left button being clicked, and uses the value '1'
- * instead of 0. Opera only reports a mousedown event for the middle button, and
- * no mouse events for the right button. Opera has default behavior for left and
- * middle click that can only be overridden via a configuration setting.
- *
- * There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.
- *
- * @param button The button to test for.
- * @return True if button was pressed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isButton(button:int):Boolean
- {
- return wrappedEvent.isButton(button);
- }
-
- /**
- * Whether this has an "action"-producing mouse button.
- *
- * By definition, this includes left-click on windows/linux, and left-click
- * without the ctrl key on Macs.
- *
- * @return The result.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function isMouseActionButton():Boolean
- {
- return wrappedEvent.isMouseActionButton();
- }
-
- /**
- * Keycode of key press.
- * Native browser event.keyCode || 0;
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get keyCode():uint
- {
- return wrappedEvent.keyCode;
- }
-
- /**
- * Whether the meta key was pressed at time of event.
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get metaKey():Boolean
- {
- return wrappedEvent.metaKey;
- }
-
- /**
- * X-coordinate relative to target.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get offsetX():Number
- {
- return wrappedEvent.offsetX;
- }
-
- /**
- * Y-coordinate relative to target.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get offsetY():Number
- {
- return wrappedEvent.offsetY;
- }
-
- /**
- * Whether the default platform modifier key was pressed at time of event.
- * (This is control for all platforms except Mac, where it's Meta.)
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get platformModifierKey():Boolean
- {
- return platformModifierKey;
- }
-
- /**
- * Whether the default action has been prevented.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function preventDefault():void
- {
- wrappedEvent.preventDefault();
- }
-
- /**
- * For mouseover and mouseout, the previous object.
- * @type {object}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get relatedTarget():Object
- {
- var o:Object = wrappedEvent.relatedTarget;
-
- if (o && o.flexjs_wrapper)
- return o.flexjs_wrapper;
- return o;
- }
-
- /**
- * X-coordinate relative to the monitor.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get screenX():Number
- {
- return wrappedEvent.screenX;
- }
-
- /**
- * Y-coordinate relative to the monitor.
- * @type {number}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get screenY():Number
- {
- return wrappedEvent.screenY;
- }
-
- /**
- * Was shiftKey key depressed.
- * @type {boolean}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get shiftKey():Boolean
- {
- return wrappedEvent.shiftKey;
- }
-
- /**
- * History state object, only set for PopState events where it's a copy of the
- * state object provided to pushState or replaceState.
- * @type {Object}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get state():Object
- {
- return wrappedEvent.state;
- }
-
- /**
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function stopImmediatePropagation():void
- {
- //wrappedEvent.stopImmediatePropagation(); // not in goog.events.BrowserEvent
- wrappedEvent.stopPropagation();
- }
-
- /**
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function stopPropagation():void
- {
- wrappedEvent.stopPropagation();
- }
-
- /**
- * The element that actually triggered the event.
- * @type {object}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get target():Object
- {
- var o:Object = wrappedEvent.target;
-
- if (o && o.flexjs_wrapper)
- return o.flexjs_wrapper;
- return o;
- }
-
- /**
- * A date object for when the event was fired.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get timestamp():Date
- {
- return wrappedEvent.timestamp;
- }
-
- /**
- * Event type, e.g. 'click'.
- * @type {string}
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get type():String
- {
- return wrappedEvent.type;
- }
- }
-}
[10/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSContainerUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSContainerUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSContainerUtils.as
deleted file mode 100644
index 868faec..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSContainerUtils.as
+++ /dev/null
@@ -1,194 +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.utils
-{
-import org.apache.flex.core.ValuesManager;
-import org.apache.flex.geom.Rectangle;
-
-/**
- * The CSSContainerUtils class is a utility class that computes the values
- * containers often need to know like border widths and padding styles.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class CSSContainerUtils
-{
- /**
- * Compute the width/thickness of the four border edges.
- *
- * @param object The object with style values.
- * @param quick True to assume all four edges have the same widths.
- * @return A Rectangle representing the four sides.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function getBorderMetrics(object:Object, quick:Boolean = false):Rectangle
- {
- var borderThickness:Object = ValuesManager.valuesImpl.getValue(object, "border-width");
- var borderStyle:Object = ValuesManager.valuesImpl.getValue(object, "border-style");
- var border:Object = ValuesManager.valuesImpl.getValue(object, "border");
- var borderOffset:Number;
- if (borderStyle == "none")
- borderOffset = 0;
- else if (borderThickness != null)
- {
- if (borderThickness is String)
- borderOffset = CSSUtils.toNumber(borderThickness as String, object.width);
- else
- borderOffset = Number(borderThickness);
- if( isNaN(borderOffset) ) borderOffset = 0;
- }
- else // no style and/or no width
- {
- border = ValuesManager.valuesImpl.getValue(object,"border");
- if (border != null)
- {
- if (border is Array)
- {
- borderOffset = CSSUtils.toNumber(border[0], object.width);
- borderStyle = border[1];
- }
- else if (border == "none")
- borderOffset = 0;
- else if (border is String)
- borderOffset = CSSUtils.toNumber(border as String, object.width);
- else
- borderOffset = Number(border);
- }
- else // no border style set at all so default to none
- borderOffset = 0;
- }
-
- if (quick)
- return new Rectangle(borderOffset, borderOffset, 0, 0);
-
- var widthTop:int = borderOffset;
- var widthLeft:int = borderOffset;
- var widthBottom:int = borderOffset;
- var widthRight:int = borderOffset;
- var value:*;
- var values:Array;
- var n:int;
- value = ValuesManager.valuesImpl.getValue(object, "border-top");
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthTop = CSSUtils.toNumber(values[0]);
- }
- value = ValuesManager.valuesImpl.getValue(object, "border-left");
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthLeft = CSSUtils.toNumber(values[0]);
- }
- value = ValuesManager.valuesImpl.getValue(object, "border-bottom");
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthBottom = CSSUtils.toNumber(values[0]);
- }
- value = ValuesManager.valuesImpl.getValue(object, "border-right");
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthRight = CSSUtils.toNumber(values[0]);
- }
- // do the math so consumer can use
- // left, right, top, bottom properties and not width/height
- return new Rectangle(widthLeft, widthTop, widthRight - widthLeft, widthTop - widthBottom);
- }
-
- /**
- * Compute the width/thickness of the four padding sides.
- *
- * @param object The object with style values.
- * @return A Rectangle representing the padding on each of the four sides.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function getPaddingMetrics(object:Object):Rectangle
- {
- var paddingLeft:Object;
- var paddingTop:Object;
- var paddingRight:Object;
- var paddingBottom:Object;
-
- var padding:Object = ValuesManager.valuesImpl.getValue(object, "padding");
- paddingLeft = ValuesManager.valuesImpl.getValue(object, "padding-left");
- paddingTop = ValuesManager.valuesImpl.getValue(object, "padding-top");
- paddingRight = ValuesManager.valuesImpl.getValue(object, "padding-right");
- paddingBottom = ValuesManager.valuesImpl.getValue(object, "padding-bottom");
- var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, object.width);
- var pt:Number = CSSUtils.getTopValue(paddingTop, padding, object.height);
- var pr:Number = CSSUtils.getRightValue(paddingRight, padding, object.width);
- var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, object.height);
-
- // do the math so consumer can use
- // left, right, top, bottom properties and not width/height
- return new Rectangle(pl, pt, pr - pl, pb - pt);
- }
-
-
- /**
- * Combine padding and border. Often used in non-containers.
- *
- * @param object The object with style values.
- * @return A Rectangle representing the padding and border on each of the four sides.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function getBorderAndPaddingMetrics(object:Object):Rectangle
- {
- var borderMetrics:Rectangle = getBorderMetrics(object);
- var paddingMetrics:Rectangle = getPaddingMetrics(object);
- return new Rectangle(borderMetrics.left + paddingMetrics.left,
- borderMetrics.top + paddingMetrics.top,
- borderMetrics.width + paddingMetrics.width,
- borderMetrics.height + paddingMetrics.height);
- }
-}
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSUtils.as
deleted file mode 100644
index 770c428..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSUtils.as
+++ /dev/null
@@ -1,328 +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.utils
-{
-
- /**
- * The CSSUtils class is a collection of static functions that provide utility
- * features for managing CSS values.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CSSUtils
- {
- /**
- * @private
- */
- public function CSSUtils()
- {
- throw new Error("CSSUtils should not be instantiated.");
- }
-
- /**
- * Converts a String to number.
- *
- * @param str The String.
- * @param reference A Number that will be used to convert percentages.
- *
- * @return Number.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function toNumber(str:String, reference:Number = 0):Number
- {
- var c:int = str.indexOf("px");
- if (c != -1)
- return Number(str.substr(0, c));
-
- c = str.indexOf("%");
- if (c != -1)
- return Number(str.substr(0, c)) * reference / 100;
-
- return Number(str);
- }
-
- /**
- * Converts a value describing a color to a uint
- *
- * @param value The value.
- *
- * @return uint of the color.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function toColor(value:Object):uint
- {
- return toColorWithAlpha(value) & 0xFFFFFF;
- }
-
- /**
- * Converts a value describing a color and alpha in a uint
- *
- * @param value The value.
- *
- * @return uint of the color.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion String
- */
- public static function toColorWithAlpha(value:Object):uint
- {
- if (!(value is String))
- return uint(value) | 0xFF000000; // css parser converted #rrggbb without alpha channel
-
- var c:int;
- var c2:int;
-
- var stringValue:String = value as String;
- if (stringValue.charAt(0) == '#')
- {
- if (stringValue.length == 4)
- return uint("0x" + stringValue.charAt(1) + stringValue.charAt(1) +
- stringValue.charAt(2) + stringValue.charAt(2) +
- stringValue.charAt(3) + stringValue.charAt(3));
- if (stringValue.length == 7)
- return uint("0xFF" + stringValue.substr(1));
- return uint("0x" + stringValue.substr(1));
- }
- else if ((c = stringValue.indexOf("rgb(")) != -1)
- {
- c2 = stringValue.indexOf(")");
- stringValue = stringValue.substring(c + 4, c2);
- var parts3:Array = stringValue.split(",");
- return (0xFF000000 +
- uint(parts3[0]) << 16 +
- uint(parts3[1]) << 8 +
- uint(parts3[2]));
- }
- else if ((c = stringValue.indexOf("rgba(")) != -1)
- {
- c2 = stringValue.indexOf(")");
- stringValue = stringValue.substring(c + 4, c2);
- var parts4:Array = stringValue.split(",");
- return (uint(parts4[3]) << 24 +
- uint(parts3[0]) << 16 +
- uint(parts3[1]) << 8 +
- uint(parts3[2]));
- }
-
- if (colorMap.hasOwnProperty(stringValue))
- return colorMap[stringValue];
- return uint(stringValue);
- }
-
- /**
- * Computes paddingLeft or marginLeft.
- *
- * @param value The value of padding-left or margin-left.
- * @param values The value of padding or margin.
- * @param reference A Number that will be used to convert percentages.
- *
- * @return Number.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion String
- */
- public static function getLeftValue(value:Object, values:Object, reference:Number = NaN):Number
- {
- if (value is Number)
- return value as Number;
-
- if (values is Number)
- return values as Number;
-
- if (value != null)
- return toNumber(value as String, reference);
- if (values == null)
- return 0;
- if (values is Array)
- {
- var arr:Array = values as Array;
- var n:int = arr.length;
- // shouldn't be n == 1. values would not be an array
- var index:int = n < 3 ? 1 : 3;
- value = arr[index];
- if (value is String)
- return toNumber(value as String, reference);
- return value as Number;
- }
- return toNumber(values as String, reference);
- }
-
- /**
- * Computes paddingRight or marginRight.
- *
- * @param value The value of padding-right or margin-right.
- * @param values The value of padding or margin.
- * @param reference A Number that will be used to convert percentages.
- *
- * @return Number.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion String
- */
- public static function getRightValue(value:Object, values:Object, reference:Number = NaN):Number
- {
- if (value is Number)
- return value as Number;
-
- if (values is Number)
- return values as Number;
-
- if (value != null)
- return toNumber(value as String, reference);
- if (values == null)
- return 0;
- if (values is Array)
- {
- var arr:Array = values as Array;
- value = arr[1];
- if (value is String)
- return toNumber(value as String, reference);
- return value as Number;
- }
- return toNumber(values as String, reference);
- }
-
- /**
- * Computes paddingTop or marginTop.
- *
- * @param value The value of padding-top or margin-top.
- * @param values The value of padding or margin.
- * @param reference A Number that will be used to convert percentages.
- *
- * @return Number.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion String
- */
- public static function getTopValue(value:Object, values:Object, reference:Number = NaN):Number
- {
- if (value is Number)
- return value as Number;
-
- if (values is Number)
- return values as Number;
-
- if (value != null)
- return toNumber(value as String, reference);
- if (values == null)
- return 0;
- if (values is Array)
- {
- var arr:Array = values as Array;
- value = arr[0];
- if (value is String)
- return toNumber(value as String, reference);
- return value as Number;
- }
- return toNumber(values as String, reference);
- }
-
- /**
- * Computes paddingBottom or marginBottom.
- *
- * @param value The value of padding-bottom or margin-bottom.
- * @param values The value of padding or margin.
- * @param reference A Number that will be used to convert percentages.
- *
- * @return Number.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion String
- */
- public static function getBottomValue(value:Object, values:Object, reference:Number = NaN):Number
- {
- if (value is Number)
- return value as Number;
-
- if (values is Number)
- return values as Number;
-
- if (value != null)
- return toNumber(value as String, reference);
- if (values == null)
- return 0;
- if (values is Array)
- {
- var arr:Array = values as Array;
- var n:int = arr.length;
- // shouldn't be n == 1. values would not be an array
- var index:int = n == 2 ? 0 : 2;
- value = arr[index];
- if (value is String)
- return toNumber(value as String, reference);
- return value as Number;
- }
- return toNumber(values as String, reference);
- }
-
- /**
- * The map of color names to uints.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var colorMap:Object = {
- transparent: 0,
- white: 0xFFFFFFFF,
- silver: 0xFFC0C0C0,
- gray: 0xFF808080,
- black: 0xFF000000,
- red: 0xFFFF0000,
- maroon: 0xFF800000,
- yellow: 0xFFFFFF00,
- olive: 0xFF808000,
- lime: 0xFF00FF00,
- green: 0xFF008000,
- aqua: 0xFF00FFFF,
- teal: 0xFF008080,
- blue: 0xFF0000FF,
- navy: 0xFF000080,
- fuchsia: 0xFFFF00FF,
- purple: 0xFF800080
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/EffectTimer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/EffectTimer.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/EffectTimer.as
deleted file mode 100644
index 3e557d6..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/EffectTimer.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.utils
-{
-COMPILE::AS3
-{
- import flash.events.EventDispatcher;
- import flash.events.TimerEvent;
- import flash.utils.Timer;
- import flash.utils.getTimer;
-}
-COMPILE::JS
-{
- import org.apache.flex.events.EventDispatcher;
-}
-import org.apache.flex.core.IEffectTimer;
-import org.apache.flex.core.ValuesManager;
-import org.apache.flex.events.ValueEvent;
-
-//--------------------------------------
-// Events
-//--------------------------------------
-
-/**
- * Dispatched as requested via the delay and
- * repeat count parameters in the constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-[Event(name="update", type="org.apache.flex.events.ValueEvent")]
-
-/**
- * The Timer class dispatches events based on a delay
- * and repeat count.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class EffectTimer extends EventDispatcher implements IEffectTimer
-{
- /**
- * Constructor.
- *
- * @param delay The number of milliseconds
- * to wait before dispatching the event.
- * @param repeatCount The number of times to dispatch
- * the event. If 0, keep dispatching forever.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function EffectTimer()
- {
- interval = ValuesManager.valuesImpl.getValue(this, "effectTimerInterval");
- COMPILE::AS3
- {
- timer = new flash.utils.Timer(interval);
- timer.addEventListener("timer", timerHandler);
- }
- }
-
- private var interval:int;
-
- COMPILE::AS3
- private var timer:flash.utils.Timer;
-
- COMPILE::JS
- private var timerInterval:Number;
-
- public function start():int
- {
- COMPILE::AS3
- {
- timer.start();
- return getTimer();
- }
- COMPILE::JS
- {
- timerInterval =
- setInterval(timerHandler, interval);
- var d:Date = new Date();
- return d.getTime();
- }
- }
-
- public function stop():void
- {
- COMPILE::AS3
- {
- timer.stop();
- }
- COMPILE::JS
- {
- clearInterval(timerInterval);
- timerInterval = -1;
- }
- }
-
- COMPILE::AS3
- private function timerHandler(event:flash.events.TimerEvent):void
- {
- event.updateAfterEvent();
- dispatchEvent(new ValueEvent("update", false, false, getTimer()));
- }
-
- COMPILE::JS
- private function timerHandler():void
- {
- var d:Date = new Date();
- dispatchEvent(new ValueEvent('update', false, false, d.getTime()));
- }
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as
deleted file mode 100644
index 0627820..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/Language.as
+++ /dev/null
@@ -1,357 +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.utils
-{
-
- [ExcludeClass]
- COMPILE::AS3
- public class Language {}
-
- COMPILE::JS
- {
- import goog.bind;
- import goog.global;
- }
-
- /**
- * @flexjsignoreimport goog.bind
- * @flexjsignoreimport goog.global
- */
- COMPILE::JS
- public class Language
- {
-
- //--------------------------------------
- // Static Property
- //--------------------------------------
-
- //--------------------------------------
- // Static Function
- //--------------------------------------
-
- /**
- * as()
- *
- * @param leftOperand The lefthand operand of the
- * binary as operator in AS3.
- * @param rightOperand The righthand operand of the
- * binary operator in AS3.
- * @param coercion The cast is a coercion,
- * throw exception if it fails.
- * @return Returns the lefthand operand if it is of the
- * type of the righthand operand, otherwise null.
- */
- static public function as(leftOperand:Object, rightOperand:Object, coercion:* = null):Object
- {
- var error:Error, itIs:Boolean, message:String;
-
- coercion = (coercion !== undefined) ? coercion : false;
-
- itIs = Language.is(leftOperand, rightOperand);
-
- if (!itIs && coercion)
- {
- message = 'Type Coercion failed';
-
- if (TypeError)
- {
- error = new TypeError(message);
- }
- else
- {
- error = new Error(message);
- }
- throw error;
- }
-
- return (itIs) ? leftOperand : null;
- }
-
-
- /**
- * int()
- *
- * @param value The value to be cast.
- * @return {number}
- */
- static public function _int(value:Number):Number
- {
- return value >> 0;
- }
-
- /**
- * is()
- *
- * @param leftOperand The lefthand operand of the
- * binary as operator in AS3.
- * @param rightOperand The righthand operand of the
- * binary operator in AS3.
- * @return {boolean}
- */
- static public function is(leftOperand:Object, rightOperand:Object):Boolean
- {
- var superClass:Object;
-
- if (leftOperand == null || rightOperand == null)
- return false;
-
- if (leftOperand instanceof rightOperand)
- return true;
- if (rightOperand === Object)
- return true; // every value is an Object in ActionScript except null and undefined (caught above)
-
- if (typeof leftOperand === 'string')
- return rightOperand === String;
-
- if (typeof leftOperand === 'number')
- return rightOperand === Number;
-
- if (typeof leftOperand === 'boolean')
- return rightOperand === Boolean;
- if (rightOperand === Array)
- return Array.isArray(leftOperand);
-
- if (leftOperand.FLEXJS_CLASS_INFO === undefined)
- return false; // could be a function but not an instance
-
- if (leftOperand.FLEXJS_CLASS_INFO.interfaces)
- {
- if (checkInterfaces(leftOperand, rightOperand))
- {
- return true;
- }
- }
-
- superClass = leftOperand.constructor;
- superClass = superClass.superClass_;
-
- if (superClass)
- {
- while (superClass && superClass.FLEXJS_CLASS_INFO)
- {
- if (superClass.FLEXJS_CLASS_INFO.interfaces)
- {
- if (checkInterfaces(superClass, rightOperand))
- {
- return true;
- }
- }
- superClass = superClass.constructor;
- superClass = superClass.superClass_;
- }
- }
-
- return false;
- }
-
- /**
- * Helper function for is()
- */
- private static function checkInterfaces(leftOperand:*, rightOperand:*):Boolean
- {
- var i:int, interfaces:Array;
-
- interfaces = leftOperand.FLEXJS_CLASS_INFO.interfaces;
- for (i = interfaces.length - 1; i > -1; i--) {
- if (interfaces[i] === rightOperand) {
- return true;
- }
-
- if (interfaces[i].prototype.FLEXJS_CLASS_INFO.interfaces) {
- var isit:Boolean = checkInterfaces(interfaces[i].prototype, rightOperand);
- if (isit) return true;
- }
- }
-
- return false;
- }
-
- /**
- * Implementation of "classDef is Class"
- */
- public function isClass(classDef:*):Boolean
- {
- return typeof classDef === 'function'
- && classDef.prototype
- && classDef.prototype.constructor === classDef;
- }
-
- /**
- * Implementation of "classDef as Class"
- */
- public function asClass(classDef:*):Class
- {
- return isClass(classDef) ? classDef : null;
- }
-
- /**
- * postdecrement handles foo--
- *
- * @param obj The object with the getter/setter.
- * @param prop The name of a property.
- * @return {number}
- */
- static public function postdecrement(obj:Object, prop:String):int
- {
- var value:int = obj[prop];
- obj[prop] = value - 1;
- return value;
- }
-
- /**
- * postincrement handles foo++
- *
- * @param obj The object with the getter/setter.
- * @param prop The name of a property.
- * @return {number}
- */
- static public function postincrement(obj:Object, prop:String):int
- {
- var value:int = obj[prop];
- obj[prop] = value + 1;
- return value;
- }
-
- /**
- * predecrement handles --foo
- *
- * @param obj The object with the getter/setter.
- * @param prop The name of a property.
- * @return {number}
- */
- static public function predecrement(obj:Object, prop:String):int
- {
- var value:int = obj[prop] - 1;
- obj[prop] = value;
- return value;
- }
-
- /**
- * preincrement handles ++foo
- *
- * @param obj The object with the getter/setter.
- * @param prop The name of a property.
- * @return {number}
- */
- static public function preincrement(obj:Object, prop:String):int
- {
- var value:int = obj[prop] + 1;
- obj[prop] = value;
- return value;
- }
-
- /**
- * superGetter calls the getter on the given class' superclass.
- *
- * @param clazz The class.
- * @param pthis The this pointer.
- * @param prop The name of the getter.
- * @return {Object}
- */
- static public function superGetter(clazz:Object, pthis:Object, prop:String):Object
- {
- var superClass:Object = clazz.superClass_;
- var superdesc:Object = Object.getOwnPropertyDescriptor(superClass, prop);
-
- while (superdesc == null)
- {
- superClass = superClass.constructor;
- superClass = superClass.superClass_;
- superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- }
- return superdesc.get.call(pthis);
- }
-
- /**
- * superSetter calls the setter on the given class' superclass.
- *
- * @param clazz The class.
- * @param pthis The this pointer.
- * @param prop The name of the getter.
- * @param value The value.
- */
- static public function superSetter(clazz:Object, pthis:Object, prop:String, value:Object):void
- {
- var superClass:Object = clazz.superClass_;
- var superdesc:Object = Object.getOwnPropertyDescriptor(superClass, prop);
-
- while (superdesc == null)
- {
- superClass = superClass.constructor;
- superClass = superClass.superClass_;
- superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
- }
- superdesc.set.apply(pthis, [value]);
- }
-
- static public function trace(...rest):void
- {
- var theConsole:*;
- var windowConsole:* = window.console;
-
- theConsole = goog.global.console;
-
- if (theConsole === undefined && windowConsole !== undefined)
- theConsole = windowConsole;
-
- try
- {
- if (theConsole && theConsole.log)
- {
- theConsole.log.apply(theConsole, rest);
- }
- }
- catch (e:Error)
- {
- // ignore; at least we tried ;-)
- }
- }
-
- /**
- * uint()
- *
- * @param value The value to be cast.
- * @return {number}
- */
- static public function uint(value:Number):Number
- {
- return value >>> 0;
- }
-
- /**
- * caches closures and returns the one closure
- *
- * @param fn The method on the instance.
- * @param object The instance.
- * @param boundMethodName The name to use to cache the closure.
- * @return The closure.
- */
- static public function closure(fn:Function, object:Object, boundMethodName:String):Function {
- if (object.hasOwnProperty(boundMethodName)) {
- return object[boundMethodName];
- }
- var boundMethod:Function = goog.bind(fn, object);
- Object.defineProperty(object, boundMethodName, {
- value: boundMethod
- });
- return boundMethod;
- };
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
deleted file mode 100644
index c69b550..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/MXMLDataInterpreter.as
+++ /dev/null
@@ -1,463 +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.utils
-{
-
-COMPILE::AS3
-{
- import flash.display.DisplayObject;
-}
-
-import org.apache.flex.core.IBead;
-import org.apache.flex.core.IContainer;
-import org.apache.flex.core.IDocument;
-import org.apache.flex.core.IMXMLDocument;
-import org.apache.flex.core.IParent;
-import org.apache.flex.core.IStrand;
-import org.apache.flex.events.Event;
-import org.apache.flex.events.IEventDispatcher;
-
-COMPILE::JS
-{
- import goog.bind;
- import org.apache.flex.core.IUIBase;
-}
-
-/**
- * The MXMLDataInterpreter class is the class that interprets the
- * encoded information generated by the compiler that describes
- * the contents of an MXML document.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignoreimport goog.bind
- */
-public class MXMLDataInterpreter
-{
- /**
- * Constructor. All methods are static so should not be instantiated.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function MXMLDataInterpreter()
- {
- super();
- }
-
-
- /**
- * Generates an object based on the encoded data.
- *
- * @param document The MXML document. If the object has an id
- * it will be assigned in this document in this method.
- * @param data The encoded data.
- * @return The object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function generateMXMLObject(document:Object, data:Array):Object
- {
- var i:int = 0;
- var cls:Class = data[i++];
- var comp:Object = new cls();
-
- if (comp is IStrand)
- initializeStrandBasedObject(document, null, comp, data, i);
- else
- {
- var m:int;
- var j:int;
- var name:String;
- var simple:*;
- var value:Object;
- var id:String;
-
- m = data[i++]; // num props
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- if (name == "id")
- id = value as String;
- if (name == "document" && !comp.document)
- comp.document = document;
- else if (name == "_id")
- id = value as String; // and don't assign to comp
- else if (name == "id")
- {
- // not all objects have to have their own id property
- try {
- comp["id"] = value;
- } catch (e:Error)
- {
-
- }
- }
- else
- comp[name] = value;
- }
- if (id)
- document[id] = comp;
-
- if (comp is IDocument)
- comp.setDocument(document, id);
- }
- return comp;
- }
-
- /**
- * Generates an Array of objects based on the encoded data.
- *
- * @param document The MXML document. If the object has an id
- * it will be assigned in this document in this method.
- * @param parent The parent for any display objects encoded in the array.
- * @param data The encoded data.
- * @return The Array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function generateMXMLArray(document:Object, parent:IParent, data:Array):Array
- {
- var comps:Array = [];
-
- var n:int = data.length;
- var i:int = 0;
- while (i < n)
- {
- var cls:Class = data[i++];
- var comp:Object = new cls();
-
- i = initializeStrandBasedObject(document, parent, comp, data, i);
-
- comps.push(comp);
- }
- return comps;
- }
-
- /**
- * @flexjsignorecoercion Function
- */
- private static function initializeStrandBasedObject(document:Object, parent:IParent, comp:Object, data:Array, i:int):int
- {
- var m:int;
- var j:int;
- var name:String;
- var simple:*;
- var value:Object;
- var id:String = null;
-
- m = data[i++]; // num props
- if (m > 0 && data[0] == "model")
- {
- m--;
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, parent, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- comp[name] = value;
- if (value is IBead && comp is IStrand)
- IStrand(comp).addBead(value as IBead);
- }
- var beadOffset:int = i + (m - 1) * 3;
- //if (beadOffset >= -1)
- // trace(beadOffset, data[beadOffset]);
- if (m > 0 && data[beadOffset] == "beads")
- {
- m--;
- }
- else
- beadOffset = -1;
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- if (name == "id")
- id = value as String;
- if (name == "document" && !comp.document)
- comp.document = document;
- else if (name == "_id")
- id = value as String; // and don't assign to comp
- else if (name == "id")
- {
- // not all objects have to have their own id property
- try {
- comp["id"] = value;
- } catch (e:Error)
- {
-
- }
- }
- else
- comp[name] = value;
- }
- if (beadOffset > -1)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- comp[name] = value;
- }
- m = data[i++]; // num styles
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- comp.setStyle(name, value);
- }
-
- COMPILE::AS3
- {
- // flexjs on the JS side won't have effects in here, they are regular properties
- // but falcon provides this set for SWFs for future compatibility with
- // the older flex-sdk.
- m = data[i++]; // num effects
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(document, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(document, value as Array);
- comp.setStyle(name, value);
- }
- }
-
- m = data[i++]; // num events
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- value = data[i++];
- COMPILE::AS3
- {
- comp.addEventListener(name, value);
- }
- COMPILE::JS
- {
- comp.addEventListener(name, goog.bind(value as Function, document));
- }
- }
-
- var children:Array = data[i++];
- if (children && comp is IMXMLDocument)
- {
- comp.setMXMLDescriptor(document, children);
- }
- COMPILE::AS3
- {
- if (parent && comp is DisplayObject)
- parent.addElement(comp, !(parent is IContainer));
- }
- COMPILE::JS
- {
- if (parent && comp is IUIBase)
- parent.addElement(comp, !(parent is IContainer));
- }
-
- if (children)
- {
- if (!(comp is IMXMLDocument))
- {
- generateMXMLInstances(document, comp as IParent, children);
- }
- }
-
- if (id)
- document[id] = comp;
-
- if (comp is IDocument)
- comp.setDocument(document, id);
-
- return i;
- }
-
- /**
- * Generates the instances of objects in an MXML document based on the encoded data.
- *
- * @param document The MXML document. If the object has an id
- * it will be assigned in this document in this method.
- * @param parent The parent for any display objects encoded in the array.
- * @param data The encoded data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function generateMXMLInstances(document:Object, parent:IParent, data:Array):void
- {
- if (!data) return;
-
- generateMXMLArray(document, parent, data);
- // maybe we can remove this. All IContainers should be IMXMLDocuments?
- if (parent is IContainer)
- {
- IContainer(parent).childrenAdded();
- }
- }
-
- /**
- * Generates the properties of the top-level object in an MXML document
- * based on the encoded data. This basically means setting the attributes
- * found on the tag and child tags that aren't in the default property.
- *
- * @param host The MXML document. If the object has an id
- * it will be assigned in this document in this method.
- * @param data The encoded data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion Function
- */
- public static function generateMXMLProperties(host:Object, data:Array):void
- {
- if (!data) return;
-
- var i:int = 0;
- var m:int;
- var j:int;
- var name:String;
- var simple:*;
- var value:Object;
- var id:String = null;
-
- m = data[i++]; // num props
- var beadOffset:int = i + (m - 1) * 3;
- //if (beadOffset >= -1)
- // (beadOffset, data[beadOffset]);
- if (m > 0 && data[beadOffset] == "beads")
- {
- m--;
- }
- else
- beadOffset = -1;
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(host, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(host, value as Array);
- if (name == "id")
- id = value as String;
- if (name == "_id")
- id = value as String; // and don't assign
- else
- host[name] = value;
- }
- if (beadOffset > -1)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(host, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(host, value as Array);
- host[name] = value;
- }
- m = data[i++]; // num styles
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(host, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(host, value as Array);
- host[name] = value;
- }
-
- COMPILE::AS3
- {
- // flexjs on the JS side won't have effects in here, they are regular properties
- // but falcon provides this set for SWFs for future compatibility with
- // the older flex-sdk.
- m = data[i++]; // num effects
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- simple = data[i++];
- value = data[i++];
- if (simple == null)
- value = generateMXMLArray(host, null, value as Array);
- else if (simple == false)
- value = generateMXMLObject(host, value as Array);
- host[name] = value;
- }
- }
-
- m = data[i++]; // num events
- for (j = 0; j < m; j++)
- {
- name = data[i++];
- value = data[i++];
- COMPILE::AS3
- {
- host.addEventListener(name, value as Function);
- }
- COMPILE::JS
- {
- host.addEventListener(name, goog.bind(value as Function, host));
- }
- }
-
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/MixinManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/MixinManager.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/MixinManager.as
deleted file mode 100644
index ab5dfed..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/MixinManager.as
+++ /dev/null
@@ -1,105 +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.utils
-{
-
-COMPILE::AS3
-{
- import flash.system.ApplicationDomain;
-}
-
-import org.apache.flex.core.IBead;
-import org.apache.flex.core.IFlexInfo;
-import org.apache.flex.core.IStrand;
-
-/**
- * The MixinManager class is the class that instantiates mixins
- * linked into the application. Mixins are classes with [Mixin]
- * metadata and are often linked in via the -includes option.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class MixinManager implements IBead
-{
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function MixinManager()
- {
- 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
- * @flexjsignorecoercion Array
- * @flexjsignorecoercion org.apache.flex.core.IFlexInfo
- * @flexjsignoreimport org.apache.flex.core.IFlexInfo
- */
- public function set strand(value:IStrand):void
- {
- _strand = value;
-
- COMPILE::AS3
- {
- var app:IFlexInfo = value as IFlexInfo;
- if (app)
- {
- var mixins:Array = app.info().mixins;
- var domain:ApplicationDomain = app.info().currentDomain;
- for each (var mixin:String in mixins)
- {
- var mixinClass:Object = domain.getDefinition(mixin);
- mixinClass.init(value);
- }
- }
- }
- COMPILE::JS
- {
- var app:IFlexInfo = value as IFlexInfo;
- if (app)
- {
- var mixins:Array = app.info()['mixins'] as Array;
- if (mixins) {
- var n:int = mixins.length;
- for (var i:int = 0; i < n; i++)
- {
- mixins[i].init(value);
- }
- }
- }
- }
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/PNGEncoder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/PNGEncoder.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/PNGEncoder.as
deleted file mode 100644
index d34ce13..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/PNGEncoder.as
+++ /dev/null
@@ -1,305 +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.utils
-{
-
-import flash.display.BitmapData;
-import flash.utils.ByteArray;
-
-/**
- * The PNGEncoder class converts raw bitmap images into encoded
- * images using Portable Network Graphics (PNG) lossless compression.
- *
- * <p>For the PNG specification, see http://www.w3.org/TR/PNG/</p>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
-COMPILE::AS3
-public class PNGEncoder
-{
-
- // this is a copy of mx.graphics.codec.PNGEncoder
-
- //--------------------------------------------------------------------------
- //
- // Class constants
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * The MIME type for a PNG image.
- */
- private static const CONTENT_TYPE:String = "image/png";
-
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function PNGEncoder()
- {
- super();
-
- initializeCRCTable();
- }
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * Used for computing the cyclic redundancy checksum
- * at the end of each chunk.
- */
- private var crcTable:Array;
-
- //--------------------------------------------------------------------------
- //
- // Properties
- //
- //--------------------------------------------------------------------------
-
- //----------------------------------
- // contentType
- //----------------------------------
-
- /**
- * The MIME type for the PNG encoded image.
- * The value is <code>"image/png"</code>.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function get contentType():String
- {
- return CONTENT_TYPE;
- }
-
- //--------------------------------------------------------------------------
- //
- // Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * Converts the pixels of a BitmapData object
- * to a PNG-encoded ByteArray object.
- *
- * @param bitmapData The input BitmapData object.
- *
- * @return Returns a ByteArray object containing PNG-encoded image data.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function encode(bitmapData:BitmapData):ByteArray
- {
- return internalEncode(bitmapData, bitmapData.width, bitmapData.height,
- bitmapData.transparent);
- }
-
- /**
- * Converts a ByteArray object containing raw pixels
- * in 32-bit ARGB (Alpha, Red, Green, Blue) format
- * to a new PNG-encoded ByteArray object.
- * The original ByteArray is left unchanged.
- *
- * @param byteArray The input ByteArray object containing raw pixels.
- * This ByteArray should contain
- * <code>4 * width * height</code> bytes.
- * Each pixel is represented by 4 bytes, in the order ARGB.
- * The first four bytes represent the top-left pixel of the image.
- * The next four bytes represent the pixel to its right, etc.
- * Each row follows the previous one without any padding.
- *
- * @param width The width of the input image, in pixels.
- *
- * @param height The height of the input image, in pixels.
- *
- * @param transparent If <code>false</code>, alpha channel information
- * is ignored but you still must represent each pixel
- * as four bytes in ARGB format.
- *
- * @return Returns a ByteArray object containing PNG-encoded image data.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function encodeByteArray(byteArray:ByteArray, width:int, height:int,
- transparent:Boolean = true):ByteArray
- {
- return internalEncode(byteArray, width, height, transparent);
- }
-
- /**
- * @private
- */
- private function initializeCRCTable():void
- {
- crcTable = [];
-
- for (var n:uint = 0; n < 256; n++)
- {
- var c:uint = n;
- for (var k:uint = 0; k < 8; k++)
- {
- if (c & 1)
- c = uint(uint(0xedb88320) ^ uint(c >>> 1));
- else
- c = uint(c >>> 1);
- }
- crcTable[n] = c;
- }
- }
-
- /**
- * @private
- */
- private function internalEncode(source:Object, width:int, height:int,
- transparent:Boolean = true):ByteArray
- {
- // The source is either a BitmapData or a ByteArray.
- var sourceBitmapData:BitmapData = source as BitmapData;
- var sourceByteArray:ByteArray = source as ByteArray;
-
- if (sourceByteArray)
- sourceByteArray.position = 0;
-
- // Create output byte array
- var png:ByteArray = new ByteArray();
-
- // Write PNG signature
- png.writeUnsignedInt(0x89504E47);
- png.writeUnsignedInt(0x0D0A1A0A);
-
- // Build IHDR chunk
- var IHDR:ByteArray = new ByteArray();
- IHDR.writeInt(width);
- IHDR.writeInt(height);
- IHDR.writeByte(8); // bit depth per channel
- IHDR.writeByte(6); // color type: RGBA
- IHDR.writeByte(0); // compression method
- IHDR.writeByte(0); // filter method
- IHDR.writeByte(0); // interlace method
- writeChunk(png, 0x49484452, IHDR);
-
- // Build IDAT chunk
- var IDAT:ByteArray = new ByteArray();
- for (var y:int = 0; y < height; y++)
- {
- IDAT.writeByte(0); // no filter
-
- var x:int;
- var pixel:uint;
-
- if (!transparent)
- {
- for (x = 0; x < width; x++)
- {
- if (sourceBitmapData)
- pixel = sourceBitmapData.getPixel(x, y);
- else
- pixel = sourceByteArray.readUnsignedInt();
-
- IDAT.writeUnsignedInt(uint(((pixel & 0xFFFFFF) << 8) | 0xFF));
- }
- }
- else
- {
- for (x = 0; x < width; x++)
- {
- if (sourceBitmapData)
- pixel = sourceBitmapData.getPixel32(x, y);
- else
- pixel = sourceByteArray.readUnsignedInt();
-
- IDAT.writeUnsignedInt(uint(((pixel & 0xFFFFFF) << 8) |
- (pixel >>> 24)));
- }
- }
- }
- IDAT.compress();
- writeChunk(png, 0x49444154, IDAT);
-
- // Build IEND chunk
- writeChunk(png, 0x49454E44, null);
-
- // return PNG
- png.position = 0;
- return png;
- }
-
- /**
- * @private
- */
- private function writeChunk(png:ByteArray, type:uint, data:ByteArray):void
- {
- // Write length of data.
- var len:uint = 0;
- if (data)
- len = data.length;
- png.writeUnsignedInt(len);
-
- // Write chunk type.
- var typePos:uint = png.position;
- png.writeUnsignedInt(type);
-
- // Write data.
- if (data)
- png.writeBytes(data);
-
- // Write CRC of chunk type and data.
- var crcPos:uint = png.position;
- png.position = typePos;
- var crc:uint = 0xFFFFFFFF;
- for (var i:uint = typePos; i < crcPos; i++)
- {
- crc = uint(crcTable[(crc ^ png.readUnsignedByte()) & uint(0xFF)] ^
- uint(crc >>> 8));
- }
- crc = uint(crc ^ uint(0xFFFFFFFF));
- png.position = crcPos;
- png.writeUnsignedInt(crc);
- }
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/PointUtils.as
deleted file mode 100644
index 09c88b4..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/PointUtils.as
+++ /dev/null
@@ -1,125 +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.utils
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObject;
- import flash.geom.Point;
- }
-
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.geom.Point;
-
- /**
- * The PointUtils class is a collection of static functions that convert
- * Points between coordinate spaces.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class PointUtils
- {
- /**
- * @private
- */
- public function PointUtils()
- {
- throw new Error("PointUtils should not be instantiated.");
- }
-
- /**
- * Converts a point from global coordinates to local coordinates
- *
- * @param point The point being converted.
- * @param local The component used as reference for the conversion.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion HTMLElement
- */
- public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
- {
- COMPILE::AS3
- {
- var fpt:flash.geom.Point = DisplayObject(local).globalToLocal(pt);
- return new org.apache.flex.geom.Point(fpt.x, fpt.y);
- }
- COMPILE::JS
- {
- var x:Number = pt.x;
- var y:Number = pt.y;
- var element:HTMLElement = local.element as HTMLElement;
-
- do {
- x -= element.offsetLeft;
- y -= element.offsetTop;
- if (local.hasOwnProperty('parent')) {
- local = local.parent;
- element = local.element as HTMLElement;
- } else {
- element = null;
- }
- }
- while (element);
- return new org.apache.flex.geom.Point(x, y);
-
- }
- }
-
- /**
- * Converts a point from local coordinates to global coordinates
- *
- * @param point The point being converted.
- * @param local The component used as reference for the conversion.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion HTMLElement
- */
- public static function localToGlobal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
- {
- COMPILE::AS3
- {
- var fpt:flash.geom.Point = DisplayObject(local).localToGlobal(pt);
- return new org.apache.flex.geom.Point(fpt.x, fpt.y);
- }
- COMPILE::JS
- {
- var x:Number = pt.x;
- var y:Number = pt.y;
- var element:HTMLElement = local.element as HTMLElement;
-
- do {
- x += element.offsetLeft;
- y += element.offsetTop;
- element = element.offsetParent as HTMLElement;
- }
- while (element);
- return new org.apache.flex.geom.Point(x, y);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/SolidBorderUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/SolidBorderUtil.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/SolidBorderUtil.as
deleted file mode 100644
index bb74b2a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/SolidBorderUtil.as
+++ /dev/null
@@ -1,191 +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.utils
-{
-import flash.display.Graphics;
-
-
-/**
- * The SolidBorderUtil class is a utility class that draws a solid color
- * border of a specified color, thickness and alpha. This class is used
- * to composite Flash equivalents of JS entities and has no JS
- * equivalent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::AS3
-public class SolidBorderUtil
-{
- /**
- * Draw a solid color border as specified. Will fill with
- * the backgroundColor if specified. The border draws
- * inside with given width/height.
- *
- * @param g The flash.display.DisplayObject#graphics
- * @param x The x position
- * @param y The y position
- * @param width The width
- * @param height The height
- * @param color The color
- * @param backgroundColor The optional fill color
- * @param thickness The thickness of the border
- * @param alpha The alpha
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function drawBorder(g:Graphics, x:Number, y:Number,
- width:Number, height:Number,
- color:uint, backgroundColor:Object = null,
- thickness:int = 1, alpha:Number = 1.0,
- ellipseWidth:Number = NaN, ellipseHeight:Number = NaN):void
- {
- g.lineStyle(); // don't draw the line, it tends to get aligned on half-pixels
-
- if (thickness > 0)
- {
- g.beginFill(color, alpha);
- if (!isNaN(ellipseWidth))
- {
- g.drawRoundRect(x, y, width, height, ellipseWidth, ellipseHeight);
- g.drawRoundRect(x + thickness, y + thickness,
- width - thickness * 2, height - thickness * 2,
- ellipseWidth, ellipseHeight);
- }
- else
- {
- g.drawRect(x, y, width, height);
- g.drawRect(x + thickness, y + thickness,
- width - thickness * 2, height - thickness * 2);
- }
- g.endFill();
- }
-
- if (backgroundColor != null)
- {
- g.beginFill(uint(backgroundColor), alpha);
-
- if (!isNaN(ellipseWidth))
- g.drawRoundRect(x + thickness, y + thickness,
- width - thickness * 2, height - thickness * 2,
- ellipseWidth, ellipseHeight);
- else
- g.drawRect(x + thickness, y + thickness,
- width - thickness * 2, height - thickness * 2);
- g.endFill();
- }
- }
-
- /**
- * Draw a solid color border as specified. Only square corners
- * are supported as the real usage for this is to handle
- * CSS triangles. The border is drawn around the given
- * width and height.
- *
- * @param g The flash.display.DisplayObject#graphics
- * @param x The x position
- * @param y The y position
- * @param width The width
- * @param height The height
- * @param colorTop The rgba color (alpha is in highest order byte)
- * @param colorRight The rgba color
- * @param colorBottom The rgba color
- * @param colorLeft The rgba color
- * @param backgroundColor The optional fill color
- * @param thicknessTop The thickness of the border
- * @param thicknessRight The thickness of the border
- * @param thicknessBottom The thickness of the border
- * @param thicknessLeft The thickness of the border
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function drawDetailedBorder(g:Graphics, x:Number, y:Number,
- width:Number, height:Number,
- colorTop:uint, colorRight:uint, colorBottom:uint, colorLeft:uint,
- thicknessTop:int = 0, thicknessRight:int = 0, thicknessBottom:int = 0, thicknessLeft:int = 0
- ):void
- {
- g.lineStyle(); // don't draw the line, it tends to get aligned on half-pixels
-
- var color:uint;
- var alpha:Number;
- if (thicknessTop > 0)
- {
- color = colorTop & 0xFFFFFF;
- alpha = (colorTop >>> 24 & 0xFF) / 255;
- g.beginFill(color, alpha);
- g.moveTo(0, 0);
- g.lineTo(width + thicknessRight + thicknessLeft, 0);
- if (width > 0)
- g.lineTo(width + thicknessLeft, thicknessTop);
- g.lineTo(thicknessLeft, thicknessTop);
- g.lineTo(0, 0);
- g.endFill();
- }
- if (thicknessLeft > 0)
- {
- color = colorLeft & 0xFFFFFF;
- alpha = (colorLeft >>> 24 & 0xFF) / 255;
- g.beginFill(color, alpha);
- g.moveTo(0, 0);
- g.lineTo(thicknessLeft, thicknessTop);
- if (height > 0)
- g.lineTo(thicknessLeft, thicknessTop + height);
- g.lineTo(0, height + thicknessBottom);
- g.lineTo(0, 0);
- g.endFill();
- }
- if (thicknessRight > 0)
- {
- color = colorRight & 0xFFFFFF;
- alpha = (colorRight >>> 24 & 0xFF) / 255;
- g.beginFill(color, alpha);
- g.moveTo(width + thicknessRight + thicknessLeft, 0);
- g.lineTo(width + thicknessRight + thicknessLeft, height + thicknessBottom + thicknessTop);
- if (height > 0)
- g.lineTo(width + thicknessLeft, height + thicknessTop);
- g.lineTo(width + thicknessLeft, thicknessTop);
- g.lineTo(width + thicknessRight + thicknessLeft, 0);
- g.endFill();
- }
- if (thicknessBottom > 0)
- {
- color = colorBottom & 0xFFFFFF;
- alpha = (colorBottom >>> 24 & 0xFF) / 255;
- g.beginFill(color, alpha);
- g.moveTo(0, height + thicknessBottom + thicknessTop);
- g.lineTo(thicknessLeft, height + thicknessTop);
- if (width > 0)
- g.lineTo(width + thicknessLeft, height + thicknessTop);
- g.lineTo(width + thicknessRight + thicknessLeft, height + thicknessBottom + thicknessTop);
- g.lineTo(0, height + thicknessBottom + thicknessTop);
- g.endFill();
- }
- }
-
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/StringTrimmer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/StringTrimmer.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/StringTrimmer.as
deleted file mode 100644
index fe170df..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/StringTrimmer.as
+++ /dev/null
@@ -1,176 +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.utils
-{
-
- /**
- * The StringTrimmer class is a collection of static functions that provide utility
- * features for trimming whitespace off Strings.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class StringTrimmer
- {
- /**
- * @private
- */
- public function StringTrimmer()
- {
- throw new Error("StringTrimmer should not be instantiated.");
- }
-
- /**
- * Removes all whitespace characters from the beginning and end
- * of the specified string.
- *
- * @param str The String whose whitespace should be trimmed.
- *
- * @return Updated String where whitespace was removed from the
- * beginning and end.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function trim(str:String):String
- {
- if (str == null) return '';
-
- var startIndex:int = 0;
- while (isWhitespace(str.charAt(startIndex)))
- ++startIndex;
-
- var endIndex:int = str.length - 1;
- while (isWhitespace(str.charAt(endIndex)))
- --endIndex;
-
- if (endIndex >= startIndex)
- return str.slice(startIndex, endIndex + 1);
- else
- return "";
- }
-
- /**
- * Removes all whitespace characters from the beginning and end
- * of each element in an Array, where the Array is stored as a String.
- *
- * @param value The String whose whitespace should be trimmed.
- *
- * @param separator The String that delimits each Array element in the string.
- *
- * @return Array where whitespace was removed from the
- * beginning and end of each element.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function splitAndTrim(value:String, delimiter:String):Array
- {
- if (value != "" && value != null)
- {
- var items:Array = value.split(delimiter);
-
- var len:int = items.length;
- for (var i:int = 0; i < len; i++)
- {
- items[i] = StringTrimmer.trim(items[i]);
- }
- return items;
- }
-
- return [];
- }
-
- /**
- * Removes all whitespace characters from the beginning and end
- * of each element in an Array, where the Array is stored as a String.
- *
- * @param value The String whose whitespace should be trimmed.
- *
- * @param separator The String that delimits each Array element in the string.
- *
- * @return Updated String where whitespace was removed from the
- * beginning and end of each element.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function trimArrayElements(value:String, delimiter:String):String
- {
- if (value != "" && value != null)
- {
- var items:Array = splitAndTrim(value, delimiter);
- if (items.length > 0)
- {
- value = items.join(delimiter);
- }
- }
-
- return value;
- }
-
- /**
- * Returns <code>true</code> if the specified string is
- * a single space, tab, carriage return, newline, or formfeed character.
- *
- * @param str The String that is is being queried.
- *
- * @return <code>true</code> if the specified string is
- * a single space, tab, carriage return, newline, or formfeed character.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function isWhitespace(character:String):Boolean
- {
- switch (character)
- {
- case " ":
- case "\t":
- case "\r":
- case "\n":
- case "\f":
- // non breaking space
- case "\u00A0":
- // line seperator
- case "\u2028":
- // paragraph seperator
- case "\u2029":
- // ideographic space
- case "\u3000":
- return true;
-
- default:
- return false;
- }
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/Timer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/Timer.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/Timer.as
deleted file mode 100644
index 582d884..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/Timer.as
+++ /dev/null
@@ -1,148 +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.utils
-{
-COMPILE::AS3
-{
- import flash.events.TimerEvent;
- import flash.utils.Timer;
-}
-
-import org.apache.flex.events.Event;
-
-COMPILE::JS
-{
- import org.apache.flex.events.EventDispatcher;
-}
-
-//--------------------------------------
-// Events
-//--------------------------------------
-
-/**
- * Dispatched as requested via the delay and
- * repeat count parameters in the constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-[Event(name="timer", type="org.apache.flex.events.Event")]
-
-/**
- * The Timer class dispatches events based on a delay
- * and repeat count.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::AS3
-public class Timer extends flash.utils.Timer
-{
- /**
- * Constructor.
- *
- * @param delay The number of milliseconds
- * to wait before dispatching the event.
- * @param repeatCount The number of times to dispatch
- * the event. If 0, keep dispatching forever.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Timer(delay:Number, repeatCount:int = 0)
- {
- super(delay, repeatCount);
- addEventListener("timer", interceptor, false, 9999);
- }
-
- private function interceptor(event:flash.events.Event):void
- {
- if (event is TimerEvent)
- {
- event.stopImmediatePropagation();
- dispatchEvent(new Event("timer"));
- }
- }
-}
-
-COMPILE::JS
-public class Timer extends EventDispatcher
-{
- /**
- * Constructor.
- *
- * @param delay The number of milliseconds
- * to wait before dispatching the event.
- * @param repeatCount The number of times to dispatch
- * the event. If 0, keep dispatching forever.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Timer(delay:Number, repeatCount:int = 0)
- {
- this.delay = delay;
- this.repeatCount = repeatCount;
- }
-
- public var delay:Number;
- public var repeatCount:int;
-
- private var currentCount:int = 0;
-
- private var timerInterval:int = -1;
-
- public function reset():void
- {
- stop();
- currentCount = 0;
- }
-
- public function stop():void
- {
- clearInterval(timerInterval);
- timerInterval = -1;
- }
-
- public function start():void
- {
- timerInterval =
- setInterval(timerHandler, delay);
- }
-
- private function timerHandler():void
- {
- currentCount++;
- if (repeatCount > 0 && currentCount >= repeatCount) {
- stop();
- }
-
- dispatchEvent(new Event('timer'));
- }
-}
-
-}
[13/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleApplication.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleApplication.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleApplication.as
deleted file mode 100644
index 5d4d918..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleApplication.as
+++ /dev/null
@@ -1,102 +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
-{
- COMPILE::AS3
- {
- import flash.display.DisplayObject;
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageQuality;
- import flash.display.StageScaleMode;
- import flash.events.Event;
- import flash.system.ApplicationDomain;
- import flash.utils.getQualifiedClassName;
- }
-
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.MouseEvent;
- import org.apache.flex.events.utils.MouseEventConverter;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- /**
- * The SimpleApplication class can be used as the main class and entry point
- * for low-level ActionScript-only FlexJS
- * applications. It is not indended for use in MXML applications or most
- * of the FlexJS components as they expect a certain application lifecycle
- * in the org.apache.flex.core.Application class.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SimpleApplication extends ApplicationBase
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function SimpleApplication()
- {
- super();
- COMPILE::AS3
- {
- if (stage)
- {
- stage.align = StageAlign.TOP_LEFT;
- stage.scaleMode = StageScaleMode.NO_SCALE;
- // should be opt-in
- //stage.quality = StageQuality.HIGH_16X16_LINEAR;
- }
-
- loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
- }
- }
-
- COMPILE::AS3
- private function initHandler(event:flash.events.Event):void
- {
- start();
- }
-
- /**
- * The entry point. Override this and put all of your code in here.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function start():void
- {
- COMPILE::JS
- {
- this.element = document.getElementsByTagName('body')[0];
- this.element.flexjs_wrapper = this;
- this.element.className = 'SimpleApplication';
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSStyles.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSStyles.as
deleted file mode 100644
index 6e83b2d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSStyles.as
+++ /dev/null
@@ -1,106 +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;
-
- /**
- * The SimpleCSSStyles class contains CSS style
- * properties supported by SimpleCSSValuesImpl.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SimpleCSSStyles
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function SimpleCSSStyles()
- {
- super();
- }
-
- public var styleList:Object = {
- "top": 1,
- "bottom": 1,
- "left": 1,
- "right": 1,
- "padding": 1,
- "paddingLeft": 1,
- "paddingRight": 1,
- "paddingTop": 1,
- "paddingBottom": 1,
- "margin": 1,
- "marginLeft": 1,
- "marginRight": 1,
- "marginTop": 1,
- "marginBottom": 1,
- "verticalAlign": 1,
- "fontFamily": 1,
- "fontSize": 1,
- "color": 1,
- "fontWeight": 1,
- "fontStyle": 1,
- "backgroundAlpha": 1,
- "backgroundColor": 1,
- "backgroundImage": 1,
- "borderColor": 1,
- "borderStyle": 1,
- "borderRadius": 1,
- "borderWidth": 1
- };
-
- public var top:*;
- public var bottom:*;
- public var left:*;
- public var right:*;
- public var padding:*;
- public var paddingLeft:*;
- public var paddingRight:*;
- public var paddingTop:*;
- public var paddingBottom:*;
- public var margin:*;
- public var marginLeft:*;
- public var marginRight:*;
- public var marginTop:*;
- public var marginBottom:*;
- public var verticalAlign:*;
- public var fontFamily:*;
- public var fontSize:*;
- public var color:*;
- public var fontWeight:*;
- public var fontStyle:*;
- public var backgroundAlpha:*;
- public var backgroundColor:*;
- public var backgroundImage:*;
- public var borderColor:*;
- public var borderStyle:*;
- public var borderRadius:*;
- public var borderWidth:*;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
deleted file mode 100644
index e64a517..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ /dev/null
@@ -1,765 +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
-{
- COMPILE::AS3
- {
- import flash.system.ApplicationDomain;
- import flash.utils.getDefinitionByName;
- import flash.utils.getQualifiedClassName;
- import flash.utils.getQualifiedSuperclassName;
- }
-
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.ValueChangeEvent;
- import org.apache.flex.events.ValueEvent;
- import org.apache.flex.utils.CSSUtils;
-
- /**
- * The SimpleCSSValuesImpl class implements a minimal set of
- * CSS lookup rules that is sufficient for most applications.
- * It does not support attribute selectors or descendant selectors
- * or id selectors. It will filter on a custom -flex-flash
- * media query but not other media queries. It can be
- * replaced with other implementations that handle more complex
- * selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SimpleCSSValuesImpl extends EventDispatcher implements IValuesImpl
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function SimpleCSSValuesImpl()
- {
- super();
- }
-
- private var mainClass:Object;
-
- private var conditionCombiners:Object;
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#init()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function init(mainClass:Object):void
- {
- var styleClassName:String;
- var c:Class;
- if (!values)
- {
- values = {};
- this.mainClass = mainClass;
- var mainClassName:String = getQualifiedClassName(mainClass);
- styleClassName = "_" + mainClassName + "_Styles";
- c = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
- generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
- }
- c = mainClass.constructor as Class;
- generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
- if (hasEventListener("init"))
- dispatchEvent(new ValueEvent("init", false, false, c["fontFaces"]));
-
- var i:int = 1;
- while (true)
- {
- var ffName:String = "factoryFunctions" + i.toString();
- var ff:Object = c[ffName];
- if (ff == null)
- break;
- generateCSSStyleDeclarations(c[ffName], c["data" + i.toString()]);
- if (hasEventListener("init"))
- dispatchEvent(new ValueEvent("init", false, false, c["fontFaces" + i.toString()]));
- i++;
- }
- }
-
- COMPILE::JS
- public function init(mainClass:Object):void
- {
- var cssData:Array = mainClass.cssData;
- var values:Object = this.values;
- if (values == null)
- values = {};
-
- if (cssData) {
- var n:int = cssData.length;
- var i:int = 0;
- while (i < n)
- {
- var numMQ:int = cssData[i++];
- if (numMQ > 0)
- {
- // skip MediaQuery tests for now
- i += numMQ;
- }
- var numSel:int = cssData[i++];
- var props:Object = {};
- for (var j:int = 0; j < numSel; j++)
- {
- var selName:String = cssData[i++];
- if (values[selName])
- props = values[selName];
- values[selName] = props;
- }
- var numProps:int = cssData[i++];
- for (j = 0; j < numProps; j++)
- {
- var propName:String = cssData[i++];
- var propValue:Object = cssData[i++];
- props[propName] = propValue;
- }
- }
- }
-
- this.values = values;
- }
-
- /**
- * Process the encoded CSS data into data structures. Usually not called
- * directly by application developers.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public function generateCSSStyleDeclarations(factoryFunctions:Object, arr:Array):void
- {
- if (factoryFunctions == null)
- return;
- if (arr == null)
- return;
-
- var declarationName:String = "";
- var segmentName:String = "";
- var n:int = arr.length;
- for (var i:int = 0; i < n; i++)
- {
- var className:int = arr[i];
- if (className == CSSClass.CSSSelector)
- {
- var selectorName:String = arr[++i];
- segmentName = selectorName + segmentName;
- if (declarationName != "")
- declarationName += " ";
- declarationName += segmentName;
- segmentName = "";
- }
- else if (className == CSSClass.CSSCondition)
- {
- if (!conditionCombiners)
- {
- conditionCombiners = {};
- conditionCombiners["class"] = ".";
- conditionCombiners["id"] = "#";
- conditionCombiners["pseudo"] = ':';
- }
- var conditionType:String = arr[++i];
- var conditionName:String = arr[++i];
- segmentName = segmentName + conditionCombiners[conditionType] + conditionName;
- }
- else if (className == CSSClass.CSSStyleDeclaration)
- {
- var factoryName:int = arr[++i]; // defaultFactory or factory
- var defaultFactory:Boolean = factoryName == CSSFactory.DefaultFactory;
- /*
- if (defaultFactory)
- {
- mergedStyle = styleManager.getMergedStyleDeclaration(declarationName);
- style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
- }
- else
- {
- style = styleManager.getStyleDeclaration(declarationName);
- if (!style)
- {
- style = new CSSStyleDeclaration(selector, styleManager, mergedStyle == null);
- if (factoryName == CSSFactory.Override)
- newSelectors.push(style);
- }
- }
- */
- var mq:String = null;
- var o:Object;
- if (i < n - 2)
- {
- // peek ahead to see if there is a media query
- if (arr[i + 1] == CSSClass.CSSMediaQuery)
- {
- mq = arr[i + 2];
- i += 2;
- declarationName = mq + "_" + declarationName;
- }
- }
- var finalName:String;
- var valuesFunction:Function;
- var valuesObject:Object;
- if (defaultFactory)
- {
- valuesFunction = factoryFunctions[declarationName];
- valuesObject = new valuesFunction();
- }
- else
- {
- valuesFunction = factoryFunctions[declarationName];
- valuesObject = new valuesFunction();
- }
- if (isValidStaticMediaQuery(mq))
- {
- finalName = fixNames(declarationName, mq);
- o = values[finalName];
- if (o == null)
- values[finalName] = valuesObject;
- else
- {
- valuesFunction["prototype"] = o;
- values[finalName] = new valuesFunction();
- }
- }
- declarationName = "";
- }
- }
-
- }
-
- private function isValidStaticMediaQuery(mq:String):Boolean
- {
- if (mq == null)
- return true;
-
- if (mq == "-flex-flash")
- return true;
-
- // TODO: (aharui) other media query
-
- return false;
- }
-
- private function fixNames(s:String, mq:String):String
- {
- if (mq != null)
- s = s.substr(mq.length + 1); // 1 more for the hyphen
-
- if (s == "")
- return "*";
-
- var arr:Array = s.split(" ");
- var n:int = arr.length;
- for (var i:int = 0; i < n; i++)
- {
- var segmentName:String = arr[i];
- if (segmentName.charAt(0) == "#" || segmentName.charAt(0) == ".")
- continue;
-
- var c:int = segmentName.lastIndexOf(".");
- if (c > -1) // it is 0 for class selectors
- {
- segmentName = segmentName.substr(0, c) + "::" + segmentName.substr(c + 1);
- arr[i] = segmentName;
- }
- }
- return arr.join(" ");
- }
-
- /**
- * The map of values. The format is not documented and it is not recommended
- * to manipulate this structure directly.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var values:Object;
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#getValue()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
- {
- var c:int = valueName.indexOf("-");
- while (c != -1)
- {
- valueName = valueName.substr(0, c) +
- valueName.charAt(c + 1).toUpperCase() +
- valueName.substr(c + 2);
- c = valueName.indexOf("-");
- }
-
- var value:*;
- var o:Object;
- var className:String;
- var selectorName:String;
-
- if (thisObject is IStyleableObject)
- {
- var styleable:IStyleableObject = IStyleableObject(thisObject);
- if (styleable.style != null)
- {
- try {
- value = styleable.style[valueName];
- }
- catch (e:Error) {
- value = undefined;
- }
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- if (styleable.id != null)
- {
- o = values["#" + styleable.id];
- if (o)
- {
- value = o[valueName];
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- }
- var classNames:String = styleable.className;
- if (classNames)
- {
- var classNameList:Array = classNames.split(" ");
- for each (className in classNameList)
- {
- if (state)
- {
- selectorName = className + ":" + state;
- o = values["." + selectorName];
- if (o)
- {
- value = o[valueName];
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- }
-
- o = values["." + className];
- if (o)
- {
- value = o[valueName];
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- }
- }
- }
-
- COMPILE::AS3
- {
- className = getQualifiedClassName(thisObject);
- }
- COMPILE::JS
- {
- className = thisObject.FLEXJS_CLASS_INFO.names[0].qName;
- }
- var thisInstance:Object = thisObject;
- while (className != "Object")
- {
- if (state)
- {
- selectorName = className + ":" + state;
- o = values[selectorName];
- if (o)
- {
- value = o[valueName];
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- }
-
- o = values[className];
- if (o)
- {
- value = o[valueName];
- if (value == "inherit")
- return getInheritingValue(thisObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- COMPILE::AS3
- {
- className = getQualifiedSuperclassName(thisInstance);
- thisInstance = getDefinitionByName(className);
- }
- COMPILE::JS
- {
- var constructorAsObject:Object = thisInstance["constructor"];
- thisInstance = constructorAsObject.superClass_;
- if (!thisInstance || !thisInstance.FLEXJS_CLASS_INFO)
- break;
-
- className = thisInstance.FLEXJS_CLASS_INFO.names[0].qName;
- }
- }
-
- if (inheritingStyles[valueName] != null &&
- thisObject is IChild)
- {
- var parentObject:Object = IChild(thisObject).parent;
- if (parentObject)
- return getValue(parentObject, valueName, state, attrs);
- }
-
- o = values["global"];
- if (o)
- {
- value = o[valueName];
- if (value !== undefined)
- return value;
- }
- o = values["*"];
- if(o)
- {
- return o[valueName];
- }
- return undefined;
- }
-
- private function getInheritingValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
- {
- var value:*;
- if (thisObject is IChild)
- {
- var parentObject:Object = IChild(thisObject).parent;
- if (parentObject)
- {
- value = getValue(parentObject, valueName, state, attrs);
- if (value == "inherit" || value === undefined)
- return getInheritingValue(parentObject, valueName, state, attrs);
- if (value !== undefined)
- return value;
- }
- return undefined;
- }
- return "inherit";
- }
-
- /**
- * A method that stores a value to be shared with other objects.
- * It is global, not per instance. Fancier implementations
- * may store shared values per-instance.
- *
- * @param thisObject An object associated with this value. Thiis
- * parameter is ignored.
- * @param valueName The name or key of the value being stored.
- * @param The value to be stored.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setValue(thisObject:Object, valueName:String, value:*):void
- {
- var c:int = valueName.indexOf("-");
- while (c != -1)
- {
- valueName = valueName.substr(0, c) +
- valueName.charAt(c + 1).toUpperCase() +
- valueName.substr(c + 2);
- c = valueName.indexOf("-");
- }
- var oldValue:Object = values[valueName];
- if (oldValue != value)
- {
- values[valueName] = value;
- dispatchEvent(new ValueChangeEvent(ValueChangeEvent.VALUE_CHANGE, false, false, oldValue, value));
- }
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#newInstance()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
- {
- var c:Class = getValue(thisObject, valueName, state, attrs);
- if (c)
- return new c();
- return null;
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#getInstance()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- * @flexjsignorecoercion Function
- */
- public function getInstance(valueName:String):Object
- {
- var o:Object = values["global"];
- o = o[valueName];
- COMPILE::AS3
- {
- var i:Class = o as Class;
- }
- COMPILE::JS
- {
- var i:Function = null;
- if (typeof(o) === "function")
- i = o as Function;
- }
- if (i)
- {
- o[valueName] = new i();
- var d:IDocument = o[valueName] as IDocument;
- if (d)
- d.setDocument(mainClass);
- }
- return o;
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#convertColor()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function convertColor(value:Object):uint
- {
- return CSSUtils.toColor(value);
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#parseStyles()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function parseStyles(styles:String):Object
- {
- var obj:Object = {};
- var parts:Array = styles.split(";");
- for each (var part:String in parts)
- {
- var pieces:Array = part.split(":");
- var value:String = pieces[1];
- if (value == "null")
- obj[pieces[0]] = null;
- else if (value == "true")
- obj[pieces[0]] = true;
- else if (value == "false")
- obj[pieces[0]] = false;
- else
- {
- var n:Number = Number(value);
- if (isNaN(n))
- {
- if (value.charAt(0) == "#")
- {
- obj[pieces[0]] = CSSUtils.toColor(value);
- }
- else
- {
- if (value.charAt(0) == "'")
- value = value.substr(1, value.length - 2);
- else if (value.charAt(0) == '"')
- value = value.substr(1, value.length - 2);
- obj[pieces[0]] = value;
- }
- }
- else
- obj[pieces[0]] = n;
- }
- }
- return obj;
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#addRule()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addRule(ruleName:String, values:Object):void
- {
- var asValues:Object = {};
- for (var valueName:String in values)
- {
- var v:* = values[valueName];
- var c:int = valueName.indexOf("-");
- while (c != -1)
- {
- valueName = valueName.substr(0, c) +
- valueName.charAt(c + 1).toUpperCase() +
- valueName.substr(c + 2);
- c = valueName.indexOf("-");
- }
- asValues[valueName] = v;
- }
- this.values[ruleName] = asValues;
- }
-
- /**
- * A map of inheriting styles
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var inheritingStyles:Object = {
- "color" : 1,
- "fontFamily" : 1,
- "fontSize" : 1,
- "fontStyle" : 1,
- "textAlign" : 1
- }
-
- /**
- * The styles that apply to each UI widget
- */
- COMPILE::JS
- public static var perInstanceStyles:Object = {
- 'backgroundColor': 1,
- 'backgroundImage': 1,
- 'color': 1,
- 'fontFamily': 1,
- 'fontWeight': 1,
- 'fontSize': 1,
- 'fontStyle': 1
- }
-
-
- /**
- * The styles that use color format #RRGGBB
- */
- COMPILE::JS
- public static var colorStyles:Object = {
- 'backgroundColor': 1,
- 'borderColor': 1,
- 'color': 1
- }
-
-
- /**
- * The properties that enumerate that we skip
- */
- COMPILE::JS
- public static var skipStyles:Object = {
- 'constructor': 1
- }
-
-
-
- /**
- * @param thisObject The object to apply styles to;
- * @param styles The styles.
- */
- COMPILE::JS
- public function applyStyles(thisObject:IUIBase, styles:Object):void
- {
- var styleList:Object = SimpleCSSValuesImpl.perInstanceStyles;
- var colorStyles:Object = SimpleCSSValuesImpl.colorStyles;
- var skipStyles:Object = SimpleCSSValuesImpl.skipStyles;
- var listObj:Object = styles;
- if (styles.styleList)
- listObj = styles.styleList;
- for (var p:String in listObj)
- {
- //if (styleList[p])
- if (skipStyles[p])
- continue;
- var value:* = styles[p];
- if (value === undefined)
- continue;
- if (typeof(value) == 'number') {
- if (colorStyles[p])
- value = '#' + value.toString(16);
- else
- value = value.toString() + 'px';
- }
- else if (p == 'backgroundImage') {
- if (p.indexOf('url') !== 0)
- value = 'url(' + value + ')';
- }
- thisObject.element.style[p] = value;
- }
- }
- }
-}
-
-COMPILE::AS3
-class CSSClass
-{
- public static const CSSSelector:int = 0;
- public static const CSSCondition:int = 1;
- public static const CSSStyleDeclaration:int = 2;
- public static const CSSMediaQuery:int = 3;
-}
-
-COMPILE::AS3
-class CSSFactory
-{
- public static const DefaultFactory:int = 0;
- public static const Factory:int = 1;
- public static const Override:int = 2;
-}
-
-COMPILE::AS3
-class CSSDataType
-{
- public static const Native:int = 0;
- public static const Definition:int = 1;
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleStatesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleStatesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleStatesImpl.as
deleted file mode 100644
index 4a27318..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleStatesImpl.as
+++ /dev/null
@@ -1,222 +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.states.AddItems;
- import org.apache.flex.states.SetEventHandler;
- import org.apache.flex.states.SetProperty;
- import org.apache.flex.states.State;
-
- import org.apache.flex.core.IChild;
- import org.apache.flex.core.IParent;
- import org.apache.flex.core.IStatesObject;
- 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.utils.MXMLDataInterpreter;
-
- /**
- * The SimpleStatesImpl class implements a minimal set of
- * view state functionality that is sufficient for most applications.
- * It only supports AddItems and SetProperty changes at this time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SimpleStatesImpl extends EventDispatcher implements IStatesImpl, IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function SimpleStatesImpl()
- {
- 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 function initialStateHandler(event:org.apache.flex.events.Event):void
- {
- sawInitComplete = true;
- stateChangeHandler(new ValueChangeEvent("currentStateChange", false, false, null,
- IStatesObject(_strand).currentState));
- }
-
- private function stateChangeHandler(event:ValueChangeEvent):void
- {
- if (!sawInitComplete)
- return;
-
- var doc:IStatesObject = _strand as IStatesObject;
- var arr:Array = doc.states;
- for each (var s:State in arr)
- {
- if (s.name == event.oldValue)
- {
- revert(s);
- break;
- }
- }
- for each (s in arr)
- {
- if (s.name == event.newValue)
- {
- apply(s);
- break;
- }
- }
- doc.dispatchEvent(new Event("stateChangeComplete"));
- }
-
- private function revert(s:State):void
- {
- var arr:Array = s.overrides;
- for each (var o:Object in arr)
- {
- if (o is AddItems)
- {
- var ai:AddItems = AddItems(o);
- for each (var item:IChild in ai.items)
- {
- var parent:IParent = item.parent as IParent;
- parent.removeElement(item);
- }
- if (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(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;
- }
- }
- for each (var item:IChild in ai.items)
- {
- var parent:IParent = ai.document as IParent;
- if (ai.destination != null)
- parent = parent[ai.destination] as IParent;
- if (ai.relativeTo != null)
- {
- var child:Object = ai.document[ai.relativeTo];
- if (ai.destination == null)
- parent = child.parent as IParent;
- var index:int = parent.getElementIndex(child);
- if (ai.position == "after")
- index++;
- parent.addElementAt(item, index);
- }
- else
- {
- parent.addElement(item);
- }
- }
- if (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);
- }
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleValuesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleValuesImpl.as
deleted file mode 100644
index 527f59e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleValuesImpl.as
+++ /dev/null
@@ -1,188 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- import org.apache.flex.events.EventDispatcher;
- import org.apache.flex.events.ValueChangeEvent;
-
- /**
- * The SimpleValuesImpl class implements a simple lookup rules that is
- * sufficient for many very simple applications. Every value
- * is essential global and shared by other instances. Values
- * are set via calls to setValue.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SimpleValuesImpl extends EventDispatcher implements IValuesImpl
- {
- public function SimpleValuesImpl()
- {
- super();
- }
-
- /**
- * The map of values. The format is not documented and it is not recommended
- * to manipulate this structure directly.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var values:Object;
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#getValue()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
- {
- return values[valueName];
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#newInstance()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
- {
- var c:Class = values[valueName];
- if (c)
- return new c();
- return null;
- }
-
- /**
- * A method that stores a value to be shared with other objects.
- * It is global, not per instance. Fancier implementations
- * may store shared values per-instance.
- *
- * @param thisObject An object associated with this value. Thiis
- * parameter is ignored.
- * @param valueName The name or key of the value being stored.
- * @param value The value to be stored.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function setValue(thisObject:Object, valueName:String, value:Object):void
- {
- var oldValue:Object = values[valueName];
- if (oldValue != value)
- {
- values[valueName] = value;
- dispatchEvent(new ValueChangeEvent(ValueChangeEvent.VALUE_CHANGE, false, false, oldValue, value));
- }
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#getInstance()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getInstance(valueName:String):Object
- {
- return values[valueName];
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#init()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function init(mainClass:Object):void
- {
- // do nothing
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#convertColor()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function convertColor(value:Object):uint
- {
- if (!(value is String))
- return uint(value);
-
- var stringValue:String = value as String;
- if (stringValue.charAt(0) == '#')
- return uint(stringValue.substr(1));
- return uint(stringValue);
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#parseStyles()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function parseStyles(value:String):Object
- {
- value = value.replace(/;/g, ",");
- return JSON.parse("{" + value + "}");
- }
-
- /**
- * @copy org.apache.flex.core.IValuesImpl#addRule()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addRule(ruleName:String, values:Object):void
- {
- // ignore ruleName since all values are global
- for (var p:String in values)
- values[p] = values[p];
- }
-
- COMPILE::JS
- public function applyStyles(thisObject:IUIBase, styles:Object):void
- {
- // to do or not needed?
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/StageProxy.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/StageProxy.as b/frameworks/projects/Core/as/src/org/apache/flex/core/StageProxy.as
deleted file mode 100644
index 1afe763..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/StageProxy.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.core
-{
- import flash.display.Stage;
- import flash.events.Event;
-
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
-
- /**
- * The StageProxy class wraps the stage and
- * presents it as a FlexJS IEventDispatcher.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class StageProxy implements IEventDispatcher
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StageProxy(stage:Stage)
- {
- super();
- _stage = stage;
- _stage.addEventListener("removedFromStage", removedFromStageHandler);
- }
-
- private var _stage:Stage;
-
- private function removedFromStageHandler(event:flash.events.Event):void
- {
- _stage.removeEventListener("removedFromStage", removedFromStageHandler);
- dispatchEvent(new org.apache.flex.events.Event("removedFromStage"));
- }
-
- /**
- * @copy org.apache.flex.core.IEventDispatcher#addEventListener()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReferences:Boolean = false):void
- {
- _stage.addEventListener(type, listener, useCapture);
- }
-
- /**
- * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
- {
- _stage.removeEventListener(type, listener, useCapture);
- }
-
- /**
- * @copy org.apache.flex.core.IEventDispatcher#removeEventListener()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function dispatchEvent(event:flash.events.Event):Boolean
- {
- return _stage.dispatchEvent(event);
- }
-
- /**
- * @copy org.apache.flex.core.IEventDispatcher#willTriger()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function willTrigger(eventName:String):Boolean
- {
- return _stage.willTrigger(eventName);
- }
-
- /**
- * @copy org.apache.flex.core.IEventDispatcher#hasEventListener()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function hasEventListener(eventName:String):Boolean
- {
- return _stage.hasEventListener(eventName);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/Strand.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/Strand.as b/frameworks/projects/Core/as/src/org/apache/flex/core/Strand.as
deleted file mode 100644
index b0318d6..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/Strand.as
+++ /dev/null
@@ -1,182 +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;
-
- /**
- * The Strand class is the base class for non-display object
- * that implement a strand.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Strand extends EventDispatcher implements IStrand
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Strand()
- {
- super();
- }
-
-
- private var _model:IBeadModel;
-
- /**
- * An IBeadModel that serves as the data model for the component.
- * Note that there is no controller or view properties since
- * this not a display object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get model():IBeadModel
- {
- if (_model == null)
- {
- // addbead will set _model
- addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as IBead);
- }
- return _model;
- }
-
- /**
- * @private
- */
- public function set model(value:IBeadModel):void
- {
- if (_model != value)
- {
- addBead(value as IBead);
- dispatchEvent(new Event("modelChanged"));
- }
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- /**
- * @copy org.apache.flex.core.Application#beads
- *
- * The beads are not automatically added to the
- * strand. Subclasses must decide when to
- * add the beads.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var beads:Array;
-
- private var _beads:Vector.<IBead>;
-
- /**
- * @copy org.apache.flex.core.IStrand#addBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- 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;
- }
-
- /**
- * @copy org.apache.flex.core.IStrand#getBeadByType()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- 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.IStrand#removeBead()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- 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;
- }
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/StyleableCSSTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/StyleableCSSTextField.as b/frameworks/projects/Core/as/src/org/apache/flex/core/StyleableCSSTextField.as
deleted file mode 100644
index 79e2a7d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/StyleableCSSTextField.as
+++ /dev/null
@@ -1,201 +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 flash.display.DisplayObjectContainer;
- import flash.text.Font;
-
- import org.apache.flex.core.IStyleableObject;
- import org.apache.flex.events.Event;
-
- /**
- * The StyleableCSSTextField class implements more CSS text styles in a TextField.
- * This makes it easier to use one in a "shadow DOM" in a complex skin.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class StyleableCSSTextField extends CSSTextField implements IStyleableObject, IChild
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function StyleableCSSTextField()
- {
- super();
- // this is the object passed into CSS lookups since it can
- // have its own individual styles and isn't subordinate
- // to a parent.
- styleParent = this;
- }
-
- /**
- * @private
- * The CSSParent property is set if the CSSTextField
- * is used in a SimpleButton-based instance because
- * the parent property is null, defeating CSS lookup.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var CSSParent:Object;
-
- override public function get parent():DisplayObjectContainer
- {
- if (CSSParent)
- return CSSParent as DisplayObjectContainer;
-
- return super.parent;
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _styles:Object;
-
- /**
- * The object that contains
- * "styles" and other associated
- * name-value pairs. You can
- * also specify a string in
- * HTML style attribute format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get style():Object
- {
- return _styles;
- }
-
- /**
- * @private
- */
- public function set style(value:Object):void
- {
- if (_styles != value)
- {
- if (value is String)
- {
- _styles = ValuesManager.valuesImpl.parseStyles(value as String);
- }
- else
- _styles = value;
- dispatchEvent(new Event("stylesChanged"));
- }
- }
-
- /**
- * A list of type names. Often used for CSS
- * type selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var typeNames:String;
-
- private var _className:String;
-
- /**
- * The classname. Often used for CSS
- * class selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get className():String
- {
- return _className;
- }
-
- /**
- * @private
- */
- public function set className(value:String):void
- {
- if (_className != value)
- {
- _className = value;
- dispatchEvent(new Event("classNameChanged"));
- }
- }
-
- /**
- * @private
- */
- override public function set text(value:String):void
- {
- super.text = value;
- var font:String = ValuesManager.valuesImpl.getValue(this, "fontFamily") as String;
- var embeddedFonts:Array = Font.enumerateFonts();
- if (embeddedFonts.length)
- embedFonts = isEmbedded(embeddedFonts, font);
- }
-
- private function isEmbedded(list:Array, name:String):Boolean
- {
- for each (var f:Font in list)
- {
- if (f.fontName == name)
- return true;
- }
- return false;
- }
- }
-}
[02/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
new file mode 100644
index 0000000..2d6f6ed
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -0,0 +1,391 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+COMPILE::AS3
+{
+ import flash.utils.ByteArray;
+}
+
+
+/**
+ * The BinaryData class is a class that represents binary data. The way
+ * browsers handle binary data varies. This class abstracts those
+ * differences..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class BinaryData
+{
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function BinaryData()
+ {
+
+ }
+
+ COMPILE::AS3
+ private var ba:ByteArray = new ByteArray();
+
+ COMPILE::JS
+ private var ba:ArrayBuffer = new ArrayBuffer(0);
+
+ COMPILE::JS
+ private var _position:int = 0;
+
+ /**
+ * Get the platform-specific data for sending.
+ * Generally only used by the network services.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get data():Object
+ {
+ return ba;
+ }
+
+ /**
+ * Write a byte of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function writeByte(byte:int):void
+ {
+ COMPILE::AS3
+ {
+ ba.writeByte(byte);
+ }
+ COMPILE::JS
+ {
+ var view:Int8Array;
+
+ growBuffer(1);
+
+ view = new Int8Array(ba, _position, 1);
+ view[0] = byte;
+ _position++;
+ }
+ }
+
+ /**
+ * Write a short integer of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function writeShort(short:int):void
+ {
+ COMPILE::AS3
+ {
+ ba.writeShort(short);
+ }
+ COMPILE::JS
+ {
+ var view:Int16Array;
+
+ growBuffer(2);
+
+ view = new Int16Array(ba, _position, 1);
+ view[0] = short;
+ _position += 2;
+ }
+ }
+
+ /**
+ * Write an unsigned int of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function writeUnsignedInt(unsigned:uint):void
+ {
+ COMPILE::AS3
+ {
+ ba.writeUnsignedInt(unsigned);
+ }
+ COMPILE::JS
+ {
+ var view:Uint32Array;
+
+ growBuffer(4);
+
+ view = new Uint32Array(ba, _position, 1);
+ view[0] = unsigned;
+ _position += 4;
+ }
+ }
+
+ /**
+ * Write a signed int of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function writeInt(integer:uint):void
+ {
+ COMPILE::AS3
+ {
+ ba.writeInt(integer);
+ }
+ COMPILE::JS
+ {
+ var view:Int32Array;
+
+ growBuffer(4);
+
+ view = new Int32Array(ba, _position, 1);
+ view[0] = integer;
+ _position += 4;
+ }
+ }
+
+ /**
+ * Read a byte of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function readByte():int
+ {
+ COMPILE::AS3
+ {
+ return ba.readByte();
+ }
+ COMPILE::JS
+ {
+ var view:Int8Array;
+
+ view = new Int8Array(ba, _position, 1);
+ _position++;
+ return view[0];
+ }
+ }
+
+ /**
+ * Read a short int of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function readShort():int
+ {
+ COMPILE::AS3
+ {
+ return ba.readShort();
+ }
+ COMPILE::JS
+ {
+ var view:Int16Array;
+
+ view = new Int16Array(ba, _position, 1);
+ _position += 2;
+ return view[0];
+ }
+ }
+
+ /**
+ * Read an unsigned int of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function readUnsignedInt():uint
+ {
+ COMPILE::AS3
+ {
+ return ba.readUnsignedInt();
+ }
+ COMPILE::JS
+ {
+ var view:Uint32Array;
+
+ view = new Uint32Array(ba, _position, 1);
+ _position += 4;
+ return view[0];
+ }
+ }
+
+ /**
+ * Read a signed int of binary data at the current position
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function readInt():int
+ {
+ COMPILE::AS3
+ {
+ return ba.readInt();
+ }
+ COMPILE::JS
+ {
+ var view:Int32Array;
+
+ view = new Int32Array(ba, _position, 1);
+ _position += 4;
+ return view[0];
+ }
+ }
+
+ /**
+ * The total number of bytes of data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get length():int
+ {
+ COMPILE::AS3
+ {
+ return ba.length;
+ }
+ COMPILE::JS
+ {
+ return ba.byteLength;
+ }
+ }
+
+ /**
+ * The total number of bytes remaining to be read.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get bytesAvailable():int
+ {
+ COMPILE::AS3
+ {
+ return ba.bytesAvailable;
+ }
+ COMPILE::JS
+ {
+ return ba.byteLength - position;
+ }
+ }
+
+ /**
+ * The total number of bytes remaining to be read.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function get position():int
+ {
+ COMPILE::AS3
+ {
+ return ba.position;
+ }
+ COMPILE::JS
+ {
+ return _position;
+ }
+ }
+
+ /**
+ * @private
+ */
+ public function set position(value:int):void
+ {
+ COMPILE::AS3
+ {
+ ba.position = value;
+ }
+ COMPILE::JS
+ {
+ _position = value;
+ }
+ }
+
+ /**
+ * A method to extend the size of the binary data
+ * so you can write more bytes to it. Not all
+ * browsers have a way to auto-resize a binary
+ * data as you write data to the binary data buffer
+ * and resizing in large chunks in generally more
+ * efficient anyway.
+ *
+ * @param extra The number of additional bytes.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function growBuffer(extra:int):void
+ {
+ // no need to do anything in AS
+ COMPILE::JS
+ {
+ var newBuffer:ArrayBuffer;
+ var newView:Int8Array;
+ var view:Int8Array;
+ var i:int;
+ var n:int;
+
+ if (_position >= ba.byteLength)
+ {
+ n = ba.byteLength;
+ newBuffer = new ArrayBuffer(n + extra);
+ newView = new Int8Array(newBuffer, 0, n);
+ view = new Int8Array(ba, 0, n);
+ for (i = 0; i < n; i++)
+ {
+ newView[i] = view[i];
+ }
+ ba = newBuffer;
+ }
+ }
+ }
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
new file mode 100644
index 0000000..61fecc7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSBorderUtils.as
@@ -0,0 +1,219 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+ import flash.display.DisplayObject;
+ import flash.display.Graphics;
+
+ import org.apache.flex.core.IStatesObject;
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.utils.SolidBorderUtil;
+ import org.apache.flex.utils.StringTrimmer;
+
+ /**
+ * The CSSBorderUtils class is shared code for getting the styles
+ * regarding borders and drawing one.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public class CSSBorderUtils
+ {
+ /**
+ * @private
+ */
+ public function CSSBorderUtils()
+ {
+ throw new Error("CSSBorderUtils should not be instantiated.");
+ }
+
+ /**
+ * Get the related styles and draw a border
+ *
+ * @param g The flash.display.Graphics to draw into.
+ * @param width The width.
+ * @param height The height.
+ * @param host The object to pull styles from.
+ * @param state The pseudo-state, if any.
+ * @param drawBackground True if area inside border should be filled with backgroundColor.
+ * @param clear True if graphics.clear() should be called.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function draw(g:Graphics, width:Number, height:Number,
+ host:DisplayObject, state:String = null,
+ drawBackground:Boolean = false, clear:Boolean = true):void
+ {
+ if (clear)
+ g.clear();
+
+ var needBorderColor:Boolean = true;
+ var borderColor:uint;
+ var borderThickness:uint = 0;
+ var borderStyle:String = "none";
+ var borderStyles:Object = ValuesManager.valuesImpl.getValue(host, "border", state);
+ if (borderStyles is Array)
+ {
+ borderColor = CSSUtils.toColor(borderStyles[2]);
+ borderStyle = borderStyles[1];
+ borderThickness = borderStyles[0];
+ needBorderColor = false;
+ }
+ else if (borderStyles is String)
+ borderStyle = borderStyles as String;
+ var value:Object = ValuesManager.valuesImpl.getValue(host, "border-style", state);
+ if (value != null)
+ borderStyle = value as String;
+ value = ValuesManager.valuesImpl.getValue(host, "border-color", state);
+ if (value != null)
+ borderColor = CSSUtils.toColor(value);
+ else if (needBorderColor)
+ {
+ value = ValuesManager.valuesImpl.getValue(host, "color", state);
+ if (value != null)
+ borderColor = CSSUtils.toColor(value);
+ }
+ // if alpha = 0; assume that alpha just wasn't specified
+ if ((borderColor & 0xFF000000) == 0)
+ borderColor = borderColor | 0xFF000000;
+ value = ValuesManager.valuesImpl.getValue(host, "border-width", state);
+ if (value != null)
+ borderThickness = value as uint;
+
+ var borderRadius:String;
+ var borderEllipseWidth:Number = NaN;
+ var borderEllipseHeight:Number = NaN;
+ value = ValuesManager.valuesImpl.getValue(host, "border-radius", state);
+ if (value != null)
+ {
+ if (value is Number)
+ borderEllipseWidth = 2 * (value as Number);
+ else
+ {
+ borderRadius = value as String;
+ var arr:Array = StringTrimmer.splitAndTrim(borderRadius, "/");
+ borderEllipseWidth = 2 * CSSUtils.toNumber(arr[0]);
+ if (arr.length > 1)
+ borderEllipseHeight = 2 * CSSUtils.toNumber(arr[1]);
+ }
+ }
+ if (borderStyle == "none" && isNaN(borderEllipseWidth))
+ {
+ var n:int;
+ var values:Array;
+ var colorTop:uint;
+ var colorLeft:uint;
+ var colorRight:uint;
+ var colorBottom:uint;
+ var widthTop:int = 0;
+ var widthLeft:int = 0;
+ var widthBottom:int = 0;
+ var widthRight:int = 0;
+ value = ValuesManager.valuesImpl.getValue(host, "border-top", state);
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthTop = CSSUtils.toNumber(values[0]);
+ // assume solid for now
+ if (n > 2)
+ colorTop = CSSUtils.toColorWithAlpha(values[2]);
+ else
+ colorTop = borderColor;
+ }
+ value = ValuesManager.valuesImpl.getValue(host, "border-left", state);
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthLeft = CSSUtils.toNumber(values[0]);
+ // assume solid for now
+ if (n > 2)
+ colorLeft = CSSUtils.toColorWithAlpha(values[2]);
+ else
+ colorLeft = borderColor;
+ }
+ value = ValuesManager.valuesImpl.getValue(host, "border-bottom", state);
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthBottom = CSSUtils.toNumber(values[0]);
+ // assume solid for now
+ if (n > 2)
+ colorBottom = CSSUtils.toColorWithAlpha(values[2]);
+ else
+ colorBottom = borderColor;
+ }
+ value = ValuesManager.valuesImpl.getValue(host, "border-right", state);
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthRight = CSSUtils.toNumber(values[0]);
+ // assume solid for now
+ if (n > 2)
+ colorRight = CSSUtils.toColorWithAlpha(values[2]);
+ else
+ colorRight = borderColor;
+ }
+ SolidBorderUtil.drawDetailedBorder(g, 0, 0, width, height,
+ colorTop, colorRight, colorBottom, colorLeft,
+ widthTop, widthRight, widthBottom, widthLeft);
+ }
+ else
+ {
+ if (borderStyle == "none")
+ borderThickness = 0;
+ var backgroundColor:Object = null;
+ if (drawBackground)
+ {
+ value = ValuesManager.valuesImpl.getValue(host, "background-color", state);
+ if (value != null)
+ backgroundColor = CSSUtils.toColorWithAlpha(value);
+ }
+ SolidBorderUtil.drawBorder(g,
+ 0, 0, width, height,
+ borderColor & 0xFFFFFF, backgroundColor, borderThickness, borderColor >>> 24 / 255,
+ borderEllipseWidth, borderEllipseHeight);
+ }
+
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
new file mode 100644
index 0000000..868faec
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSContainerUtils.as
@@ -0,0 +1,194 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+import org.apache.flex.core.ValuesManager;
+import org.apache.flex.geom.Rectangle;
+
+/**
+ * The CSSContainerUtils class is a utility class that computes the values
+ * containers often need to know like border widths and padding styles.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class CSSContainerUtils
+{
+ /**
+ * Compute the width/thickness of the four border edges.
+ *
+ * @param object The object with style values.
+ * @param quick True to assume all four edges have the same widths.
+ * @return A Rectangle representing the four sides.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function getBorderMetrics(object:Object, quick:Boolean = false):Rectangle
+ {
+ var borderThickness:Object = ValuesManager.valuesImpl.getValue(object, "border-width");
+ var borderStyle:Object = ValuesManager.valuesImpl.getValue(object, "border-style");
+ var border:Object = ValuesManager.valuesImpl.getValue(object, "border");
+ var borderOffset:Number;
+ if (borderStyle == "none")
+ borderOffset = 0;
+ else if (borderThickness != null)
+ {
+ if (borderThickness is String)
+ borderOffset = CSSUtils.toNumber(borderThickness as String, object.width);
+ else
+ borderOffset = Number(borderThickness);
+ if( isNaN(borderOffset) ) borderOffset = 0;
+ }
+ else // no style and/or no width
+ {
+ border = ValuesManager.valuesImpl.getValue(object,"border");
+ if (border != null)
+ {
+ if (border is Array)
+ {
+ borderOffset = CSSUtils.toNumber(border[0], object.width);
+ borderStyle = border[1];
+ }
+ else if (border == "none")
+ borderOffset = 0;
+ else if (border is String)
+ borderOffset = CSSUtils.toNumber(border as String, object.width);
+ else
+ borderOffset = Number(border);
+ }
+ else // no border style set at all so default to none
+ borderOffset = 0;
+ }
+
+ if (quick)
+ return new Rectangle(borderOffset, borderOffset, 0, 0);
+
+ var widthTop:int = borderOffset;
+ var widthLeft:int = borderOffset;
+ var widthBottom:int = borderOffset;
+ var widthRight:int = borderOffset;
+ var value:*;
+ var values:Array;
+ var n:int;
+ value = ValuesManager.valuesImpl.getValue(object, "border-top");
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthTop = CSSUtils.toNumber(values[0]);
+ }
+ value = ValuesManager.valuesImpl.getValue(object, "border-left");
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthLeft = CSSUtils.toNumber(values[0]);
+ }
+ value = ValuesManager.valuesImpl.getValue(object, "border-bottom");
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthBottom = CSSUtils.toNumber(values[0]);
+ }
+ value = ValuesManager.valuesImpl.getValue(object, "border-right");
+ if (value != null)
+ {
+ if (value is Array)
+ values = value as Array;
+ else
+ values = value.split(" ");
+ n = values.length;
+ widthRight = CSSUtils.toNumber(values[0]);
+ }
+ // do the math so consumer can use
+ // left, right, top, bottom properties and not width/height
+ return new Rectangle(widthLeft, widthTop, widthRight - widthLeft, widthTop - widthBottom);
+ }
+
+ /**
+ * Compute the width/thickness of the four padding sides.
+ *
+ * @param object The object with style values.
+ * @return A Rectangle representing the padding on each of the four sides.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function getPaddingMetrics(object:Object):Rectangle
+ {
+ var paddingLeft:Object;
+ var paddingTop:Object;
+ var paddingRight:Object;
+ var paddingBottom:Object;
+
+ var padding:Object = ValuesManager.valuesImpl.getValue(object, "padding");
+ paddingLeft = ValuesManager.valuesImpl.getValue(object, "padding-left");
+ paddingTop = ValuesManager.valuesImpl.getValue(object, "padding-top");
+ paddingRight = ValuesManager.valuesImpl.getValue(object, "padding-right");
+ paddingBottom = ValuesManager.valuesImpl.getValue(object, "padding-bottom");
+ var pl:Number = CSSUtils.getLeftValue(paddingLeft, padding, object.width);
+ var pt:Number = CSSUtils.getTopValue(paddingTop, padding, object.height);
+ var pr:Number = CSSUtils.getRightValue(paddingRight, padding, object.width);
+ var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, object.height);
+
+ // do the math so consumer can use
+ // left, right, top, bottom properties and not width/height
+ return new Rectangle(pl, pt, pr - pl, pb - pt);
+ }
+
+
+ /**
+ * Combine padding and border. Often used in non-containers.
+ *
+ * @param object The object with style values.
+ * @return A Rectangle representing the padding and border on each of the four sides.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function getBorderAndPaddingMetrics(object:Object):Rectangle
+ {
+ var borderMetrics:Rectangle = getBorderMetrics(object);
+ var paddingMetrics:Rectangle = getPaddingMetrics(object);
+ return new Rectangle(borderMetrics.left + paddingMetrics.left,
+ borderMetrics.top + paddingMetrics.top,
+ borderMetrics.width + paddingMetrics.width,
+ borderMetrics.height + paddingMetrics.height);
+ }
+}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
new file mode 100644
index 0000000..770c428
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/CSSUtils.as
@@ -0,0 +1,328 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+ /**
+ * The CSSUtils class is a collection of static functions that provide utility
+ * features for managing CSS values.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class CSSUtils
+ {
+ /**
+ * @private
+ */
+ public function CSSUtils()
+ {
+ throw new Error("CSSUtils should not be instantiated.");
+ }
+
+ /**
+ * Converts a String to number.
+ *
+ * @param str The String.
+ * @param reference A Number that will be used to convert percentages.
+ *
+ * @return Number.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function toNumber(str:String, reference:Number = 0):Number
+ {
+ var c:int = str.indexOf("px");
+ if (c != -1)
+ return Number(str.substr(0, c));
+
+ c = str.indexOf("%");
+ if (c != -1)
+ return Number(str.substr(0, c)) * reference / 100;
+
+ return Number(str);
+ }
+
+ /**
+ * Converts a value describing a color to a uint
+ *
+ * @param value The value.
+ *
+ * @return uint of the color.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function toColor(value:Object):uint
+ {
+ return toColorWithAlpha(value) & 0xFFFFFF;
+ }
+
+ /**
+ * Converts a value describing a color and alpha in a uint
+ *
+ * @param value The value.
+ *
+ * @return uint of the color.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion String
+ */
+ public static function toColorWithAlpha(value:Object):uint
+ {
+ if (!(value is String))
+ return uint(value) | 0xFF000000; // css parser converted #rrggbb without alpha channel
+
+ var c:int;
+ var c2:int;
+
+ var stringValue:String = value as String;
+ if (stringValue.charAt(0) == '#')
+ {
+ if (stringValue.length == 4)
+ return uint("0x" + stringValue.charAt(1) + stringValue.charAt(1) +
+ stringValue.charAt(2) + stringValue.charAt(2) +
+ stringValue.charAt(3) + stringValue.charAt(3));
+ if (stringValue.length == 7)
+ return uint("0xFF" + stringValue.substr(1));
+ return uint("0x" + stringValue.substr(1));
+ }
+ else if ((c = stringValue.indexOf("rgb(")) != -1)
+ {
+ c2 = stringValue.indexOf(")");
+ stringValue = stringValue.substring(c + 4, c2);
+ var parts3:Array = stringValue.split(",");
+ return (0xFF000000 +
+ uint(parts3[0]) << 16 +
+ uint(parts3[1]) << 8 +
+ uint(parts3[2]));
+ }
+ else if ((c = stringValue.indexOf("rgba(")) != -1)
+ {
+ c2 = stringValue.indexOf(")");
+ stringValue = stringValue.substring(c + 4, c2);
+ var parts4:Array = stringValue.split(",");
+ return (uint(parts4[3]) << 24 +
+ uint(parts3[0]) << 16 +
+ uint(parts3[1]) << 8 +
+ uint(parts3[2]));
+ }
+
+ if (colorMap.hasOwnProperty(stringValue))
+ return colorMap[stringValue];
+ return uint(stringValue);
+ }
+
+ /**
+ * Computes paddingLeft or marginLeft.
+ *
+ * @param value The value of padding-left or margin-left.
+ * @param values The value of padding or margin.
+ * @param reference A Number that will be used to convert percentages.
+ *
+ * @return Number.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion String
+ */
+ public static function getLeftValue(value:Object, values:Object, reference:Number = NaN):Number
+ {
+ if (value is Number)
+ return value as Number;
+
+ if (values is Number)
+ return values as Number;
+
+ if (value != null)
+ return toNumber(value as String, reference);
+ if (values == null)
+ return 0;
+ if (values is Array)
+ {
+ var arr:Array = values as Array;
+ var n:int = arr.length;
+ // shouldn't be n == 1. values would not be an array
+ var index:int = n < 3 ? 1 : 3;
+ value = arr[index];
+ if (value is String)
+ return toNumber(value as String, reference);
+ return value as Number;
+ }
+ return toNumber(values as String, reference);
+ }
+
+ /**
+ * Computes paddingRight or marginRight.
+ *
+ * @param value The value of padding-right or margin-right.
+ * @param values The value of padding or margin.
+ * @param reference A Number that will be used to convert percentages.
+ *
+ * @return Number.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion String
+ */
+ public static function getRightValue(value:Object, values:Object, reference:Number = NaN):Number
+ {
+ if (value is Number)
+ return value as Number;
+
+ if (values is Number)
+ return values as Number;
+
+ if (value != null)
+ return toNumber(value as String, reference);
+ if (values == null)
+ return 0;
+ if (values is Array)
+ {
+ var arr:Array = values as Array;
+ value = arr[1];
+ if (value is String)
+ return toNumber(value as String, reference);
+ return value as Number;
+ }
+ return toNumber(values as String, reference);
+ }
+
+ /**
+ * Computes paddingTop or marginTop.
+ *
+ * @param value The value of padding-top or margin-top.
+ * @param values The value of padding or margin.
+ * @param reference A Number that will be used to convert percentages.
+ *
+ * @return Number.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion String
+ */
+ public static function getTopValue(value:Object, values:Object, reference:Number = NaN):Number
+ {
+ if (value is Number)
+ return value as Number;
+
+ if (values is Number)
+ return values as Number;
+
+ if (value != null)
+ return toNumber(value as String, reference);
+ if (values == null)
+ return 0;
+ if (values is Array)
+ {
+ var arr:Array = values as Array;
+ value = arr[0];
+ if (value is String)
+ return toNumber(value as String, reference);
+ return value as Number;
+ }
+ return toNumber(values as String, reference);
+ }
+
+ /**
+ * Computes paddingBottom or marginBottom.
+ *
+ * @param value The value of padding-bottom or margin-bottom.
+ * @param values The value of padding or margin.
+ * @param reference A Number that will be used to convert percentages.
+ *
+ * @return Number.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion String
+ */
+ public static function getBottomValue(value:Object, values:Object, reference:Number = NaN):Number
+ {
+ if (value is Number)
+ return value as Number;
+
+ if (values is Number)
+ return values as Number;
+
+ if (value != null)
+ return toNumber(value as String, reference);
+ if (values == null)
+ return 0;
+ if (values is Array)
+ {
+ var arr:Array = values as Array;
+ var n:int = arr.length;
+ // shouldn't be n == 1. values would not be an array
+ var index:int = n == 2 ? 0 : 2;
+ value = arr[index];
+ if (value is String)
+ return toNumber(value as String, reference);
+ return value as Number;
+ }
+ return toNumber(values as String, reference);
+ }
+
+ /**
+ * The map of color names to uints.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static var colorMap:Object = {
+ transparent: 0,
+ white: 0xFFFFFFFF,
+ silver: 0xFFC0C0C0,
+ gray: 0xFF808080,
+ black: 0xFF000000,
+ red: 0xFFFF0000,
+ maroon: 0xFF800000,
+ yellow: 0xFFFFFF00,
+ olive: 0xFF808000,
+ lime: 0xFF00FF00,
+ green: 0xFF008000,
+ aqua: 0xFF00FFFF,
+ teal: 0xFF008080,
+ blue: 0xFF0000FF,
+ navy: 0xFF000080,
+ fuchsia: 0xFFFF00FF,
+ purple: 0xFF800080
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.as
new file mode 100644
index 0000000..3e557d6
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/EffectTimer.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.utils
+{
+COMPILE::AS3
+{
+ import flash.events.EventDispatcher;
+ import flash.events.TimerEvent;
+ import flash.utils.Timer;
+ import flash.utils.getTimer;
+}
+COMPILE::JS
+{
+ import org.apache.flex.events.EventDispatcher;
+}
+import org.apache.flex.core.IEffectTimer;
+import org.apache.flex.core.ValuesManager;
+import org.apache.flex.events.ValueEvent;
+
+//--------------------------------------
+// Events
+//--------------------------------------
+
+/**
+ * Dispatched as requested via the delay and
+ * repeat count parameters in the constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+[Event(name="update", type="org.apache.flex.events.ValueEvent")]
+
+/**
+ * The Timer class dispatches events based on a delay
+ * and repeat count.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class EffectTimer extends EventDispatcher implements IEffectTimer
+{
+ /**
+ * Constructor.
+ *
+ * @param delay The number of milliseconds
+ * to wait before dispatching the event.
+ * @param repeatCount The number of times to dispatch
+ * the event. If 0, keep dispatching forever.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function EffectTimer()
+ {
+ interval = ValuesManager.valuesImpl.getValue(this, "effectTimerInterval");
+ COMPILE::AS3
+ {
+ timer = new flash.utils.Timer(interval);
+ timer.addEventListener("timer", timerHandler);
+ }
+ }
+
+ private var interval:int;
+
+ COMPILE::AS3
+ private var timer:flash.utils.Timer;
+
+ COMPILE::JS
+ private var timerInterval:Number;
+
+ public function start():int
+ {
+ COMPILE::AS3
+ {
+ timer.start();
+ return getTimer();
+ }
+ COMPILE::JS
+ {
+ timerInterval =
+ setInterval(timerHandler, interval);
+ var d:Date = new Date();
+ return d.getTime();
+ }
+ }
+
+ public function stop():void
+ {
+ COMPILE::AS3
+ {
+ timer.stop();
+ }
+ COMPILE::JS
+ {
+ clearInterval(timerInterval);
+ timerInterval = -1;
+ }
+ }
+
+ COMPILE::AS3
+ private function timerHandler(event:flash.events.TimerEvent):void
+ {
+ event.updateAfterEvent();
+ dispatchEvent(new ValueEvent("update", false, false, getTimer()));
+ }
+
+ COMPILE::JS
+ private function timerHandler():void
+ {
+ var d:Date = new Date();
+ dispatchEvent(new ValueEvent('update', false, false, d.getTime()));
+ }
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
new file mode 100644
index 0000000..0627820
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Language.as
@@ -0,0 +1,357 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+ [ExcludeClass]
+ COMPILE::AS3
+ public class Language {}
+
+ COMPILE::JS
+ {
+ import goog.bind;
+ import goog.global;
+ }
+
+ /**
+ * @flexjsignoreimport goog.bind
+ * @flexjsignoreimport goog.global
+ */
+ COMPILE::JS
+ public class Language
+ {
+
+ //--------------------------------------
+ // Static Property
+ //--------------------------------------
+
+ //--------------------------------------
+ // Static Function
+ //--------------------------------------
+
+ /**
+ * as()
+ *
+ * @param leftOperand The lefthand operand of the
+ * binary as operator in AS3.
+ * @param rightOperand The righthand operand of the
+ * binary operator in AS3.
+ * @param coercion The cast is a coercion,
+ * throw exception if it fails.
+ * @return Returns the lefthand operand if it is of the
+ * type of the righthand operand, otherwise null.
+ */
+ static public function as(leftOperand:Object, rightOperand:Object, coercion:* = null):Object
+ {
+ var error:Error, itIs:Boolean, message:String;
+
+ coercion = (coercion !== undefined) ? coercion : false;
+
+ itIs = Language.is(leftOperand, rightOperand);
+
+ if (!itIs && coercion)
+ {
+ message = 'Type Coercion failed';
+
+ if (TypeError)
+ {
+ error = new TypeError(message);
+ }
+ else
+ {
+ error = new Error(message);
+ }
+ throw error;
+ }
+
+ return (itIs) ? leftOperand : null;
+ }
+
+
+ /**
+ * int()
+ *
+ * @param value The value to be cast.
+ * @return {number}
+ */
+ static public function _int(value:Number):Number
+ {
+ return value >> 0;
+ }
+
+ /**
+ * is()
+ *
+ * @param leftOperand The lefthand operand of the
+ * binary as operator in AS3.
+ * @param rightOperand The righthand operand of the
+ * binary operator in AS3.
+ * @return {boolean}
+ */
+ static public function is(leftOperand:Object, rightOperand:Object):Boolean
+ {
+ var superClass:Object;
+
+ if (leftOperand == null || rightOperand == null)
+ return false;
+
+ if (leftOperand instanceof rightOperand)
+ return true;
+ if (rightOperand === Object)
+ return true; // every value is an Object in ActionScript except null and undefined (caught above)
+
+ if (typeof leftOperand === 'string')
+ return rightOperand === String;
+
+ if (typeof leftOperand === 'number')
+ return rightOperand === Number;
+
+ if (typeof leftOperand === 'boolean')
+ return rightOperand === Boolean;
+ if (rightOperand === Array)
+ return Array.isArray(leftOperand);
+
+ if (leftOperand.FLEXJS_CLASS_INFO === undefined)
+ return false; // could be a function but not an instance
+
+ if (leftOperand.FLEXJS_CLASS_INFO.interfaces)
+ {
+ if (checkInterfaces(leftOperand, rightOperand))
+ {
+ return true;
+ }
+ }
+
+ superClass = leftOperand.constructor;
+ superClass = superClass.superClass_;
+
+ if (superClass)
+ {
+ while (superClass && superClass.FLEXJS_CLASS_INFO)
+ {
+ if (superClass.FLEXJS_CLASS_INFO.interfaces)
+ {
+ if (checkInterfaces(superClass, rightOperand))
+ {
+ return true;
+ }
+ }
+ superClass = superClass.constructor;
+ superClass = superClass.superClass_;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Helper function for is()
+ */
+ private static function checkInterfaces(leftOperand:*, rightOperand:*):Boolean
+ {
+ var i:int, interfaces:Array;
+
+ interfaces = leftOperand.FLEXJS_CLASS_INFO.interfaces;
+ for (i = interfaces.length - 1; i > -1; i--) {
+ if (interfaces[i] === rightOperand) {
+ return true;
+ }
+
+ if (interfaces[i].prototype.FLEXJS_CLASS_INFO.interfaces) {
+ var isit:Boolean = checkInterfaces(interfaces[i].prototype, rightOperand);
+ if (isit) return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Implementation of "classDef is Class"
+ */
+ public function isClass(classDef:*):Boolean
+ {
+ return typeof classDef === 'function'
+ && classDef.prototype
+ && classDef.prototype.constructor === classDef;
+ }
+
+ /**
+ * Implementation of "classDef as Class"
+ */
+ public function asClass(classDef:*):Class
+ {
+ return isClass(classDef) ? classDef : null;
+ }
+
+ /**
+ * postdecrement handles foo--
+ *
+ * @param obj The object with the getter/setter.
+ * @param prop The name of a property.
+ * @return {number}
+ */
+ static public function postdecrement(obj:Object, prop:String):int
+ {
+ var value:int = obj[prop];
+ obj[prop] = value - 1;
+ return value;
+ }
+
+ /**
+ * postincrement handles foo++
+ *
+ * @param obj The object with the getter/setter.
+ * @param prop The name of a property.
+ * @return {number}
+ */
+ static public function postincrement(obj:Object, prop:String):int
+ {
+ var value:int = obj[prop];
+ obj[prop] = value + 1;
+ return value;
+ }
+
+ /**
+ * predecrement handles --foo
+ *
+ * @param obj The object with the getter/setter.
+ * @param prop The name of a property.
+ * @return {number}
+ */
+ static public function predecrement(obj:Object, prop:String):int
+ {
+ var value:int = obj[prop] - 1;
+ obj[prop] = value;
+ return value;
+ }
+
+ /**
+ * preincrement handles ++foo
+ *
+ * @param obj The object with the getter/setter.
+ * @param prop The name of a property.
+ * @return {number}
+ */
+ static public function preincrement(obj:Object, prop:String):int
+ {
+ var value:int = obj[prop] + 1;
+ obj[prop] = value;
+ return value;
+ }
+
+ /**
+ * superGetter calls the getter on the given class' superclass.
+ *
+ * @param clazz The class.
+ * @param pthis The this pointer.
+ * @param prop The name of the getter.
+ * @return {Object}
+ */
+ static public function superGetter(clazz:Object, pthis:Object, prop:String):Object
+ {
+ var superClass:Object = clazz.superClass_;
+ var superdesc:Object = Object.getOwnPropertyDescriptor(superClass, prop);
+
+ while (superdesc == null)
+ {
+ superClass = superClass.constructor;
+ superClass = superClass.superClass_;
+ superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ }
+ return superdesc.get.call(pthis);
+ }
+
+ /**
+ * superSetter calls the setter on the given class' superclass.
+ *
+ * @param clazz The class.
+ * @param pthis The this pointer.
+ * @param prop The name of the getter.
+ * @param value The value.
+ */
+ static public function superSetter(clazz:Object, pthis:Object, prop:String, value:Object):void
+ {
+ var superClass:Object = clazz.superClass_;
+ var superdesc:Object = Object.getOwnPropertyDescriptor(superClass, prop);
+
+ while (superdesc == null)
+ {
+ superClass = superClass.constructor;
+ superClass = superClass.superClass_;
+ superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ }
+ superdesc.set.apply(pthis, [value]);
+ }
+
+ static public function trace(...rest):void
+ {
+ var theConsole:*;
+ var windowConsole:* = window.console;
+
+ theConsole = goog.global.console;
+
+ if (theConsole === undefined && windowConsole !== undefined)
+ theConsole = windowConsole;
+
+ try
+ {
+ if (theConsole && theConsole.log)
+ {
+ theConsole.log.apply(theConsole, rest);
+ }
+ }
+ catch (e:Error)
+ {
+ // ignore; at least we tried ;-)
+ }
+ }
+
+ /**
+ * uint()
+ *
+ * @param value The value to be cast.
+ * @return {number}
+ */
+ static public function uint(value:Number):Number
+ {
+ return value >>> 0;
+ }
+
+ /**
+ * caches closures and returns the one closure
+ *
+ * @param fn The method on the instance.
+ * @param object The instance.
+ * @param boundMethodName The name to use to cache the closure.
+ * @return The closure.
+ */
+ static public function closure(fn:Function, object:Object, boundMethodName:String):Function {
+ if (object.hasOwnProperty(boundMethodName)) {
+ return object[boundMethodName];
+ }
+ var boundMethod:Function = goog.bind(fn, object);
+ Object.defineProperty(object, boundMethodName, {
+ value: boundMethod
+ });
+ return boundMethod;
+ };
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
new file mode 100644
index 0000000..c69b550
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MXMLDataInterpreter.as
@@ -0,0 +1,463 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+COMPILE::AS3
+{
+ import flash.display.DisplayObject;
+}
+
+import org.apache.flex.core.IBead;
+import org.apache.flex.core.IContainer;
+import org.apache.flex.core.IDocument;
+import org.apache.flex.core.IMXMLDocument;
+import org.apache.flex.core.IParent;
+import org.apache.flex.core.IStrand;
+import org.apache.flex.events.Event;
+import org.apache.flex.events.IEventDispatcher;
+
+COMPILE::JS
+{
+ import goog.bind;
+ import org.apache.flex.core.IUIBase;
+}
+
+/**
+ * The MXMLDataInterpreter class is the class that interprets the
+ * encoded information generated by the compiler that describes
+ * the contents of an MXML document.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignoreimport goog.bind
+ */
+public class MXMLDataInterpreter
+{
+ /**
+ * Constructor. All methods are static so should not be instantiated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MXMLDataInterpreter()
+ {
+ super();
+ }
+
+
+ /**
+ * Generates an object based on the encoded data.
+ *
+ * @param document The MXML document. If the object has an id
+ * it will be assigned in this document in this method.
+ * @param data The encoded data.
+ * @return The object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function generateMXMLObject(document:Object, data:Array):Object
+ {
+ var i:int = 0;
+ var cls:Class = data[i++];
+ var comp:Object = new cls();
+
+ if (comp is IStrand)
+ initializeStrandBasedObject(document, null, comp, data, i);
+ else
+ {
+ var m:int;
+ var j:int;
+ var name:String;
+ var simple:*;
+ var value:Object;
+ var id:String;
+
+ m = data[i++]; // num props
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ if (name == "id")
+ id = value as String;
+ if (name == "document" && !comp.document)
+ comp.document = document;
+ else if (name == "_id")
+ id = value as String; // and don't assign to comp
+ else if (name == "id")
+ {
+ // not all objects have to have their own id property
+ try {
+ comp["id"] = value;
+ } catch (e:Error)
+ {
+
+ }
+ }
+ else
+ comp[name] = value;
+ }
+ if (id)
+ document[id] = comp;
+
+ if (comp is IDocument)
+ comp.setDocument(document, id);
+ }
+ return comp;
+ }
+
+ /**
+ * Generates an Array of objects based on the encoded data.
+ *
+ * @param document The MXML document. If the object has an id
+ * it will be assigned in this document in this method.
+ * @param parent The parent for any display objects encoded in the array.
+ * @param data The encoded data.
+ * @return The Array.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function generateMXMLArray(document:Object, parent:IParent, data:Array):Array
+ {
+ var comps:Array = [];
+
+ var n:int = data.length;
+ var i:int = 0;
+ while (i < n)
+ {
+ var cls:Class = data[i++];
+ var comp:Object = new cls();
+
+ i = initializeStrandBasedObject(document, parent, comp, data, i);
+
+ comps.push(comp);
+ }
+ return comps;
+ }
+
+ /**
+ * @flexjsignorecoercion Function
+ */
+ private static function initializeStrandBasedObject(document:Object, parent:IParent, comp:Object, data:Array, i:int):int
+ {
+ var m:int;
+ var j:int;
+ var name:String;
+ var simple:*;
+ var value:Object;
+ var id:String = null;
+
+ m = data[i++]; // num props
+ if (m > 0 && data[0] == "model")
+ {
+ m--;
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, parent, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ comp[name] = value;
+ if (value is IBead && comp is IStrand)
+ IStrand(comp).addBead(value as IBead);
+ }
+ var beadOffset:int = i + (m - 1) * 3;
+ //if (beadOffset >= -1)
+ // trace(beadOffset, data[beadOffset]);
+ if (m > 0 && data[beadOffset] == "beads")
+ {
+ m--;
+ }
+ else
+ beadOffset = -1;
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ if (name == "id")
+ id = value as String;
+ if (name == "document" && !comp.document)
+ comp.document = document;
+ else if (name == "_id")
+ id = value as String; // and don't assign to comp
+ else if (name == "id")
+ {
+ // not all objects have to have their own id property
+ try {
+ comp["id"] = value;
+ } catch (e:Error)
+ {
+
+ }
+ }
+ else
+ comp[name] = value;
+ }
+ if (beadOffset > -1)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ comp[name] = value;
+ }
+ m = data[i++]; // num styles
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ comp.setStyle(name, value);
+ }
+
+ COMPILE::AS3
+ {
+ // flexjs on the JS side won't have effects in here, they are regular properties
+ // but falcon provides this set for SWFs for future compatibility with
+ // the older flex-sdk.
+ m = data[i++]; // num effects
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(document, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(document, value as Array);
+ comp.setStyle(name, value);
+ }
+ }
+
+ m = data[i++]; // num events
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ value = data[i++];
+ COMPILE::AS3
+ {
+ comp.addEventListener(name, value);
+ }
+ COMPILE::JS
+ {
+ comp.addEventListener(name, goog.bind(value as Function, document));
+ }
+ }
+
+ var children:Array = data[i++];
+ if (children && comp is IMXMLDocument)
+ {
+ comp.setMXMLDescriptor(document, children);
+ }
+ COMPILE::AS3
+ {
+ if (parent && comp is DisplayObject)
+ parent.addElement(comp, !(parent is IContainer));
+ }
+ COMPILE::JS
+ {
+ if (parent && comp is IUIBase)
+ parent.addElement(comp, !(parent is IContainer));
+ }
+
+ if (children)
+ {
+ if (!(comp is IMXMLDocument))
+ {
+ generateMXMLInstances(document, comp as IParent, children);
+ }
+ }
+
+ if (id)
+ document[id] = comp;
+
+ if (comp is IDocument)
+ comp.setDocument(document, id);
+
+ return i;
+ }
+
+ /**
+ * Generates the instances of objects in an MXML document based on the encoded data.
+ *
+ * @param document The MXML document. If the object has an id
+ * it will be assigned in this document in this method.
+ * @param parent The parent for any display objects encoded in the array.
+ * @param data The encoded data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public static function generateMXMLInstances(document:Object, parent:IParent, data:Array):void
+ {
+ if (!data) return;
+
+ generateMXMLArray(document, parent, data);
+ // maybe we can remove this. All IContainers should be IMXMLDocuments?
+ if (parent is IContainer)
+ {
+ IContainer(parent).childrenAdded();
+ }
+ }
+
+ /**
+ * Generates the properties of the top-level object in an MXML document
+ * based on the encoded data. This basically means setting the attributes
+ * found on the tag and child tags that aren't in the default property.
+ *
+ * @param host The MXML document. If the object has an id
+ * it will be assigned in this document in this method.
+ * @param data The encoded data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion Function
+ */
+ public static function generateMXMLProperties(host:Object, data:Array):void
+ {
+ if (!data) return;
+
+ var i:int = 0;
+ var m:int;
+ var j:int;
+ var name:String;
+ var simple:*;
+ var value:Object;
+ var id:String = null;
+
+ m = data[i++]; // num props
+ var beadOffset:int = i + (m - 1) * 3;
+ //if (beadOffset >= -1)
+ // (beadOffset, data[beadOffset]);
+ if (m > 0 && data[beadOffset] == "beads")
+ {
+ m--;
+ }
+ else
+ beadOffset = -1;
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(host, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(host, value as Array);
+ if (name == "id")
+ id = value as String;
+ if (name == "_id")
+ id = value as String; // and don't assign
+ else
+ host[name] = value;
+ }
+ if (beadOffset > -1)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(host, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(host, value as Array);
+ host[name] = value;
+ }
+ m = data[i++]; // num styles
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(host, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(host, value as Array);
+ host[name] = value;
+ }
+
+ COMPILE::AS3
+ {
+ // flexjs on the JS side won't have effects in here, they are regular properties
+ // but falcon provides this set for SWFs for future compatibility with
+ // the older flex-sdk.
+ m = data[i++]; // num effects
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ simple = data[i++];
+ value = data[i++];
+ if (simple == null)
+ value = generateMXMLArray(host, null, value as Array);
+ else if (simple == false)
+ value = generateMXMLObject(host, value as Array);
+ host[name] = value;
+ }
+ }
+
+ m = data[i++]; // num events
+ for (j = 0; j < m; j++)
+ {
+ name = data[i++];
+ value = data[i++];
+ COMPILE::AS3
+ {
+ host.addEventListener(name, value as Function);
+ }
+ COMPILE::JS
+ {
+ host.addEventListener(name, goog.bind(value as Function, host));
+ }
+ }
+
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
new file mode 100644
index 0000000..ab5dfed
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/MixinManager.as
@@ -0,0 +1,105 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.utils
+{
+
+COMPILE::AS3
+{
+ import flash.system.ApplicationDomain;
+}
+
+import org.apache.flex.core.IBead;
+import org.apache.flex.core.IFlexInfo;
+import org.apache.flex.core.IStrand;
+
+/**
+ * The MixinManager class is the class that instantiates mixins
+ * linked into the application. Mixins are classes with [Mixin]
+ * metadata and are often linked in via the -includes option.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+public class MixinManager implements IBead
+{
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public function MixinManager()
+ {
+ 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
+ * @flexjsignorecoercion Array
+ * @flexjsignorecoercion org.apache.flex.core.IFlexInfo
+ * @flexjsignoreimport org.apache.flex.core.IFlexInfo
+ */
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+
+ COMPILE::AS3
+ {
+ var app:IFlexInfo = value as IFlexInfo;
+ if (app)
+ {
+ var mixins:Array = app.info().mixins;
+ var domain:ApplicationDomain = app.info().currentDomain;
+ for each (var mixin:String in mixins)
+ {
+ var mixinClass:Object = domain.getDefinition(mixin);
+ mixinClass.init(value);
+ }
+ }
+ }
+ COMPILE::JS
+ {
+ var app:IFlexInfo = value as IFlexInfo;
+ if (app)
+ {
+ var mixins:Array = app.info()['mixins'] as Array;
+ if (mixins) {
+ var n:int = mixins.length;
+ for (var i:int = 0; i < n; i++)
+ {
+ mixins[i].init(value);
+ }
+ }
+ }
+ }
+ }
+
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
new file mode 100644
index 0000000..d34ce13
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PNGEncoder.as
@@ -0,0 +1,305 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+
+import flash.display.BitmapData;
+import flash.utils.ByteArray;
+
+/**
+ * The PNGEncoder class converts raw bitmap images into encoded
+ * images using Portable Network Graphics (PNG) lossless compression.
+ *
+ * <p>For the PNG specification, see http://www.w3.org/TR/PNG/</p>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+COMPILE::AS3
+public class PNGEncoder
+{
+
+ // this is a copy of mx.graphics.codec.PNGEncoder
+
+ //--------------------------------------------------------------------------
+ //
+ // Class constants
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * The MIME type for a PNG image.
+ */
+ private static const CONTENT_TYPE:String = "image/png";
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function PNGEncoder()
+ {
+ super();
+
+ initializeCRCTable();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * Used for computing the cyclic redundancy checksum
+ * at the end of each chunk.
+ */
+ private var crcTable:Array;
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // contentType
+ //----------------------------------
+
+ /**
+ * The MIME type for the PNG encoded image.
+ * The value is <code>"image/png"</code>.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function get contentType():String
+ {
+ return CONTENT_TYPE;
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Converts the pixels of a BitmapData object
+ * to a PNG-encoded ByteArray object.
+ *
+ * @param bitmapData The input BitmapData object.
+ *
+ * @return Returns a ByteArray object containing PNG-encoded image data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function encode(bitmapData:BitmapData):ByteArray
+ {
+ return internalEncode(bitmapData, bitmapData.width, bitmapData.height,
+ bitmapData.transparent);
+ }
+
+ /**
+ * Converts a ByteArray object containing raw pixels
+ * in 32-bit ARGB (Alpha, Red, Green, Blue) format
+ * to a new PNG-encoded ByteArray object.
+ * The original ByteArray is left unchanged.
+ *
+ * @param byteArray The input ByteArray object containing raw pixels.
+ * This ByteArray should contain
+ * <code>4 * width * height</code> bytes.
+ * Each pixel is represented by 4 bytes, in the order ARGB.
+ * The first four bytes represent the top-left pixel of the image.
+ * The next four bytes represent the pixel to its right, etc.
+ * Each row follows the previous one without any padding.
+ *
+ * @param width The width of the input image, in pixels.
+ *
+ * @param height The height of the input image, in pixels.
+ *
+ * @param transparent If <code>false</code>, alpha channel information
+ * is ignored but you still must represent each pixel
+ * as four bytes in ARGB format.
+ *
+ * @return Returns a ByteArray object containing PNG-encoded image data.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+ public function encodeByteArray(byteArray:ByteArray, width:int, height:int,
+ transparent:Boolean = true):ByteArray
+ {
+ return internalEncode(byteArray, width, height, transparent);
+ }
+
+ /**
+ * @private
+ */
+ private function initializeCRCTable():void
+ {
+ crcTable = [];
+
+ for (var n:uint = 0; n < 256; n++)
+ {
+ var c:uint = n;
+ for (var k:uint = 0; k < 8; k++)
+ {
+ if (c & 1)
+ c = uint(uint(0xedb88320) ^ uint(c >>> 1));
+ else
+ c = uint(c >>> 1);
+ }
+ crcTable[n] = c;
+ }
+ }
+
+ /**
+ * @private
+ */
+ private function internalEncode(source:Object, width:int, height:int,
+ transparent:Boolean = true):ByteArray
+ {
+ // The source is either a BitmapData or a ByteArray.
+ var sourceBitmapData:BitmapData = source as BitmapData;
+ var sourceByteArray:ByteArray = source as ByteArray;
+
+ if (sourceByteArray)
+ sourceByteArray.position = 0;
+
+ // Create output byte array
+ var png:ByteArray = new ByteArray();
+
+ // Write PNG signature
+ png.writeUnsignedInt(0x89504E47);
+ png.writeUnsignedInt(0x0D0A1A0A);
+
+ // Build IHDR chunk
+ var IHDR:ByteArray = new ByteArray();
+ IHDR.writeInt(width);
+ IHDR.writeInt(height);
+ IHDR.writeByte(8); // bit depth per channel
+ IHDR.writeByte(6); // color type: RGBA
+ IHDR.writeByte(0); // compression method
+ IHDR.writeByte(0); // filter method
+ IHDR.writeByte(0); // interlace method
+ writeChunk(png, 0x49484452, IHDR);
+
+ // Build IDAT chunk
+ var IDAT:ByteArray = new ByteArray();
+ for (var y:int = 0; y < height; y++)
+ {
+ IDAT.writeByte(0); // no filter
+
+ var x:int;
+ var pixel:uint;
+
+ if (!transparent)
+ {
+ for (x = 0; x < width; x++)
+ {
+ if (sourceBitmapData)
+ pixel = sourceBitmapData.getPixel(x, y);
+ else
+ pixel = sourceByteArray.readUnsignedInt();
+
+ IDAT.writeUnsignedInt(uint(((pixel & 0xFFFFFF) << 8) | 0xFF));
+ }
+ }
+ else
+ {
+ for (x = 0; x < width; x++)
+ {
+ if (sourceBitmapData)
+ pixel = sourceBitmapData.getPixel32(x, y);
+ else
+ pixel = sourceByteArray.readUnsignedInt();
+
+ IDAT.writeUnsignedInt(uint(((pixel & 0xFFFFFF) << 8) |
+ (pixel >>> 24)));
+ }
+ }
+ }
+ IDAT.compress();
+ writeChunk(png, 0x49444154, IDAT);
+
+ // Build IEND chunk
+ writeChunk(png, 0x49454E44, null);
+
+ // return PNG
+ png.position = 0;
+ return png;
+ }
+
+ /**
+ * @private
+ */
+ private function writeChunk(png:ByteArray, type:uint, data:ByteArray):void
+ {
+ // Write length of data.
+ var len:uint = 0;
+ if (data)
+ len = data.length;
+ png.writeUnsignedInt(len);
+
+ // Write chunk type.
+ var typePos:uint = png.position;
+ png.writeUnsignedInt(type);
+
+ // Write data.
+ if (data)
+ png.writeBytes(data);
+
+ // Write CRC of chunk type and data.
+ var crcPos:uint = png.position;
+ png.position = typePos;
+ var crc:uint = 0xFFFFFFFF;
+ for (var i:uint = typePos; i < crcPos; i++)
+ {
+ crc = uint(crcTable[(crc ^ png.readUnsignedByte()) & uint(0xFF)] ^
+ uint(crc >>> 8));
+ }
+ crc = uint(crc ^ uint(0xFFFFFFFF));
+ png.position = crcPos;
+ png.writeUnsignedInt(crc);
+ }
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
new file mode 100644
index 0000000..09c88b4
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/PointUtils.as
@@ -0,0 +1,125 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.utils
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObject;
+ import flash.geom.Point;
+ }
+
+ import org.apache.flex.core.IUIBase;
+ import org.apache.flex.geom.Point;
+
+ /**
+ * The PointUtils class is a collection of static functions that convert
+ * Points between coordinate spaces.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public class PointUtils
+ {
+ /**
+ * @private
+ */
+ public function PointUtils()
+ {
+ throw new Error("PointUtils should not be instantiated.");
+ }
+
+ /**
+ * Converts a point from global coordinates to local coordinates
+ *
+ * @param point The point being converted.
+ * @param local The component used as reference for the conversion.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion HTMLElement
+ */
+ public static function globalToLocal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
+ {
+ COMPILE::AS3
+ {
+ var fpt:flash.geom.Point = DisplayObject(local).globalToLocal(pt);
+ return new org.apache.flex.geom.Point(fpt.x, fpt.y);
+ }
+ COMPILE::JS
+ {
+ var x:Number = pt.x;
+ var y:Number = pt.y;
+ var element:HTMLElement = local.element as HTMLElement;
+
+ do {
+ x -= element.offsetLeft;
+ y -= element.offsetTop;
+ if (local.hasOwnProperty('parent')) {
+ local = local.parent;
+ element = local.element as HTMLElement;
+ } else {
+ element = null;
+ }
+ }
+ while (element);
+ return new org.apache.flex.geom.Point(x, y);
+
+ }
+ }
+
+ /**
+ * Converts a point from local coordinates to global coordinates
+ *
+ * @param point The point being converted.
+ * @param local The component used as reference for the conversion.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ * @flexjsignorecoercion HTMLElement
+ */
+ public static function localToGlobal( pt:org.apache.flex.geom.Point, local:Object ):org.apache.flex.geom.Point
+ {
+ COMPILE::AS3
+ {
+ var fpt:flash.geom.Point = DisplayObject(local).localToGlobal(pt);
+ return new org.apache.flex.geom.Point(fpt.x, fpt.y);
+ }
+ COMPILE::JS
+ {
+ var x:Number = pt.x;
+ var y:Number = pt.y;
+ var element:HTMLElement = local.element as HTMLElement;
+
+ do {
+ x += element.offsetLeft;
+ y += element.offsetTop;
+ element = element.offsetParent as HTMLElement;
+ }
+ while (element);
+ return new org.apache.flex.geom.Point(x, y);
+ }
+ }
+ }
+}
[11/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/CustomEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/CustomEvent.as b/frameworks/projects/Core/as/src/org/apache/flex/events/CustomEvent.as
deleted file mode 100644
index a7921df..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/CustomEvent.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.events
-{
-
- /**
- * MXML auto-imports flash.events.Event which then requires
- * full qualification to use org.apache.flex.events.Event.
- * Use CustomEvent to skip all that extra typing.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CustomEvent extends Event
- {
-
- //--------------------------------------
- // 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 CustomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/ElementEvents.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/ElementEvents.as b/frameworks/projects/Core/as/src/org/apache/flex/events/ElementEvents.as
deleted file mode 100644
index e79762a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/ElementEvents.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
-{
-
- [ExcludeClass]
- COMPILE::AS3
- public class ElementEvents
- {
- }
-
- COMPILE::JS
- public class ElementEvents
- {
-
- //--------------------------------------
- // Static Property
- //--------------------------------------
-
- static public const elementEvents:Object = {
- 'click': 1,
- 'change': 1,
- 'keyup': 1,
- 'keydown': 1,
- 'load': 1,
- 'mouseover': 1,
- 'mouseout': 1,
- 'mouseup': 1,
- 'mousedown': 1,
- 'mousemove': 1,
- 'rollover': 1,
- 'rollout': 1
- };
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/Event.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/Event.as b/frameworks/projects/Core/as/src/org/apache/flex/events/Event.as
deleted file mode 100644
index 765db3d..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/Event.as
+++ /dev/null
@@ -1,128 +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 flash.events.Event;
- }
-
- COMPILE::JS {
- import goog.events.Event;
- }
-
- /**
- * This class simply wraps flash.events.Event so that
- * no flash packages are needed on the JS side.
- * At runtime, this class is not always the event object
- * that is dispatched. In most cases we are dispatching
- * DOMEvents instead, so as long as you don't actually
- * check the typeof(event) it will work
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class Event extends flash.events.Event
- {
-
- //--------------------------------------
- // Static Property
- //--------------------------------------
-
- static public const CHANGE:String = "change";
-
- //--------------------------------------
- // 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 Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
- {
- super(type, bubbles, cancelable);
- }
-
- //--------------------------------------
- // Property
- //--------------------------------------
-
- //--------------------------------------
- // Function
- //--------------------------------------
-
- /**
- * @private
- */
- public override function clone():flash.events.Event
- {
- return cloneEvent();
- }
-
- /**
- * Create a copy/clone of the Event object.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function cloneEvent():org.apache.flex.events.Event
- {
- return new org.apache.flex.events.Event(type, bubbles, cancelable);
- }
- }
-
- COMPILE::JS
- public class Event extends goog.events.Event {
-
- public static const CHANGE:String = "change";
-
- public function Event(type:String, target:Object = null) {
- super(type, target);
- }
-
- public function init(type:String):void {
- this.type = type;
- }
-
- /**
- * Google Closure doesn't seem to support stopImmediatePropagation, but
- * actually the HTMLElementWrapper fireListener override sends a
- * BrowserEvent in most/all cases where folks need stopImmediatePropagation
- * so we put this in here for compile time since it will exist in
- * the BrowserEvent that does get sent around.
- */
- public function stopImmediatePropagation():void
- {
- // do nothing
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/EventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/EventDispatcher.as b/frameworks/projects/Core/as/src/org/apache/flex/events/EventDispatcher.as
deleted file mode 100644
index ceec8ee..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/EventDispatcher.as
+++ /dev/null
@@ -1,66 +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::JS
- {
- import goog.events;
- import goog.events.EventTarget;
- }
-
- COMPILE::AS3
- {
- import flash.events.EventDispatcher;
- }
-
- /**
- * This class simply wraps flash.events.EventDispatcher so that
- * no flash packages are needed on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class EventDispatcher extends flash.events.EventDispatcher implements IEventDispatcher
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function EventDispatcher()
- {
- super();
- }
- }
-
- COMPILE::JS
- public class EventDispatcher extends goog.events.EventTarget implements IEventDispatcher
- {
- public function hasEventListener(type:String):Boolean
- {
- return goog.events.hasListener(this, type);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/IEventDispatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/IEventDispatcher.as b/frameworks/projects/Core/as/src/org/apache/flex/events/IEventDispatcher.as
deleted file mode 100644
index 6d8c684..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/IEventDispatcher.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.events
-{
- COMPILE::AS3
- {
- import flash.events.IEventDispatcher;
- }
-
- /**
- * This class simply wraps flash.events.EventDispatcher so that
- * no flash packages are needed on the JS side.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public interface IEventDispatcher extends flash.events.IEventDispatcher
- {
-
- }
-
- COMPILE::JS
- public interface IEventDispatcher
- {
- function addEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void;
- function removeEventListener(type:String, handler:Function, opt_capture:Boolean = false, opt_handlerScope:Object = null):void;
- //function hasEventListener(type:String):Boolean;
- function dispatchEvent(event:Object):Boolean;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/MouseEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/MouseEvent.as b/frameworks/projects/Core/as/src/org/apache/flex/events/MouseEvent.as
deleted file mode 100644
index 756438f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/MouseEvent.as
+++ /dev/null
@@ -1,290 +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 flash.events.MouseEvent;
- }
- COMPILE::JS
- {
- import window.MouseEvent;
- }
-
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.geom.Point;
- import org.apache.flex.utils.PointUtils;
-
-
- /**
- * Mouse events
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MouseEvent extends Event
- {
- private static function platformConstant(s:String):String
- {
- COMPILE::AS3
- {
- return s;
- }
- COMPILE::JS
- {
- return s.toLowerCase();
- }
- }
-
- public static const MOUSE_DOWN:String = platformConstant("mouseDown");
- public static const MOUSE_MOVE:String = platformConstant("mouseMove");
- public static const MOUSE_UP:String = platformConstant("mouseUp");
- public static const MOUSE_OUT:String = platformConstant("mouseOut");
- public static const MOUSE_OVER:String = platformConstant("mouseOver");
- public static const ROLL_OVER:String = platformConstant("rollOver");
- public static const ROLL_OUT:String = platformConstant("rollOut");
- public static const CLICK:String = "click";
-
- /**
- * 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 MouseEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
- localX:Number = NaN, localY:Number = NaN,
- relatedObject:Object = null,
- ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false,
- buttonDown:Boolean = false, delta:int = 0,
- commandKey:Boolean = false, controlKey:Boolean = false,
- clickCount:int = 0)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
- this.localX = localX;
- this.localY = localY;
- this.relatedObject = relatedObject;
- this.ctrlKey = ctrlKey;
- this.altKey = altKey;
- this.shiftKey = shiftKey;
- this.buttonDown = buttonDown;
- this.delta = delta;
- this.commandKey = commandKey;
- this.controlKey = controlKey;
- this.clickCount = clickCount;
- }
-
- private var _localX:Number;
- public function get localX():Number
- {
- return _localX;
- }
- public function set localX(value:Number):void
- {
- _localX = value;
- _stagePoint = null;
- }
-
- private var _localY:Number;
- public function get localY():Number
- {
- return _localY;
- }
- public function set localY(value:Number):void
- {
- _localY = value;
- _stagePoint = null;
- }
-
- public var relatedObject:Object;
- public var ctrlKey:Boolean;
- public var altKey:Boolean;
- public var shiftKey:Boolean;
- public var buttonDown:Boolean;
- public var delta:int;
- public var commandKey:Boolean;
- public var controlKey:Boolean;
- public var clickCount:int;
-
- // these map directly to JS MouseEvent fields.
- public function get clientX():Number
- {
- return screenX;
- }
- public function set clientX(value:Number):void
- {
- localX = value;
- }
- public function get clientY():Number
- {
- return screenY;
- }
- public function set clientY(value:Number):void
- {
- localY = value;
- }
-
- private var _stagePoint:Point;
-
- public function get screenX():Number
- {
- if (!target) return localX;
- if (!_stagePoint)
- {
- var localPoint:Point = new Point(localX, localY);
- _stagePoint = PointUtils.localToGlobal(localPoint, target);
- }
- return _stagePoint.x;
- }
-
- public function get screenY():Number
- {
- if (!target) return localY;
- if (!_stagePoint)
- {
- var localPoint:Point = new Point(localX, localY);
- _stagePoint = PointUtils.localToGlobal(localPoint, target);
- }
- return _stagePoint.y;
- }
-
- /**
- * @private
- */
- COMPILE::JS
- private static function installRollOverMixin():Boolean
- {
- window.addEventListener(MOUSE_OVER,
- mouseOverHandler, false);
- return true;
- }
-
-
- /**
- * @param e The event.
- * RollOver/RollOut is entirely implemented in mouseOver because
- * when a parent and child share an edge, you only get a mouseout
- * for the child and not the parent and you need to send rollout
- * to both. A similar issue exists for rollover.
- */
- COMPILE::JS
- private static function mouseOverHandler(e:MouseEvent):void
- {
- var j:int;
- var m:int;
- var outs:Array;
- var me:window.MouseEvent;
- var parent:Object;
- var target:Object = e.target.flexjs_wrapper;
- if (target == null)
- return; // probably over the html tag
- var targets:Array = MouseEvent.targets;
- var index:int = targets.indexOf(target);
- if (index != -1) {
- // get all children
- outs = targets.slice(index + 1);
- m = outs.length;
- for (j = 0; j < m; j++) {
- me = makeMouseEvent(
- ROLL_OUT, e);
- outs[j].element.dispatchEvent(me);
- }
- MouseEvent.targets = targets.slice(0, index + 1);
- }
- else {
- var newTargets:Array = [target];
- if (!('parent' in target))
- parent = null;
- else
- parent = target.parent;
- while (parent) {
- index = targets.indexOf(parent);
- if (index == -1) {
- newTargets.unshift(parent);
- if (!('parent' in parent))
- break;
- parent = parent.parent;
- }
- else {
- outs = targets.slice(index + 1);
- m = outs.length;
- for (j = 0; j < m; j++) {
- me = makeMouseEvent(
- ROLL_OUT, e);
- outs[j].element.dispatchEvent(me);
- }
- targets = targets.slice(0, index + 1);
- break;
- }
- }
- var n:int = newTargets.length;
- for (var i:int = 0; i < n; i++) {
- me = makeMouseEvent(
- ROLL_OVER, e);
- newTargets[i].element.dispatchEvent(me);
- }
- MouseEvent.targets = targets.concat(newTargets);
- }
- }
-
-
- /**
- */
- COMPILE::JS
- private static var rollOverMixin:Boolean =
- installRollOverMixin();
-
-
- /**
- */
- COMPILE::JS
- private static var targets:Array = [];
-
- /**
- * @param {string} type The event type.
- * @param {Event} e The mouse event.
- * @return {MouseEvent} The new event.
- */
- COMPILE::JS
- private static function makeMouseEvent(type:String, e:window.MouseEvent):window.MouseEvent
- {
- var out:window.MouseEvent = new window.MouseEvent(type);
- out.initMouseEvent(type, false, false,
- 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;
- };
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/ValueChangeEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/ValueChangeEvent.as b/frameworks/projects/Core/as/src/org/apache/flex/events/ValueChangeEvent.as
deleted file mode 100644
index 45fabbd..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/ValueChangeEvent.as
+++ /dev/null
@@ -1,129 +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
-{
-
- /**
- * The ValueChangeEvent class replaces the PropertyChangeEvent as
- * the default event for property changes used in the databinding
- * subsystem.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ValueChangeEvent extends Event
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ValueChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
- oldValue:Object = null, newValue:Object = null)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
- COMPILE::JS
- {
- super(type);
- }
- this.oldValue = oldValue;
- this.newValue = newValue;
- }
-
- /**
- * The value of the property before it was changed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var oldValue:Object;
-
- /**
- * The value of the property after it was changed.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var newValue:Object;
-
- /**
- * The name of the property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var propertyName:String;
-
- /**
- * The object that owns the property.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var source:Object;
-
- /**
- * The default event type.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const VALUE_CHANGE:String = "valueChange";
-
- /**
- * A convenience method to create an instance of the ValueChangeEvent.
- *
- * @param source The source of the object.
- * @param name The name of the event.
- * @param oldValue The value before it was changed.
- * @param newValue The value after it was changed.
- * @return An instance of the ValueChangeEvent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function createUpdateEvent(source:Object, name:String, oldValue:Object, newValue:Object):ValueChangeEvent
- {
- var event:ValueChangeEvent = new ValueChangeEvent(VALUE_CHANGE, false, false, oldValue, newValue);
- event.propertyName = name;
- event.source = source;
- return event;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/ValueEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/ValueEvent.as b/frameworks/projects/Core/as/src/org/apache/flex/events/ValueEvent.as
deleted file mode 100644
index 6088680..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/ValueEvent.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.events
-{
-
- /**
- * The ValueEvent class is used for dispatching an event
- * that has one useful value
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ValueEvent extends Event
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ValueEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
- value:Object = null)
- {
- COMPILE::AS3
- {
- super(type, bubbles, cancelable);
- }
-
- COMPILE::JS
- {
- super(type);
- }
-
- this.value = value;
- }
-
- /**
- * The value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var value:Object;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseEventConverter.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseEventConverter.as b/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseEventConverter.as
deleted file mode 100644
index a969a44..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseEventConverter.as
+++ /dev/null
@@ -1,166 +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.utils
-{
- import flash.events.Event;
- import flash.events.IEventDispatcher;
- import flash.events.MouseEvent;
-
- import org.apache.flex.events.MouseEvent;
-
- /**
- * Mouse events conversion.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class MouseEventConverter
- {
- /**
- * A map of events that are not converted, because there is no
- * JS equivalent.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static const UNCONVERTED_EVENTS:Object = { mouseWheel: 1 };
-
- /**
- * A method used to copy properties from flash.events.MouseEvent to
- * org.apache.flex.events.Event. The set of properties can be
- * different based on platform and runtime.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var convert:Function = flashConvert;
-
- private static function flashConvert(event:flash.events.MouseEvent):org.apache.flex.events.MouseEvent
- {
- if (UNCONVERTED_EVENTS[event.type])
- return null;
-
- var newEvent:org.apache.flex.events.MouseEvent =
- new org.apache.flex.events.MouseEvent(event.type, event.bubbles, event.cancelable,
- event.localX, event.localY, event.relatedObject,
- event.ctrlKey, event.altKey, event.shiftKey,
- event.buttonDown, event.delta);
-
- return newEvent;
- }
-
- private static function mouseEventConverter(event:flash.events.Event):void
- {
- if (event is flash.events.MouseEvent && (!(event is org.apache.flex.events.MouseEvent)))
- {
- var newEvent:org.apache.flex.events.MouseEvent =
- convert(flash.events.MouseEvent(event));
- if (newEvent)
- {
- // some events are not converted if there are no JS equivalents
- event.stopImmediatePropagation();
- event.target.dispatchEvent(newEvent);
- }
- else
- trace("did not convert", event.type);
- }
- }
-
- /**
- * The list of events to convert.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var allConvertedEvents:Array = [
- flash.events.MouseEvent.CLICK,
- flash.events.MouseEvent.MOUSE_DOWN,
- flash.events.MouseEvent.MOUSE_UP,
- flash.events.MouseEvent.ROLL_OVER,
- flash.events.MouseEvent.ROLL_OUT,
- flash.events.MouseEvent.MOUSE_OVER,
- flash.events.MouseEvent.MOUSE_OUT,
- flash.events.MouseEvent.MOUSE_MOVE
- ];
-
- /**
- * The list of events to convert on each instance.
- * Per-instance killers are needed for "out" events because
- * they can be sent after the instance is removed from the
- * display list so the main converter can't intercept them
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var perInstanceConvertedEvents:Array = [
- flash.events.MouseEvent.MOUSE_UP,
- flash.events.MouseEvent.ROLL_OUT,
- flash.events.MouseEvent.MOUSE_OUT
- ];
-
- /**
- * The event handler that converts the events.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static var eventHandler:Function = mouseEventConverter;
-
- /**
- * Set up the top level converter.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function setupAllConverters(target:IEventDispatcher):void
- {
- for each (var eventType:String in allConvertedEvents)
- target.addEventListener(eventType, eventHandler, true, 9999);
- }
-
- /**
- * Set up some event handlers on each instance.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function setupInstanceConverters(target:IEventDispatcher):void
- {
- for each (var eventType:String in perInstanceConvertedEvents)
- target.addEventListener(eventType, eventHandler, false, 9999);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseUtils.as
deleted file mode 100644
index 5dbc934..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/events/utils/MouseUtils.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.events.utils
-{
- import org.apache.flex.events.Event;
- import org.apache.flex.events.MouseEvent;
-
- /**
- * This class maps common event functions for MouseEvent
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class MouseUtils
- {
- public function MouseUtils()
- {
- }
-
- /**
- * Returns the event target.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- static public function eventTarget(event:Event):Object
- {
- return event.target;
- }
-
- /**
- * Returns the localX value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- static public function localX(event:MouseEvent):Number
- {
- return event.localX;
- }
-
- /**
- * Returns the localY value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- static public function localY(event:MouseEvent):Number
- {
- return event.localY;
- }
-
- /**
- * Returns the globel X value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- static public function globalX(event:MouseEvent):Number
- {
- return event.screenX;
- }
-
- /**
- * Returns the global Y value.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- static public function globalY(event:MouseEvent):Number
- {
- return event.screenY;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/geom/Point.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/geom/Point.as b/frameworks/projects/Core/as/src/org/apache/flex/geom/Point.as
deleted file mode 100644
index 46d4464..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/geom/Point.as
+++ /dev/null
@@ -1,72 +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.geom
-{
-COMPILE::AS3
-{
- import flash.geom.Point;
-}
-
-/**
- * The Point class is a utility class for holding x and y values, not that you
- * can't use it to hold a width and height value.
- *
- * The ActionScript version simply wraps flash.geom.Point to enable cross
- * compilation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::AS3
-public class Point extends flash.geom.Point
-{
- public function Point(x:Number = 0, y:Number = 0)
- {
- super(x, y);
- }
-}
-
-/**
- * The Point class is a utility class for holding x and y values, not that you
- * can't use it to hold a width and height value.
- *
- * The ActionScript version simply wraps flash.geom.Point to enable cross
- * compilation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::JS
-public class Point
-{
- public function Point(x:Number = 0, y:Number = 0)
- {
- this.x = x;
- this.y = y;
- }
-
- public var x:Number;
- public var y:Number;
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/geom/Rectangle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/geom/Rectangle.as b/frameworks/projects/Core/as/src/org/apache/flex/geom/Rectangle.as
deleted file mode 100644
index a68c080..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/geom/Rectangle.as
+++ /dev/null
@@ -1,95 +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.geom
-{
-COMPILE::AS3
-{
- import flash.geom.Rectangle;
-}
-
-/**
- * The Rectangle class is a utility class for holding four coordinates of
- * a rectangle
- *
- * The ActionScript version simply wraps flash.geom.Rectangle to enable cross
- * compilation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::AS3
-public class Rectangle extends flash.geom.Rectangle
-{
- public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)
- {
- super(x, y, width, height);
- }
-}
-
-/**
- * The Rectangle class is a utility class for holding four coordinates of
- * a rectangle
- *
- * The ActionScript version simply wraps flash.geom.Rectangle to enable cross
- * compilation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-COMPILE::JS
-public class Rectangle
-{
- public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0)
- {
- left = x;
- top = y;
- this.width = width;
- this.height = height;
- }
-
- public var left:Number;
- public var top:Number;
- public var width:Number;
- public var height:Number;
-
- public function get right():Number
- {
- return left + width;
- }
- public function set right(value:Number):void
- {
- width = value - left;
- }
-
- public function get bottom():Number
- {
- return top + height;
- }
- public function set bottom(value:Number):void
- {
- height = value - top;
- }
-}
-
-
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/geom/Size.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/geom/Size.as b/frameworks/projects/Core/as/src/org/apache/flex/geom/Size.as
deleted file mode 100644
index 4c02934..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/geom/Size.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 org.apache.flex.geom
-{
-
-/**
- * The Size class is a utility class for holding width and height values.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class Size
-{
- public function Size(width:Number = 0, height:Number = 0)
- {
- this.width = width;
- this.height = height;
- }
-
- public var width:Number;
- public var height:Number;
-}
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/states/AddItems.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/states/AddItems.as b/frameworks/projects/Core/as/src/org/apache/flex/states/AddItems.as
deleted file mode 100644
index 7f780fa..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/states/AddItems.as
+++ /dev/null
@@ -1,101 +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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// shim the mx classes for states. Be careful about updates to the main SDK's
-// version as that will move the timestamp ahead of this one and then it will
-// take precedence over this one at link time.
-package org.apache.flex.states
-{
- import org.apache.flex.core.IDocument;
-
- [ExcludeClass]
-
- /**
- * The AddItems class is one of the classes in the
- * view states subsystem. Note that the FlexJS
- * versions are simply data structures interpreted
- * by a central States implementation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class AddItems implements IDocument
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function AddItems()
- {
- super();
- }
-
- public var items:Array;
-
- public var itemsDescriptorIndex:int;
-
- public var itemsDescriptor:ItemAndDescriptor;
-
- public var destination:String;
-
- public var propertyName:String;
-
- public var position:String;
-
- public var relativeTo:String;
-
- public var document:Object;
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- var data:Object = document.mxmlsd[itemsDescriptorIndex];
- if (data is Array)
- {
- itemsDescriptor = new ItemAndDescriptor();
- itemsDescriptor.descriptor = data as Array;
- // replace the entry in the document so subsequent
- // addItems know it is shared
- document.mxmlsd[itemsDescriptorIndex] = itemsDescriptor;
- }
- else
- itemsDescriptor = data as ItemAndDescriptor;
- }
-
- /**
- * @private
- * Initialize this object from a descriptor.
- */
- public function initializeFromObject(properties:Object):Object
- {
- for (var p:String in properties)
- {
- this[p] = properties[p];
- }
-
- return Object(this);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/states/ItemAndDescriptor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/states/ItemAndDescriptor.as b/frameworks/projects/Core/as/src/org/apache/flex/states/ItemAndDescriptor.as
deleted file mode 100644
index 308c86e..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/states/ItemAndDescriptor.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.states
-{
-
- [ExcludeClass]
-
- /**
- * A data structure to store an instance
- * and its descriptor array.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class ItemAndDescriptor
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function ItemAndDescriptor()
- {
- super();
- }
-
- /**
- * The item or items created from the descriptor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var items:Object;
-
- /**
- * The descriptor used to create the item(s).
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var descriptor:Array;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/states/SetEventHandler.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/states/SetEventHandler.as b/frameworks/projects/Core/as/src/org/apache/flex/states/SetEventHandler.as
deleted file mode 100644
index f3b9ae1..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/states/SetEventHandler.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.
-//
-////////////////////////////////////////////////////////////////////////////////
-// shim the mx classes for states
-package org.apache.flex.states
-{
- import org.apache.flex.core.IDocument;
-
- [ExcludeClass]
-
- /**
- * The SetEventHandler class is one of the classes in the
- * view states subsystem. Note that the FlexJS
- * versions are simply data structures interpreted
- * by a central States implementation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SetEventHandler implements IDocument
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function SetEventHandler()
- {
- super();
- }
-
- public var target:String;
-
- public var name:String;
-
- public var handlerFunction:Function;
-
- public var document:Object;
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- * Initialize this object from a descriptor.
- */
- public function initializeFromObject(properties:Object):Object
- {
- for (var p:String in properties)
- {
- this[p] = properties[p];
- }
-
- return Object(this);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/states/SetProperty.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/states/SetProperty.as b/frameworks/projects/Core/as/src/org/apache/flex/states/SetProperty.as
deleted file mode 100644
index b6c2e1a..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/states/SetProperty.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.
-//
-////////////////////////////////////////////////////////////////////////////////
-// shim the mx classes for states
-package org.apache.flex.states
-{
- import org.apache.flex.core.IDocument;
-
- [ExcludeClass]
-
- /**
- * The SetProperty class is one of the classes in the
- * view states subsystem. Note that the FlexJS
- * versions are simply data structures interpreted
- * by a central States implementation.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class SetProperty implements IDocument
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function SetProperty()
- {
- super();
- }
-
- public var target:String;
-
- public var name:String;
-
- public var value:*;
-
- public var previousValue:*;
-
- public var document:Object;
-
- public function setDocument(document:Object, id:String = null):void
- {
- this.document = document;
- }
-
- /**
- * @private
- * Initialize this object from a descriptor.
- */
- public function initializeFromObject(properties:Object):Object
- {
- for (var p:String in properties)
- {
- this[p] = properties[p];
- }
-
- return Object(this);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/states/State.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/states/State.as b/frameworks/projects/Core/as/src/org/apache/flex/states/State.as
deleted file mode 100644
index 271e837..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/states/State.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// shim the mx classes for states
-package org.apache.flex.states
-{
- /**
- * The State class is one of the classes in the
- * view states subsystem. It is used to declare a
- * view state in an MXML document. This is one of the
- * few classes in FlexJS that use the same name as
- * a Flex SDK class because some of the IDEs and
- * compilers are hard-coded to assume this name.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class State
- {
- /**
- * Constructor.
- *
- * @param properties This parameter is not used in FlexJS and exists to make legacy compilers happy.
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public function State(properties:Object = null)
- {
- super();
- }
-
- /**
- * The name of the state.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var name:String;
-
- /**
- * Comma-delimited list of state groups of the state.
- * It is not an array so don't use square brackets [].
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var stateGroups:String;
-
- /**
- * The array of overrides. This is normally set by the compiler.
- *
- * @langversion 3.0
- * @playerversion Flash 9
- * @playerversion AIR 1.1
- * @productversion Flex 3
- */
- public var overrides:Array;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/BinaryData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/BinaryData.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/BinaryData.as
deleted file mode 100644
index 2d6f6ed..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/BinaryData.as
+++ /dev/null
@@ -1,391 +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.utils
-{
-COMPILE::AS3
-{
- import flash.utils.ByteArray;
-}
-
-
-/**
- * The BinaryData class is a class that represents binary data. The way
- * browsers handle binary data varies. This class abstracts those
- * differences..
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
-public class BinaryData
-{
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BinaryData()
- {
-
- }
-
- COMPILE::AS3
- private var ba:ByteArray = new ByteArray();
-
- COMPILE::JS
- private var ba:ArrayBuffer = new ArrayBuffer(0);
-
- COMPILE::JS
- private var _position:int = 0;
-
- /**
- * Get the platform-specific data for sending.
- * Generally only used by the network services.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get data():Object
- {
- return ba;
- }
-
- /**
- * Write a byte of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function writeByte(byte:int):void
- {
- COMPILE::AS3
- {
- ba.writeByte(byte);
- }
- COMPILE::JS
- {
- var view:Int8Array;
-
- growBuffer(1);
-
- view = new Int8Array(ba, _position, 1);
- view[0] = byte;
- _position++;
- }
- }
-
- /**
- * Write a short integer of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function writeShort(short:int):void
- {
- COMPILE::AS3
- {
- ba.writeShort(short);
- }
- COMPILE::JS
- {
- var view:Int16Array;
-
- growBuffer(2);
-
- view = new Int16Array(ba, _position, 1);
- view[0] = short;
- _position += 2;
- }
- }
-
- /**
- * Write an unsigned int of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function writeUnsignedInt(unsigned:uint):void
- {
- COMPILE::AS3
- {
- ba.writeUnsignedInt(unsigned);
- }
- COMPILE::JS
- {
- var view:Uint32Array;
-
- growBuffer(4);
-
- view = new Uint32Array(ba, _position, 1);
- view[0] = unsigned;
- _position += 4;
- }
- }
-
- /**
- * Write a signed int of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function writeInt(integer:uint):void
- {
- COMPILE::AS3
- {
- ba.writeInt(integer);
- }
- COMPILE::JS
- {
- var view:Int32Array;
-
- growBuffer(4);
-
- view = new Int32Array(ba, _position, 1);
- view[0] = integer;
- _position += 4;
- }
- }
-
- /**
- * Read a byte of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function readByte():int
- {
- COMPILE::AS3
- {
- return ba.readByte();
- }
- COMPILE::JS
- {
- var view:Int8Array;
-
- view = new Int8Array(ba, _position, 1);
- _position++;
- return view[0];
- }
- }
-
- /**
- * Read a short int of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function readShort():int
- {
- COMPILE::AS3
- {
- return ba.readShort();
- }
- COMPILE::JS
- {
- var view:Int16Array;
-
- view = new Int16Array(ba, _position, 1);
- _position += 2;
- return view[0];
- }
- }
-
- /**
- * Read an unsigned int of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function readUnsignedInt():uint
- {
- COMPILE::AS3
- {
- return ba.readUnsignedInt();
- }
- COMPILE::JS
- {
- var view:Uint32Array;
-
- view = new Uint32Array(ba, _position, 1);
- _position += 4;
- return view[0];
- }
- }
-
- /**
- * Read a signed int of binary data at the current position
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function readInt():int
- {
- COMPILE::AS3
- {
- return ba.readInt();
- }
- COMPILE::JS
- {
- var view:Int32Array;
-
- view = new Int32Array(ba, _position, 1);
- _position += 4;
- return view[0];
- }
- }
-
- /**
- * The total number of bytes of data.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get length():int
- {
- COMPILE::AS3
- {
- return ba.length;
- }
- COMPILE::JS
- {
- return ba.byteLength;
- }
- }
-
- /**
- * The total number of bytes remaining to be read.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get bytesAvailable():int
- {
- COMPILE::AS3
- {
- return ba.bytesAvailable;
- }
- COMPILE::JS
- {
- return ba.byteLength - position;
- }
- }
-
- /**
- * The total number of bytes remaining to be read.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get position():int
- {
- COMPILE::AS3
- {
- return ba.position;
- }
- COMPILE::JS
- {
- return _position;
- }
- }
-
- /**
- * @private
- */
- public function set position(value:int):void
- {
- COMPILE::AS3
- {
- ba.position = value;
- }
- COMPILE::JS
- {
- _position = value;
- }
- }
-
- /**
- * A method to extend the size of the binary data
- * so you can write more bytes to it. Not all
- * browsers have a way to auto-resize a binary
- * data as you write data to the binary data buffer
- * and resizing in large chunks in generally more
- * efficient anyway.
- *
- * @param extra The number of additional bytes.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function growBuffer(extra:int):void
- {
- // no need to do anything in AS
- COMPILE::JS
- {
- var newBuffer:ArrayBuffer;
- var newView:Int8Array;
- var view:Int8Array;
- var i:int;
- var n:int;
-
- if (_position >= ba.byteLength)
- {
- n = ba.byteLength;
- newBuffer = new ArrayBuffer(n + extra);
- newView = new Int8Array(newBuffer, 0, n);
- view = new Int8Array(ba, 0, n);
- for (i = 0; i < n; i++)
- {
- newView[i] = view[i];
- }
- ba = newBuffer;
- }
- }
- }
-}
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSBorderUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSBorderUtils.as b/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSBorderUtils.as
deleted file mode 100644
index 61fecc7..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/utils/CSSBorderUtils.as
+++ /dev/null
@@ -1,219 +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.utils
-{
- import flash.display.DisplayObject;
- import flash.display.Graphics;
-
- import org.apache.flex.core.IStatesObject;
- import org.apache.flex.core.IUIBase;
- import org.apache.flex.core.ValuesManager;
- import org.apache.flex.utils.SolidBorderUtil;
- import org.apache.flex.utils.StringTrimmer;
-
- /**
- * The CSSBorderUtils class is shared code for getting the styles
- * regarding borders and drawing one.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class CSSBorderUtils
- {
- /**
- * @private
- */
- public function CSSBorderUtils()
- {
- throw new Error("CSSBorderUtils should not be instantiated.");
- }
-
- /**
- * Get the related styles and draw a border
- *
- * @param g The flash.display.Graphics to draw into.
- * @param width The width.
- * @param height The height.
- * @param host The object to pull styles from.
- * @param state The pseudo-state, if any.
- * @param drawBackground True if area inside border should be filled with backgroundColor.
- * @param clear True if graphics.clear() should be called.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public static function draw(g:Graphics, width:Number, height:Number,
- host:DisplayObject, state:String = null,
- drawBackground:Boolean = false, clear:Boolean = true):void
- {
- if (clear)
- g.clear();
-
- var needBorderColor:Boolean = true;
- var borderColor:uint;
- var borderThickness:uint = 0;
- var borderStyle:String = "none";
- var borderStyles:Object = ValuesManager.valuesImpl.getValue(host, "border", state);
- if (borderStyles is Array)
- {
- borderColor = CSSUtils.toColor(borderStyles[2]);
- borderStyle = borderStyles[1];
- borderThickness = borderStyles[0];
- needBorderColor = false;
- }
- else if (borderStyles is String)
- borderStyle = borderStyles as String;
- var value:Object = ValuesManager.valuesImpl.getValue(host, "border-style", state);
- if (value != null)
- borderStyle = value as String;
- value = ValuesManager.valuesImpl.getValue(host, "border-color", state);
- if (value != null)
- borderColor = CSSUtils.toColor(value);
- else if (needBorderColor)
- {
- value = ValuesManager.valuesImpl.getValue(host, "color", state);
- if (value != null)
- borderColor = CSSUtils.toColor(value);
- }
- // if alpha = 0; assume that alpha just wasn't specified
- if ((borderColor & 0xFF000000) == 0)
- borderColor = borderColor | 0xFF000000;
- value = ValuesManager.valuesImpl.getValue(host, "border-width", state);
- if (value != null)
- borderThickness = value as uint;
-
- var borderRadius:String;
- var borderEllipseWidth:Number = NaN;
- var borderEllipseHeight:Number = NaN;
- value = ValuesManager.valuesImpl.getValue(host, "border-radius", state);
- if (value != null)
- {
- if (value is Number)
- borderEllipseWidth = 2 * (value as Number);
- else
- {
- borderRadius = value as String;
- var arr:Array = StringTrimmer.splitAndTrim(borderRadius, "/");
- borderEllipseWidth = 2 * CSSUtils.toNumber(arr[0]);
- if (arr.length > 1)
- borderEllipseHeight = 2 * CSSUtils.toNumber(arr[1]);
- }
- }
- if (borderStyle == "none" && isNaN(borderEllipseWidth))
- {
- var n:int;
- var values:Array;
- var colorTop:uint;
- var colorLeft:uint;
- var colorRight:uint;
- var colorBottom:uint;
- var widthTop:int = 0;
- var widthLeft:int = 0;
- var widthBottom:int = 0;
- var widthRight:int = 0;
- value = ValuesManager.valuesImpl.getValue(host, "border-top", state);
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthTop = CSSUtils.toNumber(values[0]);
- // assume solid for now
- if (n > 2)
- colorTop = CSSUtils.toColorWithAlpha(values[2]);
- else
- colorTop = borderColor;
- }
- value = ValuesManager.valuesImpl.getValue(host, "border-left", state);
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthLeft = CSSUtils.toNumber(values[0]);
- // assume solid for now
- if (n > 2)
- colorLeft = CSSUtils.toColorWithAlpha(values[2]);
- else
- colorLeft = borderColor;
- }
- value = ValuesManager.valuesImpl.getValue(host, "border-bottom", state);
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthBottom = CSSUtils.toNumber(values[0]);
- // assume solid for now
- if (n > 2)
- colorBottom = CSSUtils.toColorWithAlpha(values[2]);
- else
- colorBottom = borderColor;
- }
- value = ValuesManager.valuesImpl.getValue(host, "border-right", state);
- if (value != null)
- {
- if (value is Array)
- values = value as Array;
- else
- values = value.split(" ");
- n = values.length;
- widthRight = CSSUtils.toNumber(values[0]);
- // assume solid for now
- if (n > 2)
- colorRight = CSSUtils.toColorWithAlpha(values[2]);
- else
- colorRight = borderColor;
- }
- SolidBorderUtil.drawDetailedBorder(g, 0, 0, width, height,
- colorTop, colorRight, colorBottom, colorLeft,
- widthTop, widthRight, widthBottom, widthLeft);
- }
- else
- {
- if (borderStyle == "none")
- borderThickness = 0;
- var backgroundColor:Object = null;
- if (drawBackground)
- {
- value = ValuesManager.valuesImpl.getValue(host, "background-color", state);
- if (value != null)
- backgroundColor = CSSUtils.toColorWithAlpha(value);
- }
- SolidBorderUtil.drawBorder(g,
- 0, 0, width, height,
- borderColor & 0xFFFFFF, backgroundColor, borderThickness, borderColor >>> 24 / 255,
- borderEllipseWidth, borderEllipseHeight);
- }
-
- }
-
- }
-}
[06/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMeasurementBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMeasurementBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMeasurementBead.as
new file mode 100644
index 0000000..1722c2d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMeasurementBead.as
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The IMeasurementBead interface is the basic interface for the
+ * bead that can compute and report the measurements of the contents of
+ * a component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IMeasurementBead extends IBead
+ {
+ /**
+ * The measured width.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get measuredWidth():Number;
+
+ /**
+ * The measured height
.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get measuredHeight():Number;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPanelModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPanelModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPanelModel.as
new file mode 100644
index 0000000..02ece38
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPanelModel.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.core
+{
+ /**
+ * The IPanelModel interface describes the minimum set of properties
+ * available to a Panel control. More sophisticated Panel controls
+ * could have models that extend IPanelModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IPanelModel extends IBeadModel, ITitleBarModel
+ {
+ /**
+ * The items in the org.apache.flex.html.ControlBar. Setting this property automatically
+ * causes the ControlBar to display if you are using a View bead that supports it.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get controlBar():Array;
+ function set controlBar(value:Array):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParent.as
new file mode 100755
index 0000000..2b49278
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParent.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IParent interface is the basic interface for a
+ * component that contains subcomponents, including the
+ * application class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IParent
+ {
+ /**
+ * Add a component to the parent.
+ *
+ * @param c The subcomponent to add.
+ * @param dispatchEvent Whether to dispatch an event after adding the child.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function addElement(c:Object, dispatchEvent:Boolean = true):void;
+
+ /**
+ * Add a component to the parent.
+ *
+ * @param c The subcomponent to add.
+ * @param c The index where the subcomponent should be added.
+ * @param dispatchEvent Whether to dispatch an event after adding the child.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void;
+
+ /**
+ * Gets the index of this subcomponent.
+ *
+ * @param c The subcomponent to add.
+ * @return The index (zero-based).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getElementIndex(c:Object):int;
+
+ /**
+ * Remove a component from the parent.
+ *
+ * @param c The subcomponent to remove.
+ * @param dispatchEvent Whether to dispatch an event after removing the child.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function removeElement(c:Object, dispatchEvent:Boolean = true):void;
+
+ /**
+ * The number of elements in the parent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get numElements():int;
+
+ /**
+ * Get a component from the parent.
+ *
+ * @param c The index of the subcomponent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getElementAt(index:int):Object;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParentIUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParentIUIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParentIUIBase.as
new file mode 100755
index 0000000..a262c36
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IParentIUIBase.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.core
+{
+ /**
+ * The IParentIUIBase interface is a convenience interface
+ * for IUIBase components that contains subcomponents.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IParentIUIBase extends IParent, IUIBase
+ {
+ COMPILE::JS
+ {
+ function internalChildren():Array;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUp.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUp.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUp.as
new file mode 100644
index 0000000..0ffc3b1
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUp.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.core
+{
+ /**
+ * The IPopUp interface is a "marker" interface for a component that
+ * should be floated above other components that aren't an IPopUp.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IPopUp
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUpHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUpHost.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUpHost.as
new file mode 100755
index 0000000..65f1334
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IPopUpHost.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.core
+{
+ /**
+ * The IPopUpHost interface is a "marker" interface for a component that
+ * parents components that implement IPopUp.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IPopUpHost extends IParent
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRangeModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRangeModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRangeModel.as
new file mode 100644
index 0000000..42bf02a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRangeModel.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IRangeModel interface describes the minimum set of properties
+ * available to control that let the user select from within a
+ * range of numbers like NumericStepper and Slider. More sophisticated controls
+ * could have models that extend IRangeModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IRangeModel extends IBeadModel
+ {
+ /**
+ * The maximum value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get maximum():Number;
+ function set maximum(value:Number):void;
+
+ /**
+ * The minimum value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get minimum():Number;
+ function set minimum(value:Number):void;
+
+ /**
+ * The interval that the value is rounded to
+ * when the user is drag selecting the value
+ * or entering an arbitrary value. For example,
+ * if the snapInterval is 0.5, then only integers
+ * and values endnig in 0.5 are selectable.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get snapInterval():Number;
+ function set snapInterval(value:Number):void;
+
+ /**
+ * The change in value by which the increment
+ * and decrement buttons and arrow keys will
+ * affect the curent value..
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get stepSize():Number;
+ function set stepSize(value:Number):void;
+
+ /**
+ * The current value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get value():Number;
+ function set value(value:Number):void;
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRollOverModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRollOverModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRollOverModel.as
new file mode 100644
index 0000000..788012a
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IRollOverModel.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IRollOverModel interface describes the minimum set of properties
+ * available to control that supports rollover highlighting of an item
+ * within a set of items.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IRollOverModel extends IEventDispatcher, IBeadModel
+ {
+ /**
+ * The index of the item that is currently under the mouse.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get rollOverIndex():int;
+ function set rollOverIndex(value:int):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
new file mode 100644
index 0000000..f4ee2fe
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IScrollBarModel.as
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IScrollBarModel interface describes the minimum set of properties
+ * available to control that let the user select from within a
+ * range of numbers like ScrollBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public interface IScrollBarModel extends IRangeModel
+ {
+ /**
+ * The size of the page. This generally is used to compute
+ * the size of the thumb in the scrollbar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get pageSize():Number;
+ function set pageSize(value:Number):void;
+
+ /**
+ * The change in value when clicking on above or below the thumb on
+ * a scrollbar. Also used for pageUp/pageDown keys.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get pageStepSize():Number;
+ function set pageStepSize(value:Number):void;
+}
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectableItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectableItemRenderer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectableItemRenderer.as
new file mode 100644
index 0000000..366a5dd
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectableItemRenderer.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IItemRenderer interface is the basic interface for item renderers.
+ * More complex item renderers may implements extensions of this interface.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ISelectableItemRenderer extends IItemRenderer
+ {
+
+ /**
+ * The property on the data item that the item renderer
+ * should renderer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get labelField():String;
+ function set labelField(value:String):void;
+
+ /**
+ * The index of the data item in the data provider.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get index():int;
+ function set index(value:int):void;
+
+ /**
+ * <code>true</code> if the item renderer is rendering
+ * an item that is selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selected():Boolean;
+ function set selected(value:Boolean):void;
+
+ /**
+ * <code>true</code> if the item renderer is rendering
+ * an item that is under the mouse pointer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get hovered():Boolean;
+ function set hovered(value:Boolean):void;
+
+ /**
+ * <code>true</code> if the item renderer is rendering
+ * an item that is under the mouse pointer and the
+ * mouse button is down.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get down():Boolean;
+ function set down(value:Boolean):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectionModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectionModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectionModel.as
new file mode 100644
index 0000000..e918e47
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ISelectionModel.as
@@ -0,0 +1,100 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The ISelectionModel interface describes the minimum set of properties
+ * available to control that let the user select from within a
+ * set of items in a dataProvider. A more sophisticated model would
+ * support multiple selection.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ISelectionModel extends IEventDispatcher, IBeadModel
+ {
+ /**
+ * The set of choices displayed in the ComboBox's
+ * dropdown. The dataProvider can be a simple
+ * array or vector if the set of choices is not
+ * going to be modified (except by wholesale
+ * replacement of the dataProvider). To use
+ * different kinds of data sets, you may need to
+ * provide an alternate "mapping" bead that
+ * iterates the dataProvider, generates item
+ * renderers and assigns a data item to the
+ * item renderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get dataProvider():Object;
+ function set dataProvider(value:Object):void;
+
+ /**
+ * The index of the selected item in the
+ * dataProvider. Values less than 0 can
+ * have specific meanings but generally mean
+ * that no item is selected because the
+ * user has typed in a custom entry or has
+ * yet to make a choice.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedIndex():int;
+ function set selectedIndex(value:int):void;
+
+ /**
+ * The data item selected in the
+ * dataProvider. null usually means
+ * that the user has not selected a value
+ * and has typed in a custom entry.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedItem():Object;
+ function set selectedItem(value:Object):void;
+
+ // TODO: this is probably not needed in a selection model
+ // and should be in a scheme mapper model.
+ /**
+ * The property on the data item that the item renderer
+ * should renderer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get labelField():String;
+ function set labelField(value:String):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesImpl.as
new file mode 100644
index 0000000..df5bdee
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesImpl.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.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IStatesImpl interface is a "marker" interface for the
+ * implementation view states in a View like ViewBase. The
+ * implementation watches for the currentState property to
+ * change and executes changes accordingly.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStatesImpl extends IEventDispatcher, IBead
+ {
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesObject.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesObject.as
new file mode 100644
index 0000000..52bcdb6
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStatesObject.as
@@ -0,0 +1,74 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IStatesObject interface is the interface for an
+ * object that supports states.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStatesObject extends IEventDispatcher
+ {
+ /**
+ * 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
+ */
+ function get states():Array;
+
+ /**
+ * The current state name
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get currentState():String;
+
+ /**
+ * @private
+ */
+ function set currentState(value:String):void;
+
+ /**
+ * The array of view state transitions.
+ * These should
+ * be instances of org.apache.flex.states.Transition.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get transitions():Array;
+
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrand.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrand.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrand.as
new file mode 100644
index 0000000..b6e8b20
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrand.as
@@ -0,0 +1,77 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The IStrand interface is the basic interface for a host component for
+ * a set of plug-ins known as Beads.
+ * In FlexJS, the recommended pattern is to break out optional functionality
+ * into small plug-ins that can be re-used in other components, or replaced with
+ * different implementations optimized for different things such as size,
+ * performance, advanced features, debugging, etc.
+ *
+ * Beads are added to and removed from a Strand and can find and coordinate with
+ * other beads on the strand.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStrand
+ {
+ /**
+ * Add a bead to the strand.
+ *
+ * @param bead The bead to be added.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function addBead(bead:IBead):void;
+
+ /**
+ * Find a bead on the strand.
+ *
+ * @param classOrInterface The class or interface to use
+ * to search for the bead
+ * @return The bead.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getBeadByType(classOrInterface:Class):IBead;
+
+ /**
+ * Remove a bead from the strand.
+ *
+ * @param IBead bead The bead to be removed.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function removeBead(bead:IBead):IBead;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrandWithModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrandWithModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrandWithModel.as
new file mode 100644
index 0000000..ca2fd3e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStrandWithModel.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.core
+{
+ /**
+ * The IStrand interface is the basic interface for a host component for
+ * a set of plug-ins known as Beads.
+ * In FlexJS, the recommended pattern is to break out optional functionality
+ * into small plug-ins that can be re-used in other components, or replaced with
+ * different implementations optimized for different things such as size,
+ * performance, advanced features, debugging, etc.
+ *
+ * Beads are added to and removed from a Strand and can find and coordinate with
+ * other beads on the strand.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStrandWithModel extends IStrand
+ {
+ /**
+ * Each Strand has an model object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get model():Object;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleObject.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleObject.as
new file mode 100644
index 0000000..f8b3862
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleObject.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.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IStyleObject interface is the interface for
+ * objects that contain style properties.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStyleObject
+ {
+ /**
+ * The object these properties apply to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function set object(value:IStyleableObject):void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleableObject.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleableObject.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleableObject.as
new file mode 100644
index 0000000..ffa5999
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IStyleableObject.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.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IStyleableObject interface is the interface for
+ * objects that support style properties.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IStyleableObject extends IEventDispatcher
+ {
+ /**
+ * Get the className(s) that will be used to
+ * choose class selectors in most CSS style
+ * implementations. This property is called
+ * styleName in the Flex SDK.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get className():String;
+ function set className(value:String):void;
+
+ /**
+ * Get the id that will be used to
+ * choose id selectors in most CSS style
+ * implementations.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get id():String;
+
+ /**
+ * Get the object containing styles
+ * for this object.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get style():Object;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITextModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITextModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITextModel.as
new file mode 100644
index 0000000..3ae624c
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITextModel.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.core
+{
+ /**
+ * The ITextModel interface describes the minimum set of properties
+ * available to control that displays text. More sophisticated controls
+ * often have models that extend ITextModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ITextModel extends IBeadModel
+ {
+ /**
+ * The text displayed in the control.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get text():String;
+ function set text(value:String):void;
+
+ /**
+ * The html formatted text displayed in the control.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get html():String;
+ function set html(value:String):void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITitleBarModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITitleBarModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITitleBarModel.as
new file mode 100644
index 0000000..a3577ee
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITitleBarModel.as
@@ -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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The ITitleBarModel interface describes the minimum set of properties
+ * available to control that displays a title bar. More sophisticated controls
+ * often have models that extend ITitleBarModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ITitleBarModel extends IBeadModel
+ {
+ [Bindable("titleChange")]
+ /**
+ * The title of the TitleBar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get title():String;
+ function set title(value:String):void;
+
+ [Bindable("htmlTitleChange")]
+ /**
+ * The title of the TitleBar as HTML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get htmlTitle():String;
+ function set htmlTitle(value:String):void;
+
+ // TODO: Consider making this a bead instead.
+ // Boolean flags should often be replaced by beads.
+ // A different bead would add min/max/restore buttons.
+ [Bindable("showCloseButtonChange")]
+ /**
+ * <code>true</code> if a close button
+ * should also be in the title bar.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get showCloseButton():Boolean;
+ function set showCloseButton(value:Boolean):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IToggleButtonModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IToggleButtonModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IToggleButtonModel.as
new file mode 100644
index 0000000..352087d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IToggleButtonModel.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IToggleButtonModel interface describes the minimum set of properties
+ * available to ToggleButton that displays a text label.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IToggleButtonModel extends IBeadModel
+ {
+ // TODO: Should extend ITextModel? Or should it
+ // not assume there is a label?
+ /**
+ * The text displayed in the control.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get text():String;
+ function set text(value:String):void;
+
+ /**
+ * The html formatted text displayed in the control.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get html():String;
+ function set html(value:String):void;
+
+ /**
+ * <code>true</code> if the button is selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selected():Boolean;
+ function set selected(value:Boolean):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
new file mode 100644
index 0000000..349e24f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IUIBase.as
@@ -0,0 +1,160 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IUIBase interface is the basic interface for user interface components.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IUIBase extends IStrand, IEventDispatcher
+ {
+ /**
+ * Each IUIBase has an element that is actually added to
+ * the platform's display list DOM. It may not be the actual
+ * component itself.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ function get element():IFlexJSElement;
+
+ /**
+ * Each IUIBase has an element that is actually added to
+ * the platform's display list DOM. It may not be the actual
+ * component itself.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ function get element():WrappedHTMLElement;
+
+ /**
+ * Each IUIBase has an element that is actually added to
+ * the platform's display list DOM. It may not be the actual
+ * component itself.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ function get positioner():WrappedHTMLElement;
+
+ /**
+ * Called by parent components when the component is
+ * added via a call to addElement or addElementAt.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function addedToParent():void;
+
+ /**
+ * The alpha or opacity in the range of 0 to 1.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get alpha():Number;
+ function set alpha(value:Number):void;
+
+ /**
+ * The x co-ordinate or left side position of the bounding box.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get x():Number;
+ function set x(value:Number):void;
+
+ /**
+ * The y co-ordinate or top position of the bounding box.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get y():Number;
+ function set y(value:Number):void;
+
+ /**
+ * The width of the bounding box.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get width():Number;
+ function set width(value:Number):void;
+
+ /**
+ * The height of the bounding box.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get height():Number;
+ function set height(value:Number):void;
+
+ /**
+ * Whether the component is visible.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get visible():Boolean;
+ function set visible(value:Boolean):void;
+
+ /**
+ * The top most event dispatcher. Good for trying to capture
+ * all input events.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get topMostEventDispatcher():IEventDispatcher;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValueToggleButtonModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValueToggleButtonModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValueToggleButtonModel.as
new file mode 100644
index 0000000..f776951
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValueToggleButtonModel.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IValueToggleButtonModel interface describes the minimum set of properties
+ * available each ToggleButton in a group of ToggleButtons of which only one
+ * can be selected at a time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IValueToggleButtonModel extends IToggleButtonModel
+ {
+ /**
+ * A value associated with this instance of the ToggleButton.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get value():Object;
+ function set value(newValue:Object):void;
+
+ /**
+ * The name of the group that this ToggleButton belongs to.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get groupName():String;
+ function set groupName(value:String):void;
+
+ /**
+ * A value associated with the instance of the ToggleButton
+ * that is currently selected. It may not be this ToggleButton.
+ * This means that you can get the selected value from any
+ * instance of a ToggleButton in the group.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedValue():Object;
+ function set selectedValue(newValue:Object):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValuesImpl.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValuesImpl.as
new file mode 100644
index 0000000..f50a4ba
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IValuesImpl.as
@@ -0,0 +1,153 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IValuesImpl interface is the basic interface for the subsystem that
+ * provides default values to components. The most common implementation implements
+ * a simple version of CSS and uses data structures compiled from CSS files.
+ *
+ * @see org.apache.flex.core.SimpleCSSValuesImpl
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IValuesImpl
+ {
+ /**
+ * Returns a value for a given object based on a property name,
+ * and optionally, the current state, and a set of property value pairs.
+ *
+ * @param thisObject The object to get the value for.
+ * @param valueName The name of a property. e.g. fontFamily, color, etc.
+ * @param state The name of a state. e.g. hovered, visited
+ * @param attrs A map of property value pairs that may affect the returned value.
+ * @return A value or undefined
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*;
+
+ /**
+ * Returns a new instance based on the value for a given object based on a property name,
+ * and optionally, the current state, and a set of property value pairs. This is a way
+ * to avoid using the Class type in AS code.
+ *
+ * @param thisObject The object to get the value for.
+ * @param valueName The name of a property. e.g. fontFamily, color, etc.
+ * @param state The name of a state. e.g. hovered, visited
+ * @param attrs A map of property value pairs that may affect the returned value.
+ * @return A value or undefined
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*;
+
+ /**
+ * Returns a shared instance, instantiating the shared instance if
+ * it doesn't exist. Often used to share "managers"
+ *
+ * @param valueName The name of a shared instance. Often, the fully
+ * qualified class name is used.
+ * @return The shared instance.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getInstance(valueName:String):Object;
+
+ /**
+ * MXML Documents that support <fx:Style> blocks should call
+ * init to install the styles for each instance.
+ *
+ * @param mainClass An instance that may have styles from an <fx:Style> block.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function init(mainClass:Object):void;
+
+ /**
+ * Converts a color value into a uint.
+ *
+ * @param value A string for a color. Typically it is
+ * a color value like #ffffff or "red" in some cases.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function convertColor(value:Object):uint;
+
+ /**
+ * Converts an HTML-like style format into an object.
+ *
+ * @param value A string, such as "color:red;fontSize:10px".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function parseStyles(value:String):Object;
+
+ /**
+ * Add a style rule like a class selector.
+ *
+ * @param ruleName The name of the rule like '.myClassSelector'.
+ * @param values Name/value pairs.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function addRule(ruleName:String, values:Object):void;
+
+ /**
+ * Applies a set of styles to an instance. This is used
+ * by implementations that wrap internal elements to
+ * propagate styles to the right internal elements.
+ *
+ * @param instance An instance to apply styles to.
+ * @param styles An Object map of styles to apply.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ function applyStyles(instance:IUIBase, styles:Object):void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewport.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewport.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewport.as
new file mode 100644
index 0000000..a274f52
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IViewport.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.core
+{
+ import org.apache.flex.geom.Size;
+
+ /**
+ * A Viewport is a window onto an area of content. A viewport is given space
+ * in which to operate by a View bead. Viewports can control their area which
+ * is specified by the IViewportModel, adding scrollbars or whatever scrolling
+ * mechanism they want.
+ */
+ public interface IViewport extends IBead
+ {
+ /**
+ * Get the actual parent of the container's content.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get contentView():IUIBase;
+
+ /**
+ * Sets the upper left position of the viewport
+ * @param x The left position.
+ * @param y The top position.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setPosition(x:Number, y:Number):void;
+
+ /**
+ * Size the content area based on any visible scrolling controls and
+ * the given width and height. If width and/or height is NaN
+ * then that dimension is being sized to content.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function layoutViewportBeforeContentLayout(width:Number, height:Number):void;
+
+ /**
+ * This method is invoked after layout is complete. If width and/or height is
+ * sized to content, the viewport should determine that size and set the
+ * content area size appropriately, and display any scrolling controls
+ * before returning the resulting size of the viewport (which means the
+ * area used up by both content area and scrolling controls).
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function layoutViewportAfterContentLayout():Size;
+
+ }
+}
[20/20] git commit: [flex-asjs] [refs/heads/mavenfolders] - fix up
missing manifests in flex-config and air-config
Posted by ah...@apache.org.
fix up missing manifests in flex-config and air-config
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9282af81
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9282af81
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9282af81
Branch: refs/heads/mavenfolders
Commit: 9282af8115b116df0558933d426661509ac37503
Parents: 6324950
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 11 12:52:12 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 11 12:52:12 2016 -0800
----------------------------------------------------------------------
frameworks/air-config-template.xml | 86 ++++++++++++++++++++-
frameworks/air-config.xml | 86 ++++++++++++++++++++-
frameworks/flex-config-template.xml | 125 +++++++++++++++++++++++++------
frameworks/flex-config.xml | 125 +++++++++++++++++++++++++------
4 files changed, 374 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9282af81/frameworks/air-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/air-config-template.xml b/frameworks/air-config-template.xml
index 6edcb05..8e897ca 100644
--- a/frameworks/air-config-template.xml
+++ b/frameworks/air-config-template.xml
@@ -103,13 +103,73 @@
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
<!-- elements. -->
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Binding/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Charts/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Collections/basic-manifest.xml</manifest>
+
+ </namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Core/basic-manifest.xml</manifest>
+ <manifest>projects/Core/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Effects/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Formatters/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Graphics/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/HTML/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Mobile/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Network/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
<manifest>projects/HTML5/html5-manifest.xml</manifest>
@@ -121,6 +181,30 @@
<manifest>projects/Flat/flat-manifest.xml</manifest>
</namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+
+ <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+
+ <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+
+ <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+
+ <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+
+ </namespace>
</namespaces>
<!-- Enable post-link SWF optimization. -->
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9282af81/frameworks/air-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/air-config.xml b/frameworks/air-config.xml
index 5d9c109..82ed363 100644
--- a/frameworks/air-config.xml
+++ b/frameworks/air-config.xml
@@ -103,13 +103,73 @@
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
<!-- elements. -->
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Binding/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Charts/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Collections/basic-manifest.xml</manifest>
+
+ </namespace>
<namespace>
<uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>projects/Core/basic-manifest.xml</manifest>
+ <manifest>projects/Core/src/main/resources/basic-manifest.xml</manifest>
</namespace>
<namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Effects/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Formatters/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Graphics/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/HTML/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Mobile/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Network/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
<uri>library://ns.apache.org/flexjs/html5</uri>
<manifest>projects/HTML5/html5-manifest.xml</manifest>
@@ -121,6 +181,30 @@
<manifest>projects/Flat/flat-manifest.xml</manifest>
</namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+
+ <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+
+ <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+
+ <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+
+ <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+
+ </namespace>
</namespaces>
<!-- Enable post-link SWF optimization. -->
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9282af81/frameworks/flex-config-template.xml
----------------------------------------------------------------------
diff --git a/frameworks/flex-config-template.xml b/frameworks/flex-config-template.xml
index 7569957..ee8c56a 100644
--- a/frameworks/flex-config-template.xml
+++ b/frameworks/flex-config-template.xml
@@ -106,29 +106,108 @@
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
<!-- elements. -->
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
-
- <manifest>projects/Core/basic-manifest.xml</manifest>
-
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/html5</uri>
-
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
-
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/svg</uri>
- <manifest>projects/HTML/svg-manifest.xml</manifest>
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/flat</uri>
-
- <manifest>projects/Flat/flat-manifest.xml</manifest>
-
- </namespace>
-
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Binding/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Charts/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Collections/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Core/src/main/resources/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Effects/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Formatters/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Graphics/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/HTML/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Mobile/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Network/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+
+ <manifest>projects/HTML5/html5-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+
+ <manifest>projects/Flat/flat-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+
+ <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+
+ <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+
+ <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+
+ <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+
+ </namespace>
</namespaces>
<!-- Enable post-link SWF optimization. -->
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9282af81/frameworks/flex-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/flex-config.xml b/frameworks/flex-config.xml
index 94c7e66..f257601 100644
--- a/frameworks/flex-config.xml
+++ b/frameworks/flex-config.xml
@@ -106,29 +106,108 @@
<namespaces>
<!-- Specify a URI to associate with a manifest of components for use as MXML -->
<!-- elements. -->
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
-
- <manifest>projects/Core/basic-manifest.xml</manifest>
-
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/html5</uri>
-
- <manifest>projects/HTML5/html5-manifest.xml</manifest>
-
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/svg</uri>
- <manifest>projects/HTML/svg-manifest.xml</manifest>
- </namespace>
- <namespace>
- <uri>library://ns.apache.org/flexjs/flat</uri>
-
- <manifest>projects/Flat/flat-manifest.xml</manifest>
-
- </namespace>
-
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Binding/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Charts/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Collections/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Core/src/main/resources/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/DragDrop/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Effects/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Formatters/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Graphics/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/HTML/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Mobile/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/basic</uri>
+
+ <manifest>projects/Network/basic-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/html5</uri>
+
+ <manifest>projects/HTML5/html5-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/flat</uri>
+
+ <manifest>projects/Flat/flat-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/jquery</uri>
+
+ <manifest>projects/JQuery/jquery-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/google</uri>
+
+ <manifest>projects/GoogleMaps/google-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/cordova</uri>
+
+ <manifest>projects/Mobile/cordova-manifest.xml</manifest>
+
+ </namespace>
+ <namespace>
+ <uri>library://ns.apache.org/flexjs/createjs</uri>
+
+ <manifest>projects/CreateJS/createjs-manifest.xml</manifest>
+
+ </namespace>
</namespaces>
<!-- Enable post-link SWF optimization. -->
[17/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
rename/restructure folders for maven
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a903508e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a903508e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a903508e
Branch: refs/heads/mavenfolders
Commit: a903508e0be78b9766512eb7f490a0ba6f8b3abe
Parents: 0a2709e
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 11 11:15:41 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 11 11:15:41 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Core/as/src/CoreClasses.as | 149 --
.../projects/Core/as/src/CoreJSClasses.as | 99 --
.../as/src/org/apache/flex/core/Application.as | 602 -------
.../src/org/apache/flex/core/ApplicationBase.as | 110 --
.../as/src/org/apache/flex/core/BeadViewBase.as | 97 --
.../org/apache/flex/core/BindableCSSStyles.as | 134 --
.../apache/flex/core/BrowserResizeListener.as | 138 --
.../src/org/apache/flex/core/BrowserScroller.as | 89 --
.../src/org/apache/flex/core/BrowserWindow.as | 61 -
.../src/org/apache/flex/core/CSSFontFaceBead.as | 160 --
.../as/src/org/apache/flex/core/CSSShape.as | 163 --
.../as/src/org/apache/flex/core/CSSSprite.as | 163 --
.../as/src/org/apache/flex/core/CSSTextField.as | 163 --
.../src/org/apache/flex/core/CallLaterBead.as | 128 --
.../as/src/org/apache/flex/core/ClassFactory.as | 90 --
.../src/org/apache/flex/core/ContainerBase.as | 443 ------
.../flex/core/ContainerBaseStrandChildren.as | 99 --
.../src/org/apache/flex/core/DataBindingBase.as | 45 -
.../src/org/apache/flex/core/FilledRectangle.as | 125 --
.../org/apache/flex/core/HTMLElementWrapper.as | 247 ---
.../as/src/org/apache/flex/core/IAlertModel.as | 135 --
.../org/apache/flex/core/IApplicationView.as | 45 -
.../Core/as/src/org/apache/flex/core/IBead.as | 47 -
.../src/org/apache/flex/core/IBeadController.as | 37 -
.../as/src/org/apache/flex/core/IBeadLayout.as | 40 -
.../as/src/org/apache/flex/core/IBeadModel.as | 39 -
.../as/src/org/apache/flex/core/IBeadView.as | 46 -
.../as/src/org/apache/flex/core/IBorderModel.as | 46 -
.../Core/as/src/org/apache/flex/core/IChild.as | 59 -
.../Core/as/src/org/apache/flex/core/IChrome.as | 37 -
.../src/org/apache/flex/core/IComboBoxModel.as | 108 --
.../as/src/org/apache/flex/core/IContainer.as | 47 -
.../src/org/apache/flex/core/IContainerView.as | 33 -
.../as/src/org/apache/flex/core/IContentView.as | 38 -
.../org/apache/flex/core/IContentViewHost.as | 35 -
.../src/org/apache/flex/core/IDataGridModel.as | 44 -
.../flex/core/IDataGridPresentationModel.as | 45 -
.../core/IDataProviderItemRendererMapper.as | 52 -
.../org/apache/flex/core/IDateChooserModel.as | 101 --
.../as/src/org/apache/flex/core/IDocument.as | 48 -
.../src/org/apache/flex/core/IDragInitiator.as | 67 -
.../as/src/org/apache/flex/core/IEffectTimer.as | 68 -
.../as/src/org/apache/flex/core/IFactory.as | 46 -
.../as/src/org/apache/flex/core/IFlexInfo.as | 43 -
.../src/org/apache/flex/core/IFlexJSElement.as | 27 -
.../as/src/org/apache/flex/core/IFormatBead.as | 69 -
.../as/src/org/apache/flex/core/IImageModel.as | 48 -
.../src/org/apache/flex/core/IItemRenderer.as | 57 -
.../flex/core/IItemRendererClassFactory.as | 60 -
.../org/apache/flex/core/IItemRendererParent.as | 52 -
.../apache/flex/core/IItemRendererProvider.as | 58 -
.../as/src/org/apache/flex/core/ILayoutChild.as | 175 ---
.../as/src/org/apache/flex/core/ILayoutHost.as | 44 -
.../apache/flex/core/IListPresentationModel.as | 54 -
.../src/org/apache/flex/core/IMXMLDocument.as | 66 -
.../org/apache/flex/core/IMeasurementBead.as | 53 -
.../as/src/org/apache/flex/core/IPanelModel.as | 45 -
.../Core/as/src/org/apache/flex/core/IParent.as | 109 --
.../src/org/apache/flex/core/IParentIUIBase.as | 37 -
.../Core/as/src/org/apache/flex/core/IPopUp.as | 33 -
.../as/src/org/apache/flex/core/IPopUpHost.as | 33 -
.../as/src/org/apache/flex/core/IRangeModel.as | 95 --
.../src/org/apache/flex/core/IRollOverModel.as | 46 -
.../src/org/apache/flex/core/IScrollBarModel.as | 58 -
.../apache/flex/core/ISelectableItemRenderer.as | 95 --
.../src/org/apache/flex/core/ISelectionModel.as | 100 --
.../as/src/org/apache/flex/core/IStatesImpl.as | 37 -
.../src/org/apache/flex/core/IStatesObject.as | 74 -
.../Core/as/src/org/apache/flex/core/IStrand.as | 77 -
.../org/apache/flex/core/IStrandWithModel.as | 50 -
.../as/src/org/apache/flex/core/IStyleObject.as | 45 -
.../org/apache/flex/core/IStyleableObject.as | 71 -
.../as/src/org/apache/flex/core/ITextModel.as | 56 -
.../src/org/apache/flex/core/ITitleBarModel.as | 73 -
.../org/apache/flex/core/IToggleButtonModel.as | 67 -
.../Core/as/src/org/apache/flex/core/IUIBase.as | 160 --
.../apache/flex/core/IValueToggleButtonModel.as | 69 -
.../as/src/org/apache/flex/core/IValuesImpl.as | 153 --
.../as/src/org/apache/flex/core/IViewport.as | 80 -
.../src/org/apache/flex/core/IViewportModel.as | 50 -
.../org/apache/flex/core/IViewportScroller.as | 36 -
.../flex/core/ItemRendererClassFactory.as | 194 ---
.../as/src/org/apache/flex/core/ListBase.as | 126 --
.../apache/flex/core/ListBaseStrandChildren.as | 100 --
.../org/apache/flex/core/MXMLDragInitiator.as | 131 --
.../org/apache/flex/core/ParentDocumentBead.as | 127 --
.../org/apache/flex/core/SimpleApplication.as | 102 --
.../src/org/apache/flex/core/SimpleCSSStyles.as | 106 --
.../org/apache/flex/core/SimpleCSSValuesImpl.as | 765 ---------
.../org/apache/flex/core/SimpleStatesImpl.as | 222 ---
.../org/apache/flex/core/SimpleValuesImpl.as | 188 ---
.../as/src/org/apache/flex/core/StageProxy.as | 127 --
.../Core/as/src/org/apache/flex/core/Strand.as | 182 ---
.../apache/flex/core/StyleableCSSTextField.as | 201 ---
.../Core/as/src/org/apache/flex/core/UIBase.as | 1483 ------------------
.../as/src/org/apache/flex/core/UIButtonBase.as | 860 ----------
.../src/org/apache/flex/core/ValuesManager.as | 72 -
.../as/src/org/apache/flex/core/ViewBase.as | 98 --
.../org/apache/flex/core/WrappedHTMLElement.as | 21 -
.../src/org/apache/flex/events/BrowserEvent.as | 475 ------
.../src/org/apache/flex/events/CustomEvent.as | 64 -
.../src/org/apache/flex/events/ElementEvents.as | 51 -
.../Core/as/src/org/apache/flex/events/Event.as | 128 --
.../org/apache/flex/events/EventDispatcher.as | 66 -
.../org/apache/flex/events/IEventDispatcher.as | 49 -
.../as/src/org/apache/flex/events/MouseEvent.as | 290 ----
.../org/apache/flex/events/ValueChangeEvent.as | 129 --
.../as/src/org/apache/flex/events/ValueEvent.as | 68 -
.../flex/events/utils/MouseEventConverter.as | 166 --
.../org/apache/flex/events/utils/MouseUtils.as | 103 --
.../Core/as/src/org/apache/flex/geom/Point.as | 72 -
.../as/src/org/apache/flex/geom/Rectangle.as | 95 --
.../Core/as/src/org/apache/flex/geom/Size.as | 41 -
.../as/src/org/apache/flex/states/AddItems.as | 101 --
.../org/apache/flex/states/ItemAndDescriptor.as | 70 -
.../org/apache/flex/states/SetEventHandler.as | 79 -
.../src/org/apache/flex/states/SetProperty.as | 81 -
.../Core/as/src/org/apache/flex/states/State.as | 83 -
.../as/src/org/apache/flex/utils/BinaryData.as | 391 -----
.../src/org/apache/flex/utils/CSSBorderUtils.as | 219 ---
.../org/apache/flex/utils/CSSContainerUtils.as | 194 ---
.../as/src/org/apache/flex/utils/CSSUtils.as | 328 ----
.../as/src/org/apache/flex/utils/EffectTimer.as | 136 --
.../as/src/org/apache/flex/utils/Language.as | 357 -----
.../apache/flex/utils/MXMLDataInterpreter.as | 463 ------
.../src/org/apache/flex/utils/MixinManager.as | 105 --
.../as/src/org/apache/flex/utils/PNGEncoder.as | 305 ----
.../as/src/org/apache/flex/utils/PointUtils.as | 125 --
.../org/apache/flex/utils/SolidBorderUtil.as | 191 ---
.../src/org/apache/flex/utils/StringTrimmer.as | 176 ---
.../Core/as/src/org/apache/flex/utils/Timer.as | 148 --
.../as/src/org/apache/flex/utils/UIUtils.as | 107 --
.../flex/utils/ViewSourceContextMenuOption.as | 97 --
.../org/apache/flex/utils/dbg/DOMPathUtil.as | 95 --
.../as/tests/FlexUnitFlexJSApplication.mxml | 46 -
frameworks/projects/Core/as/tests/build.xml | 165 --
.../Core/as/tests/flexUnitTests/StrandTester.as | 27 -
.../as/tests/flexUnitTests/StrandTesterTest.as | 55 -
frameworks/projects/Core/basic-manifest.xml | 41 -
.../projects/Core/compile-as-to-js-config.xml | 77 -
.../projects/Core/compile-asjs-config.xml | 78 -
frameworks/projects/Core/compile-config.xml | 83 -
frameworks/projects/Core/compile-js-config.xml | 87 -
.../projects/Core/src/main/flex/CoreClasses.as | 149 ++
.../Core/src/main/flex/CoreJSClasses.as | 99 ++
.../flex/org/apache/flex/core/Application.as | 602 +++++++
.../org/apache/flex/core/ApplicationBase.as | 110 ++
.../flex/org/apache/flex/core/BeadViewBase.as | 97 ++
.../org/apache/flex/core/BindableCSSStyles.as | 134 ++
.../apache/flex/core/BrowserResizeListener.as | 138 ++
.../org/apache/flex/core/BrowserScroller.as | 89 ++
.../flex/org/apache/flex/core/BrowserWindow.as | 61 +
.../org/apache/flex/core/CSSFontFaceBead.as | 160 ++
.../main/flex/org/apache/flex/core/CSSShape.as | 163 ++
.../main/flex/org/apache/flex/core/CSSSprite.as | 163 ++
.../flex/org/apache/flex/core/CSSTextField.as | 163 ++
.../flex/org/apache/flex/core/CallLaterBead.as | 128 ++
.../flex/org/apache/flex/core/ClassFactory.as | 90 ++
.../flex/org/apache/flex/core/ContainerBase.as | 443 ++++++
.../flex/core/ContainerBaseStrandChildren.as | 99 ++
.../org/apache/flex/core/DataBindingBase.as | 45 +
.../org/apache/flex/core/FilledRectangle.as | 125 ++
.../org/apache/flex/core/HTMLElementWrapper.as | 247 +++
.../flex/org/apache/flex/core/IAlertModel.as | 135 ++
.../org/apache/flex/core/IApplicationView.as | 45 +
.../src/main/flex/org/apache/flex/core/IBead.as | 47 +
.../org/apache/flex/core/IBeadController.as | 37 +
.../flex/org/apache/flex/core/IBeadLayout.as | 40 +
.../flex/org/apache/flex/core/IBeadModel.as | 39 +
.../main/flex/org/apache/flex/core/IBeadView.as | 46 +
.../flex/org/apache/flex/core/IBorderModel.as | 46 +
.../main/flex/org/apache/flex/core/IChild.as | 59 +
.../main/flex/org/apache/flex/core/IChrome.as | 37 +
.../flex/org/apache/flex/core/IComboBoxModel.as | 108 ++
.../flex/org/apache/flex/core/IContainer.as | 47 +
.../flex/org/apache/flex/core/IContainerView.as | 33 +
.../flex/org/apache/flex/core/IContentView.as | 38 +
.../org/apache/flex/core/IContentViewHost.as | 35 +
.../flex/org/apache/flex/core/IDataGridModel.as | 44 +
.../flex/core/IDataGridPresentationModel.as | 45 +
.../core/IDataProviderItemRendererMapper.as | 52 +
.../org/apache/flex/core/IDateChooserModel.as | 101 ++
.../main/flex/org/apache/flex/core/IDocument.as | 48 +
.../flex/org/apache/flex/core/IDragInitiator.as | 67 +
.../flex/org/apache/flex/core/IEffectTimer.as | 68 +
.../main/flex/org/apache/flex/core/IFactory.as | 46 +
.../main/flex/org/apache/flex/core/IFlexInfo.as | 43 +
.../flex/org/apache/flex/core/IFlexJSElement.as | 27 +
.../flex/org/apache/flex/core/IFormatBead.as | 69 +
.../flex/org/apache/flex/core/IImageModel.as | 48 +
.../flex/org/apache/flex/core/IItemRenderer.as | 57 +
.../flex/core/IItemRendererClassFactory.as | 60 +
.../org/apache/flex/core/IItemRendererParent.as | 52 +
.../apache/flex/core/IItemRendererProvider.as | 58 +
.../flex/org/apache/flex/core/ILayoutChild.as | 175 +++
.../flex/org/apache/flex/core/ILayoutHost.as | 44 +
.../apache/flex/core/IListPresentationModel.as | 54 +
.../flex/org/apache/flex/core/IMXMLDocument.as | 66 +
.../org/apache/flex/core/IMeasurementBead.as | 53 +
.../flex/org/apache/flex/core/IPanelModel.as | 45 +
.../main/flex/org/apache/flex/core/IParent.as | 109 ++
.../flex/org/apache/flex/core/IParentIUIBase.as | 37 +
.../main/flex/org/apache/flex/core/IPopUp.as | 33 +
.../flex/org/apache/flex/core/IPopUpHost.as | 33 +
.../flex/org/apache/flex/core/IRangeModel.as | 95 ++
.../flex/org/apache/flex/core/IRollOverModel.as | 46 +
.../org/apache/flex/core/IScrollBarModel.as | 58 +
.../apache/flex/core/ISelectableItemRenderer.as | 95 ++
.../org/apache/flex/core/ISelectionModel.as | 100 ++
.../flex/org/apache/flex/core/IStatesImpl.as | 37 +
.../flex/org/apache/flex/core/IStatesObject.as | 74 +
.../main/flex/org/apache/flex/core/IStrand.as | 77 +
.../org/apache/flex/core/IStrandWithModel.as | 50 +
.../flex/org/apache/flex/core/IStyleObject.as | 45 +
.../org/apache/flex/core/IStyleableObject.as | 71 +
.../flex/org/apache/flex/core/ITextModel.as | 56 +
.../flex/org/apache/flex/core/ITitleBarModel.as | 73 +
.../org/apache/flex/core/IToggleButtonModel.as | 67 +
.../main/flex/org/apache/flex/core/IUIBase.as | 160 ++
.../apache/flex/core/IValueToggleButtonModel.as | 69 +
.../flex/org/apache/flex/core/IValuesImpl.as | 153 ++
.../main/flex/org/apache/flex/core/IViewport.as | 80 +
.../flex/org/apache/flex/core/IViewportModel.as | 50 +
.../org/apache/flex/core/IViewportScroller.as | 36 +
.../flex/core/ItemRendererClassFactory.as | 194 +++
.../main/flex/org/apache/flex/core/ListBase.as | 126 ++
.../apache/flex/core/ListBaseStrandChildren.as | 100 ++
.../org/apache/flex/core/MXMLDragInitiator.as | 131 ++
.../org/apache/flex/core/ParentDocumentBead.as | 127 ++
.../org/apache/flex/core/SimpleApplication.as | 102 ++
.../org/apache/flex/core/SimpleCSSStyles.as | 106 ++
.../org/apache/flex/core/SimpleCSSValuesImpl.as | 765 +++++++++
.../org/apache/flex/core/SimpleStatesImpl.as | 222 +++
.../org/apache/flex/core/SimpleValuesImpl.as | 188 +++
.../flex/org/apache/flex/core/StageProxy.as | 127 ++
.../main/flex/org/apache/flex/core/Strand.as | 182 +++
.../apache/flex/core/StyleableCSSTextField.as | 201 +++
.../main/flex/org/apache/flex/core/UIBase.as | 1483 ++++++++++++++++++
.../flex/org/apache/flex/core/UIButtonBase.as | 860 ++++++++++
.../flex/org/apache/flex/core/ValuesManager.as | 72 +
.../main/flex/org/apache/flex/core/ViewBase.as | 98 ++
.../org/apache/flex/core/WrappedHTMLElement.as | 21 +
.../flex/org/apache/flex/events/BrowserEvent.as | 475 ++++++
.../flex/org/apache/flex/events/CustomEvent.as | 64 +
.../org/apache/flex/events/ElementEvents.as | 51 +
.../main/flex/org/apache/flex/events/Event.as | 128 ++
.../org/apache/flex/events/EventDispatcher.as | 66 +
.../org/apache/flex/events/IEventDispatcher.as | 49 +
.../flex/org/apache/flex/events/MouseEvent.as | 290 ++++
.../org/apache/flex/events/ValueChangeEvent.as | 129 ++
.../flex/org/apache/flex/events/ValueEvent.as | 68 +
.../flex/events/utils/MouseEventConverter.as | 166 ++
.../org/apache/flex/events/utils/MouseUtils.as | 103 ++
.../src/main/flex/org/apache/flex/geom/Point.as | 72 +
.../main/flex/org/apache/flex/geom/Rectangle.as | 95 ++
.../src/main/flex/org/apache/flex/geom/Size.as | 41 +
.../flex/org/apache/flex/states/AddItems.as | 101 ++
.../org/apache/flex/states/ItemAndDescriptor.as | 70 +
.../org/apache/flex/states/SetEventHandler.as | 79 +
.../flex/org/apache/flex/states/SetProperty.as | 81 +
.../main/flex/org/apache/flex/states/State.as | 83 +
.../flex/org/apache/flex/utils/BinaryData.as | 391 +++++
.../org/apache/flex/utils/CSSBorderUtils.as | 219 +++
.../org/apache/flex/utils/CSSContainerUtils.as | 194 +++
.../main/flex/org/apache/flex/utils/CSSUtils.as | 328 ++++
.../flex/org/apache/flex/utils/EffectTimer.as | 136 ++
.../main/flex/org/apache/flex/utils/Language.as | 357 +++++
.../apache/flex/utils/MXMLDataInterpreter.as | 463 ++++++
.../flex/org/apache/flex/utils/MixinManager.as | 105 ++
.../flex/org/apache/flex/utils/PNGEncoder.as | 305 ++++
.../flex/org/apache/flex/utils/PointUtils.as | 125 ++
.../org/apache/flex/utils/SolidBorderUtil.as | 191 +++
.../flex/org/apache/flex/utils/StringTrimmer.as | 176 +++
.../main/flex/org/apache/flex/utils/Timer.as | 148 ++
.../main/flex/org/apache/flex/utils/UIUtils.as | 107 ++
.../flex/utils/ViewSourceContextMenuOption.as | 97 ++
.../org/apache/flex/utils/dbg/DOMPathUtil.as | 95 ++
.../Core/src/main/resources/basic-manifest.xml | 41 +
.../main/resources/compile-as-to-js-config.xml | 77 +
.../src/main/resources/compile-asjs-config.xml | 78 +
.../Core/src/main/resources/compile-config.xml | 83 +
.../src/main/resources/compile-js-config.xml | 87 +
.../test/flex/FlexUnitFlexJSApplication.mxml | 46 +
.../projects/Core/src/test/flex/build.xml | 165 ++
.../src/test/flex/flexUnitTests/StrandTester.as | 27 +
.../test/flex/flexUnitTests/StrandTesterTest.as | 55 +
286 files changed, 18535 insertions(+), 18535 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/CoreClasses.as b/frameworks/projects/Core/as/src/CoreClasses.as
deleted file mode 100644
index d43ea81..0000000
--- a/frameworks/projects/Core/as/src/CoreClasses.as
+++ /dev/null
@@ -1,149 +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 dependency analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class CoreClasses
-{
- import org.apache.flex.core.BeadViewBase; BeadViewBase;
- import org.apache.flex.core.BrowserWindow; BrowserWindow;
- COMPILE::AS3
- {
- import org.apache.flex.core.CSSShape; CSSShape;
- import org.apache.flex.core.CSSSprite; CSSSprite;
- import org.apache.flex.core.CSSTextField; CSSTextField;
- import org.apache.flex.core.StyleableCSSTextField; StyleableCSSTextField;
- }
- import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
- import org.apache.flex.core.FilledRectangle; FilledRectangle;
- import org.apache.flex.core.IAlertModel; IAlertModel;
- import org.apache.flex.core.IBead; IBead;
- import org.apache.flex.core.IBeadController; IBeadController;
- import org.apache.flex.core.IBeadLayout; IBeadLayout;
- import org.apache.flex.core.IBeadModel; IBeadModel;
- import org.apache.flex.core.IBeadView; IBeadView;
- COMPILE::AS3
- {
- import org.apache.flex.core.IBorderModel; IBorderModel;
- }
- import org.apache.flex.core.IChild; IChild;
- import org.apache.flex.core.IChrome; IChrome;
- import org.apache.flex.core.IComboBoxModel; IComboBoxModel;
- import org.apache.flex.core.IContainer; IContainer;
- import org.apache.flex.core.IContainerView; IContainerView;
- import org.apache.flex.core.IContentView; IContentView;
- import org.apache.flex.core.IContentViewHost; IContentViewHost;
- import org.apache.flex.core.IDataProviderItemRendererMapper; IDataProviderItemRendererMapper;
- import org.apache.flex.core.IDocument; IDocument;
- import org.apache.flex.core.IFormatBead; IFormatBead;
- import org.apache.flex.core.IImageModel; IImageModel;
- import org.apache.flex.core.IItemRendererProvider; IItemRendererProvider;
- import org.apache.flex.core.ILayoutChild; ILayoutChild;
- import org.apache.flex.core.ILayoutHost; ILayoutHost;
- import org.apache.flex.core.IListPresentationModel; IListPresentationModel;
- import org.apache.flex.core.IPanelModel; IPanelModel;
- import org.apache.flex.core.IParent; IParent;
- import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
- import org.apache.flex.core.IPopUp; IPopUp;
- import org.apache.flex.core.IRangeModel; IRangeModel;
- import org.apache.flex.core.IRollOverModel; IRollOverModel;
- COMPILE::AS3
- {
- import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
- }
- import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
- import org.apache.flex.core.ISelectionModel; ISelectionModel;
- import org.apache.flex.core.IStrand; IStrand;
- import org.apache.flex.core.IStrandWithModel; IStrandWithModel;
- import org.apache.flex.core.ITextModel; ITextModel;
- import org.apache.flex.core.ITitleBarModel; ITitleBarModel;
- import org.apache.flex.core.IToggleButtonModel; IToggleButtonModel;
- import org.apache.flex.core.IUIBase; IUIBase;
- import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
- import org.apache.flex.core.IViewport; IViewport;
- import org.apache.flex.core.IViewportModel; IViewportModel;
- COMPILE::AS3
- {
- import org.apache.flex.core.IViewportScroller; IViewportScroller;
- }
- import org.apache.flex.core.ListBase; ListBase;
- import org.apache.flex.core.ListBaseStrandChildren; ListBaseStrandChildren;
- import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
- import org.apache.flex.core.SimpleApplication; SimpleApplication;
- import org.apache.flex.core.DataBindingBase; DataBindingBase;
- import org.apache.flex.core.UIBase; UIBase;
- COMPILE::AS3
- {
- import org.apache.flex.core.UIButtonBase; UIButtonBase;
- }
- import org.apache.flex.events.CustomEvent; CustomEvent;
- import org.apache.flex.events.Event; Event;
- import org.apache.flex.events.EventDispatcher; EventDispatcher;
- import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
- import org.apache.flex.events.MouseEvent; MouseEvent;
- import org.apache.flex.events.ValueEvent; ValueEvent;
- import org.apache.flex.events.utils.MouseUtils; MouseUtils;
- import org.apache.flex.geom.Point; Point;
- import org.apache.flex.geom.Rectangle; Rectangle;
- import org.apache.flex.utils.BinaryData; BinaryData;
- COMPILE::AS3
- {
- import org.apache.flex.utils.CSSBorderUtils; CSSBorderUtils;
- }
- import org.apache.flex.utils.CSSContainerUtils; CSSContainerUtils;
- COMPILE::AS3
- {
- import org.apache.flex.utils.dbg.DOMPathUtil; DOMPathUtil;
- }
- import org.apache.flex.utils.EffectTimer; EffectTimer;
- import org.apache.flex.utils.MixinManager; MixinManager;
- COMPILE::AS3
- {
- import org.apache.flex.utils.PNGEncoder; PNGEncoder;
- import org.apache.flex.utils.SolidBorderUtil; SolidBorderUtil;
- import org.apache.flex.utils.StringTrimmer; StringTrimmer;
-}
- import org.apache.flex.utils.Timer; Timer;
- import org.apache.flex.utils.UIUtils; UIUtils;
-
- import org.apache.flex.core.ClassFactory; ClassFactory;
- import org.apache.flex.states.AddItems; AddItems;
- import org.apache.flex.states.SetEventHandler; SetEventHandler;
- import org.apache.flex.states.SetProperty; SetProperty;
- import org.apache.flex.states.State; State;
-
- import org.apache.flex.core.IDataGridModel; IDataGridModel;
- import org.apache.flex.core.IDataGridPresentationModel; IDataGridPresentationModel;
- import org.apache.flex.core.IDateChooserModel; IDateChooserModel;
- import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
- import org.apache.flex.utils.CSSUtils; CSSUtils;
-
- COMPILE::JS
- {
- import org.apache.flex.utils.Language; Language;
- }
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/CoreJSClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/CoreJSClasses.as b/frameworks/projects/Core/as/src/CoreJSClasses.as
deleted file mode 100644
index 6bb95de..0000000
--- a/frameworks/projects/Core/as/src/CoreJSClasses.as
+++ /dev/null
@@ -1,99 +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 dependency analysis starting
- * from the classes specified in manifest.xml.
- */
-internal class CoreJSClasses
-{
- import org.apache.flex.core.BeadViewBase; BeadViewBase;
- import org.apache.flex.core.BrowserWindow; BrowserWindow;
- import org.apache.flex.core.ItemRendererClassFactory; ItemRendererClassFactory;
- import org.apache.flex.core.FilledRectangle; FilledRectangle;
- import org.apache.flex.core.IAlertModel; IAlertModel;
- import org.apache.flex.core.IBead; IBead;
- import org.apache.flex.core.IBeadController; IBeadController;
- import org.apache.flex.core.IBeadLayout; IBeadLayout;
- import org.apache.flex.core.IBeadModel; IBeadModel;
- import org.apache.flex.core.IBeadView; IBeadView;
- //import org.apache.flex.core.IBorderModel; IBorderModel;
- import org.apache.flex.core.IChild; IChild;
- import org.apache.flex.core.IChrome; IChrome;
- import org.apache.flex.core.IComboBoxModel; IComboBoxModel;
- import org.apache.flex.core.IContainer; IContainer;
- import org.apache.flex.core.IContentView; IContentView;
- import org.apache.flex.core.IDataProviderItemRendererMapper; IDataProviderItemRendererMapper;
- import org.apache.flex.core.IDocument; IDocument;
- import org.apache.flex.core.IFormatBead; IFormatBead;
- //import org.apache.flex.core.IImageModel; IImageModel;
- import org.apache.flex.core.ILayoutChild; ILayoutChild;
- import org.apache.flex.core.ILayoutHost; ILayoutHost;
- import org.apache.flex.core.IPanelModel; IPanelModel;
- import org.apache.flex.core.IParent; IParent;
- import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
- import org.apache.flex.core.IPopUp; IPopUp;
- import org.apache.flex.core.IRollOverModel; IRollOverModel;
- //import org.apache.flex.core.IScrollBarModel; IScrollBarModel;
- import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
- import org.apache.flex.core.ISelectionModel; ISelectionModel;
- import org.apache.flex.core.IStrand; IStrand;
- import org.apache.flex.core.IStrandWithModel; IStrandWithModel;
- import org.apache.flex.core.ITextModel; ITextModel;
- import org.apache.flex.core.ITitleBarModel; ITitleBarModel;
- import org.apache.flex.core.IToggleButtonModel; IToggleButtonModel;
- import org.apache.flex.core.IUIBase; IUIBase;
- import org.apache.flex.core.IValueToggleButtonModel; IValueToggleButtonModel;
- import org.apache.flex.core.IViewport; IViewport;
- import org.apache.flex.core.IViewportModel; IViewportModel;
- //import org.apache.flex.core.IViewportScroller; IViewportScroller;
- import org.apache.flex.core.SimpleStatesImpl; SimpleStatesImpl;
- import org.apache.flex.core.DataBindingBase; DataBindingBase;
- import org.apache.flex.core.UIBase; UIBase;
- //import org.apache.flex.core.UIButtonBase; UIButtonBase;
- import org.apache.flex.events.CustomEvent; CustomEvent;
- import org.apache.flex.events.Event; Event;
- import org.apache.flex.events.EventDispatcher; EventDispatcher;
- import org.apache.flex.events.IEventDispatcher; IEventDispatcher;
- import org.apache.flex.events.MouseEvent; MouseEvent;
- import org.apache.flex.events.ValueEvent; ValueEvent;
- import org.apache.flex.events.utils.MouseUtils; MouseUtils;
- import org.apache.flex.geom.Point; Point;
- import org.apache.flex.geom.Rectangle; Rectangle;
- import org.apache.flex.utils.BinaryData; BinaryData;
- import org.apache.flex.utils.EffectTimer; EffectTimer;
- import org.apache.flex.utils.MixinManager; MixinManager;
- //import org.apache.flex.utils.PNGEncoder; PNGEncoder;
- //import org.apache.flex.utils.StringTrimmer; StringTrimmer;
- import org.apache.flex.utils.Timer; Timer;
- import org.apache.flex.utils.UIUtils; UIUtils;
-
- import org.apache.flex.core.ClassFactory; ClassFactory;
- import org.apache.flex.states.AddItems; AddItems;
- import org.apache.flex.states.SetEventHandler; SetEventHandler;
- import org.apache.flex.states.SetProperty; SetProperty;
- import org.apache.flex.states.State; State;
-}
-
-}
-
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
deleted file mode 100644
index ac80b8c..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as
+++ /dev/null
@@ -1,602 +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.IEventDispatcher;
- import org.apache.flex.events.MouseEvent;
- import org.apache.flex.events.utils.MouseEventConverter;
- import org.apache.flex.utils.MXMLDataInterpreter;
-
- COMPILE::AS3 {
- import flash.display.DisplayObject;
- import flash.display.Sprite;
- import flash.display.StageAlign;
- import flash.display.StageQuality;
- import flash.display.StageScaleMode;
- import flash.events.Event;
- import flash.system.ApplicationDomain;
- import flash.utils.getQualifiedClassName;
- }
-
- //--------------------------------------
- // Events
- //--------------------------------------
-
- /**
- * Dispatched at startup. Attributes and sub-instances of
- * the MXML document have been created and assigned.
- * The component lifecycle is different
- * than the Flex SDK. There is no creationComplete event.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="initialize", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched at startup before the instances get created.
- * Beads can call preventDefault and defer initialization.
- * This event will be dispatched on every frame until no
- * listeners call preventDefault(), then the initialize()
- * method will be called.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="preinitialize", type="org.apache.flex.events.Event")]
-
- /**
- * Dispatched at startup after the initial view has been
- * put on the display list. This event is sent before
- * applicationComplete is dispatched.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Event(name="viewChanged", type="org.apache.flex.events.Event")]
-
- /**
- * 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="applicationComplete", type="org.apache.flex.events.Event")]
- /**
- * The Application class is the main class and entry point for a FlexJS
- * application. This Application class is different than the
- * Flex SDK's mx:Application or spark:Application in that it does not contain
- * user interface elements. Those UI elements go in the views (ViewBase). This
- * Application class expects there to be a main model, a controller, and
- * an initial view.
- *
- * @see ViewBase
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class Application extends ApplicationBase implements IStrand, IParent, IEventDispatcher
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function Application()
- {
- super();
-
- COMPILE::AS3 {
- if (stage)
- {
- stage.align = StageAlign.TOP_LEFT;
- stage.scaleMode = StageScaleMode.NO_SCALE;
- // should be opt-in
- //stage.quality = StageQuality.HIGH_16X16_LINEAR;
- }
-
- loaderInfo.addEventListener(flash.events.Event.INIT, initHandler);
- }
- }
-
- COMPILE::AS3
- private function initHandler(event:flash.events.Event):void
- {
- if (model is IBead) addBead(model as IBead);
- if (controller is IBead) addBead(controller as IBead);
-
- MouseEventConverter.setupAllConverters(stage);
-
- for each (var bead:IBead in beads)
- addBead(bead);
-
- dispatchEvent(new org.apache.flex.events.Event("beadsAdded"));
-
- if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
- initialize();
- else
- addEventListener(flash.events.Event.ENTER_FRAME, enterFrameHandler);
-
- }
-
- COMPILE::AS3
- private function enterFrameHandler(event:flash.events.Event):void
- {
- if (dispatchEvent(new org.apache.flex.events.Event("preinitialize", false, true)))
- {
- removeEventListener(flash.events.Event.ENTER_FRAME, enterFrameHandler);
- initialize();
- }
- }
-
- /**
- * This method gets called when all preinitialize handlers
- * no longer call preventDefault();
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- protected function initialize():void
- {
-
- MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
-
- dispatchEvent(new org.apache.flex.events.Event("initialize"));
-
- if (initialView)
- {
- initialView.applicationModel = model;
- this.addElement(initialView);
- // if someone has installed a resize listener, fake an event to run it now
- if (stage.hasEventListener("resize"))
- stage.dispatchEvent(new flash.events.Event("resize"));
- else if (initialView is ILayoutChild)
- {
- var ilc:ILayoutChild = initialView as ILayoutChild;
- // otherwise, size once like this
- if (!isNaN(ilc.percentWidth) && !isNaN(ilc.percentHeight))
- ilc.setWidthAndHeight(stage.stageWidth, stage.stageHeight, true);
- else if (!isNaN(ilc.percentWidth))
- ilc.setWidth(stage.stageWidth);
- else if (!isNaN(ilc.percentHeight))
- ilc.setHeight(stage.stageHeight);
- }
- var bgColor:Object = ValuesManager.valuesImpl.getValue(this, "background-color");
- if (bgColor != null)
- {
- var backgroundColor:uint = ValuesManager.valuesImpl.convertColor(bgColor);
- graphics.beginFill(backgroundColor);
- graphics.drawRect(0, 0, initialView.width, initialView.height);
- graphics.endFill();
- }
- dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
- }
- dispatchEvent(new org.apache.flex.events.Event("applicationComplete"));
- }
-
- /**
- * The org.apache.flex.core.IValuesImpl that will
- * determine the default values and other values
- * for the application. The most common choice
- * is org.apache.flex.core.SimpleCSSValuesImpl.
- *
- * @see org.apache.flex.core.SimpleCSSValuesImpl
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function set valuesImpl(value:IValuesImpl):void
- {
- ValuesManager.valuesImpl = value;
- ValuesManager.valuesImpl.init(this);
- }
-
- /**
- * The initial view.
- *
- * @see org.apache.flex.core.ViewBase
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Bindable("__NoChangeEvent__")]
- public var initialView:IApplicationView;
-
- /**
- * The data model (for the initial view).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Bindable("__NoChangeEvent__")]
- COMPILE::AS3
- public var model:Object;
-
- COMPILE::JS
- private var _model:Object;
-
- /**
- * The data model (for the initial view).
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- [Bindable("__NoChangeEvent__")]
- COMPILE::JS
- override public function get model():Object
- {
- return _model;
- }
-
- /**
- * @private
- */
- [Bindable("__NoChangeEvent__")]
- COMPILE::JS
- override public function set model(value:Object):void
- {
- _model = value;
- }
-
- /**
- * The controller. The controller typically watches
- * the UI for events and updates the model accordingly.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var controller:Object;
-
- /**
- * An array of data that describes the MXML attributes
- * and tags in an MXML document. This data is usually
- * decoded by an MXMLDataInterpreter
- *
- * @see org.apache.flex.utils.MXMLDataInterpreter
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get MXMLDescriptor():Array
- {
- return null;
- }
-
- /**
- * An method called by the compiler's generated
- * code to kick off the setting of MXML attribute
- * values and instantiation of child tags.
- *
- * The call has to be made in the generated code
- * in order to ensure that the constructors have
- * completed first.
- *
- * @param data The encoded data representing the
- * MXML attributes.
- *
- * @see org.apache.flex.utils.MXMLDataInterpreter
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function generateMXMLAttributes(data:Array):void
- {
- MXMLDataInterpreter.generateMXMLProperties(this, data);
- }
-
- /**
- * The array property that is used to add additional
- * beads to an MXML tag. From ActionScript, just
- * call addBead directly.
- *
- * @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.IStrand#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.IStrand#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.IStrand#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;
- }
-
- /**
- * @copy org.apache.flex.core.IParent#addElement()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addElement(c:Object, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3 {
- if (c is IUIBase)
- {
- addChild(IUIBase(c).element as DisplayObject);
- IUIBase(c).addedToParent();
- }
- else
- addChild(c as DisplayObject);
- }
- COMPILE::JS {
- this.element.appendChild(c.element);
- c.addedToParent();
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#addElementAt()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3 {
- if (c is IUIBase)
- {
- addChildAt(IUIBase(c).element as DisplayObject, index);
- IUIBase(c).addedToParent();
- }
- else
- addChildAt(c as DisplayObject, index);
- }
- COMPILE::JS {
- var children:NodeList = internalChildren();
- if (index >= children.length)
- addElement(c);
- else
- {
- element.insertBefore(c.positioner,
- children[index]);
- c.addedToParent();
- }
-
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#getElementAt()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getElementAt(index:int):Object
- {
- COMPILE::AS3 {
- return getChildAt(index);
- }
- COMPILE::JS {
- var children:NodeList = internalChildren();
- return children[index].flexjs_wrapper;
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#getElementIndex()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function getElementIndex(c:Object):int
- {
- COMPILE::AS3 {
- if (c is IUIBase)
- return getChildIndex(IUIBase(c).element as DisplayObject);
-
- return getChildIndex(c as DisplayObject);
- }
- COMPILE::JS {
- var children:NodeList = internalChildren();
- var n:int = children.length;
- for (var i:int = 0; i < n; i++)
- {
- if (children[i] == c.element)
- return i;
- }
- return -1;
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#removeElement()
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function removeElement(c:Object, dispatchEvent:Boolean = true):void
- {
- COMPILE::AS3 {
- if (c is IUIBase)
- {
- removeChild(IUIBase(c).element as DisplayObject);
- }
- else
- removeChild(c as DisplayObject);
- }
- COMPILE::JS {
- element.removeChild(c.element);
- }
- }
-
- /**
- * @copy org.apache.flex.core.IParent#numElements
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get numElements():int
- {
- COMPILE::AS3 {
- return numChildren;
- }
- COMPILE::JS {
- var children:NodeList = internalChildren();
- return children.length;
- }
- }
-
- /**
- * @return {Object} The array of children.
- */
- COMPILE::JS
- protected function internalChildren():NodeList
- {
- return element.childNodes;
- };
-
-
-
- /**
- * @flexjsignorecoercion org.apache.flex.core.IBead
- */
- COMPILE::JS
- public function start():void
- {
- element = document.getElementsByTagName('body')[0];
- element.flexjs_wrapper = this;
- element.className = 'Application';
-
- MXMLDataInterpreter.generateMXMLInstances(this, null, MXMLDescriptor);
-
- dispatchEvent('initialize');
-
- if (model is IBead) addBead(model as IBead);
- if (controller is IBead) addBead(controller as IBead);
-
- initialView.applicationModel = model;
- addElement(initialView);
-
- if (initialView)
- {
- var baseView:UIBase = initialView as UIBase;
- if (!isNaN(baseView.percentWidth) || !isNaN(baseView.percentHeight)) {
- this.element.style.height = window.innerHeight.toString() + 'px';
- this.element.style.width = window.innerWidth.toString() + 'px';
- this.initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
- }
-
- dispatchEvent(new org.apache.flex.events.Event("viewChanged"));
- }
- dispatchEvent(new org.apache.flex.events.Event("applicationComplete"));
- };
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/ApplicationBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/ApplicationBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/ApplicationBase.as
deleted file mode 100644
index 70d6424..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/ApplicationBase.as
+++ /dev/null
@@ -1,110 +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
-{
- COMPILE::AS3 {
- import flash.display.Sprite;
- import flash.system.ApplicationDomain;
- import flash.utils.getQualifiedClassName;
- }
-
- /**
- * This is a platform-dependent base class
- * for Application
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class ApplicationBase extends Sprite implements IFlexInfo
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ApplicationBase()
- {
- super();
- }
-
- private var _info:Object;
-
- /**
- * An Object containing information generated
- * by the compiler that is useful at startup time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function info():Object
- {
- if (!_info)
- {
- var mainClassName:String = getQualifiedClassName(this);
- var initClassName:String = "_" + mainClassName + "_FlexInit";
- var c:Class = ApplicationDomain.currentDomain.getDefinition(initClassName) as Class;
- _info = c.info();
- }
- return _info;
- }
- }
-
- COMPILE::JS
- public class ApplicationBase extends HTMLElementWrapper implements IFlexInfo
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function ApplicationBase()
- {
- super();
- }
-
- private var _info:Object;
-
- /**
- * An Object containing information generated
- * by the compiler that is useful at startup time.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function info():Object
- {
- return _info;
- }
-
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/BeadViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/BeadViewBase.as b/frameworks/projects/Core/as/src/org/apache/flex/core/BeadViewBase.as
deleted file mode 100644
index a31af58..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/BeadViewBase.as
+++ /dev/null
@@ -1,97 +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.IBeadView;
- import org.apache.flex.core.IStrand;
- import org.apache.flex.events.EventDispatcher;
-
- /**
- * The BeadViewBase class is the base class for most view beads.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BeadViewBase extends EventDispatcher implements IBeadView
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BeadViewBase()
- {
- super();
- }
-
- /**
- * The strand. Do not modify except
- * via the strand setter. For reading only.
- *
- * Because Object.defineProperties in JS
- * doesn't allow you to just override the setter
- * (you have to override the getter as well even
- * if it just calls the super getter) it is
- * more efficient to expose this variable than
- * have all of the layers of simple overrides.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var _strand:IStrand;
-
- /**
- * Get the strand for this bead
- *
- * Override this for whatever else you need to do when
- * being hooked to the Strand
- *
- * @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 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;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/BindableCSSStyles.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/BindableCSSStyles.as b/frameworks/projects/Core/as/src/org/apache/flex/core/BindableCSSStyles.as
deleted file mode 100644
index 7137ade..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/BindableCSSStyles.as
+++ /dev/null
@@ -1,134 +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;
-
- /**
- * The BindableCSSStyles class contains CSS style
- * properties supported by SimpleCSSValuesImpl but
- * dispatch change events when modified
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BindableCSSStyles extends EventDispatcher
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BindableCSSStyles()
- {
- super();
- }
-
- public var styleList:Object = {
- "top": 1,
- "bottom": 1,
- "left": 1,
- "right": 1,
- "padding": 1,
- "paddingLeft": 1,
- "paddingRight": 1,
- "paddingTop": 1,
- "paddingBottom": 1,
- "margin": 1,
- "marginLeft": 1,
- "marginRight": 1,
- "marginTop": 1,
- "marginBottom": 1,
- "verticalAlign": 1,
- "fontFamily": 1,
- "fontSize": 1,
- "color": 1,
- "fontWeight": 1,
- "fontStyle": 1,
- "backgroundAlpha": 1,
- "backgroundColor": 1,
- "backgroundImage": 1,
- "borderColor": 1,
- "borderStyle": 1,
- "borderRadius": 1,
- "borderWidth": 1
- };
-
- [Bindable]
- public var top:*;
- [Bindable]
- public var bottom:*;
- [Bindable]
- public var left:*;
- [Bindable]
- public var right:*;
- [Bindable]
- public var padding:*;
- [Bindable]
- public var paddingLeft:*;
- [Bindable]
- public var paddingRight:*;
- [Bindable]
- public var paddingTop:*;
- [Bindable]
- public var paddingBottom:*;
- [Bindable]
- public var margin:*;
- [Bindable]
- public var marginLeft:*;
- [Bindable]
- public var marginRight:*;
- [Bindable]
- public var marginTop:*;
- [Bindable]
- public var marginBottom:*;
- [Bindable]
- public var verticalAlign:*;
- [Bindable]
- public var fontFamily:*;
- [Bindable]
- public var fontSize:*;
- [Bindable]
- public var color:*;
- [Bindable]
- public var fontWeight:*;
- [Bindable]
- public var fontStyle:*;
- [Bindable]
- public var backgroundAlpha:*;
- [Bindable]
- public var backgroundColor:*;
- [Bindable]
- public var backgroundImage:*;
- [Bindable]
- public var borderColor:*;
- [Bindable]
- public var borderStyle:*;
- [Bindable]
- public var borderRadius:*;
- [Bindable]
- public var borderWidth:*;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserResizeListener.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserResizeListener.as b/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserResizeListener.as
deleted file mode 100644
index f88201f..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserResizeListener.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.core
-{
-COMPILE::AS3
-{
- import flash.events.Event;
- import flash.external.ExternalInterface;
- import flash.utils.getQualifiedClassName;
-}
-
- /**
- * The BrowserResizeListener class listens for browser
- * resizing and resizes the application accordingly.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BrowserResizeListener implements IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BrowserResizeListener()
- {
- }
-
- private var app:Application;
-
- /**
- * Minimum height
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var minHeight:Number;
-
- /**
- * Minimum width
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public var minWidth:Number;
-
- /**
- * @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
- {
- app = value as Application;
- COMPILE::AS3
- {
- app.stage.addEventListener("resize", resizeHandler);
- if (ExternalInterface.available && (!isNaN(minWidth) || !isNaN(minHeight)))
- {
- // Get application name. This assumes that the wrapper is using an
- // object tag with the id that matches the application name
- var appName:String = getQualifiedClassName(app);
- var js:String = "var o = document.getElementById('" + appName + "');";
- if (!isNaN(minWidth))
- js += "o.style.minWidth = '" + minWidth.toString() + "px';";
- if (!isNaN(minHeight))
- js += "o.style.minHeight = '" + minHeight.toString() + "px';"
- ExternalInterface.call("eval", js);
- }
- }
- COMPILE::JS
- {
- window.addEventListener('resize',
- this.resizeHandler, false);
- if (!isNaN(this.minWidth))
- document.body.style.minWidth = this.minWidth.toString() + 'px';
- if (!isNaN(this.minHeight))
- document.body.style.minHeight = this.minHeight.toString() + 'px';
- document.body.style.overflow = 'auto';
- }
- }
-
- private function resizeHandler(event:Event):void
- {
- COMPILE::AS3
- {
- var initialView:UIBase = app.initialView as UIBase;
- if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight))
- initialView.setWidthAndHeight(Math.max(minWidth, app.stage.stageWidth),
- Math.max(minHeight, app.stage.stageHeight), true);
- else if (!isNaN(initialView.percentWidth))
- initialView.setWidth(Math.max(minWidth, app.stage.stageWidth));
- else if (!isNaN(initialView.percentHeight))
- initialView.setHeight(Math.max(minHeight, app.stage.stageHeight));
- }
- COMPILE::JS
- {
- var initialView:UIBase = app.initialView as UIBase;
- var element:HTMLElement = app.element;
- if (!isNaN(initialView.percentWidth) || !isNaN(initialView.percentHeight)) {
- element.style.height = window.innerHeight.toString() + 'px';
- element.style.width = window.innerWidth.toString() + 'px';
- initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes
- }
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserScroller.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserScroller.as b/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserScroller.as
deleted file mode 100644
index 670f503..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserScroller.as
+++ /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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
- COMPILE::AS3
- {
- import flash.external.ExternalInterface;
- import flash.utils.getQualifiedClassName;
- }
- import org.apache.flex.events.Event;
-
- /**
- * The BrowserScroller class enables browser scrollbars
- * when the application is larger than the screen.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BrowserScroller implements IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BrowserScroller()
- {
- }
-
- private var app:Application;
-
- /**
- * @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
- {
- app = value as Application;
- app.addEventListener("viewChanged", viewChangedHandler);
- }
-
- private function viewChangedHandler(event:Event):void
- {
- COMPILE::AS3
- {
- if (ExternalInterface.available)
- {
- // Get application name. This assumes that the wrapper is using an
- // object tag with the id that matches the application name
- var appName:String = getQualifiedClassName(app);
- var js:String = "var o = document.getElementById('" + appName + "');";
- js += "o.width = " + app.initialView.width.toString() + ";";
- js += "o.height = " + app.initialView.height.toString() + ";"
- ExternalInterface.call("eval", js);
- }
- }
- COMPILE::JS
- {
- app.element.style.overflow = 'auto';
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserWindow.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserWindow.as b/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserWindow.as
deleted file mode 100644
index ecaf8c3..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/BrowserWindow.as
+++ /dev/null
@@ -1,61 +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
-{
- COMPILE::AS3
- {
- import flash.net.navigateToURL;
- import flash.net.URLRequest;
- }
-
- /**
- * The BrowserWindow class opens a new browser window.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class BrowserWindow
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function BrowserWindow()
- {
- }
-
- public static function open(url:String, options:String):void
- {
- COMPILE::AS3
- {
- navigateToURL(new URLRequest(url), options);
- }
- COMPILE::JS
- {
- window.open(url, options);
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/CSSFontFaceBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSFontFaceBead.as b/frameworks/projects/Core/as/src/org/apache/flex/core/CSSFontFaceBead.as
deleted file mode 100644
index c601fd7..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSFontFaceBead.as
+++ /dev/null
@@ -1,160 +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
-{
- COMPILE::AS3
- {
- import flash.display.Loader;
- import flash.system.LoaderContext;
- import flash.events.Event;
- import flash.events.IOErrorEvent;
- import flash.events.SecurityErrorEvent;
- import flash.net.URLRequest;
- import flash.system.ApplicationDomain;
- import flash.utils.getQualifiedClassName;
-
- import org.apache.flex.events.Event;
- import org.apache.flex.events.IEventDispatcher;
- import org.apache.flex.events.ValueEvent;
- }
-
- /**
- * The CSSFontFaceBead class is the class that loads swfs
- * of converted fonts so they can be used in Flash.
- * It is just a stub in JS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public class CSSFontFaceBead implements IBead
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSFontFaceBead()
- {
- }
-
- 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;
- COMPILE::AS3
- {
- IEventDispatcher(ValuesManager.valuesImpl).addEventListener("init", initHandler);
- IEventDispatcher(_strand).addEventListener("preinitialize", preinitHandler);
- var mainClassName:String = getQualifiedClassName(value);
- var styleClassName:String = "_" + mainClassName + "_Styles";
- var c:Class = ApplicationDomain.currentDomain.getDefinition(styleClassName) as Class;
- requestFonts(c["fontFaces"]);
- }
- }
-
- COMPILE::AS3
- private var loaders:Array;
-
- COMPILE::AS3
- private function initHandler(event:ValueEvent):void
- {
- var fontFaces:Array = event.value as Array;
- if (fontFaces)
- requestFonts(fontFaces);
- }
-
- COMPILE::AS3
- private function requestFonts(fontFaces:Array):void
- {
- if (!loaders)
- loaders = [];
-
- if (!fontFaces || fontFaces.length == 0)
- {
- IEventDispatcher(_strand).removeEventListener("preinitialize", preinitHandler);
- return;
- }
-
- for each (var url:String in fontFaces)
- {
- // swap swf in suffix
- var c:int = url.lastIndexOf(".");
- url = url.substr(0, c) + ".swf";
- var foo:Loader = new Loader();
- var bar:URLRequest = new URLRequest(url);
- var ctx:LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain);
- foo.load(bar, ctx);
- foo.name = url;
- foo.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, completeHandler);
- foo.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
- foo.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
- loaders.push(foo.contentLoaderInfo);
- }
- }
-
- COMPILE::AS3
- private function completeHandler(event:flash.events.Event):void
- {
- removeTarget(event.target);
- }
-
- COMPILE::AS3
- private function errorHandler(event:flash.events.Event):void
- {
- trace("error loading font from: ", event.target.name);
- removeTarget(event.target);
- }
-
- COMPILE::AS3
- private function removeTarget(target:Object):void
- {
- var n:int = loaders.length;
- for (var i:int = 0; i < n; i++)
- {
- if (loaders[i] === target)
- {
- loaders.splice(i, 1);
- if (loaders.length == 0)
- IEventDispatcher(_strand).removeEventListener("preinitialize", preinitHandler);
- break;
- }
- }
- }
-
- COMPILE::AS3
- private function preinitHandler(event:org.apache.flex.events.Event):void
- {
- event.preventDefault();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/as/src/org/apache/flex/core/CSSShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSShape.as b/frameworks/projects/Core/as/src/org/apache/flex/core/CSSShape.as
deleted file mode 100644
index 2c09911..0000000
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/CSSShape.as
+++ /dev/null
@@ -1,163 +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 flash.display.Graphics;
- import flash.display.Shape;
-
- import org.apache.flex.core.IChild;
- import org.apache.flex.events.Event;
- import org.apache.flex.utils.CSSBorderUtils;
-
- /**
- * The Border class is a class used internally by many
- * controls to draw a border. The border actually drawn
- * is dictated by the IBeadView in the CSS.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- COMPILE::AS3
- public class CSSShape extends Shape implements IStyleableObject, IChild
- {
- /**
- * Constructor.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function CSSShape()
- {
- super();
- }
-
- private var _id:String;
-
- /**
- * An id property for MXML documents.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get id():String
- {
- return _id;
- }
-
- /**
- * @private
- */
- public function set id(value:String):void
- {
- if (_id != value)
- {
- _id = value;
- dispatchEvent(new Event("idChanged"));
- }
- }
-
- private var _className:String;
-
- /**
- * The classname. Often used for CSS
- * class selector lookups.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get className():String
- {
- return _className;
- }
-
- /**
- * @private
- */
- public function set className(value:String):void
- {
- if (_className != value)
- {
- _className = value;
- dispatchEvent(new Event("classNameChanged"));
- }
- }
-
- private var _styles:Object;
-
- /**
- * The object that contains
- * "styles" and other associated
- * name-value pairs. You can
- * also specify a string in
- * HTML style attribute format.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function get style():Object
- {
- return _styles;
- }
-
- /**
- * @private
- */
- public function set style(value:Object):void
- {
- if (_styles != value)
- {
- if (value is String)
- {
- _styles = ValuesManager.valuesImpl.parseStyles(value as String);
- }
- else
- _styles = value;
- dispatchEvent(new Event("stylesChanged"));
- }
- }
-
- public var state:String;
-
- /**
- * Draw the contents based on styles
- *
- * @param width The width.
- * @param height The height.
- *
- * @langversion 3.0
- * @playerversion Flash 10.2
- * @playerversion AIR 2.6
- * @productversion FlexJS 0.0
- */
- public function draw(w:Number, h:Number):void
- {
- CSSBorderUtils.draw(this.graphics, w, h, this, state, true);
- }
- }
-}
[18/20] git commit: [flex-asjs] [refs/heads/mavenfolders] - update
xml files after folder rename/refactor
Posted by ah...@apache.org.
update xml files after folder rename/refactor
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/72c9cb8f
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/72c9cb8f
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/72c9cb8f
Branch: refs/heads/mavenfolders
Commit: 72c9cb8fc013f8427a1d424dae48433bb174932c
Parents: a903508
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jan 11 12:10:01 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jan 11 12:10:01 2016 -0800
----------------------------------------------------------------------
frameworks/projects/Core/build.xml | 32 +++----
.../main/resources/compile-as-to-js-config.xml | 77 -----------------
.../src/main/resources/compile-asjs-config.xml | 2 +-
.../Core/src/main/resources/compile-config.xml | 10 +--
.../src/main/resources/compile-js-config.xml | 87 --------------------
.../projects/Core/src/test/flex/build.xml | 17 ++--
6 files changed, 28 insertions(+), 197 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72c9cb8f/frameworks/projects/Core/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/build.xml b/frameworks/projects/Core/build.xml
index 1831bf2..4a768d7 100644
--- a/frameworks/projects/Core/build.xml
+++ b/frameworks/projects/Core/build.xml
@@ -28,12 +28,13 @@
<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="Core-${release.version}.swc" />
<target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of Core.swc">
</target>
<target name="test" unless="is.jenkins">
- <ant dir="as/tests"/>
+ <ant dir="src/test/flex"/>
</target>
<target name="test-js" unless="is.jenkins">
@@ -49,7 +50,7 @@
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/target">
<include name="**/**"/>
</fileset>
</delete>
@@ -60,11 +61,11 @@
</path>
<target name="compile" description="Compiles .as files into .swc">
- <echo message="Compiling libs/Core.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. -->
@@ -82,18 +83,19 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/libs/Core.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}" />
</target>
<target name="compile-asjs">
- <echo message="Cross-compiling Core"/>
+ <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 +105,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,17 +117,18 @@
<arg value="-define=COMPILE::JS,true" />
</java>
<!-- hack: inject some jsdoc to get rid of a warning when building examples -->
- <replace file="${basedir}/js/out/org/apache/flex/events/IEventDispatcher.js"
+ <replace file="${basedir}/target/generated-sources/flexjs/org/apache/flex/events/IEventDispatcher.js"
token="org.apache.flex.events.IEventDispatcher.prototype.dispatchEvent"
value="/** @param {(Object|null|string)} event The event. 
@return {boolean} The return. */
org.apache.flex.events.IEventDispatcher.prototype.dispatchEvent" />
</target>
<target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects">
- <echo message="Compiling externs/Core.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 +146,9 @@
into the file bundles.properties in this directory.
-->
<compc fork="true"
- output="${FLEXJS_HOME}/frameworks/externs/Core.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,11 +157,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}" />
</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/72c9cb8f/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml b/frameworks/projects/Core/src/main/resources/compile-as-to-js-config.xml
deleted file mode 100644
index e601b79..0000000
--- a/frameworks/projects/Core/src/main/resources/compile-as-to-js-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>
- <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element>
- <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element>
- <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.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>
-
- <namespaces>
- <namespace>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <manifest>basic-manifest.xml</manifest>
- </namespace>
- </namespaces>
-
- <locale/>
-
- <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-classes>
- <class>CoreClasses</class>
- <!--<class>CoreASJSClasses</class>-->
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- </include-namespaces>
-
- <target-player>11.1</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72c9cb8f/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml b/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
index 977c1d4..2cb04d8 100644
--- a/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
+++ b/frameworks/projects/Core/src/main/resources/compile-asjs-config.xml
@@ -52,7 +52,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/72c9cb8f/frameworks/projects/Core/src/main/resources/compile-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-config.xml b/frameworks/projects/Core/src/main/resources/compile-config.xml
index d9a038d..7fdfa2b 100644
--- a/frameworks/projects/Core/src/main/resources/compile-config.xml
+++ b/frameworks/projects/Core/src/main/resources/compile-config.xml
@@ -52,7 +52,7 @@
</namespaces>
<source-path>
- <path-element>as/src</path-element>
+ <path-element>../flex</path-element>
</source-path>
<warn-no-constructor>false</warn-no-constructor>
@@ -60,14 +60,8 @@
<include-file>
<name>js/out/*</name>
- <path>js/out/*</path>
+ <path>../../../target/generated-sources/flexjs/*</path>
</include-file>
- <!--
- <include-file>
- <name>js/src/*</name>
- <path>js/src/*</path>
- </include-file>
- -->
<include-classes>
<class>CoreClasses</class>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72c9cb8f/frameworks/projects/Core/src/main/resources/compile-js-config.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/compile-js-config.xml b/frameworks/projects/Core/src/main/resources/compile-js-config.xml
deleted file mode 100644
index 3c3784b..0000000
--- a/frameworks/projects/Core/src/main/resources/compile-js-config.xml
+++ /dev/null
@@ -1,87 +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>
- </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>
- <path-element>asjs/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-file>
- <name>js/src/*</name>
- <path>js/src/*</path>
- </include-file>
- -->
-
- <include-classes>
- <class>CoreJSClasses</class>
- <!-- leave out for now until we get Application to compile
- <class>CoreASJSClasses</class>-->
- </include-classes>
-
- <include-namespaces>
- <uri>library://ns.apache.org/flexjs/basic</uri>
- <uri>library://ns.apache.org/flexjs/svg</uri>
- </include-namespaces>
-
- <target-player>${playerglobal.version}</target-player>
-
-
-</flex-config>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/72c9cb8f/frameworks/projects/Core/src/test/flex/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/test/flex/build.xml b/frameworks/projects/Core/src/test/flex/build.xml
index 31d979b..3fdc3d6 100644
--- a/frameworks/projects/Core/src/test/flex/build.xml
+++ b/frameworks/projects/Core/src/test/flex/build.xml
@@ -20,14 +20,15 @@
<project name="Core.test" default="main" basedir=".">
- <property name="FLEXJS_HOME" location="../../../../.."/>
+ <property name="FLEXJS_HOME" location="../../../../../.."/>
<property file="${FLEXJS_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEXJS_HOME}/build.properties"/>
<property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
<property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-
+ <property name="target.name" value="Core-${release.version}.swc" />
+
<condition property="browser" value="C:/Program Files/Internet Explorer/iexplore.exe">
<os family="windows"/>
</condition>
@@ -70,7 +71,7 @@
value="${FLEXUNIT_HOME}/FlexUnit4AntTasks/target" />
<property name="FLEXUNIT_CLASSPATH" value="${FLEXUNIT_HOME}/flexunit" />
- <target name="main" depends="clean,compile,test" description="Clean test of FlexJSUI.swc">
+ <target name="main" depends="clean,compile,test" description="Clean test of ${target.name}">
</target>
<target name="clean">
@@ -80,7 +81,7 @@
</fileset>
</delete>
<delete failonerror="false">
- <fileset dir="${basedir}/js/out">
+ <fileset dir="${basedir}/bin">
<include name="**/**"/>
</fileset>
</delete>
@@ -119,13 +120,9 @@
<arg value="-debug" />
<arg value="-define=COMPILE::AS3,true" />
<arg value="-define=COMPILE::JS,false" />
- <arg value="-compiler.mxml.children-as-data" />
- <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
- <arg value="-compiler.binding-value-change-event-type=valueChange" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
- <arg value="-source-path+=${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
+ <arg value="-source-path+=${FLEXJS_HOME}/frameworks/projects/Core/src/main/flex" />
<arg value="-library-path+=${FLEXJS_HOME}/frameworks/libs" />
<arg value="${FLEXUNIT_LIBPATH1}" />
<arg value="${FLEXUNIT_LIBPATH2}" />
@@ -149,7 +146,7 @@
verbose="true"
localTrusted="true"
timeout="90000">
- <source dir="${FLEXJS_HOME}/frameworks/projects/Core/as/src" />
+ <source dir="${FLEXJS_HOME}/frameworks/projects/Core/src/main/flex" />
<library dir="${FLEXJS_HOME}/frameworks/libs" />
</flexunit>
[07/20] git commit: [flex-asjs] [refs/heads/mavenfolders] -
rename/restructure folders for maven
Posted by ah...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadModel.as
new file mode 100644
index 0000000..23e6251
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadModel.as
@@ -0,0 +1,39 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IBeadModel interface is a "marker" interface for beads that
+ * represent the data model for a control. A marker interface has no addtional APIs.
+ * It is used to find the model bead on the strand via calls to getBeadByType.
+ *
+ * @see org.apache.flex.core.IStrand#getBeadByType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IBeadModel extends IBead, IEventDispatcher
+ {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadView.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadView.as
new file mode 100644
index 0000000..215e911
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadView.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+
+ /**
+ * The IBeadView interface is the interface for beads that
+ * represent the view for a control.
+ * It is used to find the view bead on the strand via calls to getBeadByType.
+ *
+ * @see org.apache.flex.core.IStrand#getBeadByType
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IBeadView extends IBead
+ {
+ /**
+ * The host component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get host():IUIBase
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
new file mode 100644
index 0000000..c746a8f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBorderModel.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.geom.Rectangle;
+
+ /**
+ * The IBorderModel interface is the basic interface for a data model for
+ * drawing borders.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ public interface IBorderModel extends IBead, IBeadModel
+ {
+ /**
+ * The offsets from the edges of the host component where
+ * the border should be drawn.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get offsets():Rectangle;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
new file mode 100755
index 0000000..6052094
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChild.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObjectContainer;
+ }
+
+ /**
+ * The IChild interface is the basic interface for a
+ * component that is parented by another component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChild
+ {
+ /**
+ * The parent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::AS3
+ function get parent():DisplayObjectContainer;
+
+ /**
+ * The parent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ COMPILE::JS
+ function get parent():IUIBase;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChrome.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChrome.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChrome.as
new file mode 100644
index 0000000..e96fdc7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IChrome.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.core
+{
+ /**
+ * The IChrome interface is a "marker" interface.
+ * Items that implement IChrome are designating themselves as being attached
+ * to their parent in a way that's different from normal content. For example,
+ * to a Container, a child being added that's an IChrome implementor will be
+ * added outside of the content area.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IChrome
+ {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IComboBoxModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IComboBoxModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IComboBoxModel.as
new file mode 100644
index 0000000..efe0460
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IComboBoxModel.as
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IComboBoxModel interface describes the minimum set of properties
+ * available to a ComboBox control. More sophisticated ComboBox controls
+ * could have models that extend IComboBoxModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IComboBoxModel extends IEventDispatcher, IBeadModel
+ {
+ // TODO: should extend ITextModel
+ /**
+ * The text displayed in the ComboBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get text():String;
+ function set text(value:String):void;
+
+ /**
+ * The html formatted text displayed in the ComboBox.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get html():String;
+ function set html(value:String):void;
+
+ /**
+ * The set of choices displayed in the ComboBox's
+ * dropdown. The dataProvider can be a simple
+ * array or vector if the set of choices is not
+ * going to be modified (except by wholesale
+ * replacement of the dataProvider). To use
+ * different kinds of data sets, you may need to
+ * provide an alternate "mapping" bead that
+ * iterates the dataProvider, generates item
+ * renderers and assigns a data item to the
+ * item renderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get dataProvider():Object;
+ function set dataProvider(value:Object):void;
+
+ /**
+ * The index of the selected item in the
+ * dataProvider. Values less than 0 can
+ * have specific meanings but generally mean
+ * that no item is selected because the
+ * user has typed in a custom entry or has
+ * yet to make a choice.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedIndex():int;
+ function set selectedIndex(value:int):void;
+
+ /**
+ * The data item selected in the
+ * dataProvider. null usually means
+ * that the user has not selected a value
+ * and has typed in a custom entry.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedItem():Object;
+ function set selectedItem(value:Object):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainer.as
new file mode 100644
index 0000000..e3b6c9d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainer.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.core
+{
+ /**
+ * The IContainer interface is used to mark certain components as Containers.
+ * While most components are containers in the sense that they are composited
+ * from a set of child components, the term Container is commonly used in Flex
+ * to denote components that take an arbitrary set or sets of children and do
+ * not try to abstract away that fact.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IContainer extends IParent
+ {
+ /**
+ * This method is called after children have been
+ * added to the container so the container doesn't
+ * have to re-layout as each child is added.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function childrenAdded():void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.as
new file mode 100644
index 0000000..ae07cb7
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContainerView.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.core
+{
+ /**
+ * The IContainerView interface should be implemented by any view bead
+ * that acts as the primary view for a ContainerBase-derived class.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IContainerView extends IParent
+ {
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentView.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentView.as
new file mode 100644
index 0000000..42cc685
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentView.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.core
+{
+ public interface IContentView
+ {
+ function get x():Number;
+ function set x(value:Number):void;
+
+ function get y():Number;
+ function set y(value:Number):void;
+
+ function get width():Number;
+ function set width(value:Number):void;
+
+ function get height():Number;
+ function set height(value:Number):void;
+
+ function addElement(value:Object, dispatchEvent:Boolean = true):void;
+ function removeAllElements():void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentViewHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentViewHost.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentViewHost.as
new file mode 100644
index 0000000..b7ff5ff
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IContentViewHost.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 org.apache.flex.core
+{
+ /**
+ * This interface is implemented by components that provide
+ * access to "behind the scenes" children that are not accessible
+ * through the addElement()/removeElement() APIs.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IContentViewHost extends IParent
+ {
+ function get strandChildren():IParent;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.as
new file mode 100644
index 0000000..5ac0584
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridModel.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 org.apache.flex.core
+{
+ /**
+ * The IDataGridModel interface describes the minimum set of properties
+ * available to an DataGrid control. More sophisticated DataGrid controls
+ * could have models that extend IDataGridModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDataGridModel extends ISelectionModel
+ {
+ /**
+ * The set of DataGridColumns.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get columns():Array;
+ function set columns(value:Array):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridPresentationModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridPresentationModel.as
new file mode 100644
index 0000000..7307148
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataGridPresentationModel.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.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IDataGridPresentationModel interfaces defines the data needed to
+ * present a DataGrid.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDataGridPresentationModel extends IListPresentationModel
+ {
+ /**
+ * The labels used for each column.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get columnLabels():Array;
+ function set columnLabels(value:Array):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataProviderItemRendererMapper.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataProviderItemRendererMapper.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataProviderItemRendererMapper.as
new file mode 100644
index 0000000..20afbee
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataProviderItemRendererMapper.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IItemRendererClassFactory;
+
+ /**
+ * The IDataProviderItemRendererMapper interface is the interface for beads
+ * that know how to iterate through a dataProvider, generate item renderers,
+ * and assign items from the dataProvider to those item renderers. In FlexJS,
+ * a wide range of data providers are allowed, from simple Arrays and Vectors
+ * on up to sophisticated data structures that dispatch change events.
+ * Different IDataProviderItemRendererMapper implements are often required to
+ * iterate through those different data structures.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDataProviderItemRendererMapper extends IBead
+ {
+ /**
+ * IDataProviderItemRendererMapper use an IItemRendererClassFactory
+ * to generate instances of item renderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get itemRendererFactory():IItemRendererClassFactory;
+ function set itemRendererFactory(value:IItemRendererClassFactory):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDateChooserModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDateChooserModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDateChooserModel.as
new file mode 100644
index 0000000..7dea245
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDateChooserModel.as
@@ -0,0 +1,101 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IDateChooserModel interface.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDateChooserModel extends IEventDispatcher, IBeadModel
+ {
+ /**
+ * An array of strings used to name the days of the week with Sunday being the
+ * first element of the array.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get dayNames():Array;
+ function set dayNames(value:Array):void;
+
+ /**
+ * An array of strings used to name the months of the year with January being
+ * the first element of the array.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get monthNames():Array;
+ function set monthNames(value:Array):void;
+
+ /**
+ * The year currently displayed by the DateChooser.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get displayedYear():Number;
+ function set displayedYear(value:Number):void;
+
+ /**
+ * The month currently displayed by the DateChooser.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get displayedMonth():Number;
+ function set displayedMonth(value:Number):void;
+
+ /**
+ * The index of the first day of the week, Sunday = 0.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get firstDayOfWeek():Number;
+ function set firstDayOfWeek(value:Number):void;
+
+ /**
+ * The currently selected date or null if no date has been selected.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get selectedDate():Date;
+ function set selectedDate(value:Date):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDocument.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDocument.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDocument.as
new file mode 100644
index 0000000..4eaab4e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDocument.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.core
+{
+ /**
+ * The IDocument interface is the basic interface for objects that can be
+ * tags in an MXML document and need to know about the host document. It is
+ * similar to the IMXMLObject interface in the Flex SDK.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDocument
+ {
+ /**
+ * This method is called to notify an instance of what MXML document
+ * it belongs to, if any, and what its assigned id is in that
+ * document, if any.
+ *
+ * @param document The MXML document that hosts this component.
+ * @param id The optional id of the component in the document.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setDocument(document:Object, id:String = null):void
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDragInitiator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDragInitiator.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDragInitiator.as
new file mode 100644
index 0000000..fa4ae22
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDragInitiator.as
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IDragInitiator interface is the basic interface for the object that
+ * wants to know if a drop was accepted in a drag/drop operation.
+ *
+ * There are two methods instead of the usual one because in some scenarios
+ * the drag initiator needs to prepare the data before it gets dropped.
+ * For example, in a tree control, dragging from one node to another,
+ * the tree should un-parent the node before it is moved to the
+ * new parent node, so the tree would un-parent the node in acceptingDrop.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IDragInitiator
+ {
+ /**
+ * This method is called to notify the dragInitiator
+ * that you want to accept a drop.
+ *
+ * @param type The type of drop accepted. Allowed
+ * values are in org.apache.flex.core.DropType.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function acceptingDrop(dropTarget:Object, type:String):void
+
+ /**
+ * This method is called to notify the dragInitiator
+ * that you have accepted the drop.
+ *
+ * @param type The type of drop accepted. Allowed
+ * values are in org.apache.flex.core.DropType.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function acceptedDrop(dropTarget:Object, type:String):void
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IEffectTimer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IEffectTimer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IEffectTimer.as
new file mode 100644
index 0000000..7affda2
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IEffectTimer.as
@@ -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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IEffectTimer interface is the basic interface for the
+ * class that updates effects like tweens. Different
+ * IEffectTimer implementations are tuned for various
+ * runtime environments like mobile, Flash, desktop,
+ * or even automated testing where the currentTime is
+ * controlled so the animation updates its target at
+ * predictable positions on the screen.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IEffectTimer extends IEventDispatcher
+ {
+ /**
+ * Start getting update events.
+ *
+ * @return The current time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function start():int;
+
+ /**
+ * Stop getting update events. Current time
+ * should theoretically keep advancing, but events
+ * are not dispatched so most implementations
+ * stop the platform timer (which can save battery
+ * on mobile devices) because they know that
+ * when start() is called they have a way of
+ * getting the updated current time.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function stop():void;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFactory.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFactory.as
new file mode 100644
index 0000000..3a9665e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFactory.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The IFactory interface is the basic interface used as the
+ * type for properties that specify a factory for item renderers
+ * and other scenarios where multiple copies of a custom
+ * class are generated.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IFactory
+ {
+ /**
+ * This method is called to generate a new instance of
+ * an item renderer or other custom class.
+ *
+ * @return A new instance of an item renderer or other custom class.
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function newInstance():*;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexInfo.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexInfo.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexInfo.as
new file mode 100644
index 0000000..e89da6f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexInfo.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.core
+{
+ /**
+ * The IFlexInfo interface is an interface used to signal to the compiler
+ * that it should generate a data structure that contains information
+ * about the application such as its size, mixins, locale, etc.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IFlexInfo
+ {
+ /**
+ * The compiler overrides this getter to provide the data structure.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function info():Object
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
new file mode 100644
index 0000000..ae0cdb1
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFlexJSElement.as
@@ -0,0 +1,27 @@
+package org.apache.flex.core
+{
+ COMPILE::AS3
+ public interface IFlexJSElement
+ {
+
+ }
+
+ COMPILE::JS
+ public interface IFlexJSElement
+ {
+
+ //--------------------------------------
+ // Property
+ //--------------------------------------
+
+ /**
+ * A pointer back to the instance that wrapped this element.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ //function get flexjs_wrapper():Object;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFormatBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFormatBead.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFormatBead.as
new file mode 100644
index 0000000..016642b
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IFormatBead.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IFormatBead interface should be implemented by any bead that
+ * provides a formatting service. When the bead instance is created it
+ * should listen for change events and set its formattedString property
+ * for later retrieveal.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IFormatBead extends IBead, IEventDispatcher
+ {
+ /**
+ * The name of the property for the source to be formatted.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get propertyName():String;
+ function set propertyName(value:String):void;
+
+ /**
+ * The name of the event to listen for, indicating that propertyName
+ * property has changed. The default event is propertyName+"Changed".
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get eventName():String;
+ function set eventName(value:String):void;
+
+ /**
+ * The formatted result.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get formattedString():String;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IImageModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IImageModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IImageModel.as
new file mode 100644
index 0000000..1551d0f
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IImageModel.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.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IImageModel interface describes the minimum set of properties
+ * available to an Image control. More sophisticated Image controls
+ * could have models that extend IImageModel.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IImageModel extends IEventDispatcher, IBeadModel
+ {
+ /**
+ * The source URL for the image. Embedding images is not
+ * recommended for FlexJS as there is no embedding support
+ * in the browsers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get source():String;
+ function set source(value:String):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRenderer.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRenderer.as
new file mode 100644
index 0000000..7843e36
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRenderer.as
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IEventDispatcher;
+
+ /**
+ * The IItemRenderer interface is the basic interface for item renderers.
+ * More complex item renderers may implements extensions of this interface.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IItemRenderer extends IEventDispatcher
+ {
+ /**
+ * The data item to be displayed by the item renderer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get data():Object;
+ function set data(value:Object):void;
+
+ /**
+ * The parent component of the itemRenderer instance. This is the container that houses
+ * all of the itemRenderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get itemRendererParent():Object;
+ function set itemRendererParent(value:Object):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererClassFactory.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererClassFactory.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererClassFactory.as
new file mode 100644
index 0000000..a12c1e5
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererClassFactory.as
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The IItemRendererClassFactory interface is the basic interface for beads
+ * that generate instances of IItemRenderers. Note that this is not the same
+ * as an org.apache.flex.core.IFactory which is a lower-level interface for generating
+ * an instance of just about anything. IItemRendererClassFactory implementations
+ * often use IFactory to generate the actual item renderer instance, but
+ * the IItemRendererClassFactory bead allows for more computation about which
+ * renderer to instantiate. For example, the default implementation
+ * in org.apache.flex.core.ItemRendererClassFactory checks for an itemRenderer
+ * property on the strand, then looks for a default definition in CSS, but
+ * also handles the renderer being defined in MXML in sub tags of the
+ * ItemRendererClassFactory. Other more advanced implementations could
+ * return different renderers based on the data item's type.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IItemRendererClassFactory extends IBead
+ {
+ // TODO: add additional parameters like the data item and index
+ /**
+ * This method is called to generate another instance of an item renderer
+ * and attach it to the given parent.
+ *
+ * @param parent The parent of the item renderer.
+ * @return The item renderer.
+ *
+ * @see org.apache.flex.core.IItemRendererParent
+ * @see org.apache.flex.core.IItemRenderer
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function createItemRenderer(parent:IItemRendererParent):IItemRenderer;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererParent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererParent.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererParent.as
new file mode 100644
index 0000000..18656ef
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererParent.as
@@ -0,0 +1,52 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import org.apache.flex.events.IEventDispatcher;
+
+ /**
+ * The IItemRendererParent interface is the basic interface for the
+ * container that parents item renderers.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IItemRendererParent extends IParent, IEventDispatcher
+ {
+ /**
+ * The IItemRendererParent interface is the basic interface for the
+ * container that parents item renderers.
+ *
+ * @param index The index of the data item.
+ * @return The item renderer for the data item.
+ *
+ * @see org.apache.flex.core.IItemRenderer
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function getItemRendererForIndex(index:int):IItemRenderer;
+ function removeAllElements():void;
+ function updateAllItemRenderers():void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererProvider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererProvider.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererProvider.as
new file mode 100644
index 0000000..0e85c14
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IItemRendererProvider.as
@@ -0,0 +1,58 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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.IFactory;
+
+ /**
+ * The IItemRendererProvider interface is implemented by classes that
+ * provide a ClassFactory for itemRenderers.
+ *
+ * @see org.apache.flex.core.IItemRenderer
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IItemRendererProvider
+ {
+ /**
+ * Returns whether or not the class has an itemRenderer set.
+ * @return true if the itemRenderer has been set, false otherwise.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get hasItemRenderer():Boolean;
+
+ /**
+ * Returns the class factory that will generate instances of the itemRenderer.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get itemRenderer():IFactory;
+ function set itemRenderer(value:IFactory):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
new file mode 100755
index 0000000..dc710ef
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
@@ -0,0 +1,175 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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
+{
+ COMPILE::AS3
+ {
+ import flash.display.DisplayObjectContainer;
+ }
+
+ /**
+ * The IChild interface is the basic interface for a
+ * component that is parented by another component.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ILayoutChild extends IChild, IUIBase
+ {
+ /**
+ * The requested percentage width of
+ * this component in its container.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get percentWidth():Number;
+ function set percentWidth(value:Number):void;
+
+ /**
+ * The requested percentage height of
+ * this component in its container.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get percentHeight():Number;
+ function set percentHeight(value:Number):void;
+
+ /**
+ * The width of this component
+ * if set by the width property
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get explicitWidth():Number;
+
+ /**
+ * The height of this component
+ * if set by the height property
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get explicitHeight():Number;
+
+ /**
+ * Sets the height of the component without
+ * setting explicitHeight.
+ *
+ * @param value The new height.
+ * @param noEvent True if no change event should be sent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setHeight(value:Number, noEvent:Boolean = false):void;
+
+ /**
+ * Sets the width of the component without
+ * setting explicitWidth.
+ *
+ * @param value The new width.
+ * @param noEvent True if no change event should be sent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setWidth(value:Number, noEvent:Boolean = false):void;
+
+ /**
+ * Sets the X value of the component without setting the 'left' style
+ *
+ * @param value The new x value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setX(value:Number):void;
+
+ /**
+ * Sets the Y value of the component without setting the 'top' style
+ *
+ * @param value The new y value.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setY(value:Number):void;
+
+ /**
+ * Sets the width and height of the component
+ * without setting explicitWidth or explicitHeight.
+ * It also sends one change event. If both
+ * values change it only sends heightCHange event.
+ *
+ * @param newWidth The new width.
+ * @param newHeight The new height.
+ * @param noEvent True if no change event should be sent.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setWidthAndHeight(newWidth:Number, newHeight:Number, noEvent:Boolean = false):void;
+
+ /**
+ * True if no percentWidth or explicitWidth has been
+ * assigned
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function isWidthSizedToContent():Boolean;
+
+ /**
+ * True if no percentHeight or explicitHeight has been
+ * assigned
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function isHeightSizedToContent():Boolean;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutHost.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutHost.as
new file mode 100644
index 0000000..3f36723
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutHost.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 org.apache.flex.core
+{
+ /**
+ * The ILayoutHost interface is the basic interface for the
+ * container views that have an IBeadLayout. The layout implementation
+ * often needs to know certain things about other objects in
+ * the view.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface ILayoutHost
+ {
+ /**
+ * The container that parents all of the content.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get contentView():IParentIUIBase;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IListPresentationModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IListPresentationModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IListPresentationModel.as
new file mode 100644
index 0000000..445c3b4
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IListPresentationModel.as
@@ -0,0 +1,54 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES 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 IListPresentationModel interface holds key values for the display
+ * of lists.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IListPresentationModel extends IBead
+ {
+ /**
+ * The height of every row in the list.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get rowHeight():Number;
+ function set rowHeight(value:Number):void;
+
+ /**
+ * The distance each row should be separated from the row above.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get separatorThickness():Number;
+ function set separatorThickness(value:Number):void;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a903508e/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMXMLDocument.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMXMLDocument.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMXMLDocument.as
new file mode 100644
index 0000000..6e31769
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IMXMLDocument.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ /**
+ * The IMXMLDocument interface is an interface for a component that
+ * supports being written in MXML.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ public interface IMXMLDocument
+ {
+ /**
+ * @copy org.apache.flex.core.Application#MXMLDescriptor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function get MXMLDescriptor():Array;
+
+ /**
+ * Set the descriptor for this MXML component
+ *
+ * @param document The MXML document.
+ * @param value The descriptor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function setMXMLDescriptor(document:Object, value:Array):void;
+
+ /**
+ * @copy org.apache.flex.core.Application#generateMXMLAttributes()
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion FlexJS 0.0
+ */
+ function generateMXMLAttributes(data:Array):void
+
+ }
+}