flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/50] [abbrv] git commit: [flex-asjs] [refs/heads/dual] - replicate 2053d408b467f7eaf7acff7f051a9882ec58c5ad to Basic
Date Thu, 09 Feb 2017 05:44:57 GMT
replicate 2053d408b467f7eaf7acff7f051a9882ec58c5ad to Basic


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

Branch: refs/heads/dual
Commit: 803278f36c2e5620554906ed0b464485a0b486b4
Parents: 3b51a32
Author: Alex Harui <aharui@apache.org>
Authored: Sun Feb 5 21:59:12 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Sun Feb 5 21:59:12 2017 -0800

----------------------------------------------------------------------
 .../Basic/src/main/flex/BasicClasses.as         |  1 +
 .../apache/flex/html/beads/DateChooserView.as   | 99 ++++++--------------
 .../controllers/DateChooserMouseController.as   | 23 +----
 .../flex/html/beads/models/DateChooserModel.as  |  6 +-
 .../html/supportClasses/DateChooserHeader.as    | 66 +++++++++++++
 .../html/supportClasses/DateItemRenderer.as     | 90 ++++++++++++++++++
 .../html/supportClasses/DayNameItemRenderer.as  | 85 +++++++++++++++++
 .../html/supportClasses/StringItemRenderer.as   |  2 +-
 .../Basic/src/main/resources/basic-manifest.xml |  4 +
 .../Basic/src/main/resources/defaults.css       | 65 ++++++++++---
 .../html/supportClasses/DateChooserHeader.as    | 66 -------------
 .../html/supportClasses/DateItemRenderer.as     | 90 ------------------
 .../html/supportClasses/DayNameItemRenderer.as  | 85 -----------------
 13 files changed, 335 insertions(+), 347 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/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 c4efe4d..87997cc 100644
--- a/frameworks/projects/Basic/src/main/flex/BasicClasses.as
+++ b/frameworks/projects/Basic/src/main/flex/BasicClasses.as
@@ -173,6 +173,7 @@ internal class BasicClasses
 	import org.apache.flex.html.supportClasses.DateChooserButton; DateChooserButton;
 	import org.apache.flex.html.supportClasses.DateHeaderButton; DateHeaderButton;
     import org.apache.flex.html.supportClasses.DateChooserList; DateChooserList;
+    import org.apache.flex.html.supportClasses.DateItemRenderer; DateItemRenderer;
 	import org.apache.flex.html.supportClasses.GraphicsItemRenderer; GraphicsItemRenderer;
 
     import org.apache.flex.html.beads.TitleBarView; TitleBarView;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
index 61a7d4a..ec3e0d0 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/DateChooserView.as
@@ -30,9 +30,11 @@ package org.apache.flex.html.beads
 	import org.apache.flex.html.Container;
     import org.apache.flex.html.List;
 	import org.apache.flex.html.TextButton;
+    import org.apache.flex.html.beads.layouts.HorizontalLayout;
 	import org.apache.flex.html.beads.layouts.TileLayout;
 	import org.apache.flex.html.beads.models.DateChooserModel;
 	import org.apache.flex.html.supportClasses.DateHeaderButton;
