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 2012/11/28 07:17:18 UTC
svn commit: r1414539 [2/2] - in /incubator/flex/whiteboard/aharui: ./
flexjs/ flexjs/example/ flexjs/example/FlexJSTest/
flexjs/example/FlexJSTest/controllers/ flexjs/example/FlexJSTest/js/
flexjs/example/FlexJSTest/models/ flexjs/source/ flexjs/source...
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IStrand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IStrand.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IStrand.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IStrand.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ public interface IStrand
+ {
+ function addBead(bead:IBead):void;
+ function getBeadByType(classOrInterface:Class):IBead;
+ function removeBead(bead:IBead):IBead;
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IStrand.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextBead.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextBead.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextBead.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextBead.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ public interface ITextBead extends IBead
+ {
+ function get text():String;
+ function set text(value:String):void;
+
+ function get html():String;
+ function set html(value:String):void;
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextBead.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextModel.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextModel.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextModel.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextModel.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ public interface ITextModel extends IBeadModel
+ {
+ function get text():String;
+ function set text(value:String):void;
+
+ function get html():String;
+ function set html(value:String):void;
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ITextModel.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IValuesImpl.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IValuesImpl.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IValuesImpl.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IValuesImpl.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ public interface IValuesImpl
+ {
+ function getValue(valueName:String):Object;
+ function setValue(valueName:String, value:Object):void;
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/IValuesImpl.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/SimpleValuesImpl.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/SimpleValuesImpl.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/SimpleValuesImpl.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/SimpleValuesImpl.as Wed Nov 28 06:17:09 2012
@@ -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 flash.events.EventDispatcher;
+ import flash.events.IEventDispatcher;
+
+ import org.apache.flex.events.ValueChangeEvent;
+
+ public class SimpleValuesImpl extends EventDispatcher implements IValuesImpl
+ {
+ public function SimpleValuesImpl()
+ {
+ super();
+ }
+
+ public var values:Object;
+
+ public function getValue(valueName:String):Object
+ {
+ return values[valueName];
+ }
+
+ public function setValue(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));
+ }
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/SimpleValuesImpl.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/UIBase.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/UIBase.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/UIBase.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/UIBase.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+ import flash.display.DisplayObjectContainer;
+ import flash.display.Sprite;
+ import flash.events.Event;
+
+ public class UIBase extends Sprite implements IInitModel, IStrand
+ {
+ public function UIBase()
+ {
+ super();
+ }
+
+ private var _width:Number;
+ override public function get width():Number
+ {
+ return _width;
+ }
+ override public function set width(value:Number):void
+ {
+ if (_width != value)
+ {
+ _width = value;
+ dispatchEvent(new Event("widthChanged"));
+ }
+ }
+ protected function get $width():Number
+ {
+ return super.width;
+ }
+
+ private var _height:Number;
+ override public function get height():Number
+ {
+ return _height;
+ }
+ override public function set height(value:Number):void
+ {
+ if (_height != value)
+ {
+ _height = value;
+ dispatchEvent(new Event("heightChanged"));
+ }
+ }
+ protected function get $height():Number
+ {
+ return super.height;
+ }
+
+ private var _model:IBeadModel;
+ protected function get model():IBeadModel
+ {
+ return _model;
+ }
+
+ private var strand:Vector.<IBead>;
+ public function addBead(bead:IBead):void
+ {
+ if (!strand)
+ strand = new Vector.<IBead>;
+ strand.push(bead);
+ if (bead is IBeadModel)
+ _model = bead as IBeadModel;
+ bead.strand = this;
+ }
+
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in strand)
+ {
+ if (bead is classOrInterface)
+ return bead;
+ }
+ return null;
+ }
+
+ 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;
+ }
+
+ public function initModel():void
+ {
+
+ }
+
+ public function addToParent(p:DisplayObjectContainer):void
+ {
+ p.addChild(this);
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/UIBase.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ValuesManager.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ValuesManager.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ValuesManager.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ValuesManager.as Wed Nov 28 06:17:09 2012
@@ -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 class ValuesManager
+ {
+ public function ValuesManager()
+ {
+ }
+
+ private static var _valuesImpl:IValuesImpl;
+
+ public static function get valuesImpl():IValuesImpl
+ {
+ return _valuesImpl;
+ }
+ public static function set valuesImpl(value:IValuesImpl):void
+ {
+ _valuesImpl = value;
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ValuesManager.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ViewBase.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ViewBase.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ViewBase.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ViewBase.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,116 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF 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 org.apache.flex.binding.SimpleBinding;
+ import org.apache.flex.core.IStrand;
+
+ public class ViewBase extends UIBase
+ {
+ public function ViewBase()
+ {
+ super();
+ }
+
+ public function get uiDescriptors():Array
+ {
+ return null;
+ }
+
+ public function initUI(app:Application):void
+ {
+ // cache this for speed
+ var descriptors:Array = uiDescriptors;
+
+ var n:int = descriptors.length;
+ var i:int = 0;
+
+ while (i < n)
+ {
+ var valueName:String;
+ var value:Object;
+
+ var c:Class = descriptors[i++]; // class
+ var o:DisplayObject = new c() as DisplayObject;
+ if (o is UIBase)
+ UIBase(o).addToParent(this);
+ else
+ addChild(o);
+ c = descriptors[i++]; // model
+ if (c)
+ {
+ value = new c();
+ IStrand(o).addBead(value as IBead);
+ }
+ if (o is IInitModel)
+ IInitModel(o).initModel();
+ var j:int;
+ var m:int;
+ valueName = descriptors[i++]; // id
+ if (valueName)
+ this[valueName] = o;
+
+ m = descriptors[i++]; // num props
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ value = descriptors[i++];
+ o[valueName] = value;
+ }
+ m = descriptors[i++]; // num beads
+ for (j = 0; j < m; j++)
+ {
+ c = descriptors[i++];
+ value = new c();
+ IStrand(o).addBead(value as IBead);
+ }
+ if (o is IInitSkin)
+ {
+ IInitSkin(o).initSkin();
+ }
+ m = descriptors[i++]; // num events
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ value = descriptors[i++];
+ o.addEventListener(valueName, value as Function);
+ }
+ m = descriptors[i++]; // num bindings
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ var bindingType:int = descriptors[i++];
+ switch (bindingType)
+ {
+ case 0:
+ var sb:SimpleBinding = new SimpleBinding();
+ sb.destination = o;
+ sb.destinationPropertyName = valueName;
+ sb.source = app[descriptors[i++]];
+ sb.sourcePropertyName = descriptors[i++];
+ sb.eventName = descriptors[i++];
+ sb.initialize();
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/core/ViewBase.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as Wed Nov 28 06:17:09 2012
@@ -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.events
+{
+ import flash.events.Event;
+
+ public class ValueChangeEvent extends Event
+ {
+ public function ValueChangeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false,
+ oldValue:Object = null, newValue:Object = null)
+ {
+ super(type, bubbles, cancelable);
+ this.oldValue = oldValue;
+ this.newValue = newValue;
+ }
+
+ public var oldValue:Object;
+ public var newValue:Object;
+
+ public static const VALUE_CHANGE:String = "valueChange";
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/events/ValueChangeEvent.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as Wed Nov 28 06:17:09 2012
@@ -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.html.staticControls
+{
+ 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.IStrand;
+
+ public class Button extends SimpleButton implements IStrand
+ {
+ public function Button(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+ {
+ super(upState, overState, downState, hitTestState);
+ // mouseChildren = true;
+ // mouseEnabled = true;
+ }
+
+ private var _model:IBeadModel;
+ protected function get model():IBeadModel
+ {
+ return _model;
+ }
+
+ private var strand:Vector.<IBead>;
+ public function addBead(bead:IBead):void
+ {
+ if (!strand)
+ strand = new Vector.<IBead>;
+ strand.push(bead);
+ if (bead is IBeadModel)
+ _model = bead as IBeadModel;
+ bead.strand = this;
+ }
+
+ public function getBeadByType(classOrInterface:Class):IBead
+ {
+ for each (var bead:IBead in strand)
+ {
+ if (bead is classOrInterface)
+ return bead;
+ }
+ return null;
+ }
+
+ 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;
+ }
+
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as Wed Nov 28 06:17:09 2012
@@ -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.html.staticControls
+{
+ public class DropDownList
+ {
+ public function DropDownList()
+ {
+ }
+
+ private var _dataProvider:Array;
+
+ public function get dataProvider():Array
+ {
+ return _dataProvider;
+ }
+
+ public function set dataProvider(value:Array):void
+ {
+ _dataProvider = value;
+ }
+
+ private var _selectedIndex:int;
+
+ public function get selectedIndex():int
+ {
+ return _selectedIndex;
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/DropDownList.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as Wed Nov 28 06:17:09 2012
@@ -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.html.staticControls
+{
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IInitSkin;
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.core.ITextBead;
+ import org.apache.flex.core.UIBase;
+ import org.apache.flex.core.ValuesManager;
+
+ /**
+ * Label probably should extend TextField directly,
+ * but the player's APIs for TextLine do not allow
+ * direct instantiation, and we might want to allow
+ * Labels to be declared and have their actual
+ * view be swapped out.
+ */
+ public class Label extends UIBase implements IInitSkin
+ {
+ public function Label()
+ {
+ super();
+ }
+
+ public function get text():String
+ {
+ return ITextModel(model).text;
+ }
+ public function set text(value:String):void
+ {
+ ITextModel(model).text = value;
+ }
+
+ public function get html():String
+ {
+ return ITextModel(model).html;
+ }
+ public function set html(value:String):void
+ {
+ ITextModel(model).html = value;
+ }
+
+ override public function initModel():void
+ {
+ if (getBeadByType(ITextModel) == null)
+ addBead(new (ValuesManager.valuesImpl.getValue("ITextModel")) as IBead);
+ }
+
+ public function initSkin():void
+ {
+ if (getBeadByType(ITextBead) == null)
+ addBead(new (ValuesManager.valuesImpl.getValue("ITextBead")) as IBead);
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/Label.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as Wed Nov 28 06:17:09 2012
@@ -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.html.staticControls
+{
+ import flash.display.DisplayObject;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.ITextModel;
+ import org.apache.flex.core.IInitModel;
+ import org.apache.flex.core.IInitSkin;
+ import org.apache.flex.core.ValuesManager;
+ import org.apache.flex.html.staticControls.beads.ITextButtonBead;
+
+ public class TextButton extends Button implements IInitModel, IInitSkin
+ {
+ public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null, hitTestState:DisplayObject=null)
+ {
+ super(upState, overState, downState, hitTestState);
+ }
+
+ public function get text():String
+ {
+ return ITextModel(model).text;
+ }
+ public function set text(value:String):void
+ {
+ ITextModel(model).text = value;
+ }
+
+ public function get html():String
+ {
+ return ITextModel(model).html;
+ }
+ public function set html(value:String):void
+ {
+ ITextModel(model).html = value;
+ }
+
+ public function initModel():void
+ {
+ if (getBeadByType(ITextModel) == null)
+ addBead(new (ValuesManager.valuesImpl.getValue("ITextModel")) as IBead);
+ }
+
+ public function initSkin():void
+ {
+ if (getBeadByType(ITextButtonBead) == null)
+ addBead(new (ValuesManager.valuesImpl.getValue("ITextButtonBead")) as IBead);
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/IButtonBead.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/IButtonBead.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/IButtonBead.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/IButtonBead.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+ public interface IButtonBead
+ {
+ function get state():String;
+ function set state(value:String):void;
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/IButtonBead.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ITextButtonBead.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ITextButtonBead.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ITextButtonBead.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ITextButtonBead.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+ import org.apache.flex.core.ITextBead;
+
+ public interface ITextButtonBead extends ITextBead
+ {
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ITextButtonBead.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextButtonBead.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextButtonBead.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextButtonBead.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextButtonBead.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,132 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+ import flash.display.Shape;
+ import flash.display.SimpleButton;
+ import flash.display.Sprite;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.ITextBead;
+ import org.apache.flex.core.ITextModel;
+
+ public class TextButtonBead implements ITextButtonBead
+ {
+ public function TextButtonBead()
+ {
+ upTextField = new TextField();
+ downTextField = new TextField();
+ overTextField = new TextField();
+ upTextField.border = true;
+ downTextField.border = true;
+ overTextField.border = true;
+ upTextField.background = true;
+ downTextField.background = true;
+ overTextField.background = true;
+ upTextField.borderColor = 0;
+ downTextField.borderColor = 0;
+ overTextField.borderColor = 0;
+ upTextField.backgroundColor = 0xCCCCCC;
+ downTextField.backgroundColor = 0x808080;
+ overTextField.backgroundColor = 0xFFCCCC;
+ upTextField.selectable = false;
+ upTextField.type = TextFieldType.DYNAMIC;
+ downTextField.selectable = false;
+ downTextField.type = TextFieldType.DYNAMIC;
+ overTextField.selectable = false;
+ overTextField.type = TextFieldType.DYNAMIC;
+ upTextField.autoSize = "left";
+ downTextField.autoSize = "left";
+ overTextField.autoSize = "left";
+
+ }
+
+ private var textModel:ITextModel;
+
+ private var _strand:IStrand;
+
+ private var shape:Shape;
+
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ textModel = value.getBeadByType(ITextModel) as ITextModel;
+ textModel.addEventListener("textChange", textChangeHandler);
+ textModel.addEventListener("htmlChange", htmlChangeHandler);
+ shape = new Shape();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, 10, 10);
+ shape.graphics.endFill();
+ SimpleButton(value).upState = upTextField;
+ SimpleButton(value).downState = downTextField;
+ SimpleButton(value).overState = overTextField;
+ SimpleButton(value).hitTestState = shape;
+ if (textModel.text !== null)
+ text = textModel.text;
+ if (textModel.html !== null)
+ html = textModel.html;
+ }
+
+ private function textChangeHandler(event:Event):void
+ {
+ text = textModel.text;
+ }
+
+ private function htmlChangeHandler(event:Event):void
+ {
+ html = textModel.html;
+ }
+
+ private var upTextField:TextField;
+ private var downTextField:TextField;
+ private var overTextField:TextField;
+
+ public function get text():String
+ {
+ return upTextField.text;
+ }
+ public function set text(value:String):void
+ {
+ upTextField.text = value;
+ downTextField.text = value;
+ overTextField.text = value;
+ shape.graphics.clear();
+ shape.graphics.beginFill(0xCCCCCC);
+ shape.graphics.drawRect(0, 0, upTextField.textWidth, upTextField.textHeight);
+ shape.graphics.endFill();
+
+ }
+
+ public function get html():String
+ {
+ return upTextField.htmlText;
+ }
+
+ public function set html(value:String):void
+ {
+ upTextField.htmlText = value;
+ downTextField.htmlText = value;
+ overTextField.htmlText = value;
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextButtonBead.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldBead.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldBead.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldBead.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldBead.as Wed Nov 28 06:17:09 2012
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+ import flash.display.DisplayObjectContainer;
+ import flash.events.Event;
+ import flash.text.TextField;
+ import flash.text.TextFieldType;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.ITextBead;
+ import org.apache.flex.core.ITextModel;
+
+ public class TextFieldBead implements IBead, ITextBead
+ {
+ public function TextFieldBead()
+ {
+ _textField = new TextField();
+ _textField.selectable = false;
+ _textField.type = TextFieldType.DYNAMIC;
+ _textField.mouseEnabled = false;
+ }
+ private var textModel:ITextModel;
+
+ private var _strand:IStrand;
+
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ textModel = value.getBeadByType(ITextModel) as ITextModel;
+ textModel.addEventListener("textChange", textChangeHandler);
+ textModel.addEventListener("htmlChange", htmlChangeHandler);
+ DisplayObjectContainer(value).addChild(_textField);
+ if (textModel.text !== null)
+ text = textModel.text;
+ if (textModel.html !== null)
+ html = textModel.html;
+ }
+
+ private function textChangeHandler(event:Event):void
+ {
+ text = textModel.text;
+ }
+
+ private function htmlChangeHandler(event:Event):void
+ {
+ html = textModel.html;
+ }
+
+ private var _textField:TextField;
+
+ public function get text():String
+ {
+ return _textField.text;
+ }
+ public function set text(value:String):void
+ {
+ _textField.text = value;
+ }
+
+ public function get html():String
+ {
+ return _textField.htmlText;
+ }
+
+ public function set html(value:String):void
+ {
+ _textField.htmlText = value;
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/TextFieldBead.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/models/TextModel.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/models/TextModel.as?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/models/TextModel.as (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/models/TextModel.as Wed Nov 28 06:17:09 2012
@@ -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.html.staticControls.beads.models
+{
+ import flash.events.Event;
+ import flash.events.EventDispatcher;
+
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IStrand;
+ import org.apache.flex.core.ITextModel;
+
+ public class TextModel extends EventDispatcher implements IBead, ITextModel
+ {
+ public function TextModel()
+ {
+ }
+
+ private var _strand:IStrand;
+
+ public function set strand(value:IStrand):void
+ {
+ _strand = value;
+ }
+
+ private var _text:String;
+ public function get text():String
+ {
+ return _text;
+ }
+
+ public function set text(value:String):void
+ {
+ if (value != _text)
+ {
+ _text = value;
+ dispatchEvent(new Event("textChange"));
+ }
+ }
+
+ private var _html:String;
+ public function get html():String
+ {
+ return _html;
+ }
+
+ public function set html(value:String):void
+ {
+ if (value != _html)
+ {
+ _html = value;
+ dispatchEvent(new Event("htmlChange"));
+ }
+ }
+ }
+}
\ No newline at end of file
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/as/FlexJSUI/src/org/apache/flex/html/staticControls/beads/models/TextModel.as
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/whiteboard/aharui/flexjs/source/js/framework.js
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/aharui/flexjs/source/js/framework.js?rev=1414539&view=auto
==============================================================================
--- incubator/flex/whiteboard/aharui/flexjs/source/js/framework.js (added)
+++ incubator/flex/whiteboard/aharui/flexjs/source/js/framework.js Wed Nov 28 06:17:09 2012
@@ -0,0 +1,1030 @@
+// JavaScript Document
+if (!("models" in window))
+ window.models = {};
+
+if (!("controllers" in window))
+ window.controllers = {};
+
+if (!("flash" in window))
+ window.flash = {};
+
+if (!("events" in flash))
+ flash.events = {};
+
+if (!("org" in window))
+ window.org = {};
+
+if (!("apache" in org))
+ org.apache = {};
+
+if (!("flex" in org.apache))
+ org.apache.flex = {};
+
+if (!("core" in org.apache.flex))
+ org.apache.flex.core = {};
+
+if (!("html" in org.apache.flex))
+ org.apache.flex.html = {};
+
+if (!("binding" in org.apache.flex))
+ org.apache.flex.binding = {};
+
+if (!("static" in org.apache.flex.html))
+ org.apache.flex.html.staticControls = {};
+
+if (!("beads" in org.apache.flex.html.staticControls))
+ org.apache.flex.html.staticControls.beads = {};
+
+if (!("static" in org.apache.flex.html.staticControls.beads))
+ org.apache.flex.html.staticControls.beads.models = {};
+
+/*******************************
+*
+* Application
+*
+********************************/
+
+org.apache.flex.core.Application = adobe.extend("org.apache.flex.core.Application", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.core.Application()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.core.Application} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ queuedListeners : undefined,
+
+ addEventListener : function(type, handler)
+ {
+ // at contructor time, the element may not be available yet
+ if (typeof this.element == "undefined")
+ {
+ if (typeof this.queuedListeners == "undefined")
+ this.queuedListeners = [];
+ this.queuedListeners.push ({ type: type, handler: handler});
+ return;
+ }
+
+ if (typeof this.element.attachEvent == "function")
+ this.element.attachEvent(adobe.eventMap[type], handler);
+ else if (typeof this.element.addEventListener == "function")
+ {
+ this.element.addEventListener(type, handler);
+ }
+ },
+
+ start : function()
+ {
+ /** @type {org.apache.flex.core.Application} */
+ var self = this;
+
+ this.element = document.getElementsByTagName('body')[0];
+
+ if (typeof this.queuedListeners != "undefined")
+ {
+ var n = this.queuedListeners.length;
+ for (var i = 0; i < n; i++)
+ {
+ var q = this.queuedListeners[i];
+ this.addEventListener(q.type, q.handler);
+ }
+ }
+
+ self.valuesImpl = new self.valuesImplClass;
+ org.apache.flex.core.ValuesManager.valuesImpl = self.valuesImpl;
+
+ self.initialView = new self.initialViewClass;
+ self.initialView.addToParent(this.element);
+ self.initialView.initUI(self);
+ // create the event
+ var evt = document.createEvent('Event');
+ // define that the event name is `build`
+ evt.initEvent('viewChanged', true, true);
+
+ // elem is any element
+ this.element.dispatchEvent(evt);
+
+ }
+
+});
+
+
+/**
+ * Member: org.apache.flex.core.Application.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.core.Application}
+ */
+org.apache.flex.core.Application.prototype._CLASS = org.apache.flex.core.Application;
+
+
+/**
+ * Member: org.apache.flex.core.Application._PACKAGE
+ * @const
+ * @type {org.apache.flex.core.Application}
+ */
+org.apache.flex.core.Application._PACKAGE = org.apache.flex.core;
+
+
+/**
+ * Member: org.apache.flex.core.Application._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.Application._NAME = "org.apache.flex.core.Application";
+
+/**
+ * Member: org.apache.flex.core.Application._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.Application._FULLNAME = "org.apache.flex.core.Application";
+
+/**
+ * Member: org.apache.flex.core.Application._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.Application._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.core.Application._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.Application._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.core.Application"] = org.apache.flex.core.Application;
+
+/*******************************
+*
+* UIBase
+*
+********************************/
+
+org.apache.flex.core.UIBase = adobe.extend("org.apache.flex.core.UIBase", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.core.UIBase()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.core.UIBase} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ addEventListener : function(type, handler)
+ {
+ if (typeof this.element.attachEvent == "function")
+ this.element.attachEvent(adobe.eventMap[type], handler);
+ else if (typeof this.element.addEventListener == "function")
+ this.element.addEventListener(type, handler);
+ },
+
+ dispatchEvent : function(evt)
+ {
+ /** @type {org.apache.flex.core.UIBase} */
+ var self = this;
+
+ // elem is any element
+ this.element.dispatchEvent(evt);
+ },
+
+ set_x : function(n)
+ {
+ this.positioner.style.position = "absolute";
+ this.positioner.style.left = n.toString() + "px";
+ },
+
+ set_y : function(n)
+ {
+ this.positioner.style.position = "absolute";
+ this.positioner.style.top = n.toString() + "px";
+ }
+
+});
+
+
+/**
+ * Member: org.apache.flex.core.UIBase.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.core.UIBase.prototype._CLASS = org.apache.flex.core.UIBase;
+
+
+/**
+ * Member: org.apache.flex.core.UIBase._PACKAGE
+ * @const
+ * @type {org.apache.flex.core.UIBase}
+ */
+org.apache.flex.core.UIBase._PACKAGE = org.apache.flex.core;
+
+
+/**
+ * Member: org.apache.flex.core.UIBase._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.UIBase._NAME = "org.apache.flex.core.UIBase";
+
+/**
+ * Member: org.apache.flex.core.UIBase._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.UIBase._FULLNAME = "org.apache.flex.core.UIBase";
+
+/**
+ * Member: org.apache.flex.core.UIBase._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.UIBase._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.core.UIBase._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.UIBase._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.core.UIBase"] = org.apache.flex.core.UIBase;
+
+/*******************************
+*
+* ViewBase
+*
+********************************/
+
+org.apache.flex.core.ViewBase = adobe.extend("org.apache.flex.core.ViewBase", org.apache.flex.core.UIBase, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.core.ViewBase()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.core.ViewBase} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ addToParent : function(p)
+ {
+ this.element = document.createElement("div");
+ p.appendChild(this.element);
+ },
+
+ initUI: function(app)
+ {
+ /** @type {org.apache.flex.core.ViewBase} */
+ var self = this;
+
+ // cache this for speed
+ var descriptors = self.get_uiDescriptors();
+
+ var n = descriptors.length;
+ var i = 0;
+
+ var value;
+ var valueName;
+
+ while (i < n)
+ {
+ var c = descriptors[i++]; // class
+ var o = new c();
+ o.addToParent(this.element);
+ c = descriptors[i++]; // model
+ if (c)
+ {
+ value = new c();
+ o.addBead(value);
+ }
+ if (typeof o.initModel == "function")
+ o.initModel();
+ var j;
+ var m;
+ valueName = descriptors[i++]; // id
+ if (valueName)
+ this[valueName] = o;
+
+ m = descriptors[i++]; // num props
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ value = descriptors[i++];
+ o["set_" + valueName](value);
+ }
+ m = descriptors[i++]; // num beads
+ for (j = 0; j < m; j++)
+ {
+ c = descriptors[i++];
+ value = new c();
+ o.addBead(value);
+ }
+ if (typeof o.initSkin == "function")
+ o.initSkin();
+ m = descriptors[i++]; // num events
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ value = descriptors[i++];
+ o.addEventListener(valueName, adobe.createProxy(this, value));
+ }
+ m = descriptors[i++]; // num bindings
+ for (j = 0; j < m; j++)
+ {
+ valueName = descriptors[i++];
+ var bindingType = descriptors[i++];
+ switch (bindingType)
+ {
+ case 0:
+ var sb = new org.apache.flex.binding.SimpleBinding();
+ sb.destination = o;
+ sb.destinationPropertyName = valueName;
+ sb.source = app[descriptors[i++]];
+ sb.sourcePropertyName = descriptors[i++];
+ sb.eventName = descriptors[i++];
+ sb.initialize();
+ }
+ }
+ }
+ }
+
+});
+
+
+/**
+ * Member: org.apache.flex.core.ViewBase.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.core.ViewBase}
+ */
+org.apache.flex.core.ViewBase.prototype._CLASS = org.apache.flex.core.ViewBase;
+
+
+/**
+ * Member: org.apache.flex.core.ViewBase._PACKAGE
+ * @const
+ * @type {org.apache.flex.core.ViewBase}
+ */
+org.apache.flex.core.ViewBase._PACKAGE = org.apache.flex.core;
+
+
+/**
+ * Member: org.apache.flex.core.ViewBase._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.ViewBase._NAME = "org.apache.flex.core.ViewBase";
+
+/**
+ * Member: org.apache.flex.core.ViewBase._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.ViewBase._FULLNAME = "org.apache.flex.core.ViewBase";
+
+/**
+ * Member: org.apache.flex.core.ViewBase._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.ViewBase._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.core.ViewBase._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.ViewBase._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.core.ViewBase"] = org.apache.flex.core.ViewBase;
+
+/*******************************
+*
+* Label
+*
+********************************/
+
+org.apache.flex.html.staticControls.Label = adobe.extend("org.apache.flex.html.staticControls.Label", org.apache.flex.core.UIBase, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.html.staticControls.Label()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.html.staticControls.Label} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ addToParent : function(p)
+ {
+ this.element = document.createElement("div");
+ this.positioner = this.element;
+ p.appendChild(this.element);
+ },
+
+ get_text : function()
+ {
+ return this.element.innerHTML;
+ },
+
+ set_text : function(s)
+ {
+ this.element.innerHTML = s;
+ }
+
+});
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.html.staticControls.Label}
+ */
+org.apache.flex.html.staticControls.Label.prototype._CLASS = org.apache.flex.html.staticControls.Label;
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label._PACKAGE
+ * @const
+ * @type {org.apache.flex.html.staticControls.Label}
+ */
+org.apache.flex.html.staticControls.Label._PACKAGE = org.apache.flex.html.staticControls;
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.html.staticControls.Label._NAME = "org.apache.flex.html.staticControls.Label";
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.html.staticControls.Label._FULLNAME = "org.apache.flex.html.staticControls.Label";
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.html.staticControls.Label._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.html.staticControls.Label._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.html.staticControls.Label._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.html.staticControls.Label"] = org.apache.flex.html.staticControls.Label;
+
+/*******************************
+*
+* TextButton
+*
+********************************/
+org.apache.flex.html.staticControls.TextButton = adobe.extend("org.apache.flex.html.staticControls.TextButton", org.apache.flex.core.UIBase, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.html.staticControls.TextButton()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.html.staticControls.TextButton} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ addToParent : function(p)
+ {
+ this.positioner = document.createElement("input");
+ this.element = this.positioner;
+ this.element.setAttribute("type", "button");
+ p.appendChild(this.positioner);
+ },
+
+ get_text : function()
+ {
+ return this.element.getAttribute("value");
+ },
+
+ set_text : function(s)
+ {
+ this.element.setAttribute("value", s);
+ }
+
+});
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.html.staticControls.TextButton}
+ */
+org.apache.flex.html.staticControls.TextButton.prototype._CLASS = org.apache.flex.html.staticControls.TextButton;
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton._PACKAGE
+ * @const
+ * @type {org.apache.flex.html.staticControls.TextButton}
+ */
+org.apache.flex.html.staticControls.TextButton._PACKAGE = org.apache.flex.html.staticControls;
+
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.html.staticControls.TextButton._NAME = "org.apache.flex.html.staticControls.TextButton";
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.html.staticControls.TextButton._FULLNAME = "org.apache.flex.html.staticControls.TextButton";
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.html.staticControls.TextButton._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.html.staticControls.TextButton._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.html.staticControls.TextButton._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.html.staticControls.TextButton"] = org.apache.flex.html.staticControls.TextButton;
+
+/*******************************
+*
+* SimpleValuesImpl
+*
+********************************/
+
+org.apache.flex.core.SimpleValuesImpl = adobe.extend("org.apache.flex.core.SimpleValuesImpl", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.core.SimpleValuesImpl()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.core.SimpleValuesImpl} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+});
+
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.core.SimpleValuesImpl}
+ */
+org.apache.flex.core.SimpleValuesImpl.prototype._CLASS = org.apache.flex.core.SimpleValuesImpl;
+
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl._PACKAGE
+ * @const
+ * @type {org.apache.flex.core.SimpleValuesImpl}
+ */
+org.apache.flex.core.SimpleValuesImpl._PACKAGE = org.apache.flex.core;
+
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.SimpleValuesImpl._NAME = "org.apache.flex.core.SimpleValuesImpl";
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.SimpleValuesImpl._FULLNAME = "org.apache.flex.core.SimpleValuesImpl";
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.SimpleValuesImpl._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.core.SimpleValuesImpl._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.SimpleValuesImpl._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.core.SimpleValuesImpl"] = org.apache.flex.core.SimpleValuesImpl;
+
+/*******************************
+*
+* ValuesManager
+*
+********************************/
+
+org.apache.flex.core.ValuesManager = adobe.extend("org.apache.flex.core.ValuesManager", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.core.ValuesManager()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.core.ValuesManager} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+});
+
+
+/**
+ * Member: org.apache.flex.core.ValuesManager.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.core.ValuesManager}
+ */
+org.apache.flex.core.ValuesManager.prototype._CLASS = org.apache.flex.core.ValuesManager;
+
+
+/**
+ * Member: org.apache.flex.core.ValuesManager._PACKAGE
+ * @const
+ * @type {org.apache.flex.core.ValuesManager}
+ */
+org.apache.flex.core.ValuesManager._PACKAGE = org.apache.flex.core;
+
+
+/**
+ * Member: org.apache.flex.core.ValuesManager._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.ValuesManager._NAME = "org.apache.flex.core.ValuesManager";
+
+/**
+ * Member: org.apache.flex.core.ValuesManager._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.core.ValuesManager._FULLNAME = "org.apache.flex.core.ValuesManager";
+
+/**
+ * Member: org.apache.flex.core.ValuesManager._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.ValuesManager._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.core.ValuesManager._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.core.ValuesManager._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.core.ValuesManager"] = org.apache.flex.core.ValuesManagerValuesManager;
+
+/*******************************
+*
+* SimpleBinding
+*
+********************************/
+
+org.apache.flex.binding.SimpleBinding = adobe.extend("org.apache.flex.binding.SimpleBinding", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: org.apache.flex.binding.SimpleBinding()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {org.apache.flex.binding.SimpleBinding} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ source: null,
+ sourcePropertyName: null,
+ eventName: null,
+ destination: null,
+ destinationPropertyName: null,
+
+ changeHandler : function()
+ {
+ /** @type {org.apache.flex.binding.SimpleBinding} */
+ var self = this;
+
+ self.destination["set_" + self.destinationPropertyName](self.source["get_" + self.sourcePropertyName]());
+ },
+
+ initialize : function()
+ {
+ /** @type {org.apache.flex.binding.SimpleBinding} */
+ var self = this;
+
+ self.source.addEventListener(self.eventName, adobe.createProxy(self, self.changeHandler));
+ self.destination["set_" + self.destinationPropertyName](self.source["get_" + self.sourcePropertyName]());
+ }
+
+
+
+});
+
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding.prototype._CLASS
+ * @const
+ * @type {org.apache.flex.binding.SimpleBinding}
+ */
+org.apache.flex.binding.SimpleBinding.prototype._CLASS = org.apache.flex.binding.SimpleBinding;
+
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding._PACKAGE
+ * @const
+ * @type {org.apache.flex.binding.SimpleBinding}
+ */
+org.apache.flex.binding.SimpleBinding._PACKAGE = org.apache.flex.binding;
+
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding._NAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.binding.SimpleBinding._NAME = "org.apache.flex.binding.SimpleBinding";
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding._FULLNAME
+ * @const
+ * @type {string}
+ */
+org.apache.flex.binding.SimpleBinding._FULLNAME = "org.apache.flex.binding.SimpleBinding";
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding._SUPER
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.binding.SimpleBinding._SUPER = Object;
+
+/**
+ * Member: org.apache.flex.binding.SimpleBinding._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+org.apache.flex.binding.SimpleBinding._NAMESPACES = {};
+
+adobe.classes["org.apache.flex.binding.SimpleBinding"] = org.apache.flex.binding.SimpleBinding;
+
+/*******************************
+*
+* EventDispatcher
+*
+********************************/
+
+flash.events.EventDispatcher = adobe.extend("flash.events.EventDispatcher", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: flash.events.EventDispatcher()
+ * @constructor
+ */
+ init : function()
+ {
+ /** @type {flash.events.EventDispatcher} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ return self;
+ },
+
+ listeners : {},
+
+ addEventListener : function(type, handler)
+ {
+ if (typeof this.listeners.type === "undefined")
+ this.listeners[type] = [];
+
+ this.listeners[type].push(handler);
+ },
+
+ dispatchEvent : function(event)
+ {
+ var self = this;
+ var type = event.type;
+ if (typeof this.listeners[type] !== "undefined")
+ {
+ var arr = this.listeners[type];
+ var n = arr.length;
+ for (var i = 0; i < n; i++)
+ arr[i](event);
+ }
+ }
+
+});
+
+
+/**
+ * Member: flash.events.EventDispatcher.prototype._CLASS
+ * @const
+ * @type {flash.events.EventDispatcher}
+ */
+flash.events.EventDispatcher.prototype._CLASS = flash.events.EventDispatcher;
+
+
+/**
+ * Member: flash.events.EventDispatcher._PACKAGE
+ * @const
+ * @type {flash.events.EventDispatcher}
+ */
+flash.events.EventDispatcher._PACKAGE = flash.events;
+
+
+/**
+ * Member: flash.events.EventDispatcher._NAME
+ * @const
+ * @type {string}
+ */
+flash.events.EventDispatcher._NAME = "flash.events.EventDispatcher";
+
+/**
+ * Member: flash.events.EventDispatcher._FULLNAME
+ * @const
+ * @type {string}
+ */
+flash.events.EventDispatcher._FULLNAME = "flash.events.EventDispatcher";
+
+/**
+ * Member: flash.events.EventDispatcher._SUPER
+ * @const
+ * @type {Object}
+ */
+flash.events.EventDispatcher._SUPER = Object;
+
+/**
+ * Member: flash.events.EventDispatcher._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+flash.events.EventDispatcher._NAMESPACES = {};
+
+adobe.classes["flash.events.EventDispatcher"] = flash.events.EventDispatcher;
+
+/*******************************
+*
+* Event
+*
+********************************/
+
+flash.events.Event = adobe.extend("flash.events.Event", adobe, {
+
+ // Constructor
+
+
+ /**
+ * Constructor: flash.events.Event()
+ * @constructor
+ */
+ init : function(type)
+ {
+ /** @type {flash.events.Event} */
+ var self = this;
+
+ self._super(); /* Call to super() was missing in ctor! */
+
+ self.type = type;
+ return self;
+ },
+
+ type : undefined
+
+});
+
+
+/**
+ * Member: flash.events.Event.prototype._CLASS
+ * @const
+ * @type {flash.events.Event}
+ */
+flash.events.Event.prototype._CLASS = flash.events.Event;
+
+
+/**
+ * Member: flash.events.Event._PACKAGE
+ * @const
+ * @type {flash.events.Event}
+ */
+flash.events.Event._PACKAGE = flash.events;
+
+
+/**
+ * Member: flash.events.Event._NAME
+ * @const
+ * @type {string}
+ */
+flash.events.Event._NAME = "flash.events.Event";
+
+/**
+ * Member: flash.events.Event._FULLNAME
+ * @const
+ * @type {string}
+ */
+flash.events.Event._FULLNAME = "flash.events.Event";
+
+/**
+ * Member: flash.events.Event._SUPER
+ * @const
+ * @type {Object}
+ */
+flash.events.Event._SUPER = Object;
+
+/**
+ * Member: flash.events.Event._NAMESPACES
+ * @const
+ * @type {Object}
+ */
+flash.events.Event._NAMESPACES = {};
+
+adobe.classes["flash.events.Event"] = flash.events.Event;
+
Propchange: incubator/flex/whiteboard/aharui/flexjs/source/js/framework.js
------------------------------------------------------------------------------
svn:eol-style = native