You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2010/06/08 16:52:34 UTC

svn commit: r952667 - in /incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat: Component.js configuration/ComponentAppearance.js configuration/Theme.js

Author: zoe
Date: Tue Jun  8 14:52:34 2010
New Revision: 952667

URL: http://svn.apache.org/viewvc?rev=952667&view=rev
Log:
ARIES-319 More colours moved to Theme

Modified:
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/ComponentAppearance.js
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/Theme.js

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js?rev=952667&r1=952666&r2=952667&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js Tue Jun  8 14:52:34 2010
@@ -177,7 +177,7 @@ initGfx : function() {
 		r : 5
 	}).setStroke( {
 		width : 2,
-		color : '#808080'
+		color : this.componentAppearance.getOutlineColor0()
 	})
 
 	if (this.componentAppearance.useLinearShading()) {
@@ -192,7 +192,7 @@ initGfx : function() {
 				color : this.componentAppearance.getBackgroundColor()
 			}, {
 				offset : 1,
-				color : "#ffffff"
+				color : this.componentAppearance.getBackgroundContrastColor()
 			} ]
 		});
 	} else {
@@ -227,7 +227,7 @@ refresh : function() {
 				color : this.componentAppearance.getBackgroundColor()
 			}, {
 				offset : 1,
-				color : "#ffffff"
+				color : this.componentAppearance.getBackgroundContrastColor() 
 			} ]
 		});
 	} else {

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/ComponentAppearance.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/ComponentAppearance.js?rev=952667&r1=952666&r2=952667&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/ComponentAppearance.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/ComponentAppearance.js Tue Jun  8 14:52:34 2010
@@ -32,6 +32,10 @@ dojo.declare("goat.configuration.Compone
 	lineColour : null,
 	lineWidth : null,
 	backgroundColour : null,
+	backgroundContrastColour : null,
+	outlineColor0 : null,
+	outlineColor1 : null,
+	outlineColor2 : null,
 
 	constructor : function(theme, parentAppearance) {
 		this.theme = theme;
@@ -46,9 +50,48 @@ dojo.declare("goat.configuration.Compone
 			return this.theme.getBundleBackgroundColor();
 		}
 	},
+	getOutlineColor0 : function() {
+		if (this.outlineColor0 != null) {
+			return this.outlineColor0;
+		} else if (this.parentAppearance != null) {
+			return parentAppearance.getOutlineColor0();
+		} else {
+			return this.theme.getBundleOutlineColor0();
+		}
+	},
+	getOutlineColor1 : function() {
+		if (this.outlineColor1 != null) {
+			return this.outlineColor1;
+		} else if (this.parentAppearance != null) {
+			return parentAppearance.getOutlineColor1();
+		} else {
+			return this.theme.getBundleOutlineColor1();
+		}
+	},
+	getOutlineColor2 : function() {
+		if (this.outlineColor2 != null) {
+			return this.outlineColor2;
+		} else if (this.parentAppearance != null) {
+			return parentAppearance.getOutlineColor2();
+		} else {
+			return this.theme.getBundleOutlineColor2();
+		}
+	},
+	getBackgroundContrastColor : function() {
+		if (this.backgroundContrastColor != null) {
+			return this.backgroundContrastColor;
+		} else if (this.parentAppearance != null) {
+			return parentAppearance.getBackgroundContrastColor();
+		} else {
+			return this.theme.getBundleBackgroundContrastColor();
+		}
+	},
 	setBackgroundColor : function(backgroundColor) {
 		this.backgroundColor = backgroundColor;
 	},
+	setBackgroundContrastColor : function(backgroundContrastColor) {
+		this.backgroundContrastColor = backgroundContrastColor;
+	},
 
 	useLinearShading : function() {
 		return this.theme.shouldUseLinearShading();

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/Theme.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/Theme.js?rev=952667&r1=952666&r2=952667&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/Theme.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/configuration/Theme.js Tue Jun  8 14:52:34 2010
@@ -31,9 +31,11 @@ dojo.declare("goat.configuration.Theme",
 	showState : null,
 	showVersion : null,
 	bundleBackgroundColor: "#ffff80",
+	bundleBackgroundContrastColor: "#ffffff",
 	bundleOutlineColor0: "#808080",
 	bundleOutlineColor1: "#BA98E2",
 	bundleOutlineColor2: "#682DAE",
+	serviceBackgroundColor: "#FFFF33",
 
 	constructor : function() {
 		this.greyOutInactiveBundles = true;
@@ -50,8 +52,20 @@ dojo.declare("goat.configuration.Theme",
 	getBundleBackgroundColor: function() {
 		return this.bundleBackgroundColor;
 	},
+	getBundleBackgroundContrastColor: function() {
+		return this.bundleBackgroundContrastColor;
+	},
 	getServiceBackgroundColor: function() {
-		return "#FFFF33";
+		return this.serviceBackgroundColor;
+	},
+	getBundleOutlineColor0: function() {
+		return this.bundleOutlineColor0;
+	},
+	getBundleOutlineColor1: function() {
+		return this.bundleOutlineColor1;
+	},
+	getBundleOutlineColor2: function() {
+		return this.bundleOutlineColor2;
 	},
 	getTriangleSize: function() {
 		return 20;