Transferred from the Adobe Open Source Subversion Repository

Revision: 18200
Author:   deeptika@adobe.com
Date:     2010-10-19T08:38:49.688818Z

Log Message:
-----------
Datavisualization.swc refactoring - 1

Rewritten Legend component to extend UIComponent instead of Container
Added style "labelClass" to AxisRenderer, ColumnChart, ColumnSeries, BarChart and BarSeries.
Its default value is spark.components.Label (mx.controls.Label if former is not found in the application domain)

QE notes: Legend, Column and Bar chart labeling, Axis labels needs good amount of testing. Mustella tests would fail for labels (a shift in position of labels might be there).

Doc notes: A new style "labelClass" is added for classes AxisRenderer, ColumnChart, ColumnSeries, BarChart and BarSeries

Bugs:
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/LegendAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/BarSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/items/BarSeriesItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/AxisRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/Legend.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/items/ColumnSeriesItem.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1253243 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/series/BarSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/BarSeries.as
@@ -18,6 +18,7 @@
 import flash.filters.DropShadowFilter;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flash.system.ApplicationDomain;
 import flash.utils.Dictionary;

 import mx.charts.BarChart;
@@ -43,7 +44,6 @@
 import mx.collections.CursorBookmark;
 import mx.collections.ICollectionView;
 import mx.collections.IViewCursor;
-import mx.controls.Label;
 import mx.core.ClassFactory;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
@@ -120,6 +120,20 @@
  */
 [Style(name="labelAlign", type="String", enumeration="left,center,right", inherit="no")]

+/**
+ *  The class that is used by this component to render labels.
+ *
+ *
It can be set to either the mx.controls.Label class
+ *  or the spark.components.Label class.

+ *
+ *  @default spark.components.Label
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4
+ */
+[Style(name="labelClass", type="Class", inherit="no")]
 /**
  * Determines the position of labels
  * Possible values are "none" , "outside"
@@ -243,16 +257,34 @@
         _labelLayer = new UIComponent();
         _labelLayer.styleName = this;

-        labelCache = new InstanceCache(Label,_labelLayer);
+        labelCache = new InstanceCache(getLabelClass(),_labelLayer);
         labelCache.discard = true;
         labelCache.properties =
         {
-            selectable: false,
             styleName: this
         };

         dataTransform = new CartesianTransform();
     }
+
+	private function getLabelClass():Class
+	{
+		var labelClass:Class = getStyle("labelClass");
+		if(labelClass == null)
+		{
+			try{
+				labelClass = Class(ApplicationDomain.currentDomain.
+					getDefinition("spark.components::Label"));
+			}
+			catch(e:Error)
+			{
+				labelClass = Class(ApplicationDomain.currentDomain.
+					getDefinition("mx.controls::Label"));
+			}
+		}
+		return labelClass;
+	}
+

     //--------------------------------------------------------------------------
     //
@@ -2401,7 +2433,7 @@
         var labels:Array /* of Label */ = labelCache.instances;
         var dataTransform:CartesianTransform=CartesianTransform(dataTransform);

-        var label:Label;
+        var label:Object;
         var align:String = getStyle('labelAlign');
         var size:Number = getStyle('fontSize');
         for (var i:int = 0; i < n; i++)
@@ -2409,7 +2441,7 @@
             var v:BarSeriesItem =activeCount[i];
             label=labels[i];
             label.x=v.labelX;
-            label.y=v.labelY;
+            label.y=v.labelY+4;
             label.text=v.labelText;
             label.width=v.labelWidth;
             label.height=v.labelHeight;
@@ -2452,7 +2484,7 @@
         var n:int=activeCount.length;
         labelCache.count = n;
         var labels:Array /* of Label */ = labelCache.instances;
-        var label:Label;
+        var label:Object;

         var rotation:Number = getStyle('labelRotation');
         var size:Number = getStyle('fontSize');
@@ -2461,7 +2493,7 @@
             var v:BarSeriesItem =activeCount[i];
             label=labels[i];
             label.x=v.labelX;
