flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - use a subclass so we don't have to bring in DG classes in a class selector. Class selectors do not get pruned from the .css file, only Type selectors do
Date Fri, 23 Sep 2016 04:14:20 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop c1682af60 -> fd05c9612


use a subclass so we don't have to bring in DG classes in a class selector.  Class selectors
do not get pruned from the .css file, only Type selectors do


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

Branch: refs/heads/develop
Commit: fd05c96129a1a553acf0c902f5bdf4aa0cb21483
Parents: c1682af
Author: Alex Harui <aharui@apache.org>
Authored: Thu Sep 22 21:14:01 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Sep 22 21:14:10 2016 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/DataGridView.as  | 13 ++---
 .../html/supportClasses/DataGridColumnList.as   | 61 ++++++++++++++++++++
 .../HTML/src/main/resources/basic-manifest.xml  |  1 +
 .../HTML/src/main/resources/defaults.css        |  2 +-
 4 files changed, 69 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd05c961/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
index 73e6af7..be81545 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/DataGridView.as
@@ -32,12 +32,12 @@ package org.apache.flex.html.beads
 	import org.apache.flex.events.IEventDispatcher;
 	import org.apache.flex.html.DataGridButtonBar;
 	import org.apache.flex.html.Container;
-	import org.apache.flex.html.List;
 	import org.apache.flex.html.beads.layouts.ButtonBarLayout;
 	import org.apache.flex.html.beads.layouts.VerticalLayout;
 	import org.apache.flex.html.beads.models.ArraySelectionModel;
 	import org.apache.flex.html.beads.models.DataGridPresentationModel;
 	import org.apache.flex.html.supportClasses.DataGridColumn;
+	import org.apache.flex.html.supportClasses.DataGridColumnList;
 	import org.apache.flex.html.supportClasses.ScrollingViewport;
 	import org.apache.flex.html.supportClasses.Viewport;
 
@@ -202,7 +202,7 @@ package org.apache.flex.html.beads
 				var xpos:Number = 0;
 				var listWidth:Number = host.width / _lists.length;
 				for (var i:int=0; i < _lists.length; i++) {
-					var list:List = _lists[i] as List;
+					var list:DataGridColumnList = _lists[i] as DataGridColumnList;
 					list.x = xpos;
 					list.y = 0;
 
@@ -229,7 +229,7 @@ package org.apache.flex.html.beads
 
 			for (var i:int=0; i < _lists.length; i++)
 			{
-				var list:List = _lists[i] as List;
+				var list:DataGridColumnList = _lists[i] as DataGridColumnList;
 				var listModel:ISelectionModel = list.getBeadByType(IBeadModel) as ISelectionModel;
 				listModel.dataProvider = sharedModel.dataProvider;
 			}
@@ -243,12 +243,12 @@ package org.apache.flex.html.beads
 		private function handleColumnListChange(event:Event):void
 		{
 			var sharedModel:IDataGridModel = _strand.getBeadByType(IBeadModel) as IDataGridModel;
-			var list:List = event.target as List;
+			var list:DataGridColumnList = event.target as DataGridColumnList;
 			sharedModel.selectedIndex = list.selectedIndex;
 
 			for(var i:int=0; i < _lists.length; i++) {
 				if (list != _lists[i]) {
-					var otherList:List = _lists[i] as List;
+					var otherList:DataGridColumnList = _lists[i] as DataGridColumnList;
 					otherList.selectedIndex = list.selectedIndex;
 				}
 			}
@@ -270,9 +270,8 @@ package org.apache.flex.html.beads
 			for (var i:int=0; i < sharedModel.columns.length; i++) {
 				var dataGridColumn:DataGridColumn = sharedModel.columns[i] as DataGridColumn;
 
-				var list:List = new List();
+				var list:DataGridColumnList = new DataGridColumnList();
 				list.id = "dataGridColumn"+String(i);
-				list.className = "DataGridColumn";
 				list.addBead(sharedModel);
 				list.itemRenderer = dataGridColumn.itemRenderer;
 				list.labelField = dataGridColumn.dataField;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd05c961/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridColumnList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridColumnList.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridColumnList.as
new file mode 100644
index 0000000..bb0fa65
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataGridColumnList.as
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.supportClasses
+{
+    import org.apache.flex.html.List;
+    
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
+    /**
+     *  @copy org.apache.flex.core.ISelectionModel#change
+     *  
+     *  @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 DataGridColumnList class is the List class used internally
+     *  by DataGrid for each column.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public class DataGridColumnList extends List
+	{
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		public function DataGridColumnList()
+		{
+			super();
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd05c961/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
index ef80984..4fef715 100644
--- a/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/basic-manifest.xml
@@ -93,6 +93,7 @@
     <component id="DataGridButtonBarTextButton" class="org.apache.flex.html.DataGridButtonBarTextButton"/>
     <component id="DataGridColumn" class="org.apache.flex.html.supportClasses.DataGridColumn"/>
     <component id="DataGridLinesBead" class="org.apache.flex.html.beads.DataGridLinesBead"/>
+    <component id="DataGridColumnList" class="org.apache.flex.html.supportClasses.DataGridColumnList"/>
     
     <component id="DataItemRendererFactoryForArrayData" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayData"
/>
     <component id="DataItemRendererFactoryForArrayList" class="org.apache.flex.html.beads.DataItemRendererFactoryForArrayList"
/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fd05c961/frameworks/projects/HTML/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/resources/defaults.css b/frameworks/projects/HTML/src/main/resources/defaults.css
index 2610e53..dd9bf27 100644
--- a/frameworks/projects/HTML/src/main/resources/defaults.css
+++ b/frameworks/projects/HTML/src/main/resources/defaults.css
@@ -131,7 +131,7 @@ DataGridButtonBar
 	border-style: none;
 }
 
-.DataGridColumn {
+DataGridColumnList {
 	IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataGridModel");
 	IBeadView:  ClassReference("org.apache.flex.html.beads.ListView");			
 	IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ListSingleSelectionMouseController");


Mime
View raw message