flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [02/12] git commit: [flex-asjs] [refs/heads/develop] - more asdoc
Date Thu, 06 Feb 2014 14:39:48 GMT
more asdoc


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/afb5796e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/afb5796e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/afb5796e

Branch: refs/heads/develop
Commit: afb5796e2c5406abdc54e479e82aa6f21b93f3cc
Parents: 1facedd
Author: Alex Harui <aharui@apache.org>
Authored: Tue Feb 4 12:28:30 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Wed Feb 5 21:59:30 2014 -0800

----------------------------------------------------------------------
 .../apache/flex/html/staticControls/Button.as   |  2 -
 .../apache/flex/html/staticControls/CheckBox.as | 57 ++++++++++++++-
 .../flex/html/staticControls/Container.as       | 77 +++++++++++++++++++-
 3 files changed, 129 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/afb5796e/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
index 18aa828..8770153 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Button.as
@@ -18,8 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import flash.display.DisplayObject;
-	
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
     import org.apache.flex.core.UIButtonBase;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/afb5796e/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
index ceaf488..175d411 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/CheckBox.as
@@ -18,7 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import flash.display.DisplayObject;
     import flash.events.MouseEvent;
 	
 	import org.apache.flex.core.IToggleButtonModel;
@@ -26,31 +25,83 @@ package org.apache.flex.html.staticControls
 	import org.apache.flex.core.UIButtonBase;
 	import org.apache.flex.events.Event;
 	
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
+    /**
+     *  Dispatched when the user checks or un-checks the CheckBox.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
 	[Event(name="change", type="org.apache.flex.events.Event")]
 
+    /**
+     *  The CheckBox class implements the common user interface
+     *  control.  The CheckBox includes its text label.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
 	public class CheckBox extends UIButtonBase implements IStrand
 	{
-		public function CheckBox(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function CheckBox()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 			
 			addEventListener(MouseEvent.CLICK, internalMouseHandler);
 		}
 		
+        /**
+         *  The text label for the CheckBox.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
 		public function get text():String
 		{
 			return IToggleButtonModel(model).text;
 		}
+        
+        /**
+         *  @private
+         */
 		public function set text(value:String):void
 		{
 			IToggleButtonModel(model).text = value;
 		}
 		
+        /**
+         *  <code>true</code> if the check mark is displayed.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
 		public function get selected():Boolean
 		{
 			return IToggleButtonModel(model).selected;
 		}
 		
+        /**
+         *  @private
+         */
 		public function set selected(value:Boolean):void
 		{
 			IToggleButtonModel(model).selected = value;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/afb5796e/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
index 05a59b1..7859fef 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/Container.as
@@ -27,26 +27,83 @@ package org.apache.flex.html.staticControls
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.events.Event;
 	
-    [Event(name="change", type="org.apache.flex.events.Event")]
-    
 	[DefaultProperty("mxmlContent")]
+    
+    /**
+     *  The Container class implements a basic container of
+     *  other controls and containers.  The position and size
+     *  of the children are determined by a layout or by
+     *  absolute positioning and sizing.  This Container does
+     *  not have a built-in scrollbar or clipping of content
+     *  exceeds its boundaries.
+     * 
+     *  While the container is relatively lightweight, it should
+     *  generally not be used as the base class for other controls,
+     *  even if those controls are composed of children.  That's
+     *  because the fundamental API of Container is to support
+     *  an arbitrary set of children, and most controls only
+     *  support a specific set of children.
+     * 
+     *  And that's one of the advantages of beads: that functionality
+     *  used in a Container can also be used in a Control as long
+     *  as that bead doesn't assume that its strand is a Container.
+     * 
+     *  For example, even though you can use a Panel to create the
+     *  equivalent of an Alert control, the Alert is a 
+     *  control and not a Container because the Alert does not
+     *  support an arbitrary set of children.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
 	public class Container extends UIBase implements IContainer
 	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
 		public function Container()
 		{
 			super();
 			actualParent = this;
 		}
 		
+        /**
+         *  @copy org.apache.flex.core.ViewBase#mxmlContent.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
 		public var mxmlContent:Array;
 
 		private var actualParent:DisplayObjectContainer;
 		
+        /**
+         *  Set a platform-specific object as the actual parent for 
+         *  children.  This must be public so it can be accessed
+         *  by beads.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
 		public function setActualParent(parent:DisplayObjectContainer):void
 		{
 			actualParent = parent;	
 		}
 		
+        /**
+         *  @private
+         */
         override public function getElementIndex(c:Object):int
         {
             if (c is IUIBase)
@@ -55,6 +112,9 @@ package org.apache.flex.html.staticControls
                 return actualParent.getChildIndex(c as DisplayObject);
         }
 
+        /**
+         *  @private
+         */
         override public function addElement(c:Object):void
         {
             if (c is IUIBase)
@@ -78,6 +138,9 @@ package org.apache.flex.html.staticControls
 			}
         }
         
+        /**
+         *  @private
+         */
         override public function addElementAt(c:Object, index:int):void
         {
             if (c is IUIBase)
@@ -100,6 +163,9 @@ package org.apache.flex.html.staticControls
 			}
         }
         
+        /**
+         *  @private
+         */
         override public function removeElement(c:Object):void
         {
             if (c is IUIBase)
@@ -108,6 +174,10 @@ package org.apache.flex.html.staticControls
                 actualParent.removeChild(c as DisplayObject);
         }
         
+        /**
+         *  Get the array of children.  To change the children use
+         *  addElement, removeElement.
+         */
         public function getChildren():Array
 		{
 			var children:Array = [];
@@ -117,6 +187,9 @@ package org.apache.flex.html.staticControls
 			return children;
 		}
 
+        /**
+         *  @private
+         */
 		public function childrenAdded():void
 		{
 			dispatchEvent(new Event("childrenAdded"));


Mime
View raw message