flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject [18/23] git commit: [flex-asjs] [refs/heads/develop] - FLEX-35328 - Change IDataFieldProviderModel to bead DataFieldProviderBead
Date Thu, 29 Jun 2017 19:22:54 GMT
FLEX-35328 - Change IDataFieldProviderModel to bead DataFieldProviderBead


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

Branch: refs/heads/develop
Commit: eaa33ea5b77b936d2b137978aabb6871424d63e0
Parents: 141b10b
Author: piotrz <piotrz@apache.org>
Authored: Sun Jun 25 19:24:37 2017 +0200
Committer: piotrz <piotrz@apache.org>
Committed: Sun Jun 25 19:24:37 2017 +0200

----------------------------------------------------------------------
 .../Basic/src/main/flex/BasicClasses.as         |  1 -
 .../flex/html/beads/DataFieldProviderBead.as    | 89 +++++++++++++++++++
 .../DataItemRendererFactoryForArrayData.as      |  9 +-
 .../DataItemRendererFactoryForArrayList.as      |  9 +-
 .../html/beads/models/DataFieldProviderModel.as | 91 --------------------
 .../Basic/src/main/resources/basic-manifest.xml |  1 +
 .../projects/Core/src/main/flex/CoreClasses.as  |  1 -
 .../apache/flex/core/IDataFieldProviderModel.as | 47 ----------
 8 files changed, 98 insertions(+), 150 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/flex/BasicClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/BasicClasses.as b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
index 7203474..6c44dc8 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -213,7 +213,6 @@ internal class BasicClasses
 	import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
 
     import org.apache.flex.html.beads.models.DataProviderModel; DataProviderModel;