-            label.y=v.labelY;
+            label.y=v.labelY+4;
             label.width=v.labelWidth;
             label.height=v.labelHeight;
             label.text=v.labelText;


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284067 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/easing/Linear.as
+++ frameworks/projects/spark/src/spark/effects/easing/Linear.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
 package spark.effects.easing
 {
 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1248555 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderInfo.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderInfo.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.controls.advancedDataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264381 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as
+++ frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
 package spark.components.calendarClasses
 {
 import spark.collections.OnDemandDataProvider;


Update KrewState: pass event and args to guard function

--- krew-framework/krewfw/builtin_actor/system/KrewState.as
+++ krew-framework/krewfw/builtin_actor/system/KrewState.as
@@ -85,8 +85,9 @@
          *
(Optional) exit    : {Function(state:KrewState):void} - Called when state ends.

          *
(Optional) begin   : {Function(state:KrewState):void} - Called when state or child state starts.

          *
(Optional) end     : {Function(state:KrewState):void} - Called when state or child state ends.

-         *
(Optional) guard   : {Function(state:KrewState):Boolean} - Called when event triggered.
-         *           Return false to prevent transition and bubbling event.

+         *
(Optional) guard   : {Function(state:KrewState, event:String, args:Object):Boolean}
+         *           - Called when event is triggered.
+         *             Return false to prevent transition and bubbling event.

          *
(Optional) listen  : {Object or Array} - Ex.)
          *           [{event: "event_name", to:"target_state_name", hook:hookFunc}]
          *           - event で指定したイベントを受け取ったとき、to で指定した state に遷移する。
@@ -362,7 +363,7 @@
          */
         public function onEvent(args:Object, event:String):void {
             if (_isListeningTo(event)) {
-                if (_guardFunc != null  &&  !_guardFunc(this)) { return; }
+                if (_guardFunc != null  &&  !_guardFunc(this, event, args)) { return; }

                 var eventHook:Function = _getEventHookWith(event);
                 if (eventHook != null) { eventHook(this, args); }


WIP -- More opcodes

WIP -- More opcodes

--- index.as
+++ index.as
@@ -8,6 +8,7 @@
 extern def exit(status: c_int);
 extern def printf(format: str, ...);
 extern def malloc(s: size_t): *uint8;
+extern def memset(dst: *uint8, ch: c_int, count: size_t): *uint8;
 extern def free(ptr: *uint8);
 extern def fopen(filename: str, mode: str): *FILE;
 extern def fclose(stream: *FILE);
@@ -18,6 +19,8 @@

 // CPU
 let ram: *uint8;
+let cycles: float64;
+let IME = false;
 let PC: uint16 = 0;
 let AF: uint16 = 0;
 let A: *uint8 = (&AF as *uint8);
@@ -36,12 +39,14 @@
 def main() {
   init();
   init_optable();
+  init_cycletable();

   open_rom("./boxxle.gb");

-  while true { emulate(); }
+  while true { execute(); }

   fini_optable();
+  fini_cycletable();
   fini();
 }

@@ -54,11 +59,14 @@

 def reset() {
   PC = 0x0100;
+  SP = 0xFFFE;
+  IME = true;
+
   AF = 0x01B0;
   BC = 0x0013;
   DE = 0x00D8;
   HL = 0x014D;
-  SP = 0xFFFE;
+
   *(ram + 0xFF05) = 0x00;
   *(ram + 0xFF06) = 0x00;
   *(ram + 0xFF07) = 0x00;
@@ -122,14 +130,6 @@
   free(title as *uint8);
 }

-def execute() {
-  // Get next opcode
-  let opcode = mmu_next8();
-
-  // Decode and execute instruction
-  *(optable + opcode)();
-}
-
 // =============================================================================
 // [MMU] Memory Management Unit
 // =============================================================================
@@ -140,11 +140,11 @@
 }

 // Read 16-bits
-def mmu_read16(address: uint16): uint8 {
+def mmu_read16(address: uint16): uint16 {
   let l = mmu_read8(address + 0);
   let h = mmu_read8(address + 1);

-  return uint16(l) | (uint16(h) * 256);
+  return uint16(l) | (uint16(h) << 8);
 }

 // Read IMMEDIATE 8-bits
@@ -156,7 +156,7 @@
 }

 // Read IMMEDIATE 16-bits
-def mmu_next16(): uint8 {
+def mmu_next16(): uint16 {
   let value = mmu_read16(PC);
   PC += 1;

@@ -164,11 +164,14 @@
 }

 // Write 8-bits
-def mmu_write8(address: uint16, value: uint8): uint8 {
+def mmu_write8(address: uint16, value: uint8) {
+  *(ram + address) = value;
 }

 // Write 16-bits
-def mmu_write16(address: uint16, value: uint16): uint8 {
+def mmu_write16(address: uint16, value: uint16) {
+  *(ram + address) = uint8(value & 0xFF);
+  *(ram + address + 1) = uint8(value >> 8);
 }

 // =============================================================================
@@ -177,7 +180,8 @@
 let optable: *(() -> ());

 def init_optable() {
-  optable = malloc(0x1_00) as *(() -> ());
+  optable = malloc(0x1_00 * 8) as *(() -> ());
+  memset(optable as *uint8, 0, 0x1_00 * 8);

   *(optable + 0x00) = op_00;
   *(optable + 0x01) = op_01;
@@ -186,7 +190,7 @@
   *(optable + 0x04) = op_04;
   *(optable + 0x05) = op_05;
   *(optable + 0x06) = op_06;
-  *(optable + 0x07) = op_07;
+  // TODO: *(optable + 0x07) = op_07;
   *(optable + 0x08) = op_08;
   *(optable + 0x09) = op_09;
   *(optable + 0x0A) = op_0A;
@@ -194,7 +198,92 @@
   *(optable + 0x0C) = op_0C;
   *(optable + 0x0D) = op_0D;
   *(optable + 0x0E) = op_0E;
-  *(optable + 0x0F) = op_0F;
+  // TODO: *(optable + 0x0F) = op_0F;
+
+  *(optable + 0x20) = op_20;
+  *(optable + 0x21) = op_21;
+  *(optable + 0x22) = op_22;
+  *(optable + 0x23) = op_23;
+  *(optable + 0x24) = op_24;
+  *(optable + 0x25) = op_25;
+  *(optable + 0x26) = op_26;
+  *(optable + 0x27) = op_27;
+  *(optable + 0x28) = op_28;
+  *(optable + 0x29) = op_29;
+  *(optable + 0x2A) = op_2A;
+  *(optable + 0x2B) = op_2B;
+  *(optable + 0x2C) = op_2C;
+  *(optable + 0x2D) = op_2D;
+  *(optable + 0x2E) = op_2E;
+  *(optable + 0x2F) = op_2F;
+
+  *(optable + 0x30) = op_30;
+  *(optable + 0x31) = op_31;
+  *(optable + 0x32) = op_32;
+  *(optable + 0x33) = op_33;
+  *(optable + 0x34) = op_34;
+  *(optable + 0x35) = op_35;
+  *(optable + 0x36) = op_36;
+  *(optable + 0x37) = op_37;
+  *(optable + 0x38) = op_38;
+  *(optable + 0x39) = op_39;
+  *(optable + 0x3A) = op_3A;
+  *(optable + 0x3B) = op_3B;
+  *(optable + 0x3C) = op_3C;
+  *(optable + 0x3D) = op_3D;
+  *(optable + 0x3E) = op_3E;
+  *(optable + 0x3F) = op_3F;
+
+  *(optable + 0xC0) = op_C0;
+  *(optable + 0xC1) = op_C1;
+  *(optable + 0xC2) = op_C2;
+  *(optable + 0xC3) = op_C3;
+  *(optable + 0xC4) = op_C4;
+  *(optable + 0xC5) = op_C5;
+  *(optable + 0xC6) = op_C6;
+  *(optable + 0xC7) = op_C7;
+  *(optable + 0xC8) = op_C8;
+  *(optable + 0xC9) = op_C9;
+  *(optable + 0xCA) = op_CA;
+  *(optable + 0xCB) = op_CB;
+  *(optable + 0xCC) = op_CC;
+  *(optable + 0xCD) = op_CD;
+  *(optable + 0xCE) = op_CE;
+  *(optable + 0xCF) = op_CF;
+
+  *(optable + 0xE0) = op_E0;
+  *(optable + 0xE1) = op_E1;
+  *(optable + 0xE2) = op_E2;
+  // *(optable + 0xE3) = _
+  // *(optable + 0xE4) = _
+  *(optable + 0xE5) = op_E5;
+  *(optable + 0xE6) = op_E6;
+  *(optable + 0xE7) = op_E7;
+  *(optable + 0xE8) = op_E8;
+  *(optable + 0xE9) = op_E9;
+  *(optable + 0xEA) = op_EA;
+  // *(optable + 0xEB) = _
+  // *(optable + 0xEC) = _
+  // *(optable + 0xED) = _
+  *(optable + 0xEE) = op_EE;
+  *(optable + 0xEF) = op_EF;
+
+  *(optable + 0xF0) = op_F0;
+  *(optable + 0xF1) = op_F1;
+  *(optable + 0xF2) = op_F2;
+  *(optable + 0xF3) = op_F3;
+  // *(optable + 0xF4) = _
+  *(optable + 0xF5) = op_F5;
+  *(optable + 0xF6) = op_F6;
+  *(optable + 0xF7) = op_F7;
+  *(optable + 0xF8) = op_F8;
+  // TODO: *(optable + 0xF9) = op_F9;
+  *(optable + 0xFA) = op_FA;
+  *(optable + 0xFB) = op_FB;
+  // *(optable + 0xFC) = _
+  // *(optable + 0xFD) = _
+  *(optable + 0xFE) = op_FE;
+  *(optable + 0xFF) = op_FF;
 }

 def fini_optable() {
@@ -208,6 +297,7 @@

 def init_cycletable() {
   cycletable = malloc(0x1_00) as *uint8;
+  memset(cycletable as *uint8, 0, 0x1_00);

   *(cycletable + 0x00) = 4;
   *(cycletable + 0x01) = 12;
@@ -225,10 +315,292 @@
   *(cycletable + 0x0D) = 4;
   *(cycletable + 0x0E) = 8;
   *(cycletable + 0x0F) = 4;
+
+  *(cycletable + 0x20) = 8;  //  +4 IFF
+  *(cycletable + 0x21) = 12;
+  *(cycletable + 0x22) = 8;
+  *(cycletable + 0x23) = 8;
+  *(cycletable + 0x24) = 4;
+  *(cycletable + 0x25) = 4;
+  *(cycletable + 0x26) = 8;
+  *(cycletable + 0x27) = 4;
+  *(cycletable + 0x28) = 8;  //  +4 IFF
+  *(cycletable + 0x29) = 8;
+  *(cycletable + 0x2A) = 8;
+  *(cycletable + 0x2B) = 8;
+  *(cycletable + 0x2C) = 4;
+  *(cycletable + 0x2D) = 4;
+  *(cycletable + 0x2E) = 8;
+  *(cycletable + 0x2F) = 4;
+
+  *(cycletable + 0x30) = 8;  //  +4 IFF
+  *(cycletable + 0x31) = 12;
+  *(cycletable + 0x32) = 8;
+  *(cycletable + 0x33) = 8;
+  *(cycletable + 0x34) = 12;
+  *(cycletable + 0x35) = 12;
+  *(cycletable + 0x36) = 12;
+  *(cycletable + 0x37) = 4;
+  *(cycletable + 0x38) = 8;  //  +4 IFF
+  *(cycletable + 0x39) = 8;
+  *(cycletable + 0x3A) = 8;
+  *(cycletable + 0x3B) = 8;
+  *(cycletable + 0x3C) = 4;
+  *(cycletable + 0x3D) = 4;
+  *(cycletable + 0x3E) = 8;
+  *(cycletable + 0x3F) = 4;
+
+  *(cycletable + 0xC0) = 8;   // +12 IFF
+  *(cycletable + 0xC1) = 12;
+  *(cycletable + 0xC2) = 12;  //  +4 IFF
+  *(cycletable + 0xC3) = 16;
+  *(cycletable + 0xC4) = 12;  // +12 IFF
+  *(cycletable + 0xC5) = 16;
+  *(cycletable + 0xC6) = 8;
+  *(cycletable + 0xC7) = 16;
+  *(cycletable + 0xC8) = 8;   // +12 IFF
+  *(cycletable + 0xC9) = 16;
+  *(cycletable + 0xCA) = 12;  //  +4 IFF
+  *(cycletable + 0xCC) = 12;  // +12 IFF
+  *(cycletable + 0xCD) = 24;
+  *(cycletable + 0xCE) = 8;
+  *(cycletable + 0xCF) = 16;
+
+  *(cycletable + 0xE0) = 12;
+  *(cycletable + 0xE1) = 12;
+  *(cycletable + 0xE2) = 8;
+  // *(cycletable + 0xE3) = _
+  // *(cycletable + 0xE4) = _
+  *(cycletable + 0xE5) = 16;
+  *(cycletable + 0xE6) = 8;
+  *(cycletable + 0xE7) = 16;
+  *(cycletable + 0xE8) = 16;
+  *(cycletable + 0xE9) = 4;
+  *(cycletable + 0xEA) = 16;
+  // *(cycletable + 0xEB) = _
+  // *(cycletable + 0xEC) = _
+  // *(cycletable + 0xED) = _
+  *(cycletable + 0xEE) = 8;
+  *(cycletable + 0xEF) = 16;
+
+  *(cycletable + 0xF0) = 12;
+  *(cycletable + 0xF1) = 12;
+  *(cycletable + 0xF2) = 8;
+  *(cycletable + 0xF3) = 4;
+  // *(cycletable + 0xF4) = _
+  *(cycletable + 0xF5) = 16;
+  *(cycletable + 0xF6) = 8;
+  *(cycletable + 0xF7) = 16;
+  *(cycletable + 0xF8) = 12;
+  *(cycletable + 0xF9) = 8;
+  *(cycletable + 0xFA) = 16;
+  *(cycletable + 0xFB) = 4;
+  // *(cycletable + 0xFC) = _
+  // *(cycletable + 0xFD) = _
+  *(cycletable + 0xFE) = 8;
+  *(cycletable + 0xFF) = 16;
 }

 def fini_cycletable() {
   free(cycletable as *uint8);
+}
+
+// =============================================================================
+// [FL] Flag
+// =============================================================================
+type Flag = uint8;
+
+let FLAG_Z: Flag = 0b1000_0000;
+let FLAG_N: Flag = 0b0100_0000;
+let FLAG_H: Flag = 0b0010_0000;
+let FLAG_C: Flag = 0b0001_0000;
+
+def flag_set(flag: Flag, value: bool) {
+  if value { *F |=  uint8(flag); }
+  else     { *F &= ~uint8(flag); }
+}
+
+def flag_get(flag: Flag): bool {
+  return *F & uint8(flag) != 0;
+}
+
+def flag_geti(flag: Flag): uint8 {
+  return if flag_get(flag) { 1; } else { 0; };
+}
+
+// =============================================================================
+// [OM] Operation Mnemonics
+// =============================================================================
+
+// Increment 8-bit Register
+def om_inc8(r: *uint8) {
+  flag_set(FLAG_H, (((*r & 0xF) + (1 & 0xF)) & 0x10) > 0);
+
+  *r += 1;
+
+  flag_set(FLAG_Z, *r == 0);
+  flag_set(FLAG_N, false);
+}
+
+// Decrement 8-bit Register
+def om_dec8(r: *uint8) {
+  flag_set(FLAG_H, (((*r & 0xF) - (1 & 0xF)) & 0x10) < 0);
+
+  *r -= 1;
+
+  flag_set(FLAG_Z, *r == 0);
+  flag_set(FLAG_N, true);
+}
+
+// Increment 16-bit Register
+def om_inc16(r: *uint16) {
+  *r += 1;
+}
+
+// Decrement 16-bit Register
+def om_dec16(r: *uint16) {
+  *r -= 1;
+}
+
+// And 8-bit value
+def om_and8(a: uint8, b: uint8): uint8 {
+  let r = a & b;
+
+  flag_set(FLAG_Z, r == 0);
+  flag_set(FLAG_N, false);
+  flag_set(FLAG_H, true);
+  flag_set(FLAG_C, false);
+
+  return r;
+}
+
+// Or 8-bit value
+def om_or8(a: uint8, b: uint8): uint8 {
+  let r = a & b;
+
+  flag_set(FLAG_Z, r == 0);
+  flag_set(FLAG_N, false);
+  flag_set(FLAG_H, false);
+  flag_set(FLAG_C, false);
+
+  return r;
+}
+
+// Xor 8-bit value
+def om_xor8(a: uint8, b: uint8): uint8 {
+  let r = a ^ b;
+
+  flag_set(FLAG_Z, r == 0);
+  flag_set(FLAG_N, false);
+  flag_set(FLAG_H, false);
+  flag_set(FLAG_C, false);
+
+  return r;
+}
+
+// Add 8-bit value
+def om_add8(a: uint8, b: uint8): uint8 {
+  flag_set(FLAG_H, (((a & 0xF) + (b & 0xF)) & 0x10) > 0);
+
+  let r = uint16(a) + uint16(b);
+
+  flag_set(FLAG_C, r > 0xFFFF);
+  flag_set(FLAG_Z, r == 0);
+  flag_set(FLAG_N, false);
+
+  return uint8(r & 0xFF);
+}
+
+// Add 8-bit value w/carry
+def om_adc8(a: uint8, b: uint8): uint8 {
+  return om_add8(a, b + uint8(flag_geti(FLAG_C)));
+}
+
+// Subtract 8-bit value
+def om_sub8(a: uint8, b: uint8): uint8 {
+  let r = om_add8(a, ~b);
+
+  flag_set(FLAG_N, true);
+
+  return r;
+}
+
+// Subtract 8-bit value w/carry
+def om_sbc8(a: uint8, b: uint8): uint8 {
+  let r = om_adc8(a, ~b);
+
+  flag_set(FLAG_N, true);
+
+  return r;
+}
+
+// Add 16-bit value
+def om_add16(a: uint16, b: uint16): uint16 {
+  flag_set(FLAG_H, (((a & 0xFF) + (b & 0xFF)) & 0x100) > 0);
+
+  let r = uint32(a) + uint32(b);
+
+  flag_set(FLAG_C, r > 0xFFFF);
+  flag_set(FLAG_N, false);
+
+  return uint16(r & 0xFFFF);
+}
+
+// Add 16-bit value w/carry
+def om_adc16(a: uint16, b: uint16): uint16 {
+  return om_add16(a, b + uint16(flag_geti(FLAG_C)));
+}
+
+// Subtract 16-bit value
+def om_sub16(a: uint16, b: uint16): uint16 {
+  let r = om_add16(a, ~b);
+
+  flag_set(FLAG_N, true);
+
+  return r;
+}
+
+// Subtract 16-bit value w/carry
+def om_sbc16(a: uint16, b: uint16): uint16 {
+  let r = om_adc16(a, ~b);
+
+  flag_set(FLAG_N, true);
+
+  return r;
+}
+
+// Push 16-bit value
+def om_push16(r: *uint16) {
+  SP -= 2;
+  mmu_write16(SP, *r);
+}
+
+// Pop 16-bit value
+def om_pop16(r: *uint16) {
+  *r = mmu_read16(SP);
+  SP += 2;
+}
+
+// Jump
+def om_jp(address: uint16) {
+  PC = address;
+}
+
+// Call
+def om_call(address: uint16) {
+  om_push16(&PC);
+  om_jp(address);
+}
+
+// Return
+def om_ret() {
+  om_pop16(&PC);
+}
+
+// Return (and enable interrupts)
+def om_reti() {
+  IME = true;
+  om_ret();
 }

 // =============================================================================
@@ -252,33 +624,534 @@

 // [03] INC BC
 def op_03() {
-  *BC += 1;
-
-  flag_set(FLAG_Z, *BC == 0);
-  flag_set(FLAG_N, 0);
-  flag_set(FLAG_H, ..);
+  om_inc16(&BC);
 }

 // [04] INC B
 def op_04() {
-  *B += 1;
-  // TODO: Flags
+  om_inc8(B);
 }

 // [05] DEC B
 def op_05() {
-  *B -= 1;
-  // TODO: Flags
-}
-
-
-// [06]
-// [07]
-// [08]
-// [09]
-// [0A]
-// [0B]
-// [0C]
-// [0D]
-// [0E]
-// [0F]
+  om_dec8(B);
+}
+
+// [06] LD B, n
+def op_06() {
+  *B = mmu_next8();
+}
+
+// TODO: [07] RLCA
+
+// [08] LD (nn), SP
+def op_08() {
+  mmu_write16(mmu_next16(), SP);
+}
+
+// [09] ADD HL, BC
+def op_09() {
+  HL = om_add16(HL, BC);
+}
+
+// [0A] LD A, (BC)
+def op_0A() {
+  *A = mmu_read8(BC);
+}
+
+// [0B] DEC BC
+def op_0B() {
+  om_dec16(&BC);
+}
+
+// [0C] INC C
+def op_0C() {
+  om_inc8(C);
+}
+
+// [0D] DEC C
+def op_0D() {
+  om_dec8(C);
+}
+
+// [0E] LD C, n
+def op_0E() {
+  *C = mmu_next8();
+}
+
+// TODO: [0F] RRCA
+
+// [20] JR NZ, n
+def op_20() {
+  let n = mmu_next8();
+  if not flag_get(FLAG_Z) {
+    om_jp(PC + uint16(n));
+    cycles += 4;
+  }
+}
+
+// [21] LD HL, nn
+def op_21() {
+  HL = mmu_next16();
+}
+
+// [22] LDI (HL), A
+def op_22() {
+  mmu_write8(HL, *A);
+  HL += 1;
+}
+
+// [23] INC HL
+def op_23() {
+  om_inc16(&HL);
+}
+
+// [24] INC H
+def op_24() {
+  om_inc8(H);
+}
+
+// [25] DEC H
+def op_25() {
+  om_dec8(H);
+}
+
+// [26] LD H, n
+def op_26() {
+  *H = mmu_next8();
+}
+
+// [27] DAA
+def op_27() {
+  // REF: http://stackoverflow.com/a/29990058
+
+  // When this instruction is executed, the A register is BCD corrected
+  // using the contents of the flags. The exact process is the following:
+  // if the least significant four bits of A contain a non-BCD digit (i. e.
+  // it is greater than 9) or the H flag is set, then $06 is added to the
+  // register. Then the four most significant bits are checked. If this
+  // more significant digit also happens to be greater than 9 or the C
+  // flag is set, then $60 is added.
+
+  // If the N flag is set, subtract instead of add.
+
+  // If the lower 4 bits form a number greater than 9 or H is set,
+  // add $06 to the accumulator
+
+  let r = uint16(*A);
+
+  if (r & 0xF) > 9 or flag_get(FLAG_H) {
+    if flag_get(FLAG_N) {
+      r -= 0x06;
+    } else {
+      r += 0x06;
+    }
+  }
+
+  // If the upper 4 bits form a number greater than 9 or C is set,
+  // add $60 to the accumulator
+  if ((r >> 4) & 0xF) > 9 or flag_get(FLAG_H) {
+    if flag_get(FLAG_N) {
+      r -= 0x60;
+    } else {
+      r += 0x60;
+    }
+  }
+
+  flag_set(FLAG_C, r & 0x100 != 0);
+  flag_set(FLAG_H, false);
+
+  *A = uint8(r);
+
+  flag_set(FLAG_Z, *A == 0);
+}
+
+// [28] JR Z, n
+def op_28() {
+  let n = mmu_next8();
+  if flag_get(FLAG_Z) {
+    om_jp(PC + uint16(n));
+    cycles += 4;
+  }
+}
+
+// [29] ADD HL, HL
+def op_29() {
+  HL = om_add16(HL, HL);
+}
+
+// [2A] LDI A, (HL)
+def op_2A() {
+  *A = mmu_read8(HL);
+  HL += 1;
+}
+
+// [2B] DEC HL
+def op_2B() {
+  om_dec16(&HL);
+}
+
+// [2C] INC L
+def op_2C() {
+  om_inc8(L);
+}
+
+// [2D] DEC L
+def op_2D() {
+  om_dec8(L);
+}
+
+// [2E] LD L, n
+def op_2E() {
+  *A = mmu_next8();
+}
+
+// [2F] CPL
+def op_2F() {
+  *A ^= 0xFF;
+
+  flag_set(FLAG_N, true);
+  flag_set(FLAG_H, true);
+}
+
+// [30] JR NC, n
+def op_30() {
+  let n = mmu_next8();
+  if not flag_get(FLAG_C) {
+    om_jp(PC + uint16(n));
+    cycles += 4;
+  }
+}
+
+// [31] LD SP, nn
+def op_31() {
+  SP = mmu_next16();
+}
+
+// [32] LDD (HL), A
+def op_32() {
+  mmu_write8(HL, *A);
+  HL -= 1;
+}
+
+// [33] INC SP
+def op_33() {
+  om_inc16(&SP);
+}
+
+// [34] INC (HL)
+def op_34() {
+  om_inc8(ram + HL);
+}
+
+// [35] DEC (HL)
+def op_35() {
+  om_dec8(ram + HL);
+}
+
+// [36] LD (HL), n
+def op_36() {
+  mmu_write8(HL, mmu_next8());
+}
+
+// [37] SCF
+def op_37() {
+  flag_set(FLAG_C, true);
+  flag_set(FLAG_H, false);
+  flag_set(FLAG_N, false);
+}
+
+// [38] JR C, n
+def op_38() {
+  let n = mmu_next8();
+  if flag_get(FLAG_C) {
+    om_jp(PC + uint16(n));
+    cycles += 4;
+  }
+}
+
+// [39] ADD HL, SP
+def op_39() {
+  HL = om_add16(HL, SP);
+}
+
+// [3A] LDD A, (HL)
+def op_3A() {
+  *A = mmu_read8(HL);
+  HL -= 1;
+}
+
+// [3B] DEC SP
+def op_3B() {
+  om_dec16(&SP);
+}
+
+// [3C] INC A
+def op_3C() {
+  om_inc8(A);
+}
+
+// [3D] DEC A
+def op_3D() {
+  om_dec8(A);
+}
+
+// [3E] LD A, n
+def op_3E() {
+  *A = mmu_next8();
+}
+
+// [3F] CCF
+def op_3F() {
+  flag_set(FLAG_C, flag_geti(FLAG_C) ^ 1 != 0);
+  flag_set(FLAG_H, false);
+  flag_set(FLAG_N, false);
+}
+
+// [C0] RET NZ
+def op_C0() {
+  if not flag_get(FLAG_Z) {
+    om_ret();
+    cycles += 12;
+  }
+}
+
+// [C1] POP BC
+def op_C1() {
+  om_pop16(&BC);
+}
+
+// [C2] JP NZ, nn
+def op_C2() {
+  let nn = mmu_next16();
+  if not flag_get(FLAG_Z) {
+    om_jp(nn);
+    cycles += 4;
+  }
+}
+
+// [C3] JP nn
+def op_C3() {
+  om_jp(mmu_next16());
+}
+
+// [C4] CALL NZ, nn
+def op_C4() {
+  let nn = mmu_next16();
+  if not flag_get(FLAG_Z) {
+    om_call(nn);
+    cycles += 12;
+  }
+}
+
+// [C5] PUSH BC
+def op_C5() {
+  om_push16(&BC);
+}
+
+// [C6] ADD A, n
+def op_C6() {
+  *A = om_add8(*A, mmu_next8());
+}
+
+// [C7] RST $00
+def op_C7() {
+  om_jp(0x00);
+}
+
+// [C8] RET Z
+def op_C8() {
+  if flag_get(FLAG_Z) {
+    om_ret();
+    cycles += 12;
+  }
+}
+
+// [C9] RET
+def op_C9() {
+  om_ret();
+}
+
+// [CA] JP Z, nn
+def op_CA() {
+  let nn = mmu_next16();
+  if flag_get(FLAG_Z) {
+    om_jp(nn);
+    cycles += 4;
+  }
+}
+
+// [CB] ~
+def op_CB() {
+  // Get next opcode
+  let opcode = mmu_next8();
+
+  // Not implemented yet
+  printf("error: unknown opcode: $CB $%02X\n", opcode);
+  exit(-1);
+}
+
+// [CC] CALL Z, nn
+def op_CC() {
+  let nn = mmu_next16();
+  if flag_get(FLAG_Z) {
+    om_call(nn);
+    cycles += 12;
+  }
+}
+
+// [CD] CALL nn
+def op_CD() {
+  om_call(mmu_next16());
+}
+
+// [CE] ADC A, n
+def op_CE() {
+  *A = om_adc8(*A, mmu_next8());
+}
+
+// [CF] RST $08
+def op_CF() {
+  om_jp(0x08);
+}
+
+// [E0] LD ($FF00 + n), A
+def op_E0() {
+  mmu_write8(0xFF00 + uint16(mmu_next8()), *A);
+}
+
+// [E1] POP HL
+def op_E1() {
+  om_pop16(&HL);
+}
+
+// [E2] LD ($FF00 + C), A
+def op_E2() {
+  mmu_write8(0xFF00 + uint16(*C), *A);
+}
+
+// [E5] PUSH HL
+def op_E5() {
+  om_push16(&HL);
+}
+
+// [E6] AND n
+def op_E6() {
+  *A = om_and8(*A, mmu_next8());
+}
+
+// [E7] RST $20
+def op_E7() {
+  om_jp(0x20);
+}
+
+// [E8] ADD SP, n
+def op_E8() {
+  SP = om_add16(SP, uint16(mmu_next8()));
+}
+
+// [E9] JP (HL)
+def op_E9() {
+  om_jp(HL);
+}
+
+// [EA] LD (nn), A
+def op_EA() {
+  mmu_write8(mmu_next16(), *A);
+}
+
+// [EE] XOR n
+def op_EE() {
+  *A = om_xor8(*A, mmu_next8());
+}
+
+// [EF] RST $28
+def op_EF() {
+  om_jp(0x28);
+}
+
+// [F0] LD A, ($FF00 + n)
+def op_F0() {
+  *A = mmu_read8(0xFF00 + uint16(mmu_next8()));
+}
+
+// [F1] POP AF
+def op_F1() {
+  om_pop16(&AF);
+}
+
+// [F2] LD A, ($FF00 + C)
+def op_F2() {
+  *A = mmu_read8(0xFF00 + uint16(*C));
+}
+
+// [F3] DI
+def op_F3() {
+  IME = false;
+}
+
+// [F5] PUSH AF
+def op_F5() {
+  om_push16(&AF);
+}
+
+// [F6] OR n
+def op_F6() {
+  *A = om_or8(*A, mmu_next8());
+}
+
+// [F7] RST 30H
+def op_F7() {
+  om_jp(0x30);
+}
+
+// TODO: [F8] LD HL, SP +/- n
+
+// [F9] LD SP, HL
+def op_F8() {
+  SP = HL;
+}
+
+// [FA] LD A, (nn)
+def op_FA() {
+  *A = mmu_read8(mmu_next16());
+}
+
+// [FB] EI
+def op_FB() {
+  IME = true;
+}
+
+// [FE] CP n
+def op_FE() {
+  om_sub8(*A, mmu_next8());
+}
+
+// [FF] RST $38
+def op_FF() {
+  om_jp(0x38);
+}
+
+// =============================================================================
+// [EX] Execute
+// =============================================================================
+def execute() {
+  // Get next opcode
+  let opcode = mmu_next8();
+
+  // Check if valid/known instruction
+  if *((optable as *int64) + opcode) == 0 {
+    printf("error: unknown opcode: $%02X\n", opcode);
+    exit(-1);
+  }
+
+  // DEBUG: Log opcode
+  // TODO: Better debug information
+  printf("debug: opcode: $%02X\n", opcode);
+
+  // Execute instruction
+  (*(optable + opcode))();
+
+  // Add instruction execution time to cycle counter
+  cycles += float64(*(cycletable + opcode));
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17692
Author:   chiedozi@adobe.com
Date:     2010-09-14T00:28:56.001477Z

Log Message:
-----------
Integrated revision 17684 from beta branch

Log Message:
***********
Corrected the spelling of the registerPersistenceClassAlias method in MobileApplicationBase

QE notes:
Doc notes:
Bugs: SDK-27797
Reviewer: Evtim
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedMobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264556 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorApplicationBase.as
@@ -297,7 +297,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    protected function registerPeristenceClassAliases():void
+    protected function registerPersistenceClassAliases():void
     {
     }

@@ -353,7 +353,7 @@

         if (sessionCachingEnabled)
         {
-            registerPeristenceClassAliases();
+            registerPersistenceClassAliases();

             persistenceManager = createPersistenceManager();
             persistenceManager.initialize();


Now using FilteredKeySet to sort keys asynchronously.

--- WeaveUI/src/weave/visualization/tools/CustomGraphicsTool.as
+++ WeaveUI/src/weave/visualization/tools/CustomGraphicsTool.as
@@ -25,10 +25,10 @@

 	import mx.containers.Canvas;

+	import weave.Weave;
 	import weave.api.WeaveAPI;
 	import weave.api.core.ILinkableHashMap;
 	import weave.api.data.IAttributeColumn;
-	import weave.api.data.IKeySet;
 	import weave.api.detectLinkableObjectChange;
 	import weave.api.getCallbackCollection;
 	import weave.api.linkableObjectIsBusy;
@@ -39,10 +39,10 @@
 	import weave.api.ui.IVisToolWithSelectableAttributes;
 	import weave.core.LinkableFunction;
 	import weave.core.LinkableHashMap;
+	import weave.data.KeySets.FilteredKeySet;
 	import weave.primitives.Bounds2D;
 	import weave.ui.AttributeSelectorPanel;
 	import weave.ui.DraggablePanel;
-	import weave.utils.ColumnUtils;
 	import weave.utils.GraphicsBuffer;
 	import weave.utils.PlotterUtils;
 	import weave.utils.TextGraphics;
@@ -50,6 +50,13 @@
 	public class CustomGraphicsTool extends DraggablePanel implements IVisToolWithSelectableAttributes
 	{
 		WeaveAPI.registerImplementation(IVisTool, CustomGraphicsTool, "ActionScript Graphics Tool");
+
+		override protected function constructor():void
+		{
+			super.constructor();
+
+			filteredKeySet.keyFilter.globalName = Weave.DEFAULT_SUBSET_KEYFILTER;
+		}

 		public const vars:LinkableHashMap = newLinkableChild(this,LinkableHashMap);
 		public const drawScript:LinkableFunction = registerLinkableChild(this, new LinkableFunction(defaultScript, false, true));
@@ -62,8 +69,13 @@
 		public function get bitmapData():BitmapData { return bitmap.bitmapData; }
 		public const textGraphics:TextGraphics = new TextGraphics();
 		public const canvas:Canvas = new Canvas();
-		public var keys:Array;
 		public var locals:Object; // for use inside scripts
+		private const filteredKeySet:FilteredKeySet = newLinkableChild(this, FilteredKeySet);
+
+		public function get keys():Array
+		{
+			return filteredKeySet.keys;
+		}

 		public function getSelectableAttributes():Array
 		{
@@ -108,6 +120,8 @@
 			var newColumn:IAttributeColumn = vars.childListCallbacks.lastObjectAdded as IAttributeColumn;
 			if (newColumn)
 				registerLinkableChild(vars, WeaveAPI.StatisticsCache.getColumnStatistics(newColumn));
+
+			filteredKeySet.setColumnKeySources(vars.getObjects(IAttributeColumn));
 		}

 		// remembers previous unscaled width,height
@@ -121,17 +135,18 @@
 		}
 		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
 		{
-			super.updateDisplayList.apply(this,arguments);
-
+			super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+			var keysChanged:Boolean = detectLinkableObjectChange(updateDisplayList, filteredKeySet);
 			var varsChanged:Boolean = detectLinkableObjectChange(updateDisplayList, vars);
 			var scriptChanged:Boolean = detectLinkableObjectChange(updateDisplayList, drawScript)

-			// do nothing if nothing changed (script, vars, size)
-			if (!scriptChanged && !varsChanged && _prevSize.x == unscaledWidth && _prevSize.y == unscaledHeight)
+			// do nothing if nothing changed (keys, script, vars, size)
+			if (!keysChanged && !scriptChanged && !varsChanged && _prevSize.x == unscaledWidth && _prevSize.y == unscaledHeight)
 				return;

 			// wait until vars are not busy
-			if (linkableObjectIsBusy(vars))
+			if (linkableObjectIsBusy(vars) || linkableObjectIsBusy(filteredKeySet))
 				return;

 			// remember current size for next time
@@ -158,10 +173,6 @@
 				if (!locals || scriptChanged)
 					locals = {};

-				// when the vars hash map changes, get the keys from all the columns in it
-				if (varsChanged)
-					keys = ColumnUtils.getAllKeys(vars.getObjects(IKeySet));
-
 				// run the custom script
 				drawScript.apply(this);

@@ -176,11 +187,8 @@

 		public static const defaultScript:String = <![CDATA[
 			import 'flash.utils.Dictionary';
-			import 'weave.api.detectLinkableObjectChange';
-			import 'weave.api.data.IAttributeColumn';
 			import 'weave.compiler.GlobalLib';
 			import 'weave.data.AttributeColumns.DynamicColumn';
-			import 'weave.data.KeySets.SortedKeySet';

 			var getStats = WeaveAPI.StatisticsCache.getColumnStatistics;
 			var getColumn = locals.getColumn || (locals.getColumn = function(name) { return vars.requestObject(name, DynamicColumn, false); });
@@ -199,14 +207,6 @@

 			ccol.globalName = 'defaultColorColumn';

-			var varsChanged = detectLinkableObjectChange(this, vars);
-			if (varsChanged)
-			{
-				// sort keys by the first column
-				var compare = SortedKeySet.generateCompareFunction([xcol]);
-				StandardLib.sort(keys, compare);
-			}
-
 			db.setBounds(xstat.getMin(), ystat.getMin(), xstat.getMax(), ystat.getMax());
 			sb.setBounds(margin, canvas.height-margin, canvas.width-margin, margin); // bottom to top


fixed a wee bug with the highlighting where 'saving as' would make it forget its highlighted status

--- flexEditor/src/org/arisgames/editor/components/PlaceMarkerEditorView.as
+++ flexEditor/src/org/arisgames/editor/components/PlaceMarkerEditorView.as
@@ -232,7 +232,10 @@

 			//Update the Google Marker
 			var options:MarkerOptions = placeMarker.getOptions();
-			options.icon = new PlaceMarkerIcon(placeMark.name);
+
+			var temp:PlaceMarkerIcon= new PlaceMarkerIcon(placeMark.name);
+			temp.isHighlighted = placeMark.placeMarker.icon.isHighlighted;
+			options.icon  = temp;
 			placeMarker.setOptions(options);
 			placeMarker.icon = options.icon as PlaceMarkerIcon;
 			placeMarker.icon.select();


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1253352 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/series/items/PlotSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/PlotSeriesItem.as
@@ -0,0 +1,239 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.series.items
+{
+
+import mx.charts.ChartItem;
+import mx.charts.series.PlotSeries;
+import mx.graphics.IFill;
+
+/**
+ *  Represents the information required to render an item as part of a PlotSeries. The PlotSeries class passes these items to its itemRenderer when rendering.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class PlotSeriesItem extends ChartItem
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  @param element The owning series.
+     *  @param data The item from the dataProvider this ChartItem represents .
+     *  @param index The index of the item from the series's dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function PlotSeriesItem(element:PlotSeries = null,
+                                   data:Object = null, index:uint = 0)
+    {
+        super(element, data, index);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // fill
+    //----------------------------------
+    [Inspectable(environment="none")]
+
+    /**
+     *  Holds the fill color of the item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public var fill:IFill;
+
+    //----------------------------------
+    //  radius
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The radius of this item, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var radius:Number;
+
+    //----------------------------------
+    //  x
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var x:Number;
+
+    //----------------------------------
+    //  xFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, filtered against the horizontal axis of the containing chart.
+     *  This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xFilter:Number;
+
+    //----------------------------------
+    //  xNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, converted to a number by the horizontal axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xNumber:Number;
+
+    //----------------------------------
+    //  xValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xValue:Object;
+
+    //----------------------------------
+    //  y
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item converted into screen coordinates
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var y:Number;
+
+    //----------------------------------
+    //  yFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, filtered against the vertical axis of the containing chart.
+     *  This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yFilter:Number;
+
+    //----------------------------------
+    //  yNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yNumber:Number;
+
+    //----------------------------------
+    //  yValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yValue:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Returns a copy of this ChartItem.
+     */
+    override public function clone():ChartItem
+    {
+        var result:PlotSeriesItem = new PlotSeriesItem(PlotSeries(element),item,index);
+        result.itemRenderer = itemRenderer;
+        return result;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290388 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as
+++ frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 6626
Author:   gosmith@adobe.com
Date:     2009-05-05T01:45:01.568612Z

Log Message:
-----------
Integrated a private build of TLF from Rich.

This build has an additional tabbing-related fix on top of TLF Build 424. We decided to take 424 because it allows all event handling in TextContainerManager to be overridden, which may be important for fixing beta bugs. But Rich also fixed a new bug that I found today: if you had moused over a TextInput or TextArea, then when you tabbed to it you couldn't enter text. This build passed the TextInput and TextArea Mustella tests. We'll take the official 425 tomorrow which will be 424 plus this new fix.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Carol

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swz</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/textLayout.swf</path>
<path kind="file" action="M">/flex/sdk/trunk/in/tlf/tlf.properties</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282482 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/RichEditableTextContainerManager.as
@@ -63,7 +63,7 @@
     /**
      *  @private
      */
-    private var hasScrollRect:Boolean = false;
+    //private var hasScrollRect:Boolean = false;

     /**
      *  @private
@@ -205,7 +205,7 @@
      *  there is a controller attached all the event handling is done by the
      *  controller and this no longer gets called.
      */
-    override protected function focusInHandler(event:FocusEvent):void
+    override public function focusInHandler(event:FocusEvent):void
     {
         textView.mx_internal::focusInHandler(event);


Transferred from the Adobe Open Source Subversion Repository

Revision: 19626
Author:   chiedozi@adobe.com
Date:     2011-01-06T19:57:52.187352Z

Log Message:
-----------
Fixed an issue where TabbedViewNavigator wouldn't properly display its child navigators if the component didn't have a tabBar skinPart.

QE notes:
Doc notes:
Bugs:
Reviewer: Ryan
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264075 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -127,7 +127,9 @@
     //  Class variables
     //
     //--------------------------------------------------------------------------
-
+
+    // TODO (chiedozi): Consider having a NO_SELECTION constant to differentiate
+    // between NO_PROPOSED_SELECTION and clearing the selection.  See List.
     /**
      *  @private
      *  Static constant representing no proposed selection.
@@ -409,16 +411,17 @@

         if (value && value.length > 0)
         {
-            _selectedIndex = 0;
+            // Reset selectedIndex to -1 and proposed index to 0 so that the appropriate
+            // navigator is selected in commit properties.
+            _selectedIndex = _proposedSelectedIndex = 0;
         }
         else
         {
-            _selectedIndex = NO_PROPOSED_SELECTION;
+            _selectedIndex = _proposedSelectedIndex = NO_PROPOSED_SELECTION;
         }

         // The proposed selected index is reset because it is no longer valid
         // since the array of navigators has changed.
-        _proposedSelectedIndex = NO_PROPOSED_SELECTION;
         selectedIndexChanged = false;

         // Notify listeners that the collection changed
@@ -496,14 +499,18 @@

         if (view)
         {
-            tabBar.visible = tabBar.includeInLayout = view.tabBarVisible;
+            if (tabBar)
+                tabBar.visible = tabBar.includeInLayout = view.tabBarVisible;
+
             overlayControls = view.overlayControls;
         }
         else
         {
             // If the current view is null, the tab bar is shown so that the
             // user still has a ui for changing the selected tab.
-            tabBar.visible = tabBar.includeInLayout = true;
+            if (tabBar)
+                tabBar.visible = tabBar.includeInLayout = true;
+
             overlayControls = false;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18785
Author:   chiedozi@adobe.com
Date:     2010-11-22T22:54:54.368346Z

Log Message:
-----------
ViewNavigatorBase now registers its stage event listenters on creationComplete to avoid RTEs related to a null systemManager
Fixed RTE in ViewNavigator and TabbedViewNavigator that occurred when a developer created a custom actionbar or tabbar hide/show animation

QE notes:
Doc notes:
Bugs:SDK-28573
Reviewer: Corey
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264070 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -154,6 +154,7 @@
     //
     //--------------------------------------------------------------------------

+    [Bindable]
     [SkinPart(required="false")]
     /**
      *  A skin part that defines the tab bar of the navigator.
@@ -256,6 +257,7 @@
     //  activeNavigator
     //----------------------------------

+    [Bindable("change")]
     /**
      *  Returns the active navigator for the TabbedViewNavigator.  Only one
      *  navigator can be active at a time.  The active navigator can be
@@ -504,7 +506,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    protected function calculateFinalUIPositions():void
+    private function calculateFinalUIPositions():void
     {
         var animateTabBarUp:Boolean;

@@ -772,7 +774,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function createTabBarShowEffect():IEffect
+    protected function createTabBarShowEffect():IEffect
     {
         return createTabBarVisibilityEffect();
     }
@@ -785,7 +787,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    public function createTabBarHideEffect():IEffect
+    protected function createTabBarHideEffect():IEffect
     {
         return createTabBarVisibilityEffect();
     }
@@ -909,6 +911,8 @@
      */
     override public function loadViewData(value:Object):void
     {
+        super.loadViewData(value);
+
         var savedStacks:Vector.<Object>;
         var savedSelectedIndex:Number = value.selectedIndex as Number;

@@ -1039,16 +1043,21 @@
     private function visibilityAnimation_completeHandler(event:EffectEvent):void
     {
         event.target.removeEventListener(EffectEvent.EFFECT_END, visibilityAnimation_completeHandler);
-
-        tabBar.visible = tabBar.includeInLayout = tabBarProps.end.visible;
-        tabBar.cacheAsBitmap = tabBarProps.start.cacheAsBitmap;
-
-        contentGroup.includeInLayout = contentGroupProps.start.includeInLayout;
-        contentGroup.cacheAsBitmap = contentGroupProps.start.cacheAsBitmap;
-
         tabBarVisibilityEffect = null;
-        tabBarProps = null;
-        contentGroupProps = null;
+
+        if (tabBarProps)
+        {
+            tabBar.visible = tabBar.includeInLayout = tabBarProps.end.visible;
+            tabBar.cacheAsBitmap = tabBarProps.start.cacheAsBitmap;
+            tabBarProps = null;
+        }
+
+        if (contentGroupProps)
+        {
+            contentGroup.includeInLayout = contentGroupProps.start.includeInLayout;
+            contentGroup.cacheAsBitmap = contentGroupProps.start.cacheAsBitmap;
+            contentGroupProps = null;
+        }
     }

     //--------------------------------------------------------------------------


Transferred from the Adobe Open Source Subversion Repository

Revision: 19325
Author:   clucier@adobe.com
Date:     2010-12-13T20:17:04.998196Z

Log Message:
-----------
We now disable background processing (disable layout) during mobile view transitions.  Added mode to PerfReporter such that FPS is computed via ENTER_FRAME events instead of RENDER (was a pain to have to invoke stage.invalidate() at all the right places, for interval based animations). Disabled frameRate zooming in ViewNavigator.

QE notes: None
Doc notes: None
Bugs: SDK-28657, SDK-28755
Reviewer: Chiedo
Tests run: Checkin, TransitionTests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/PerfLib/src/perflib/impl/PerfReporter.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/mobile/TransitionTests/src/TransitionTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance/PerfLib/src/perflib/IPerfReporter.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264777 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as
@@ -151,7 +151,11 @@
      */
     private var animatedProperty:String;

-
+    /**
+     *  @private
+     */
+    private var flipEffect:IEffect;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -317,7 +321,7 @@
         // Align underside 'face' of our card.
         alignCardFaces(endView);

-        return createCardFlipAnimation(transitionGroup, endView.width);
+        return createCardFlipAnimation(endView.width);
     }

     /**
@@ -332,7 +336,7 @@
         // Align underside 'face' of our card.
         alignCardFaces(targetNavigator);

-        return createCardFlipAnimation(transitionGroup, endView.width);
+        return createCardFlipAnimation(endView.width);
     }

     /**
@@ -340,7 +344,7 @@
      *  Shared helper routine which serves as our effect factory for both standard
      *  and consolidated transitions.
      */
-    protected function createCardFlipAnimation(flipTarget:UIComponent, width:Number):IEffect
+    protected function createCardFlipAnimation(width:Number):IEffect
     {
         // Now offset our transform center as appropriate for the transition direction
         transitionGroup.transformX = viewWidth / 2;
@@ -383,10 +387,11 @@
         // an update listener so that we can hide the old view once it's out
         // of view.
         animation.motionPaths = vector;
-        animation.target = flipTarget;
+        animation.target = transitionGroup;
         animation.duration = duration;
         animation.addEventListener("effectUpdate", effectUpdateHandler);
         animation.easer = easer;
+        flipEffect = animation;

         return animation;
     }
@@ -405,10 +410,11 @@
             if (!consolidatedTransition)
                 startView.visible = false;
             else
-                cachedNavigator.visible = false;
-
-            event.target.removeEventListener("effectUpdate", effectUpdateHandler);
+                cachedNavigator.displayObject.visible = false;
         }
+
+        // Ensure transform matrix is updated even when layout is disabled.
+        transitionGroup.validateDisplayList();
     }

     //--------------------------------------------------------------------------
@@ -428,7 +434,7 @@
         alignCubeFaces(startView, endView);

         // Construct our animation sequence now that actors are configured.
-        return createCubeFlipAnimation(transitionGroup, vertical ? viewHeight : viewWidth);
+        return createCubeFlipAnimation(vertical ? viewHeight : viewWidth);
     }

     /**
@@ -444,7 +450,7 @@
         alignCubeFaces(cachedNavigator, targetNavigator);

         // Construct our animation sequence now that actors are configured.
-        return createCubeFlipAnimation(transitionGroup, vertical ? viewHeight : viewWidth);
+        return createCubeFlipAnimation(vertical ? viewHeight : viewWidth);
     }

     /**
@@ -452,19 +458,20 @@
      *  Shared helper routine which serves as our effect factory for both standard
      *  and consolidated transitions.
      */
-    protected function createCubeFlipAnimation(flipTarget:UIComponent, depth:Number):IEffect
+    protected function createCubeFlipAnimation(depth:Number):IEffect
     {
         // Validate our transition group prior to the start of our animation.
         transitionGroup.validateNow();

         var p:Parallel = new Parallel();
-        p.target = flipTarget;
+        p.target = transitionGroup;

         // Zoom out
         var m1:Move3D = new Move3D();
         m1.zTo = depth / 1.45;
         m1.duration = duration/2;
         m1.addEventListener("effectUpdate", cubeEffectUpdateHandler);
+        flipEffect = m1;

         // Zoom back in
         var m2:Move3D = new Move3D();
@@ -499,10 +506,10 @@

         var frontFacing:Boolean = isFrontFacing(face);
         if (!frontFacing)
-        {
             face.visible = false;
-            event.target.removeEventListener("effectUpdate", cubeEffectUpdateHandler);
-        }
+
+        // Ensure transform matrix is updated even when layout is disabled.
+        transitionGroup.validateDisplayList();
     }

     /**
@@ -551,7 +558,7 @@
             face.scaleX = -1;
         }
     }
-
+
     /**
      *  @private
      */
@@ -772,9 +779,12 @@
         transitionGroup = null;
         cachedNavigator = null;

+        flipEffect.removeEventListener("effectUpdate", cubeEffectUpdateHandler);
+        flipEffect.removeEventListener("effectUpdate", effectUpdateHandler);
+        flipEffect = null;
+
         super.cleanUp();
     }
-

 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20073
Author:   rfrishbe@adobe.com
Date:     2011-02-02T22:32:18.438038Z

Log Message:
-----------
Fixing up TextArea ScrollBar thumbs so that they are an appropriate minimum size.

QE notes: -
Doc notes:
Bugs: SDK-29175
Reviewer: Eric Day
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265526 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as
@@ -1,7 +1,9 @@
 package spark.skins.mobile
 {
 import mx.core.DPIClassification;
+import mx.core.mx_internal;

+use namespace mx_internal;

 public class TextAreaHScrollBarSkin extends HScrollBarSkin
 {
@@ -10,26 +12,38 @@
         super();

         thumbSkinClass = TextAreaHScrollBarThumbSkin;
+        var paddingBottom:int;
+        var paddingHorizontal:int;

         switch (applicationDPI)
         {
             case DPIClassification.DPI_320:
             {
                 minHeight = 15;
+                paddingBottom = TextAreaHScrollBarThumbSkin.PADDING_BOTTOM_320DPI;
+                paddingHorizontal = TextAreaHScrollBarThumbSkin.PADDING_HORIZONTAL_320DPI;
                 break;
             }
             case DPIClassification.DPI_240:
             {
                 minHeight = 11;
+                paddingBottom = TextAreaHScrollBarThumbSkin.PADDING_BOTTOM_240DPI;
+                paddingHorizontal = TextAreaHScrollBarThumbSkin.PADDING_HORIZONTAL_240DPI;
                 break;
             }
             default:
             {
                 // default PPI160
                 minHeight = 9;
+                paddingBottom = TextAreaHScrollBarThumbSkin.PADDING_BOTTOM_DEFAULTDPI;
+                paddingHorizontal = TextAreaHScrollBarThumbSkin.PADDING_HORIZONTAL_DEFAULTDPI;
                 break;
             }
         }
+
+        // The minimum width is set such that, at it's smallest size, the thumb appears
+        // as wide as it is high.
+        minThumbWidth = (minHeight - paddingBottom) + (paddingHorizontal * 2);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19444
Author:   klin@adobe.com
Date:     2010-12-17T01:12:03.325656Z

Log Message:
-----------
Enable easier styling and customization of DataGrid skin parts. Replaced IGridRowBackground with IGridVisualElement. A DataGrid skin part that implements IGridVisualElement will have its prepareGridVisualElement() method called before its layed out. This allows us create skin parts that can pull styles from DataGrid when created. Users can also have their skin parts implement IGridVisualElement to customize their skin part before beign layed out.

Also added the following styles to DataGrid: caretColor, rollOverColor, selectionColor, and symbolColor. Many of the skin parts in the default skin implement IGridVisualElement to enable these styles. Added default caretColor to defaults.css of #0167FF.

QE notes: Will break custom skin tests
Doc notes: No
Bugs: SDK-28491
Reviewer: Hans
Tests run: cyclone, checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultGridHeaderRenderer.mxml</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridRowBackground.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/IGridVisualElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DataGridSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/wireframe/src/spark/skins/wireframe/DataGridSkin.mxml</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281840 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridVisualElement.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridVisualElement.as
@@ -0,0 +1,83 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.components.gridClasses
+{
+
+import spark.components.Grid;
+
+/**
+ *  This interface provides a method that dynamically created visual
+ *  elements can use to configure themselves before they're displayed.
+ *  It's called as needed when a factory generated visual element
+ *  is created or reused.  It is not intended to be called directly.
+ *
+ *
This is an optional interface for all of the factory-generated
+ *  visual elements except itemRenderers: caretIndicator,
+ *  hoverIndicator, editorIndicator,
+ *  selectionIndicator, columnSeparator,
+ *  rowSeparator,
+ *  alternatingRowColorsBackground (see DataGrid),
+ *  sortIndicator (see GridColumnHeaderGroup).  It's
+ *  typically used to configure generated visual elements with
+ *  DataGrid's style values.  For example, to use the value of the
+ *  DataGrid's "symbolColor" style for the caret's fill color,
+ *  one would define the prepareGridVisualElement()
+ *  method like this:

+ *
+ *

+ *

+ *  public function prepareGridVisualElement(grid:Grid, rowIndex:int, columnIndex:int):void
+ *  {
+ *      caretStroke.color = grid.dataGrid.getStyle("caretColor");
+ *  }
+ *

+ *

+ *
+ *
The rowIndex and columnIndex parameters specify the
+ *  the cell the visual element will occupy.  If columnIndex=-1 then the visual element
+ *  will occupy a Grid row; similarly if rowIndex=-1 then the visual element will occupy
+ *  a Grid column.

+ *
+ *
There are many more examples like this in DataGridSkin.mxml.  Note that custom
+ *  DataGrid skin visual elements can choose not to implement this interface if the
+ *  the added flexibility isn't needed.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4.5
+ */
+public interface IGridVisualElement
+{
+    /**
+     *  This method is called before a visual element of the Grid is rendered to give the
+     *  element a chance to configure itself.  The method's parameters specify what
+     *  cell, or row (if columnIndex = -1), or column (if rowIndex = -1) the visual
+     *  element will occupy.
+     *
+     *
If the visual element is generated by a factory valued
+     *  DataGrid skin part, like selectionIndicator or hoverIndicator,
+     *  then grid.dataGrid will be the DataGrid for which
+     *  grid is a skin part.

+     *
+     *  @param grid The Grid associated with this visual element.
+     *  @param rowIndex The row coordinate of the cell the visual element will occupy, or -1
+     *  @param columnIndex The column coordinate of the cell the visual element will occupy, or -1
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    function prepareGridVisualElement(grid:Grid, rowIndex:int, columnIndex:int):void;
+}
+}


show warning if unsupported attribute tags are found

--- src/sssplayer/data/SSSPartAnime.as
+++ src/sssplayer/data/SSSPartAnime.as
@@ -16,7 +16,20 @@
 			}
 			this._attributes = {};
 			for each (var attribute:XML in this.xml.attributes.attribute) {
-				this._attributes[attribute.@tag] = SSSAttribute.fromXML(attribute);
+				var attributeTag:String = String(attribute.@tag);
+				this._attributes[attributeTag] = SSSAttribute.fromXML(attribute);
+				switch (attributeTag) {
+					case "CELL":
+					case "HIDE":
+					case "POSX":
+					case "POSY":
+					case "ROTZ":
+					case "SCLX":
+					case "SCLY":
+						break;
+					default:
+						trace("SSSPartAnime.attributes(): Attribute not supported:", attributeTag);
+				}
 			}
 			return this._attributes;
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1251783 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/automation_airspark/src/spark/automation/delegates/components/SparkWindowAutomationImpl.as
+++ frameworks/projects/automation_airspark/src/spark/automation/delegates/components/SparkWindowAutomationImpl.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package spark.automation.delegates.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290669 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/olap/QueryError.as
+++ frameworks/projects/advancedgrids/src/mx/olap/QueryError.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 12930
Author:   egeorgie@adobe.com
Date:     2009-12-15T00:23:58.803039Z

Log Message:
-----------
Optimize transformSize and transformBounds, reduce allocation of Point objects.

This change addresses a couple of FIXMEs I had put in the internal MatrixUtil class. The parameters were changed to numbers instead of points and I unrolled the matrix multiplication to significantly reduce the number of multiplications and additions. Both methods now return reference to the same internal static Point object to further reduce dynamic object allocation.

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Deepa
Tests run: checkintests, mustella tests/gumbo/layout
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/sparkTest/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260986 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/BitmapFill.as
+++ frameworks/projects/framework/src/mx/graphics/BitmapFill.as
@@ -941,7 +941,7 @@

                 // Get the bounds of the transformed bitmap (minus translation)
                 var bitmapSize:Point = MatrixUtil.transformBounds(
-                                        new Point(sourceAsBitmapData.width, sourceAsBitmapData.height),
+                                        sourceAsBitmapData.width, sourceAsBitmapData.height,
                                         transformMatrix,
                                         bitmapTopLeft);


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262090 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/modules/IModuleInfo.as
+++ frameworks/projects/framework/src/mx/modules/IModuleInfo.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.modules
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6753
Author:   srahim@adobe.com
Date:     2009-05-08T14:46:34.979202Z

Log Message:
-----------
QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/MXMLComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278371 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/ButtonBar.as
+++ frameworks/projects/spark/src/spark/components/ButtonBar.as
@@ -52,9 +52,23 @@
 [Event(name="itemClick", type="mx.events.ItemClickEvent")]

 /**
- *  The ButtonBar control displays a set of Buttons
+ *  The ButtonBar control displays a set of Buttons.
+ *
+ *  @mxml
The <ButtonBar> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <ButtonBar
+ *
+ *    Properties
+ *    arrowKeysWrapFocus="true|false"
+ *    Events
+ *    itemClick="No default"
+ *  />
+ *

  *
  *  @includeExample examples/ButtonBarExample.mxml
+ *  @see spark.skins.default.ButtonBarSkin
  *
  *  @langversion 3.0
  *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 7979
Author:   aharui@adobe.com
Date:     2009-06-18T21:47:52.364806Z

Log Message:
-----------
ButtonBar PARB changes:

-arrowKeysWrapFocus removed from ButtonBar
-arrowKeysWrapFocus added to ListBase
-arrowKeysWrapFocus added as parameter to LayoutBase.getNavigationDestinationIndex (and subclasses of LayoutBase)
-itemClick event removed from ButtonBar, now uses "change" event like other ListBase components
-ASDoc removed for partAdded/partRemoved

QE Notes: None
Doc Notes: Yes, ASDoc affected by every change listed above
Bugs: N/A
Reviewer: szeto
tests: checkintests mustella/List mustella/ButtonBar

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278378 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/ButtonBar.as
+++ frameworks/projects/spark/src/spark/components/ButtonBar.as
@@ -30,27 +30,12 @@
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;
-import mx.events.ItemClickEvent;
+import mx.events.IndexChangedEvent;
 import mx.managers.IFocusManagerComponent;

+use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal
+
 [IconFile("ButtonBar.png")]
-
-//--------------------------------------
-//  Events
-//--------------------------------------
-
-/**
- *  Dispatched when a button is selected.
- *
- *  @eventType mx.events.ItemClickEvent.ITEM_CLICK
- *
- *  @langversion 3.0
- *  @playerversion Flash 10
- *  @playerversion AIR 1.5
- *  @productversion Flex 4
- */
-[Event(name="itemClick", type="mx.events.ItemClickEvent")]
-

 [Alternative(replacement="mx.controls.ButtonBar", since="4.0")]

@@ -60,7 +45,7 @@
  *
  *
The typical use for a button bar is for grouping
  *  a set of related buttons together, which gives them a common look
- *  and navigation, and handling the logic for the itemClick event
+ *  and navigation, and handling the logic for the change event
  *  in a single place.

  *
  *
The ButtonBar control creates Button controls based on the value of
@@ -76,11 +61,6 @@
  *

  *  <ButtonBar
  *
- *    Properties
- *    arrowKeysWrapFocus="false"
- *
- *    Events
- *    itemClick="No default"
  *  />
  *

  *
@@ -123,13 +103,13 @@
         super();
         itemRendererFunction = defaultButtonBarItemRendererFunction;

-        //Add a keyDown event listener so we can adjust
-        //selection accordingly.
-        addEventListener(KeyboardEvent.KEY_DOWN, buttonBar_keyDownHandler);
-        addEventListener(KeyboardEvent.KEY_UP, buttonBar_keyUpHandler);
-
         tabChildren = false;
         tabEnabled = true;
+
+        addEventListener(IndexChangedEvent.CARET_CHANGE, caretChangeHandler);
+
+        // start off with a button under the caret
+        _caretIndex = 0;
     }

     //--------------------------------------------------------------------------
@@ -140,12 +120,6 @@

     /**
      *  @private
-     *  Index of currently focused child.
-     */
-    private var focusedIndex:int = 0;
-
-    /**
-     *  @private
      */
     private var inKeyUpHandler:Boolean;

@@ -155,23 +129,6 @@
     //
     //--------------------------------------------------------------------------

-    //----------------------------------
-    //  arrowKeysWrapFocus
-    //----------------------------------
-
-    /**
-     *  If true, using arrow keys to navigate within
-     *  the ButtonBar wraps when it hits either end.
-     *
-     *  @default false
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var arrowKeysWrapFocus:Boolean;
-
     //----------------------------------
     //  firstButton
     //----------------------------------
@@ -308,8 +265,8 @@
      */
     override public function drawFocus(isFocused:Boolean):void
     {
-        adjustLayering(focusedIndex);
-        drawButtonFocus(focusedIndex, isFocused);
+        adjustLayering(caretIndex);
+        drawButtonFocus(caretIndex, isFocused);
     }

@@ -325,18 +282,13 @@

         if (renderer)
         {
-            focusedIndex = index;
+            setCurrentCaretIndex(index);
             renderer.selected = selected;
         }
     }

     /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
+     *  @private
      */
     override protected function partAdded(partName:String, instance:Object):void
     {
@@ -351,12 +303,7 @@
     }

     /**
-     *  @inheritDoc
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
+     *  @private
      */
     override protected function partRemoved(partName:String, instance:Object):void
     {
@@ -369,6 +316,19 @@
         }

         super.partRemoved(partName, instance);
+    }
+
+    /**
+     *  @private
+     *  button bar always keeps something under the caret so don't let it
+     *  become -1
+     */
+    override mx_internal function setCurrentCaretIndex(value:Number):void
+    {
+        if (value == -1)
+            return;
+
+        super.setCurrentCaretIndex(value);
     }

     //--------------------------------------------------------------------------
@@ -435,60 +395,63 @@
      */
     private function item_clickHandler(event:MouseEvent):void
     {
-        var index:int = dataGroup.getElementIndex(
+        var newIndex:int = dataGroup.getElementIndex(
                             event.currentTarget as IVisualElement);

         var currentRenderer:IItemRenderer;
-        if (focusedIndex >= 0  && !inKeyUpHandler)
-        {
-            currentRenderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
+        if (caretIndex >= 0 && !inKeyUpHandler) // don't remove caret when keybd nav
+        {
+            currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
             currentRenderer.showsCaret = false;
         }

-        if (index == selectedIndex)
+        if (newIndex == selectedIndex)
         {
             if (!requireSelection)
-                selectedIndex = -1;
+                selectedIndex = NO_SELECTION;
         }
         else
         {
-            focusedIndex = selectedIndex = index;
-        }
-
-        var newEvent:ItemClickEvent =
-            new ItemClickEvent(ItemClickEvent.ITEM_CLICK);
-        if ("label" in event.currentTarget)
-            newEvent.label = event.currentTarget.label;
-        newEvent.index = index;
-        newEvent.relatedObject = InteractiveObject(event.currentTarget);
-        newEvent.item = dataProvider ?
-                        dataProvider.getItemAt(index) :
-                        null;
-        dispatchEvent(newEvent);
-    }
-
+            selectedIndex = newIndex;
+        }
+
+    }
+
+    /**
+     *  @private
+     */
+    private function caretChangeHandler(event:Event):void
+    {
+        adjustLayering(caretIndex);
+    }
+
     /**
      *  @private
      *  Attempt to lift the focused button above the others
      *  so that the focus ring can show.
      */
-    private function adjustLayering(focusedIndex:int):void
+    private function adjustLayering(caretIndex:int):void
     {
         var n:int = dataProvider ? dataProvider.length : 0;
         for (var i:int = 0; i < n; i++)
         {
             var renderer:IVisualElement = IVisualElement(dataGroup.getElementAt(i));
-            if (i == focusedIndex)
-                renderer.depth = 1;
-            else
-                renderer.depth = 0;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    private function buttonBar_keyDownHandler(event:KeyboardEvent):void
+            // renderer may not exist in commitProps
+            // should get called again when we get focus
+            if (renderer)
+            {
+                if (i == caretIndex)
+                    renderer.depth = 1;
+                else
+                    renderer.depth = 0;
+            }
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function keyDownHandler(event:KeyboardEvent):void
     {
         var currentRenderer:IItemRenderer;
         var renderer:IItemRenderer;
@@ -502,22 +465,30 @@
         if (!dataProvider)
             return;

+        super.keyDownHandler(event);
+
+        var oldCaretIndex:Number = caretIndex;
+        var e:IndexChangedEvent;
         var length:int = dataProvider.length;
         switch (event.keyCode)
         {
             case Keyboard.UP:
             case Keyboard.LEFT:
             {
-                currentRenderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
-                if (focusedIndex > 0 || arrowKeysWrapFocus)
+                currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
+                if (caretIndex > 0 || arrowKeysWrapFocus)
                 {
                     if (currentRenderer)
                         currentRenderer.showsCaret = false;
-                    focusedIndex = (focusedIndex - 1 + length) % length;
-                    adjustLayering(focusedIndex);
-                    renderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
+                    setCurrentCaretIndex((caretIndex - 1 + length) % length);
+                    adjustLayering(caretIndex);
+                    renderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                     if (renderer)
                         renderer.showsCaret = true;
+                    e = new IndexChangedEvent(IndexChangedEvent.CARET_CHANGE);
+                    e.oldIndex = oldCaretIndex;
+                    e.newIndex = caretIndex;
+                    dispatchEvent(e);
                 }

                 event.stopPropagation();
@@ -526,16 +497,20 @@
             case Keyboard.DOWN:
             case Keyboard.RIGHT:
             {
-                currentRenderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
-                if (focusedIndex < dataProvider.length - 1 || arrowKeysWrapFocus)
+                currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
+                if (caretIndex < dataProvider.length - 1 || arrowKeysWrapFocus)
                 {
                     if (currentRenderer)
                         currentRenderer.showsCaret = false;
-                    focusedIndex = (focusedIndex + 1) % length;
-                    adjustLayering(focusedIndex);
-                    renderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
+                    setCurrentCaretIndex((caretIndex + 1) % length);
+                    adjustLayering(caretIndex);
+                    renderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                     if (renderer)
                         renderer.showsCaret = true;
+                    e = new IndexChangedEvent(IndexChangedEvent.CARET_CHANGE);
+                    e.oldIndex = oldCaretIndex;
+                    e.newIndex = caretIndex;
+                    dispatchEvent(e);
                 }

                 event.stopPropagation();
@@ -543,7 +518,7 @@
             }
             case Keyboard.SPACE:
             {
-                currentRenderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
+                currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                 if (!currentRenderer || (currentRenderer.selected && requireSelection))
                     return;
                 currentRenderer.dispatchEvent(event);
@@ -555,7 +530,7 @@
     /**
      *  @private
      */
-    private function buttonBar_keyUpHandler(event:KeyboardEvent):void
+    override protected function keyUpHandler(event:KeyboardEvent):void
     {
         var currentRenderer:IItemRenderer;
         var renderer:IItemRenderer;
@@ -568,11 +543,13 @@

         inKeyUpHandler = true;

+        super.keyUpHandler(event);
+
         switch (event.keyCode)
         {
             case Keyboard.SPACE:
             {
-                  currentRenderer = dataGroup.getElementAt(focusedIndex) as IItemRenderer;
+                  currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                 if (!currentRenderer || (currentRenderer.selected && requireSelection))
                     return;
                 currentRenderer.dispatchEvent(event);