+    import org.apache.flex.html.supportClasses.DateChooserHeader;
     import org.apache.flex.html.supportClasses.DateChooserList;
     
 	/**
@@ -77,8 +79,11 @@ package org.apache.flex.html.beads
 		private var _prevMonthButton:DateHeaderButton;
 		private var _nextMonthButton:DateHeaderButton;
 		private var monthLabel:DateHeaderButton;
-        private var daysContainer:List;
+        private var dayNamesContainer:DateChooserHeader;
+        private var daysContainer:DateChooserList;
+        
         private var _dayNames:Array;
+        private var _days:Array;
         
 		/**
 		 *  The button that causes the previous month to be displayed by the DateChooser.
@@ -111,14 +116,6 @@ package org.apache.flex.html.beads
             return daysContainer;
         }
             
-		/**
-		 * The array of DateChooserButton instances that represent each day of the month.
-		 */
-		public function get dayNames():Array
-		{
-			return _dayNames;
-		}
-
 		private function handleSizeChange(event:Event):void
 		{
 			layoutContents();
@@ -147,19 +144,17 @@ package org.apache.flex.html.beads
 			monthLabel.height = 20;
 			UIBase(_strand).addElement(monthLabel);
 
+            dayNamesContainer = new DateChooserHeader();
+            UIBase(_strand).addElement(dayNamesContainer, false);
+            
             daysContainer = new DateChooserList();
             UIBase(_strand).addElement(daysContainer, false);
             
-            //tileLayout.numColumns = 7;
             _dayNames = new Array();
             
 			// the calendar has 7 columns with 6 rows, the first row are the day names
 			for(var i:int=0; i < 7; i++) {
-                dayNames.push(model.dayNames[i]);
-			}
-
-			for(i=0; i < 42; i++) {
-                dayNames.push(String(i+1));
+                _dayNames.push(model.dayNames[i]);
 			}
 
 			IEventDispatcher(daysContainer).dispatchEvent( new Event("itemsCreated") );
@@ -182,16 +177,18 @@ package org.apache.flex.html.beads
             monthLabel.y = 0;
             monthLabel.width = sw - _prevMonthButton.width - _nextMonthButton.width;
             
-            daysContainer.x = 0;
-            daysContainer.y = monthLabel.y + monthLabel.height + 4;
-            daysContainer.width = sw;
-            daysContainer.height = sh - (monthLabel.height+5);
+            dayNamesContainer.x = 0;
+            dayNamesContainer.y = monthLabel.y + monthLabel.height;
+            dayNamesContainer.width = sw;
+            dayNamesContainer.height = monthLabel.height;
             
-            daysContainer.dataProvider = dayNames;
+            dayNamesContainer.dataProvider = _dayNames;
             
-            COMPILE::SWF {
-                displayBackgroundAndBorder(_strand as UIBase);
-            }
+            daysContainer.x = 0;
+            daysContainer.y = dayNamesContainer.y + dayNamesContainer.height;
+            daysContainer.width = sw;
+            daysContainer.height = sh - monthLabel.height - dayNamesContainer.height;
+            daysContainer.dataProvider = _days;
                 
             IEventDispatcher(_strand).dispatchEvent( new Event("layoutNeeded") );
             IEventDispatcher(daysContainer).dispatchEvent( new Event("layoutNeeded") );
@@ -208,27 +205,26 @@ package org.apache.flex.html.beads
 
 			var firstDay:Date = new Date(model.displayedYear,model.displayedMonth,1);
 
+            _days = new Array(42);
+            
 			// blank out the labels for the first firstDay.day-1 entries.
 			for(var i:int=0; i < firstDay.getDay(); i++) {
-                dayNames[i+7] = "";
+                _days[i] = null;
             }
 
-			// flag today
-			var today:Date = new Date();
-
 			// renumber to the last day of the month
 			var dayNumber:int = 1;
 			var numDays:Number = numberOfDaysInMonth(model.displayedMonth, model.displayedYear);
 
-            for(; i < dayNames.length-7 && dayNumber <= numDays; i++) {
-                dayNames[i+7] = String(dayNumber++);
-			}
+            for(; i < _days.length && dayNumber <= numDays; i++) {
+                _days[i] = new Date(model.displayedYear, model.displayedMonth, dayNumber++);
+            }
 
 			// blank out the rest
-            for(; i < dayNames.length-7; i++) {
-                dayNames[i+7] = "";			
+            for(; i < _days.length; i++) {
+                _days[i] = null;
             }
-            daysContainer.dataProvider = dayNames;
+            daysContainer.dataProvider = _days;
 		}
 
 		/**
@@ -263,42 +259,5 @@ package org.apache.flex.html.beads
 			updateCalendar();
 		}
 		
-		/**
-		 * @private
-		 */
-		COMPILE::SWF
-		protected function displayBackgroundAndBorder(host:UIBase) : void
-		{
-			var backgroundColor:Object = ValuesManager.valuesImpl.getValue(host, "background-color");
-			var backgroundImage:Object = ValuesManager.valuesImpl.getValue(host, "background-image");
-			if (backgroundColor != null || backgroundImage != null)
-			{
-				if (host.getBeadByType(IBackgroundBead) == null)
-					var c:Class = ValuesManager.valuesImpl.getValue(host, "iBackgroundBead");
-				if (c) {
-					host.addBead( new c() as IBead );
-				}
-			}
-			
-			var borderStyle:String;
-			var borderStyles:Object = ValuesManager.valuesImpl.getValue(host, "border");
-			if (borderStyles is Array)
-			{
-				borderStyle = borderStyles[1];
-			}
-			if (borderStyle == null)
-			{
-				borderStyle = ValuesManager.valuesImpl.getValue(host, "border-style") as String;
-			}
-			if (borderStyle != null && borderStyle != "none")
-			{
-				if (host.getBeadByType(IBorderBead) == null) {
-					c = ValuesManager.valuesImpl.getValue(host, "iBorderBead");
-					if (c) {
-						host.addBead( new c() as IBead );
-					}
-				}
-			}
-		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/controllers/DateChooserMouseController.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/controllers/DateChooserMouseController.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/controllers/DateChooserMouseController.as
index a03e069..1809df3 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/controllers/DateChooserMouseController.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/controllers/DateChooserMouseController.as
@@ -74,19 +74,13 @@ package org.apache.flex.html.beads.controllers
 			view.nextMonthButton.addEventListener("click", nextMonthClickHandler);
 			
             IEventDispatcher(view.dayList).addEventListener("change", listHandler);
-			//var dayButtons:Array = view.dayButtons;
-			//for(var i:int=0; i < dayButtons.length; i++) {
-			//	IEventDispatcher(dayButtons[i]).addEventListener("click", dayButtonClickHandler);
-			//}
 		}
 		
         private function listHandler(event:Event):void
         {
             var list:DateChooserList = event.target as DateChooserList;
-            var model:DateChooserModel = _strand.getBeadByType(IBeadModel) as DateChooserModel;
-            var newDate:Date = new Date(model.displayedYear,model.displayedMonth,list.selectedIndex-7);
-            
-            model.selectedDate = newDate;
+            var model:DateChooserModel = _strand.getBeadByType(IBeadModel) as DateChooserModel;
                    
+            model.selectedDate = list.selectedItem as Date;
             IEventDispatcher(_strand).dispatchEvent( new Event("change") );
         }
 
@@ -122,18 +116,5 @@ package org.apache.flex.html.beads.controllers
 			model.displayedYear = year;
 		}
 		