-    import org.apache.flex.html.beads.models.DataFieldProviderModel; DataFieldProviderModel;
 	import org.apache.flex.html.beads.DataContainerView; DataContainerView;
 
 	COMPILE::SWF

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataFieldProviderBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataFieldProviderBead.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataFieldProviderBead.as
new file mode 100644
index 0000000..4d5fd0a
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataFieldProviderBead.as
@@ -0,0 +1,89 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.beads
+{
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+    import org.apache.flex.core.IBead;
+
+    /**
+     *  The DataFieldProviderBead class is a model that holds dataField used mostly
+	 *  in item renderers for retrieve some value from dataProvider items.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.9
+     */
+	public class DataFieldProviderBead implements IBead
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.9
+         */
+		public function DataFieldProviderBead()
+		{
+		}
+
+		private var _strand:IStrand;
+		
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.9
+         */
+		public function set strand(value:IStrand):void
+		{
+			_strand = value;
+		}
+
+		private var _dataField:String = null;
+		
+        /**
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.9
+         */
+		public function get dataField():String
+		{
+			return _dataField;
+		}
+
+        /**
+         *  @private
+         */
+		public function set dataField(value:String):void
+		{
+			if (value != _dataField)
+			{
+                _dataField = value;
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
index 36754da..377aed3 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayData.as
@@ -25,7 +25,6 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IListPresentationModel;
 	import org.apache.flex.core.ISelectableItemRenderer;
 	import org.apache.flex.core.IDataProviderModel;
-    import org.apache.flex.core.IDataFieldProviderModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
 	import org.apache.flex.core.SimpleCSSStyles;
@@ -73,7 +72,7 @@ package org.apache.flex.html.beads
 		}
 
 		protected var dataProviderModel:IDataProviderModel;
-		protected var dataFieldProviderModel:IDataFieldProviderModel;
+		protected var dataFieldProvider:DataFieldProviderBead;
 		
 		protected var labelField:String;
         protected var dataField:String;
@@ -103,10 +102,10 @@ package org.apache.flex.html.beads
 			dataProviderModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
 			labelField = dataProviderModel.labelField;
 
-            dataFieldProviderModel = _strand.getBeadByType(IDataFieldProviderModel) as IDataFieldProviderModel;
-			if (dataFieldProviderModel)
+            dataFieldProvider = _strand.getBeadByType(DataFieldProviderBead) as DataFieldProviderBead;
+			if (dataFieldProvider)
             {
-                dataField = dataFieldProviderModel.dataField;
+                dataField = dataFieldProvider.dataField;
             }
 
 			// if the host component inherits from DataContainerBase, the itemRendererClassFactory
will 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayList.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayList.as
index b55571b..63763f0 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayList.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DataItemRendererFactoryForArrayList.as
@@ -25,7 +25,6 @@ package org.apache.flex.html.beads
 	import org.apache.flex.core.IItemRendererParent;
 	import org.apache.flex.core.IListPresentationModel;
 	import org.apache.flex.core.ISelectableItemRenderer;
-    import org.apache.flex.core.IDataFieldProviderModel;
 	import org.apache.flex.core.IDataProviderModel;
 	import org.apache.flex.core.IStrand;
 	import org.apache.flex.core.IUIBase;
@@ -71,7 +70,7 @@ package org.apache.flex.html.beads
 		}
 		
 		protected var dataProviderModel:IDataProviderModel;
-        protected var dataFieldProviderModel:IDataFieldProviderModel;
+        protected var dataFieldProvider:DataFieldProviderBead;
 
 		protected var labelField:String;
 		protected var dataField:String;
@@ -98,10 +97,10 @@ package org.apache.flex.html.beads
 			dataProviderModel.addEventListener("dataProviderChanged", dataProviderChangeHandler);
 			labelField = dataProviderModel.labelField;
 
-            dataFieldProviderModel = _strand.getBeadByType(IDataFieldProviderModel) as IDataFieldProviderModel;
-            if (dataFieldProviderModel)
+            dataFieldProvider = _strand.getBeadByType(DataFieldProviderBead) as DataFieldProviderBead;
+            if (dataFieldProvider)
             {
-                dataField = dataFieldProviderModel.dataField;
+                dataField = dataFieldProvider.dataField;
             }
 
 			// if the host component inherits from DataContainerBase, the itemRendererClassFactory
will 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DataFieldProviderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DataFieldProviderModel.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DataFieldProviderModel.as
deleted file mode 100644
index 8a33273..0000000
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DataFieldProviderModel.as
+++ /dev/null
@@ -1,91 +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.beads.models
-{
-	import org.apache.flex.core.IDataFieldProviderModel;
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.EventDispatcher;
-			
-    /**
-     *  The DataFieldProviderModel class is a model that holds dataField used mostly
-	 *  in item renderers for retrieve some value from dataProvider items.
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.9
-     */
-	public class DataFieldProviderModel extends EventDispatcher implements IDataFieldProviderModel
-	{
-        /**
-         *  Constructor.
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.9
-         */
-		public function DataFieldProviderModel()
-		{
-		}
-
-		private var _strand:IStrand;
-		
-        /**
-         *  @copy org.apache.flex.core.IBead#strand
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.9
-         */
-		public function set strand(value:IStrand):void
-		{
-			_strand = value;
-		}
-
-		private var _dataField:String = null;
-		
-        /**
-         *  @copy org.apache.flex.core.IDataFieldProviderModel#dataField
-         *  
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.9
-         */
-		public function get dataField():String
-		{
-			return _dataField;
-		}
-
-        /**
-         *  @private
-         */
-		public function set dataField(value:String):void
-		{
-			if (value != _dataField)
-			{
-                _dataField = value;
-				dispatchEvent(new Event("labelFieldChanged"));
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
index 4bc09fa..f44cef3 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -96,6 +96,7 @@
     <component id="DateItemRenderer" class="org.apache.flex.html.supportClasses.DateItemRenderer"/>
     <component id="DayNameItemRenderer" class="org.apache.flex.html.supportClasses.DayNameItemRenderer"/>
     <component id="TextButtonItemRenderer" class="org.apache.flex.html.supportClasses.TextButtonItemRenderer"/>
+    <component id="DataFieldProviderBead" class="org.apache.flex.html.beads.DataFieldProviderBead"/>
     <!--
      <component id="TextFieldItemRenderer" class="org.apache.flex.html.supportClasses.TextFieldItemRenderer"/>
      <component id="HScrollBar" class="org.apache.flex.html.supportClasses.HScrollBar"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index 2ac3b49..11b8b8b 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -96,7 +96,6 @@ internal class CoreClasses
 	}
     import org.apache.flex.core.ISelectableItemRenderer; ISelectableItemRenderer;
     import org.apache.flex.core.ISelectionModel; ISelectionModel;
-	import org.apache.flex.core.IDataFieldProviderModel; IDataFieldProviderModel;
     import org.apache.flex.core.IStrand; IStrand;
 	import org.apache.flex.core.IStrandPrivate; IStrandPrivate;
     import org.apache.flex.core.IStrandWithModel; IStrandWithModel;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaa33ea5/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataFieldProviderModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataFieldProviderModel.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataFieldProviderModel.as
deleted file mode 100644
index deed144..0000000
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IDataFieldProviderModel.as
+++ /dev/null
@@ -1,47 +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;
-
-    /**
-     *  The IDataFieldProviderModel interface describes the minimum set of properties
-     *  available to control that let the user choose "dataField" from within a
-     *  set of items in a dataProvider.
-     * 
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.6
-     *  @productversion FlexJS 0.9
-     */
-	public interface IDataFieldProviderModel extends IEventDispatcher, IBeadModel
-	{
-        /**
-         *  The property on the data item that the item renderer
-         *  should renderer.
-         * 
-         *  @langversion 3.0
-         *  @playerversion Flash 10.2
-         *  @playerversion AIR 2.6
-         *  @productversion FlexJS 0.9
-         */
-		function get dataField():String;
-		function set dataField(value:String):void;
-	}
-}


Mime
View raw message