flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Replaced SpinnerModel and SliderModel with RangeModel in Spinner, Slider, and NumericStepper controls. Note that there is an issue currently with the NumericStepper and its Spinner not sharing the same model
Date Fri, 19 Jul 2013 21:12:38 GMT
Updated Branches:
  refs/heads/develop 8dc68bb44 -> dea317257


Replaced SpinnerModel and SliderModel with RangeModel in Spinner, Slider, and NumericStepper
controls. Note that there is an issue currently with the NumericStepper and its Spinner not
sharing the same model.


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

Branch: refs/heads/develop
Commit: dea317257a1fdc80991f5932401e5a3da604dab0
Parents: 8dc68bb
Author: Peter Ent <pent@apache.org>
Authored: Fri Jul 19 17:12:26 2013 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Fri Jul 19 17:12:26 2013 -0400

----------------------------------------------------------------------
 frameworks/as/defaults.css                      |  10 +-
 frameworks/as/src/FlexJSUIClasses.as            |   2 -
 .../as/src/org/apache/flex/core/ISliderModel.as |  37 ------
 .../src/org/apache/flex/core/ISpinnerModel.as   |  43 -------
 .../flex/html/staticControls/NumericStepper.as  |  28 +++--
 .../apache/flex/html/staticControls/Slider.as   |  24 ++--
 .../apache/flex/html/staticControls/Spinner.as  |  28 +++--
 .../staticControls/beads/NumericStepperView.as  |   4 +-
 .../html/staticControls/beads/SliderView.as     |   7 +-
 .../html/staticControls/beads/SpinnerView.as    |   7 +-
 .../beads/controllers/SliderMouseController.as  |  31 ++---
 .../beads/controllers/SpinnerMouseController.as |  15 +--
 .../staticControls/beads/models/SliderModel.as  |  96 --------------
 .../staticControls/beads/models/SpinnerModel.as | 125 -------------------
 14 files changed, 88 insertions(+), 369 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/as/defaults.css b/frameworks/as/defaults.css