-		/**
-		 * @private
-		 */
-		private function dayButtonClickHandler(event:MouseEvent):void
-		{
-			var dateButton:DateChooserButton = event.target as DateChooserButton;
-			if (dateButton.dayOfMonth > 0) {
-				var model:DateChooserModel = _strand.getBeadByType(IBeadModel) as DateChooserModel;
-				var newDate:Date = new Date(model.displayedYear,model.displayedMonth,dateButton.dayOfMonth);
-				model.selectedDate = newDate;
-				IEventDispatcher(_strand).dispatchEvent( new Event("change") );
-			}
-		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DateChooserModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DateChooserModel.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DateChooserModel.as
index 4b6fc18..34bdbaa 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DateChooserModel.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/models/DateChooserModel.as
@@ -181,8 +181,10 @@ package org.apache.flex.html.beads.models
 				_selectedDate = value;
 				dispatchEvent( new Event("selectedDateChanged") );
 				
-				displayedMonth = value.getMonth();
-				displayedYear  = value.getFullYear();
+                if (value != null) {
+    				displayedMonth = value.getMonth();
+    				displayedYear  = value.getFullYear();
+                }
 			}
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
new file mode 100644
index 0000000..775a140
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
@@ -0,0 +1,66 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.DataContainer;
+	import org.apache.flex.html.beads.layouts.TileLayout;
+	
+	/**
+	 *  The DateChooserHeader is the container for the days of the week labels
+	 *  in the DateChooser.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class DateChooserHeader extends DataContainer
+	{
+		/**
+		 * Constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function DateChooserHeader()
+		{
+			super();
+			
+			tileLayout = new TileLayout();
+			tileLayout.numColumns = 7;
+			addBead(tileLayout);
+		}
+		
+		/**
+		 * @private
+		 */
+		private var tileLayout:TileLayout;
+		
+		/**
+		 * @private
+		 */
+		override public function set height(value:Number):void
+		{
+			super.height = value;
+			tileLayout.rowHeight = value;
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
new file mode 100644
index 0000000..f450c37
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
@@ -0,0 +1,90 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	COMPILE::SWF
+	{
+		import flash.text.TextFieldAutoSize;
+		import flash.text.TextFieldType;
+		
+		import org.apache.flex.core.CSSTextField;            
+	}
+	import org.apache.flex.events.Event;
+
+	/**
+	 *  The DateItemRenderer class renders date values for the DateChooser.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class DateItemRenderer extends StringItemRenderer
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function DateItemRenderer()
+		{
+			super();
+			
+			className = "DateItemRenderer";
+		}
+		
+		/**
+		 *  Sets the data value and uses the String version of the data for display.
+		 * 
+		 *  @param Object data The object being displayed by the itemRenderer instance.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function set data(value:Object):void
+		{
+			super.data = value;
+			
+			COMPILE::SWF {
+				textField.autoSize = TextFieldAutoSize.CENTER;
+			}
+			
+			if (value is Date) {
+				this.text = String( (value as Date).getDate() );
+			} else {
+				this.text = "";
+			}
+		}
+		
+		/**
+		 * @private
+		 */
+		COMPILE::JS
+		override public function set height(value:Number):void
+		{
+			super.height = value;
+			element.style["line-height"] = String(value)+"px";
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
new file mode 100644
index 0000000..ebe86f4
--- /dev/null
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	COMPILE::SWF
+	{
+		import flash.text.TextFieldAutoSize;
+		import flash.text.TextFieldType;
+		
+		import org.apache.flex.core.CSSTextField;            
+	}
+	import org.apache.flex.events.Event;
+
+	/**
+	 *  The DayNameItemRenderer class renders the names of days of the week
+	 *  for the DateChooser.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public class DayNameItemRenderer extends StringItemRenderer
+	{
+		/**
+		 *  constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function DayNameItemRenderer()
+		{
+			super();
+			
+			className = "DayNameItemRenderer";
+		}
+		
+		/**
+		 *  Sets the data value and uses the String version of the data for display.
+		 * 
+		 *  @param Object data The object being displayed by the itemRenderer instance.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function set data(value:Object):void
+		{
+			super.data = value;
+			
+			COMPILE::SWF {
+				textField.autoSize = TextFieldAutoSize.CENTER;
+			}
+		}
+		
+		/**
+		 * @private
+		 */
+		COMPILE::JS
+		override public function set height(value:Number):void
+		{
+			super.height = value;
+			element.style["line-height"] = String(value)+"px";
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
index b897012..2a0f798 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/supportClasses/StringItemRenderer.as
@@ -162,7 +162,7 @@ package org.apache.flex.html.supportClasses
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {            
-            element = document.createElement('div') as WrappedHTMLElement;
+            element = document.createElement('span') as WrappedHTMLElement;
             positioner = element;
             positioner.style.position = 'relative';
             

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/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 a419df7..ffc3734 100644
--- a/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Basic/src/main/resources/basic-manifest.xml
@@ -79,6 +79,9 @@
     <component id="MXMLItemRenderer" class="org.apache.flex.html.supportClasses.MXMLItemRenderer"/>
     <component id="DataItemRenderer" class="org.apache.flex.html.supportClasses.DataItemRenderer"/>
     <component id="ButtonBarButtonItemRenderer" class="org.apache.flex.html.supportClasses.ButtonBarButtonItemRenderer"/>
+    <component id="DateItemRenderer" class="org.apache.flex.html.supportClasses.DateItemRenderer"/>
+    <component id="DayNameItemRenderer" class="org.apache.flex.html.supportClasses.DayNameItemRenderer"/>
+
     <!--
      <component id="TextFieldItemRenderer" class="org.apache.flex.html.supportClasses.TextFieldItemRenderer"/>
     <component id="HScrollBar" class="org.apache.flex.html.supportClasses.HScrollBar"/>
@@ -119,6 +122,7 @@
 
     <component id="DateChooser" class="org.apache.flex.html.DateChooser"/>
     <component id="DateChooserList" class="org.apache.flex.html.supportClasses.DateChooserList"
/>
+    <component id="DateChooserHeader" class="org.apache.flex.html.supportClasses.DateChooserHeader"
/>
     <component id="DateField" class="org.apache.flex.html.DateField"/>
     <component id="VerticalColumnLayout" class="org.apache.flex.html.beads.layouts.VerticalColumnLayout"
/>
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/Basic/src/main/resources/defaults.css
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/resources/defaults.css b/frameworks/projects/Basic/src/main/resources/defaults.css
index 65f81da..268ad1b 100644
--- a/frameworks/projects/Basic/src/main/resources/defaults.css
+++ b/frameworks/projects/Basic/src/main/resources/defaults.css
@@ -201,14 +201,48 @@ DataGridColumnList {
 	border-color: #333333;
 }
 
+/* DateChooser */
+
 DateChooser {
     IBeadView:   ClassReference("org.apache.flex.html.beads.DateChooserView");
     IBeadModel:  ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
     IBeadController: ClassReference("org.apache.flex.html.beads.controllers.DateChooserMouseController");
     width:  280px;
-    height: 240px;
+    height: 230px;
+}
+
+DateChooserList {
+    IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.DataItemRendererFactoryForArrayData");
+	IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
+    IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.DataItemRenderer");
+    border-style: solid;
+    border-radius: 4px;
+    border-color: #000000;
+    border-width: 1px;
+    background-color: #FFFFFF;
+}
+
+DateChooserHeader {    
+    IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.DayNameItemRenderer");
              
+    border-style: solid;
+    border-color: #000000;
+    border-width: 1px;
+    background-color: #FFFFFF;
 }
 
+DateItemRenderer
+{
+    IBeadController: ClassReference("org.apache.flex.html.beads.controllers.ItemRendererMouseController");
+    text-align: center;
+}
+
+DayNameItemRenderer
+{
+    text-align: center;
+}
+ 
+/* DateField */
+
 DateField {
     IBeadView:   ClassReference("org.apache.flex.html.beads.DateFieldView");
     IBeadModel:  ClassReference("org.apache.flex.html.beads.models.DateChooserModel");
@@ -216,6 +250,8 @@ DateField {
     IFormatBead: ClassReference("org.apache.flex.html.accessories.DateFormatMMDDYYYYBead");
 }
 
+/* RangeStepper */
+
 RangeStepper {
 	IBeadView: ClassReference("org.apache.flex.html.beads.RangeStepperView");
 	IBeadModel: ClassReference("org.apache.flex.html.beads.models.RangeModelExtended");
@@ -512,17 +548,6 @@ ControlBar
     iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");    
 }
 
-DateChooserList {
-    IDataProviderItemRendererMapper: ClassReference("org.apache.flex.html.beads.TextItemRendererFactoryForArrayData");
-	IItemRendererClassFactory: ClassReference("org.apache.flex.core.ItemRendererClassFactory");
-    IItemRenderer: ClassReference("org.apache.flex.html.supportClasses.StringItemRenderer");
-    border-style: solid;
-    border-radius: 4px;
-    border-color: #0000DD;
-    border-width: 1px;
-    background-color: #DDDDFF;
-}
-
 DataContainer
 {
 	IBeadModel: ClassReference("org.apache.flex.html.beads.models.DataProviderModel");
@@ -538,6 +563,22 @@ DataContainer
 	border-color: #222222;
 }
 
+DateChooserList {
+   iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
+   iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead"); 
+}
+       
+DateChooserHeader {
+    padding-top: 0px;
+    padding-bottom: 5px;
+    iBackgroundBead: ClassReference('org.apache.flex.html.beads.SolidBackgroundBead');
+    iBorderBead: ClassReference("org.apache.flex.html.beads.SingleLineBorderBead");   
+}
+       
+DateItemRenderer {
+    margin: 0px;
+    padding: 5px;
+}
 
 DropDownList
 {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
deleted file mode 100644
index 775a140..0000000
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateChooserHeader.as
+++ /dev/null
@@ -1,66 +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.supportClasses
-{
-	import org.apache.flex.html.DataContainer;
-	import org.apache.flex.html.beads.layouts.TileLayout;
-	
-	/**
-	 *  The DateChooserHeader is the container for the days of the week labels
-	 *  in the DateChooser.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class DateChooserHeader extends DataContainer
-	{
-		/**
-		 * Constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function DateChooserHeader()
-		{
-			super();
-			
-			tileLayout = new TileLayout();
-			tileLayout.numColumns = 7;
-			addBead(tileLayout);
-		}
-		
-		/**
-		 * @private
-		 */
-		private var tileLayout:TileLayout;
-		
-		/**
-		 * @private
-		 */
-		override public function set height(value:Number):void
-		{
-			super.height = value;
-			tileLayout.rowHeight = value;
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
deleted file mode 100644
index f450c37..0000000
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DateItemRenderer.as
+++ /dev/null
@@ -1,90 +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.supportClasses
-{
-	COMPILE::SWF
-	{
-		import flash.text.TextFieldAutoSize;
-		import flash.text.TextFieldType;
-		
-		import org.apache.flex.core.CSSTextField;            
-	}
-	import org.apache.flex.events.Event;
-
-	/**
-	 *  The DateItemRenderer class renders date values for the DateChooser.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class DateItemRenderer extends StringItemRenderer
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function DateItemRenderer()
-		{
-			super();
-			
-			className = "DateItemRenderer";
-		}
-		
-		/**
-		 *  Sets the data value and uses the String version of the data for display.
-		 * 
-		 *  @param Object data The object being displayed by the itemRenderer instance.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		override public function set data(value:Object):void
-		{
-			super.data = value;
-			
-			COMPILE::SWF {
-				textField.autoSize = TextFieldAutoSize.CENTER;
-			}
-			
-			if (value is Date) {
-				this.text = String( (value as Date).getDate() );
-			} else {
-				this.text = "";
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::JS
-		override public function set height(value:Number):void
-		{
-			super.height = value;
-			element.style["line-height"] = String(value)+"px";
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/803278f3/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
deleted file mode 100644
index ebe86f4..0000000
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DayNameItemRenderer.as
+++ /dev/null
@@ -1,85 +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.supportClasses
-{
-	COMPILE::SWF
-	{
-		import flash.text.TextFieldAutoSize;
-		import flash.text.TextFieldType;
-		
-		import org.apache.flex.core.CSSTextField;            
-	}
-	import org.apache.flex.events.Event;
-
-	/**
-	 *  The DayNameItemRenderer class renders the names of days of the week
-	 *  for the DateChooser.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public class DayNameItemRenderer extends StringItemRenderer
-	{
-		/**
-		 *  constructor.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		public function DayNameItemRenderer()
-		{
-			super();
-			
-			className = "DayNameItemRenderer";
-		}
-		
-		/**
-		 *  Sets the data value and uses the String version of the data for display.
-		 * 
-		 *  @param Object data The object being displayed by the itemRenderer instance.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		override public function set data(value:Object):void
-		{
-			super.data = value;
-			
-			COMPILE::SWF {
-				textField.autoSize = TextFieldAutoSize.CENTER;
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		COMPILE::JS
-		override public function set height(value:Number):void
-		{
-			super.height = value;
-			element.style["line-height"] = String(value)+"px";
-		}
-	}
-}


Mime
View raw message