flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [18/50] [abbrv] git commit: [flex-sdk] [refs/heads/master] - FLEX-34982: The styles will now fallback to assigning directly to the chart directly if the style declaration was not found. This corrects RTE's that occur later when the styles are referenced
Date Mon, 11 Jan 2016 21:55:01 GMT
FLEX-34982: The styles will now fallback to assigning directly to the chart directly if the
style declaration was not found.  This corrects RTE's that occur later when the styles are
referenced and do not perform null checks.

-Removed initStyles() method return values since they were not being checked and it's only
response was true.  It's a private method, will not have to worry about being overridden.


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

Branch: refs/heads/master
Commit: 10a910ea280b7abec5c8afff4883a94360f701b0
Parents: d22d687
Author: Mark Kessler <KesslerConsulting@gmail.com>
Authored: Fri Dec 11 12:34:20 2015 -0500
Committer: Mark Kessler <KesslerConsulting@gmail.com>
Committed: Fri Dec 11 12:34:20 2015 -0500

----------------------------------------------------------------------
 .../charts/src/mx/charts/series/AreaSeries.as   | 20 ++++++++++++----
 .../charts/src/mx/charts/series/BarSeries.as    | 17 ++++++++++----
 .../charts/src/mx/charts/series/BubbleSeries.as | 19 ++++++++++++----
 .../src/mx/charts/series/CandlestickSeries.as   | 18 +++++++++++----
 .../charts/src/mx/charts/series/ColumnSeries.as | 16 ++++++++++---
 .../charts/src/mx/charts/series/HLOCSeries.as   | 17 ++++++++++----
 .../charts/src/mx/charts/series/LineSeries.as   | 20 ++++++++++++----
 .../charts/src/mx/charts/series/PieSeries.as    | 24 ++++++++++++++------
 .../charts/src/mx/charts/series/PlotSeries.as   | 14 +++++++++---
 9 files changed, 125 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as b/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as
index 1b26975..f36d4ed 100644
--- a/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/AreaSeries.as
@@ -869,11 +869,13 @@ public class AreaSeries extends Series implements IStackable2
 	/**
 	 *  @private
 	 */
-	private function initStyles():Boolean
+	private function initStyles():void
 	{
 		HaloDefaults.init(styleManager);
-		
+
 		var areaSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.AreaSeries");
+
+
 		if (areaSeriesStyle)
 		{
 			areaSeriesStyle.setStyle("areaRenderer", new ClassFactory(mx.charts.renderers.AreaRenderer));
@@ -882,10 +884,18 @@ public class AreaSeries extends Series implements IStackable2
 			areaSeriesStyle.setStyle("fills", []);
 			areaSeriesStyle.setStyle("stroke", HaloDefaults.pointStroke);
 		}
-		
-		return true;
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("areaRenderer", new ClassFactory(mx.charts.renderers.AreaRenderer));
+			setStyle("legendMarkerRenderer", new ClassFactory(AreaSeriesLegendMarker));
+			setStyle("areaFill", new SolidColor(0x000000));
+			setStyle("fills", []);
+			setStyle("stroke", HaloDefaults.pointStroke);
+        }
 	}
-	
+
+
 	/**
 	 *  @inheritDoc
 	 *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
index 7fb224a..42b5d76 100644
--- a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
@@ -1051,11 +1051,13 @@ public class BarSeries extends Series implements IStackable2, IBar
 	/**
      *  @private
      */
-    private function initStyles():Boolean
+    private function initStyles():void
     {
         HaloDefaults.init(styleManager);
 		
 		var barSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.BarSeries");
+
+
 		if (barSeriesStyle)
 		{
 			barSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.BoxItemRenderer));
@@ -1063,10 +1065,17 @@ public class BarSeries extends Series implements IStackable2, IBar
 			barSeriesStyle.setStyle("fills", []);
 			barSeriesStyle.setStyle("stroke", HaloDefaults.emptyStroke);
 		}
-		
-        return true;
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.BoxItemRenderer));
+			setStyle("fill", new SolidColor(0x000000));
+			setStyle("fills", []);
+			setStyle("stroke", HaloDefaults.emptyStroke);
+        }
     }