index 720d247..91c4a5e 100644
--- a/frameworks/as/defaults.css
+++ b/frameworks/as/defaults.css
@@ -61,7 +61,7 @@ global
 
 Alert
 {
-    iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
+    IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
     IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.AlertView");
     IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.AlertController");
     iBackgroundBead: ClassReference("org.apache.flex.html.staticControls.beads.SolidBackgroundBead");
@@ -133,7 +133,7 @@ List
 
 NumericStepper
 {
-    iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.SpinnerModel");
+    IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.RangeModel");
     IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.NumericStepperView");
     
     padding: 0px;
@@ -174,7 +174,7 @@ ScrollBar
 
 SimpleAlert
 {
-    iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
+    IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.AlertModel");
     IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.SimpleAlertView");
     IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.AlertController");
     iBorderBead: ClassReference("org.apache.flex.html.staticControls.beads.SingleLineBorderBead");
@@ -188,7 +188,7 @@ SimpleAlert
 
 Slider
 {
-    iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.SliderModel");
+    IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.RangeModel");
     iBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.SliderView");
     iBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.SliderMouseController");
     iThumbView: ClassReference("org.apache.flex.html.staticControls.beads.SliderThumbView");
@@ -197,7 +197,7 @@ Slider
 
 Spinner
 {
-    iBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.SpinnerModel");
+    IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.RangeModel");
     IBeadView:  ClassReference("org.apache.flex.html.staticControls.beads.SpinnerView");
     IBeadController: ClassReference("org.apache.flex.html.staticControls.beads.controllers.SpinnerMouseController");
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/FlexJSUIClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/FlexJSUIClasses.as b/frameworks/as/src/FlexJSUIClasses.as
index 0d44c29..ed77401 100644
--- a/frameworks/as/src/FlexJSUIClasses.as
+++ b/frameworks/as/src/FlexJSUIClasses.as
@@ -56,8 +56,6 @@ internal class FlexJSUIClasses
     import org.apache.flex.html.staticControls.beads.models.ArraySelectionModel; ArraySelectionModel;
     import org.apache.flex.html.staticControls.beads.models.ComboBoxModel; ComboBoxModel;
     import org.apache.flex.html.staticControls.beads.models.PanelModel; PanelModel;
-	import org.apache.flex.html.staticControls.beads.models.SliderModel; SliderModel;
-    import org.apache.flex.html.staticControls.beads.models.SpinnerModel; SpinnerModel;
 	import org.apache.flex.html.staticControls.beads.models.TextModel; TextModel;
     import org.apache.flex.html.staticControls.beads.models.TitleBarModel; TitleBarModel;
 	import org.apache.flex.html.staticControls.beads.models.ToggleButtonModel; ToggleButtonModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/core/ISliderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/ISliderModel.as b/frameworks/as/src/org/apache/flex/core/ISliderModel.as
deleted file mode 100644
index e9a0562..0000000
--- a/frameworks/as/src/org/apache/flex/core/ISliderModel.as
+++ /dev/null
@@ -1,37 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
-	import org.apache.flex.events.IEventDispatcher;
-	
-	public interface ISliderModel extends IEventDispatcher, IBeadModel
-	{
-		function get value():Number;
-		function set value(newValue:Number):void;
-		
-		function get minimum():Number;
-		function set minimum(value:Number):void;
-		
-		function get maximum():Number;
-		function set maximum(value:Number):void;
-		
-		function get snapInterval():Number;
-		function set snapInterval(value:Number):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/core/ISpinnerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/core/ISpinnerModel.as b/frameworks/as/src/org/apache/flex/core/ISpinnerModel.as
deleted file mode 100644
index 0f079da..0000000
--- a/frameworks/as/src/org/apache/flex/core/ISpinnerModel.as
+++ /dev/null
@@ -1,43 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.core
-{
-	import org.apache.flex.events.IEventDispatcher;
-	
-	public interface ISpinnerModel extends IEventDispatcher, IBeadModel
-	{
-		function get value():Number;
-		function set value(newValue:Number):void;
-		
-		function get minimum():Number;
-		function set minimum(value:Number):void;
-		
-		function get maximum():Number;
-		function set maximum(value:Number):void;
-		
-		function get stepSize():Number;
-		function set stepSize(value:Number):void;
-		
-		function get allowValueWrap():Boolean;
-		function set allowValueWrap(value:Boolean):void;
-		
-		function get snapInterval():Number;
-		function set snapInterval(value:Number):void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as b/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
index 6341994..f2c2b1c 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/NumericStepper.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import org.apache.flex.core.ISpinnerModel;
+	import org.apache.flex.core.IRangeModel;
 
 	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
 	public class NumericStepper extends Container
@@ -26,51 +26,57 @@ package org.apache.flex.html.staticControls
 		public function NumericStepper()
 		{
 			super();
+			
+			IRangeModel(model).value = 0;
+			IRangeModel(model).minimum = 0;
+			IRangeModel(model).maximum = 100;
+			IRangeModel(model).stepSize = 1;
+			IRangeModel(model).snapInterval = 1;
 		}
 		
 		public function get value():Number
 		{
-			return ISpinnerModel(model).value;
+			return IRangeModel(model).value;
 		}
 		public function set value(newValue:Number):void
 		{
-			ISpinnerModel(model).value = newValue;
+			IRangeModel(model).value = newValue;
 		}
 		
 		public function get minimum():Number
 		{
-			return ISpinnerModel(model).minimum;
+			return IRangeModel(model).minimum;
 		}
 		public function set minimum(value:Number):void
 		{
-			ISpinnerModel(model).minimum = value;
+			IRangeModel(model).minimum = value;
 		}
 		
 		public function get maximum():Number
 		{
-			return ISpinnerModel(model).maximum;
+			return IRangeModel(model).maximum;
 		}
 		public function set maximum(value:Number):void
 		{
-			ISpinnerModel(model).maximum = value;
+			IRangeModel(model).maximum = value;
 		}
 		
 		public function get stepSize():Number
 		{
-			return ISpinnerModel(model).stepSize;
+			return IRangeModel(model).stepSize;
 		}
 		public function set stepSize(value:Number):void
 		{
-			ISpinnerModel(model).stepSize = value;
+			IRangeModel(model).stepSize = value;
 		}
 		
 		public function get snapInterval():Number
 		{
-			return ISpinnerModel(model).snapInterval;
+			return IRangeModel(model).snapInterval;
 		}
 		public function set snapInterval(value:Number):void
 		{
-			ISpinnerModel(model).snapInterval = value;
+			IRangeModel(model).snapInterval = value;
 		}
 		
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/Slider.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Slider.as b/frameworks/as/src/org/apache/flex/html/staticControls/Slider.as
index 09c3b87..47a0db5 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Slider.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Slider.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import org.apache.flex.core.ISliderModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.UIBase;
 	
 	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
@@ -30,42 +30,48 @@ package org.apache.flex.html.staticControls
 			super();
 			
 			className = "Slider";
+			
+			IRangeModel(model).value = 0;
+			IRangeModel(model).minimum = 0;
+			IRangeModel(model).maximum = 100;
+			IRangeModel(model).stepSize = 1;
+			IRangeModel(model).snapInterval = 1;
 		}
 		
 		public function get value():Number
 		{
-			return ISliderModel(model).value;
+			return IRangeModel(model).value;
 		}
 		public function set value(newValue:Number):void
 		{
-			ISliderModel(model).value = newValue;
+			IRangeModel(model).value = newValue;
 		}
 		
 		public function get minimum():Number
 		{
-			return ISliderModel(model).minimum;
+			return IRangeModel(model).minimum;
 		}
 		public function set minimum(value:Number):void
 		{
-			ISliderModel(model).minimum = value;
+			IRangeModel(model).minimum = value;
 		}
 		
 		public function get maximum():Number
 		{
-			return ISliderModel(model).maximum;
+			return IRangeModel(model).maximum;
 		}
 		public function set maximum(value:Number):void
 		{
-			ISliderModel(model).maximum = value;
+			IRangeModel(model).maximum = value;
 		}
 		
 		public function get snapInterval():Number
 		{
-			return ISliderModel(model).snapInterval;
+			return IRangeModel(model).snapInterval;
 		}
 		public function set snapInterval(value:Number):void
 		{
-			ISliderModel(model).snapInterval = value;
+			IRangeModel(model).snapInterval = value;
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as b/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
index ab9dc1d..d11a390 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/Spinner.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls
 {
-	import org.apache.flex.core.ISpinnerModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.UIBase;
 	
 	[Event(name="valueChanged", type="org.apache.flex.events.Event")]
@@ -30,51 +30,57 @@ package org.apache.flex.html.staticControls
 			super();
 			
 			className = "Spinner";
+			
+			IRangeModel(model).value = 0;
+			IRangeModel(model).minimum = 0;
+			IRangeModel(model).maximum = 100;
+			IRangeModel(model).stepSize = 1;
+			IRangeModel(model).snapInterval = 1;
 		}
 		
 		public function get value():Number
 		{
-			return ISpinnerModel(model).value;
+			return IRangeModel(model).value;
 		}
 		public function set value(newValue:Number):void
 		{
-			ISpinnerModel(model).value = newValue;
+			IRangeModel(model).value = newValue;
 		}
 		
 		public function get minimum():Number
 		{
-			return ISpinnerModel(model).minimum;
+			return IRangeModel(model).minimum;
 		}
 		public function set minimum(value:Number):void
 		{
-			ISpinnerModel(model).minimum = value;
+			IRangeModel(model).minimum = value;
 		}
 		
 		public function get maximum():Number
 		{
-			return ISpinnerModel(model).maximum;
+			return IRangeModel(model).maximum;
 		}
 		public function set maximum(value:Number):void
 		{
-			ISpinnerModel(model).maximum = value;
+			IRangeModel(model).maximum = value;
 		}
 		
 		public function get snapInterval():Number
 		{
-			return ISpinnerModel(model).snapInterval;
+			return IRangeModel(model).snapInterval;
 		}
 		public function set snapInterval(value:Number):void
 		{
-			ISpinnerModel(model).snapInterval = value;
+			IRangeModel(model).snapInterval = value;
 		}
 		
 		public function get stepSize():Number
 		{
-			return ISpinnerModel(model).stepSize;
+			return IRangeModel(model).stepSize;
 		}
 		public function set stepSize(value:Number):void
 		{
-			ISpinnerModel(model).stepSize = value;
+			IRangeModel(model).stepSize = value;
 		}
 		
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
index 87b4d35..bbc964b 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/NumericStepperView.as
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html.staticControls.beads
 {
+	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.ISpinnerModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.createjs.staticControls.Label;
@@ -54,7 +54,7 @@ package org.apache.flex.html.staticControls.beads
 			
 			// add a spinner
 			spinner = new Spinner();
-			spinner.addBead( value.getBeadByType(ISpinnerModel) );
+			spinner.addBead( value.getBeadByType(IBeadModel) );
 			spinner.addToParent(value);
 			spinner.width = 17;
 			

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/SliderView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SliderView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SliderView.as
index 476b1ea..2737888 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SliderView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SliderView.as
@@ -21,8 +21,9 @@ package org.apache.flex.html.staticControls.beads
 	import flash.display.DisplayObject;
 	
 	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.ISliderModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
@@ -36,7 +37,7 @@ package org.apache.flex.html.staticControls.beads
 		{
 		}
 		
-		private var sliderModel:ISliderModel;
+		private var rangeModel:IRangeModel;
 		
 		private var _strand:IStrand;
 		public function set strand(value:IStrand):void
@@ -55,7 +56,7 @@ package org.apache.flex.html.staticControls.beads
 			IEventDispatcher(value).addEventListener("widthChanged",sizeChangeHandler);
 			IEventDispatcher(value).addEventListener("heightChanged",sizeChangeHandler);
 			
-			sliderModel = _strand.getBeadByType(ISliderModel) as ISliderModel;
+			rangeModel = _strand.getBeadByType(IBeadModel) as IRangeModel;
 			
 			// set a minimum size to trigger the size change handler
 			var needsSizing:Boolean = true;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
index d9bfc4d..f65e951 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/SpinnerView.as
@@ -20,8 +20,9 @@ package org.apache.flex.html.staticControls.beads
 {
 	import flash.display.DisplayObject;
 	
+	import org.apache.flex.core.IBeadModel;
 	import org.apache.flex.core.IBeadView;
-	import org.apache.flex.core.ISpinnerModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.html.staticControls.Button;
@@ -33,7 +34,7 @@ package org.apache.flex.html.staticControls.beads
 		{
 		}
 		
-		private var spinnerModel:ISpinnerModel;
+		private var rangeModel:IRangeModel;
 		
 		private var _strand:IStrand;
 		public function set strand(value:IStrand):void
@@ -54,7 +55,7 @@ package org.apache.flex.html.staticControls.beads
 			
 			UIBase(_strand).addChild(_decrement);
 			UIBase(_strand).addChild(_increment);
-			spinnerModel = _strand.getBeadByType(ISpinnerModel) as ISpinnerModel;
+			rangeModel = _strand.getBeadByType(IBeadModel) as IRangeModel;
 		}
 		
 		private var _decrement:DisplayObject;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
index 2befc27..2364f21 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SliderMouseController.as
@@ -23,7 +23,8 @@ package org.apache.flex.html.staticControls.beads.controllers
 	
 	import org.apache.flex.core.IBead;
 	import org.apache.flex.core.IBeadController;
-	import org.apache.flex.core.ISliderModel;
+	import org.apache.flex.core.IBeadModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.html.staticControls.beads.ISliderView;
@@ -35,14 +36,14 @@ package org.apache.flex.html.staticControls.beads.controllers
 			trace("SliderMouseController");
 		}
 		
-		private var sliderModel:ISliderModel;
+		private var rangeModel:IRangeModel;
 		
 		private var _strand:IStrand;
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
 			
-			sliderModel = value.getBeadByType(ISliderModel) as ISliderModel;
+			rangeModel = value.getBeadByType(IBeadModel) as IRangeModel;
 			
 			var sliderView:ISliderView = value.getBeadByType(ISliderView) as ISliderView;
 			sliderView.thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbDownHandler);
@@ -53,8 +54,8 @@ package org.apache.flex.html.staticControls.beads.controllers
 		
 		protected function snap(value:Number):Number
 		{
-			var si:Number = sliderModel.snapInterval;
-			var n:Number = Math.round((value - sliderModel.minimum) / si) * si + sliderModel.minimum;
+			var si:Number = rangeModel.snapInterval;
+			var n:Number = Math.round((value - rangeModel.minimum) / si) * si + rangeModel.minimum;
 			if (value > 0)
 			{
 				if (value - n < n + si - value)
@@ -96,17 +97,17 @@ package org.apache.flex.html.staticControls.beads.controllers
 			var newX:Number = thumb.x + deltaX;
 			
 			var p:Number = newX/UIBase(_strand).width;
-			var n:Number = p*(sliderModel.maximum - sliderModel.minimum) + sliderModel.minimum;
+			var n:Number = p*(rangeModel.maximum - rangeModel.minimum) + rangeModel.minimum;
 			n = snap(n);
-			if( n < sliderModel.minimum ) n = sliderModel.minimum;
-			else if( n > sliderModel.maximum ) n = sliderModel.maximum;
+			if( n < rangeModel.minimum ) n = rangeModel.minimum;
+			else if( n > rangeModel.maximum ) n = rangeModel.maximum;
 			
-			p = (n-sliderModel.minimum)/(sliderModel.maximum-sliderModel.minimum);
+			p = (n-rangeModel.minimum)/(rangeModel.maximum-rangeModel.minimum);
 			newX = p*(UIBase(_strand).width);
 			
 			sliderView.thumb.x = newX - sliderView.thumb.width/2;
 			
-			sliderModel.value = n;
+			rangeModel.value = n;
 		}
 		
 		private function trackClickHandler( event:MouseEvent ) : void
@@ -117,16 +118,16 @@ package org.apache.flex.html.staticControls.beads.controllers
 			
 			var xloc:Number = event.localX;
 			var p:Number = xloc/UIBase(_strand).width;
-			var n:Number = p*(sliderModel.maximum - sliderModel.minimum) + sliderModel.minimum;
+			var n:Number = p*(rangeModel.maximum - rangeModel.minimum) + rangeModel.minimum;
 			n = snap(n);
-			if( n < sliderModel.minimum ) n = sliderModel.minimum;
-			else if( n > sliderModel.maximum ) n = sliderModel.maximum;
+			if( n < rangeModel.minimum ) n = rangeModel.minimum;
+			else if( n > rangeModel.maximum ) n = rangeModel.maximum;
 			
-			p = (n-sliderModel.minimum)/(sliderModel.maximum-sliderModel.minimum);
+			p = (n-rangeModel.minimum)/(rangeModel.maximum-rangeModel.minimum);
 			xloc = p*(UIBase(_strand).width);
 			sliderView.thumb.x = xloc - sliderView.thumb.width/2;
 			
-			sliderModel.value = n;
+			rangeModel.value = n;
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
index b383120..606e2f8 100644
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
+++ b/frameworks/as/src/org/apache/flex/html/staticControls/beads/controllers/SpinnerMouseController.as
@@ -21,7 +21,8 @@ package org.apache.flex.html.staticControls.beads.controllers
 	import flash.events.MouseEvent;
 	
 	import org.apache.flex.core.IBeadController;
-	import org.apache.flex.core.ISpinnerModel;
+	import org.apache.flex.core.IBeadModel;
+	import org.apache.flex.core.IRangeModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
@@ -33,14 +34,14 @@ package org.apache.flex.html.staticControls.beads.controllers
 		{
 		}
 		
-		private var spinnerModel:ISpinnerModel;
+		private var rangeModel:IRangeModel;
 		
 		private var _strand:IStrand;
 		public function set strand(value:IStrand):void
 		{
 			_strand = value;
 			
-			spinnerModel = value.getBeadByType(ISpinnerModel) as ISpinnerModel;
+			rangeModel = value.getBeadByType(IBeadModel) as IRangeModel;
 			
 			var spinnerBead:ISpinnerView = value.getBeadByType(ISpinnerView) as ISpinnerView;
 			spinnerBead.decrement.addEventListener(MouseEvent.CLICK, decrementClickHandler);
@@ -51,8 +52,8 @@ package org.apache.flex.html.staticControls.beads.controllers
 		
 		protected function snap(value:Number):Number
 		{
-			var si:Number = spinnerModel.snapInterval;
-			var n:Number = Math.round((value - spinnerModel.minimum) / si) * si + spinnerModel.minimum;
+			var si:Number = rangeModel.snapInterval;
+			var n:Number = Math.round((value - rangeModel.minimum) / si) * si + rangeModel.minimum;
 			if (value > 0)
 			{
 				if (value - n < n + si - value)
@@ -67,13 +68,13 @@ package org.apache.flex.html.staticControls.beads.controllers
 		
 		private function decrementClickHandler( event:Event ) : void
 		{
-			spinnerModel.value = snap(Math.max(spinnerModel.minimum, spinnerModel.value - spinnerModel.stepSize));
+			rangeModel.value = snap(Math.max(rangeModel.minimum, rangeModel.value - rangeModel.stepSize));
 			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
 		}
 		
 		private function incrementClickHandler( event:Event ) : void
 		{
-			spinnerModel.value = snap(Math.min(spinnerModel.maximum, spinnerModel.value + spinnerModel.stepSize));

+			rangeModel.value = snap(Math.min(rangeModel.maximum, rangeModel.value + rangeModel.stepSize));

 			IEventDispatcher(_strand).dispatchEvent(new Event("valueChanged"));
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SliderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SliderModel.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SliderModel.as
deleted file mode 100644
index d6e28d4..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SliderModel.as
+++ /dev/null
@@ -1,96 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.staticControls.beads.models
-{
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.ISliderModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.EventDispatcher;
-	
-	public class SliderModel extends EventDispatcher implements ISliderModel, IBead
-	{
-		public function SliderModel()
-		{
-			super();
-		}
-		
-		private var _value:Number = 0;
-		public function get value():Number
-		{
-			return _value;
-		}
-		
-		public function set value(newValue:Number):void
-		{
-			if( newValue != _value ) {
-				_value = newValue;
-				dispatchEvent( new Event("valueChanged") );
-			}
-		}
-		
-		private var _minimum:Number = 0
-		public function get minimum():Number
-		{
-			return _minimum;
-		}
-		
-		public function set minimum(value:Number):void
-		{
-			if( value != _minimum ) {
-				_minimum = value;
-				dispatchEvent( new Event("minimumChanged") );
-			}
-		}
-		
-		private var _maximum:Number = 10;
-		public function get maximum():Number
-		{
-			return _maximum;
-		}
-		
-		public function set maximum(value:Number):void
-		{
-			if( value != _maximum ) {
-				_maximum = value;
-				dispatchEvent( new Event("maximumChanged") );
-			}
-		}
-		
-		private var _snapInterval:Number = 1;
-		public function get snapInterval():Number
-		{
-			return _snapInterval;
-		}
-		
-		public function set snapInterval(value:Number):void
-		{
-			if( value != _snapInterval ) {
-				_snapInterval = value;
-				dispatchEvent( new Event("snapIntervalChanged") );
-			}
-		}
-		
-		private var _strand:IStrand;
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/dea31725/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SpinnerModel.as
----------------------------------------------------------------------
diff --git a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SpinnerModel.as
b/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SpinnerModel.as
deleted file mode 100644
index 6ea266b..0000000
--- a/frameworks/as/src/org/apache/flex/html/staticControls/beads/models/SpinnerModel.as
+++ /dev/null
@@ -1,125 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.html.staticControls.beads.models
-{
-	import org.apache.flex.core.IBead;
-	import org.apache.flex.core.ISpinnerModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.EventDispatcher;
-	
-	public class SpinnerModel extends EventDispatcher implements ISpinnerModel, IBead
-	{
-		public function SpinnerModel()
-		{
-			super();
-		}
-		
-		private var _value:Number = 0;
-		public function get value():Number
-		{
-			return _value;
-		}
-		
-		public function set value(newValue:Number):void
-		{
-			if( newValue != _value ) {
-				_value = newValue;
-				dispatchEvent( new Event("valueChanged") );
-				trace("Spinner value is " + newValue);
-			}
-		}
-		
-		private var _minimum:Number = 0
-		public function get minimum():Number
-		{
-			return _minimum;
-		}
-		
-		public function set minimum(value:Number):void
-		{
-			if( value != _minimum ) {
-				_minimum = value;
-				dispatchEvent( new Event("minimumChanged") );
-			}
-		}
-		
-		private var _maximum:Number = 10;
-		public function get maximum():Number
-		{
-			return _maximum;
-		}
-		
-		public function set maximum(value:Number):void
-		{
-			if( value != _maximum ) {
-				_maximum = value;
-				dispatchEvent( new Event("maximumChanged") );
-			}
-		}
-		
-		private var _stepSize:Number = 1;
-		public function get stepSize():Number
-		{
-			return _stepSize;
-		}
-		
-		public function set stepSize(value:Number):void
-		{
-			if( value != _stepSize ) {
-				_stepSize = value;
-				dispatchEvent( new Event("stepSizeChanged") );
-			}
-		}
-		
-		private var _allowValueWrap:Boolean = false;
-		public function get allowValueWrap():Boolean
-		{
-			return _allowValueWrap;
-		}
-		
-		public function set allowValueWrap(value:Boolean):void
-		{
-			if( value != _allowValueWrap ) {
-				_allowValueWrap = value;
-				dispatchEvent( new Event("valueWrapChanged") );
-			}
-		}
-		
-		private var _snapInterval:Number = 1;
-		public function get snapInterval():Number
-		{
-			return _snapInterval;
-		}
-		
-		public function set snapInterval(value:Number):void
-		{
-			if( value != _snapInterval ) {
-				_snapInterval = value;
-				dispatchEvent( new Event("snapIntervalChanged") );
-			}
-		}
-		
-		private var _strand:IStrand;
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-		}
-	}
-}
\ No newline at end of file


Mime
View raw message