flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [3/3] git commit: [flex-asjs] [refs/heads/develop] - remove constructor args from Button
Date Tue, 04 Feb 2014 18:51:27 GMT
remove constructor args from Button


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

Branch: refs/heads/develop
Commit: 0053fff98d7670be7246471701b9fcc7588fcfe2
Parents: 86d62f1
Author: Alex Harui <aharui@apache.org>
Authored: Tue Feb 4 10:49:14 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Feb 4 10:49:31 2014 -0800

----------------------------------------------------------------------
 .../flex/createjs/staticControls/TextButton.as  |  6 +--
 .../apache/flex/html/staticControls/Button.as   | 43 +++++++++++++++++++-
 .../flex/html/staticControls/TextButton.as      |  6 +--
 .../apache/flex/html/staticControls/TitleBar.as |  6 ++-
 .../html/staticControls/beads/ComboBoxView.as   |  5 ++-
 .../flex/html5/staticControls/TextButton.as     |  6 +--
 .../flex/jquery/staticControls/TextButton.as    |  6 +--
 .../flex/svg/staticControls/TextButton.as       |  6 +--
 8 files changed, 60 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/staticControls/TextButton.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/staticControls/TextButton.as
index 6764b22..3ad2e66 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/staticControls/TextButton.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/createjs/staticControls/TextButton.as
@@ -18,16 +18,14 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.createjs.staticControls
 {
-	import flash.display.DisplayObject;
-
 	import org.apache.flex.core.ITextModel;
 	import org.apache.flex.html.staticControls.Button;
 	
 	public class TextButton extends Button
 	{
-		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+		public function TextButton()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}
 		
 		public function get text():String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/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 ce28dc5..18aa828 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
@@ -25,13 +25,52 @@ package org.apache.flex.html.staticControls
     import org.apache.flex.core.UIButtonBase;
 	import org.apache.flex.events.IEventDispatcher;
 	
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
+    /**
+     *  Dispatched when the user clicks on a button.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
 	[Event(name="click", type="org.apache.flex.events.Event")]
 
+    /**
+     *  The Button class is a simple button.  Use TextButton for
+     *  buttons that should show text.  This is the lightest weight
+     *  button used for non-text buttons like the arrow buttons
+     *  in a Scrollbar or NumericStepper.
+     * 
+     *  The most common view for this button is CSSButtonView that
+     *  allows you to specify a backgroundImage in CSS that defines
+     *  the look of the button.
+     * 
+     *  However, when used in ScrollBar and when composed in many
+     *  other components, it is more common to assign a custom view
+     *  to the button.  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
 	public class Button extends UIButtonBase implements IStrand, IEventDispatcher, IUIBase
 	{
-		public function Button(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 Button()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
index 425af1e..5db9916 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TextButton.as
@@ -18,15 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import flash.display.DisplayObject;
-	
 	import org.apache.flex.core.ITextModel;
 	
 	public class TextButton extends Button
 	{
-		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+		public function TextButton()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}
 		
 		public function get text():String

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
index 574a5a8..d66d230 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/TitleBar.as
@@ -221,7 +221,11 @@ package org.apache.flex.html.staticControls
 			hitArea.graphics.drawRect(0, 0, 11, 11);
 			hitArea.graphics.endFill();
 			
-			var button:Button = new Button(upState, overState, downState, hitArea);
+			var button:Button = new Button();
+            button.upState = upState;
+            button.overState = overState;
+            button.downState = downState;
+            button.hitTestState = hitArea;
 			button.visible = showCloseButton;
 			
 			button.addEventListener('click',closeButtonHandler);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
index 3aad763..8fa0ffa 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html/staticControls/beads/ComboBoxView.as
@@ -123,7 +123,10 @@ package org.apache.flex.html.staticControls.beads
 			downSprite = new Sprite();
 			drawButton( downSprite, "down", 18, 18 );
 			
-			button = new Button( upSprite, overSprite, downSprite );
+			button = new Button();
+            button.upState = upSprite;
+            button.overState = overSprite;
+            button.downState = downSprite;
 			DisplayObjectContainer(strand).addChild(button);
 			button.width = 18;
 			button.height = 18;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html5/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html5/staticControls/TextButton.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html5/staticControls/TextButton.as
index 6c87ea4..d23ffb7 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html5/staticControls/TextButton.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/html5/staticControls/TextButton.as
@@ -18,15 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html5.staticControls
 {
-	import flash.display.DisplayObject;
-	
 	import org.apache.flex.html.staticControls.TextButton;
 	
 	public class TextButton extends org.apache.flex.html.staticControls.TextButton
 	{
-		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+		public function TextButton()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/jquery/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/jquery/staticControls/TextButton.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/jquery/staticControls/TextButton.as
index c2632f3..fb78c83 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/jquery/staticControls/TextButton.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/jquery/staticControls/TextButton.as
@@ -18,15 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.jquery.staticControls
 {
-	import flash.display.DisplayObject;
-	
 	import org.apache.flex.html.staticControls.TextButton;
 	
 	public class TextButton extends org.apache.flex.html.staticControls.TextButton
 	{
-		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+		public function TextButton()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0053fff9/frameworks/as/projects/FlexJSUI/src/org/apache/flex/svg/staticControls/TextButton.as
----------------------------------------------------------------------
diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/svg/staticControls/TextButton.as
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/svg/staticControls/TextButton.as
index a493e31..bb278bf 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/svg/staticControls/TextButton.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/svg/staticControls/TextButton.as
@@ -18,15 +18,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.svg.staticControls
 {
-	import flash.display.DisplayObject;
-	
 	import org.apache.flex.html.staticControls.TextButton;
 	
 	public class TextButton extends org.apache.flex.html.staticControls.TextButton
 	{
-		public function TextButton(upState:DisplayObject=null, overState:DisplayObject=null, downState:DisplayObject=null,
hitTestState:DisplayObject=null)
+		public function TextButton()
 		{
-			super(upState, overState, downState, hitTestState);
+			super();
 		}
 	}
 }
\ No newline at end of file


Mime
View raw message