-    
+
+
     /**
      *  @inheritDoc
      *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as b/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as
index 57bfcfb..c061671 100644
--- a/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/BubbleSeries.as
@@ -699,11 +699,13 @@ public class BubbleSeries extends Series
 	/**
 	 *  @private
 	 */
-	private function initStyles():Boolean
+	private function initStyles():void
 	{
 		HaloDefaults.init(styleManager);
-		
+
 		var bubbleSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.BubbleSeries");
+
+
 		if (bubbleSeriesStyle)
 		{
 			bubbleSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.CircleItemRenderer));
@@ -711,10 +713,17 @@ public class BubbleSeries extends Series
 			bubbleSeriesStyle.setStyle("fills", []);
 			bubbleSeriesStyle.setStyle("stroke", new SolidColorStroke(0,1,0.2));
 		}
-		
-		return true;
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.CircleItemRenderer));
+			setStyle("fill", new SolidColor(0x444444));
+			setStyle("fills", []);
+			setStyle("stroke", new SolidColorStroke(0,1,0.2));
+        }
 	}
-	
+
+
 	/**
 	 *  @inheritDoc
 	 *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as b/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as
index 32959fb..1b29f6b 100644
--- a/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as
@@ -284,11 +284,13 @@ public class CandlestickSeries extends HLOCSeriesBase
     /**
      *  @private
      */
-    private function initStyles():Boolean
+    private function initStyles():void
     {
         HaloDefaults.init(styleManager);
-		
+
 		var csSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.CandlestickSeries");
+
+
 		if (csSeriesStyle)
 		{
 			csSeriesStyle.setStyle("boxStroke", new SolidColorStroke(0,0));
@@ -298,8 +300,16 @@ public class CandlestickSeries extends HLOCSeriesBase
 			csSeriesStyle.setStyle("fills", []);
 			csSeriesStyle.setStyle("stroke", new SolidColorStroke(0,0));
 		}
-		
-        return true;
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("boxStroke", new SolidColorStroke(0,0));
+			setStyle("declineFill", new SolidColor(0));
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.CandlestickItemRenderer));
+			setStyle("fill", new SolidColor(0xFFFFFF));
+			setStyle("fills", []);
+			setStyle("stroke", new SolidColorStroke(0,0));
+        }
     }
 
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
index 05e5eee..9a02582 100644
--- a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
@@ -1039,21 +1039,31 @@ public class ColumnSeries extends Series implements IColumn,IStackable2
     /**
      *  @private
      */
-    private function initStyles():Boolean
+    private function initStyles():void
     {
         HaloDefaults.init(styleManager);
 		
 		var columnSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.ColumnSeries");
+
+
 		if (columnSeriesStyle)
 		{
 			columnSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.BoxItemRenderer));
 			columnSeriesStyle.setStyle("fill", new SolidColor(0x000000));
 			columnSeriesStyle.setStyle("fills", []);
 			columnSeriesStyle.setStyle("stroke", HaloDefaults.emptyStroke);
-		}		
-        return true;
+		}
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.BoxItemRenderer));
+			setStyle("fill", new SolidColor(0x000000));
+			setStyle("fills", []);
+			setStyle("stroke", HaloDefaults.emptyStroke);
+        }
     }
 
+
     /**
      *  @inheritDoc
      *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as b/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
index dfcc8af..cfd9eec 100644
--- a/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
@@ -188,11 +188,13 @@ public class HLOCSeries extends HLOCSeriesBase
 	/**
 	 *  @private
 	 */
-	private function initStyles():Boolean
+	private function initStyles():void
 	{
 		HaloDefaults.init(styleManager);
-		
+
 		var hlocSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.HLOCSeries");
+
+
 		if (hlocSeriesStyle)
 		{
 			hlocSeriesStyle.setStyle("closeTickStroke", new SolidColorStroke(0, 3, 1, false, "normal",
"none"));
@@ -200,10 +202,17 @@ public class HLOCSeries extends HLOCSeriesBase
 			hlocSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.HLOCItemRenderer));
 			hlocSeriesStyle.setStyle("stroke", new SolidColorStroke(0,0));
 		}
-		
-		return true;
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("closeTickStroke", new SolidColorStroke(0, 3, 1, false, "normal", "none"));
+			setStyle("openTickStroke", new SolidColorStroke(0, 3, 1, false, "normal", "none"));
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.HLOCItemRenderer));
+			setStyle("stroke", new SolidColorStroke(0,0));
+        }
 	}
 
