Repository: flex-asjs Updated Branches: refs/heads/refactor-sprite bf6f5a703 -> 68ceca582
Made Application implement IUIBase This needs to be fixed up when the Application refactor is done Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/68ceca58 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/68ceca58 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/68ceca58 Branch: refs/heads/refactor-sprite Commit: 68ceca5822214099a4d569a1184c5cdb1c9c1bbe Parents: bf6f5a7 Author: Harbs <[email protected]> Authored: Sun Jul 31 13:09:44 2016 +0300 Committer: Harbs <[email protected]> Committed: Sun Jul 31 13:09:44 2016 +0300 ---------------------------------------------------------------------- .../flex/org/apache/flex/core/Application.as | 142 ++++++++++++++++++- 1 file changed, 139 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/68ceca58/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 index 939655f..7d47e9c 100644 --- 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 @@ -23,7 +23,7 @@ package org.apache.flex.core import org.apache.flex.events.MouseEvent; import org.apache.flex.events.utils.MouseEventConverter; import org.apache.flex.utils.MXMLDataInterpreter; - import org.apache.flex.utils.Timer; + import org.apache.flex.utils.Timer; COMPILE::SWF { import flash.display.DisplayObject; @@ -103,7 +103,7 @@ package org.apache.flex.core * @playerversion AIR 2.6 * @productversion FlexJS 0.0 */ - public class Application extends ApplicationBase implements IStrand, IParent, IEventDispatcher + public class Application extends ApplicationBase implements IStrand, IParent, IEventDispatcher, IUIBase { /** * Constructor. @@ -653,5 +653,141 @@ package org.apache.flex.core } dispatchEvent(new org.apache.flex.events.Event("applicationComplete")); } - } + + COMPILE::SWF + public function get $displayObject():DisplayObject + { + return this; + } + + public function addedToParent():void + { + // Nothing to do now + } + COMPILE::SWF + public function get element():IFlexJSElement + { + // for now until this is refactored return null so it compiles + return null; + } + + COMPILE::SWF + 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::SWF + { + 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::SWF + private function stageProxy_removedFromStageHandler(event:flash.events.Event):void + { + _stageProxy = null; + } + COMPILE::JS + public function get alpha():Number + { + // TODO Auto Generated method stub + return 0; + } + COMPILE::JS + public function set alpha(value:Number):void + { + // TODO Auto Generated method stub + + } + COMPILE::JS + public function get height():Number + { + // TODO Auto Generated method stub + return 0; + } + COMPILE::JS + public function set height(value:Number):void + { + // TODO Auto Generated method stub + + } + COMPILE::JS + public function get visible():Boolean + { + // TODO Auto Generated method stub + return false; + } + COMPILE::JS + public function set visible(value:Boolean):void + { + // TODO Auto Generated method stub + + } + COMPILE::JS + public function get width():Number + { + // TODO Auto Generated method stub + return 0; + } + COMPILE::JS + public function set width(value:Number):void + { + // TODO Auto Generated method stub + + } + COMPILE::JS + public function get x():Number + { + // TODO Auto Generated method stub + return 0; + } + COMPILE::JS + public function set x(value:Number):void + { + // TODO Auto Generated method stub + + } + COMPILE::JS + public function get y():Number + { + // TODO Auto Generated method stub + return 0; + } + COMPILE::JS + public function set y(value:Number):void + { + // TODO Auto Generated method stub + + } + + COMPILE::JS + public function get positioner():WrappedHTMLElement + { + // TODO Auto Generated method stub + return null + } + + + + } }