+
 	/**
 	 *  @inheritDoc
 	 *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/LineSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/LineSeries.as b/frameworks/projects/charts/src/mx/charts/series/LineSeries.as
index 08c97c4..6cc7462 100644
--- a/frameworks/projects/charts/src/mx/charts/series/LineSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/LineSeries.as
@@ -883,21 +883,31 @@ public class LineSeries extends Series
 	/**
      *  @private
      */
-    private function initStyles():Boolean
+    private function initStyles():void
     {
         HaloDefaults.init(styleManager);
-		
+
 		var lineSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.LineSeries");
+
+
 		if (lineSeriesStyle)
 		{
 			lineSeriesStyle.setStyle("lineSegmentRenderer", new ClassFactory(LineRenderer));
 			lineSeriesStyle.setStyle("fill", new SolidColor(0xFFFFFF));
 			lineSeriesStyle.setStyle("fills", []);
 			lineSeriesStyle.setStyle("lineStroke", new SolidColorStroke(0,3));
-		}		
-        return true;
+		}
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("lineSegmentRenderer", new ClassFactory(LineRenderer));
+			setStyle("fill", new SolidColor(0xFFFFFF));
+			setStyle("fills", []);
+			setStyle("lineStroke", new SolidColorStroke(0,3));
+        }
     }
-    
+
+
     /**
      *  @inheritDoc
      *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/PieSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/PieSeries.as b/frameworks/projects/charts/src/mx/charts/series/PieSeries.as
index 97783b1..02c87c0 100644
--- a/frameworks/projects/charts/src/mx/charts/series/PieSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/PieSeries.as
@@ -1170,29 +1170,39 @@ public class PieSeries extends Series
 	/**
 	 *  @private
 	 */
-	private function initStyles():Boolean
+	private function initStyles():void
 	{
 		HaloDefaults.init(styleManager);
 		
+		var pieSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.PieSeries");
 		var pieFills:Array /* of IFill */ = [];
-		
 		var n:int = HaloDefaults.defaultFills.length;
+
+
 		for (var i:int = 0; i < n; i++)
 		{
 			pieFills[i] = HaloDefaults.defaultFills[i];
 		}
-		
-		var pieSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.PieSeries");
+
+
 		if (pieSeriesStyle)
 		{
 			pieSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.WedgeItemRenderer));
 			pieSeriesStyle.setStyle("fills", pieFills);
 			pieSeriesStyle.setStyle("legendMarkerRenderer", new ClassFactory(PieSeriesLegendMarker));
 			pieSeriesStyle.setStyle("calloutStroke", new SolidColorStroke(0,0,1));
-		}		
-		return true;
+		}
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.WedgeItemRenderer));
+			setStyle("fills", pieFills);
+			setStyle("legendMarkerRenderer", new ClassFactory(PieSeriesLegendMarker));
+			setStyle("calloutStroke", new SolidColorStroke(0,0,1));
+        }
 	}
-	
+
+
 	/**
 	 *  @inheritDoc
 	 *  

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/10a910ea/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as b/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
index 7d1c7bb..da73d3a 100644
--- a/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
+++ b/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
@@ -632,18 +632,26 @@ public class PlotSeries extends Series
 	/**
      *  @private
      */
-    private function initStyles():Boolean
+    private function initStyles():void
     {
         HaloDefaults.init(styleManager);
 		
 		var plotSeriesStyle:CSSStyleDeclaration = HaloDefaults.findStyleDeclaration(styleManager,
"mx.charts.series.PlotSeries");
+
+
 		if (plotSeriesStyle)
 		{
 			plotSeriesStyle.setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.DiamondItemRenderer));
 			plotSeriesStyle.setStyle("fill", new SolidColor(0x4444AA));
 			plotSeriesStyle.setStyle("fills", []);
-		}		
-        return true;
+		}
+        else
+        {
+            //Fallback to set the style to this chart directly.
+			setStyle("itemRenderer", new ClassFactory(mx.charts.renderers.DiamondItemRenderer));
+			setStyle("fill", new SolidColor(0x4444AA));
+			setStyle("fills", []);
+        }
     }
 
     


Mime
View raw message