tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r477287 [17/32] - in /tapestry/tapestry4/trunk: tapestry-examples/TimeTracker/ tapestry-examples/TimeTracker/src/config/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/TimeTracker/src/java/org/apache/tapestry/timetrack...
Date Mon, 20 Nov 2006 18:54:48 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,58 @@
+
+dojo.provide("dojo.lfx.Animation");dojo.require("dojo.lang.func");dojo.lfx.Line = function( start,  end){this.start = start;this.end = end;if(dojo.lang.isArray(start)){var diff = [];dojo.lang.forEach(this.start, function(s,i){diff[i] = this.end[i] - s;}, this);this.getValue = function( n){var res = [];dojo.lang.forEach(this.start, function(s, i){res[i] = (diff[i] * n) + s;}, this);return res;}}else{var diff = end - start;this.getValue = function( n){return (diff * n) + this.start;}}}
+dojo.lfx.easeDefault = function( n){if(dojo.render.html.khtml){return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2));}else{return (0.5+((Math.sin( (n+1.5) * Math.PI))/2));}}
+dojo.lfx.easeIn = function( n){return Math.pow(n, 3);}
+dojo.lfx.easeOut = function( n){return ( 1 - Math.pow(1 - n, 3) );}
+dojo.lfx.easeInOut = function( n){return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) );}
+dojo.lfx.IAnimation = function(){}
+dojo.lang.extend(dojo.lfx.IAnimation, {curve: null,duration: 1000,easing: null,repeatCount: 0,rate: 25,handler: null,beforeBegin: null,onBegin: null,onAnimate: null,onEnd: null,onPlay: null,onPause: null,onStop: null,play: null,pause: null,stop: null,connect: function( evt,  scope,  newFunc){if(!newFunc){newFunc = scope;scope = this;}
+newFunc = dojo.lang.hitch(scope, newFunc);var oldFunc = this[evt]||function(){};this[evt] = function(){var ret = oldFunc.apply(this, arguments);newFunc.apply(this, arguments);return ret;}
+return this;},fire: function( evt,  args){if(this[evt]){this[evt].apply(this, (args||[]));}
+return this;},repeat: function( count){this.repeatCount = count;return this;},_active: false,_paused: false});dojo.lfx.Animation = function(	 handlers,duration,curve,easing,repeatCount,rate){dojo.lfx.IAnimation.call(this);if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){rate = repeatCount;repeatCount = easing;easing = curve;curve = duration;duration = handlers;handlers = null;}else if(handlers.getValue||dojo.lang.isArray(handlers)){rate = easing;repeatCount = curve;easing = duration;curve = handlers;duration = null;handlers = null;}
+if(dojo.lang.isArray(curve)){this.curve = new dojo.lfx.Line(curve[0], curve[1]);}else{this.curve = curve;}
+if(duration != null && duration > 0){ this.duration = duration; }
+if(repeatCount){ this.repeatCount = repeatCount; }
+if(rate){ this.rate = rate; }
+if(handlers){dojo.lang.forEach([
+"handler", "beforeBegin", "onBegin","onEnd", "onPlay", "onStop", "onAnimate"
+], function(item){if(handlers[item]){this.connect(item, handlers[item]);}}, this);}
+if(easing && dojo.lang.isFunction(easing)){this.easing=easing;}}
+dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Animation, {_startTime: null,_endTime: null,_timer: null,_percent: 0,_startRepeatCount: 0,play: function( delay,  gotoStart){if(gotoStart){clearTimeout(this._timer);this._active = false;this._paused = false;this._percent = 0;}else if(this._active && !this._paused){return this;}
+this.fire("handler", ["beforeBegin"]);this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+this._startTime = new Date().valueOf();if(this._paused){this._startTime -= (this.duration * this._percent / 100);}
+this._endTime = this._startTime + this.duration;this._active = true;this._paused = false;var step = this._percent / 100;var value = this.curve.getValue(step);if(this._percent == 0 ){if(!this._startRepeatCount){this._startRepeatCount = this.repeatCount;}
+this.fire("handler", ["begin", value]);this.fire("onBegin", [value]);}
+this.fire("handler", ["play", value]);this.fire("onPlay", [value]);this._cycle();return this;},pause: function(){clearTimeout(this._timer);if(!this._active){ return this; }
+this._paused = true;var value = this.curve.getValue(this._percent / 100);this.fire("handler", ["pause", value]);this.fire("onPause", [value]);return this;},gotoPercent: function( pct,  andPlay){clearTimeout(this._timer);this._active = true;this._paused = true;this._percent = pct;if(andPlay){ this.play(); }
+return this;},stop: function( gotoEnd){clearTimeout(this._timer);var step = this._percent / 100;if(gotoEnd){step = 1;}
+var value = this.curve.getValue(step);this.fire("handler", ["stop", value]);this.fire("onStop", [value]);this._active = false;this._paused = false;return this;},status: function(){if(this._active){return this._paused ? "paused" : "playing";}else{return "stopped";}
+return this;},_cycle: function(){clearTimeout(this._timer);if(this._active){var curr = new Date().valueOf();var step = (curr - this._startTime) / (this._endTime - this._startTime);if(step >= 1){step = 1;this._percent = 100;}else{this._percent = step * 100;}
+if((this.easing)&&(dojo.lang.isFunction(this.easing))){step = this.easing(step);}
+var value = this.curve.getValue(step);this.fire("handler", ["animate", value]);this.fire("onAnimate", [value]);if( step < 1 ){this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate);}else{this._active = false;this.fire("handler", ["end"]);this.fire("onEnd");if(this.repeatCount > 0){this.repeatCount--;this.play(null, true);}else if(this.repeatCount == -1){this.play(null, true);}else{if(this._startRepeatCount){this.repeatCount = this._startRepeatCount;this._startRepeatCount = 0;}}}}
+return this;}});dojo.lfx.Combine = function( animations){dojo.lfx.IAnimation.call(this);this._anims = [];this._animsEnded = 0;var anims = arguments;if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){anims = anims[0];}
+dojo.lang.forEach(anims, function(anim){this._anims.push(anim);anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded"));}, this);}
+dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Combine, {_animsEnded: 0,play: function( delay,  gotoStart){if( !this._anims.length ){ return this; }
+this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+if(gotoStart || this._anims[0].percent == 0){this.fire("onBegin");}
+this.fire("onPlay");this._animsCall("play", null, gotoStart);return this;},pause: function(){this.fire("onPause");this._animsCall("pause");return this;},stop: function( gotoEnd){this.fire("onStop");this._animsCall("stop", gotoEnd);return this;},_onAnimsEnded: function(){this._animsEnded++;if(this._animsEnded >= this._anims.length){this.fire("onEnd");}
+return this;},_animsCall: function( funcName){var args = [];if(arguments.length > 1){for(var i = 1 ; i < arguments.length ; i++){args.push(arguments[i]);}}
+var _this = this;dojo.lang.forEach(this._anims, function(anim){anim[funcName](args);}, _this);return this;}});dojo.lfx.Chain = function( animations) {dojo.lfx.IAnimation.call(this);this._anims = [];this._currAnim = -1;var anims = arguments;if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){anims = anims[0];}
+var _this = this;dojo.lang.forEach(anims, function(anim, i, anims_arr){this._anims.push(anim);if(i < anims_arr.length - 1){anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") );}else{anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) );}}, this);}
+dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Chain, {_currAnim: -1,play: function( delay,  gotoStart){if( !this._anims.length ) { return this; }
+if( gotoStart || !this._anims[this._currAnim] ) {this._currAnim = 0;}
+var currentAnimation = this._anims[this._currAnim];this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+if(currentAnimation){if(this._currAnim == 0){this.fire("handler", ["begin", this._currAnim]);this.fire("onBegin", [this._currAnim]);}
+this.fire("onPlay", [this._currAnim]);currentAnimation.play(null, gotoStart);}
+return this;},pause: function(){if( this._anims[this._currAnim] ) {this._anims[this._currAnim].pause();this.fire("onPause", [this._currAnim]);}
+return this;},playPause: function(){if(this._anims.length == 0){ return this; }
+if(this._currAnim == -1){ this._currAnim = 0; }
+var currAnim = this._anims[this._currAnim];if( currAnim ) {if( !currAnim._active || currAnim._paused ) {this.play();} else {this.pause();}}
+return this;},stop: function(){var currAnim = this._anims[this._currAnim];if(currAnim){currAnim.stop();this.fire("onStop", [this._currAnim]);}
+return currAnim;},_playNext: function(){if( this._currAnim == -1 || this._anims.length == 0 ) { return this; }
+this._currAnim++;if( this._anims[this._currAnim] ){this._anims[this._currAnim].play(null, true);}
+return this;}});dojo.lfx.combine = function( animations){var anims = arguments;if(dojo.lang.isArray(arguments[0])){anims = arguments[0];}
+if(anims.length == 1){ return anims[0]; }
+return new dojo.lfx.Combine(anims);}
+dojo.lfx.chain = function( animations){var anims = arguments;if(dojo.lang.isArray(arguments[0])){anims = arguments[0];}
+if(anims.length == 1){ return anims[0]; }
+return new dojo.lfx.Chain(anims);}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.kwCompoundRequire({browser: ["dojo.lfx.html"],dashboard: ["dojo.lfx.html"]});dojo.provide("dojo.lfx.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,16 @@
+
+dojo.provide("dojo.lfx.extras");dojo.require("dojo.lfx.html");dojo.require("dojo.lfx.Animation");dojo.lfx.html.fadeWipeIn = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anim = dojo.lfx.combine(
+dojo.lfx.fadeIn(nodes, duration, easing),dojo.lfx.wipeIn(nodes, duration, easing)
+);if(callback){anim.connect("onEnd", function(){callback(nodes, anim);});}
+return anim;}
+dojo.lfx.html.fadeWipeOut = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anim = dojo.lfx.combine(
+dojo.lfx.fadeOut(nodes, duration, easing),dojo.lfx.wipeOut(nodes, duration, easing)
+);if(callback){anim.connect("onEnd", function(){callback(nodes, anim);});}
+return anim;}
+dojo.lfx.html.scale = function(nodes,percentage,scaleContent,fromCenter,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var outer = dojo.html.getMarginBox(node);var actualPct = percentage/100.0;var props = [
+{	property: "width",start: outer.width,end: outer.width * actualPct},{	property: "height",start: outer.height,end: outer.height * actualPct}];if(scaleContent){var fontSize = dojo.html.getStyle(node, 'font-size');var fontSizeType = null;if(!fontSize){fontSize = parseFloat('100%');fontSizeType = '%';}else{dojo.lang.some(['em','px','%'], function(item, index, arr){if(fontSize.indexOf(item)>0){fontSize = parseFloat(fontSize);fontSizeType = item;return true;}});}
+props.push({property: "font-size",start: fontSize,end: fontSize * actualPct,units: fontSizeType });}
+if(fromCenter){var positioning = dojo.html.getStyle(node, "position");var originalTop = node.offsetTop;var originalLeft = node.offsetLeft;var endTop = ((outer.height * actualPct) - outer.height)/2;var endLeft = ((outer.width * actualPct) - outer.width)/2;props.push({property: "top",start: originalTop,end: (positioning == "absolute" ? originalTop - endTop : (-1*endTop))});props.push({property: "left",start: originalLeft,end: (positioning == "absolute" ? originalLeft - endLeft : (-1*endLeft))});}
+var anim = dojo.lfx.propertyAnimation(node, props, duration, easing);if(callback){anim.connect("onEnd", function(){callback(node, anim);});}
+anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lang.mixin(dojo.lfx, dojo.lfx.html);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/html.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/html.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/html.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/html.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,65 @@
+
+dojo.provide("dojo.lfx.html");dojo.require("dojo.gfx.color");dojo.require("dojo.lfx.Animation");dojo.require("dojo.lang.array");dojo.require("dojo.html.display");dojo.require("dojo.html.color");dojo.require("dojo.html.layout");dojo.lfx.html._byId = function(nodes){if(!nodes){ return []; }
+if(dojo.lang.isArrayLike(nodes)){if(!nodes.alreadyChecked){var n = [];dojo.lang.forEach(nodes, function(node){n.push(dojo.byId(node));});n.alreadyChecked = true;return n;}else{return nodes;}}else{var n = [];n.push(dojo.byId(nodes));n.alreadyChecked = true;return n;}}
+dojo.lfx.html.propertyAnimation = function(	 nodes,propertyMap,duration,easing,handlers){nodes = dojo.lfx.html._byId(nodes);var targs = {"propertyMap": propertyMap,"nodes": nodes,"duration": duration,"easing": easing||dojo.lfx.easeDefault};var setEmUp = function(args){if(args.nodes.length==1){var pm = args.propertyMap;if(!dojo.lang.isArray(args.propertyMap)){var parr = [];for(var pname in pm){pm[pname].property = pname;parr.push(pm[pname]);}
+pm = args.propertyMap = parr;}
+dojo.lang.forEach(pm, function(prop){if(dj_undef("start", prop)){if(prop.property != "opacity"){prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property));}else{prop.start = dojo.html.getOpacity(args.nodes[0]);}}});}}
+var coordsAsInts = function(coords){var cints = [];dojo.lang.forEach(coords, function(c){cints.push(Math.round(c));});return cints;}
+var setStyle = function(n, style){n = dojo.byId(n);if(!n || !n.style){ return; }
+for(var s in style){try{if(s == "opacity"){dojo.html.setOpacity(n, style[s]);}else{n.style[s] = style[s];}}catch(e){ dojo.debug(e); }}}
+var propLine = function(properties){this._properties = properties;this.diffs = new Array(properties.length);dojo.lang.forEach(properties, function(prop, i){if(dojo.lang.isFunction(prop.start)){prop.start = prop.start(prop, i);}
+if(dojo.lang.isFunction(prop.end)){prop.end = prop.end(prop, i);}
+if(dojo.lang.isArray(prop.start)){this.diffs[i] = null;}else if(prop.start instanceof dojo.gfx.color.Color){prop.startRgb = prop.start.toRgb();prop.endRgb = prop.end.toRgb();}else{this.diffs[i] = prop.end - prop.start;}}, this);this.getValue = function(n){var ret = {};dojo.lang.forEach(this._properties, function(prop, i){var value = null;if(dojo.lang.isArray(prop.start)){}else if(prop.start instanceof dojo.gfx.color.Color){value = (prop.units||"rgb") + "(";for(var j = 0 ; j < prop.startRgb.length ; j++){value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : "");}
+value += ")";}else{value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units||"px" : "");}
+ret[dojo.html.toCamelCase(prop.property)] = value;}, this);return ret;}}
+var anim = new dojo.lfx.Animation({beforeBegin: function(){setEmUp(targs);anim.curve = new propLine(targs.propertyMap);},onAnimate: function(propValues){dojo.lang.forEach(targs.nodes, function(node){setStyle(node, propValues);});}},targs.duration,null,targs.easing
+);if(handlers){for(var x in handlers){if(dojo.lang.isFunction(handlers[x])){anim.connect(x, anim, handlers[x]);}}}
+return anim;}
+dojo.lfx.html._makeFadeable = function(nodes){var makeFade = function(node){if(dojo.render.html.ie){if( (node.style.zoom.length == 0) &&
+(dojo.html.getStyle(node, "zoom") == "normal") ){node.style.zoom = "1";}
+if(	(node.style.width.length == 0) &&
+(dojo.html.getStyle(node, "width") == "auto") ){node.style.width = "auto";}}}
+if(dojo.lang.isArrayLike(nodes)){dojo.lang.forEach(nodes, makeFade);}else{makeFade(nodes);}}
+dojo.lfx.html.fade = function( nodes,values,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var props = { property: "opacity" };if(!dj_undef("start", values)){props.start = values.start;}else{props.start = function(){ return dojo.html.getOpacity(nodes[0]); };}
+if(!dj_undef("end", values)){props.end = values.end;}else{dojo.raise("dojo.lfx.html.fade needs an end value");}
+var anim = dojo.lfx.propertyAnimation(nodes, [ props ], duration, easing);anim.connect("beforeBegin", function(){dojo.lfx.html._makeFadeable(nodes);});if(callback){anim.connect("onEnd", function(){ callback(nodes, anim); });}
+return anim;}
+dojo.lfx.html.fadeIn = function( nodes,  duration,  easing,  callback){return dojo.lfx.html.fade(nodes, { end: 1 }, duration, easing, callback);}
+dojo.lfx.html.fadeOut = function( nodes,  duration,  easing,  callback){return dojo.lfx.html.fade(nodes, { end: 0 }, duration, easing, callback);}
+dojo.lfx.html.fadeShow = function( nodes,  duration,  easing,  callback){nodes=dojo.lfx.html._byId(nodes);dojo.lang.forEach(nodes, function(node){dojo.html.setOpacity(node, 0.0);});var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback);anim.connect("beforeBegin", function(){if(dojo.lang.isArrayLike(nodes)){dojo.lang.forEach(nodes, dojo.html.show);}else{dojo.html.show(nodes);}});return anim;}
+dojo.lfx.html.fadeHide = function( nodes,  duration,  easing,  callback){var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function(){if(dojo.lang.isArrayLike(nodes)){dojo.lang.forEach(nodes, dojo.html.hide);}else{dojo.html.hide(nodes);}
+if(callback){ callback(nodes, anim); }});return anim;}
+dojo.lfx.html.wipeIn = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var oprop = {  };dojo.html.show(node);var height = dojo.html.getBorderBox(node).height;dojo.html.hide(node);var anim = dojo.lfx.propertyAnimation(node,{	"height": {start: 1,end: function(){ return height; }}},duration,easing);anim.connect("beforeBegin", function(){oprop.overflow = node.style.overflow;oprop.height = node.style.height;with(node.style){overflow = "hidden";height = "1px";}
+dojo.html.show(node);});anim.connect("onEnd", function(){with(node.style){overflow = oprop.overflow;height = oprop.height;}
+if(callback){ callback(node, anim); }});anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lfx.html.wipeOut = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var oprop = {  };var anim = dojo.lfx.propertyAnimation(node,{	"height": {start: function(){ return dojo.html.getContentBox(node).height; },end: 1}},duration,easing,{"beforeBegin": function(){oprop.overflow = node.style.overflow;oprop.height = node.style.height;with(node.style){overflow = "hidden";}
+dojo.html.show(node);},"onEnd": function(){dojo.html.hide(node);with(node.style){overflow = oprop.overflow;height = oprop.height;}
+if(callback){ callback(node, anim); }}}
+);anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lfx.html.slideTo = function( nodes,coords,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];var compute = dojo.html.getComputedStyle;dojo.lang.forEach(nodes, function(node){var top = null;var left = null;var init = (function(){var innerNode = node;return function(){var pos = compute(innerNode, 'position');top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0);left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0);if (!dojo.lang.inArray(['absolute', 'relative'], pos)) {var ret = dojo.html.abs(innerNode, true);dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");top = ret.y;left = ret.x;}}})();init();var anim = dojo.lfx.propertyAnimation(node,{	"top": { start: top, end: (coords.top||0) },"left": { start: left, end: (coords.left||0)  }},duration,easing,{ "beforeBegin": init }
+);if(callback){anim.connect("onEnd", function(){ callback(nodes, anim); });}
+anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lfx.html.slideBy = function( nodes,  coords,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];var compute = dojo.html.getComputedStyle;dojo.lang.forEach(nodes, function(node){var top = null;var left = null;var init = (function(){var innerNode = node;return function(){var pos = compute(innerNode, 'position');top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0);left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0);if (!dojo.lang.inArray(['absolute', 'relative'], pos)) {var ret = dojo.html.abs(innerNode, true);dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");top = ret.y;left = ret.x;}}})();init();var anim = dojo.lfx.propertyAnimation(node,{"top": { start: top, end: top+(coords.top||0) },"left": { start: left, end: left+(coords.left||0) }},duration,easing).connect("beforeBegin", init);if(callback){anim.connect("onEnd", function(){ callback(
 nodes, anim); });}
+anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lfx.html.explode = function( start,endNode,duration,easing,callback){var h = dojo.html;start = dojo.byId(start);endNode = dojo.byId(endNode);var startCoords = h.toCoordinateObject(start, true);var outline = document.createElement("div");h.copyStyle(outline, endNode);if(endNode.explodeClassName){ outline.className = endNode.explodeClassName; }
+with(outline.style){position = "absolute";display = "none";var backgroundStyle = h.getStyle(start, "background-color");backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent";backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor;}
+dojo.body().appendChild(outline);with(endNode.style){visibility = "hidden";display = "block";}
+var endCoords = h.toCoordinateObject(endNode, true);with(endNode.style){display = "none";visibility = "visible";}
+var props = { opacity: { start: 0.5, end: 1.0 }};dojo.lang.forEach(["height", "width", "top", "left"], function(type){props[type] = { start: startCoords[type], end: endCoords[type] }});var anim = new dojo.lfx.propertyAnimation(outline,props,duration,easing,{"beforeBegin": function(){h.setDisplay(outline, "block");},"onEnd": function(){h.setDisplay(endNode, "block");outline.parentNode.removeChild(outline);}}
+);if(callback){anim.connect("onEnd", function(){ callback(endNode, anim); });}
+return anim;}
+dojo.lfx.html.implode = function( startNode,end,duration,easing,callback){var h = dojo.html;startNode = dojo.byId(startNode);end = dojo.byId(end);var startCoords = dojo.html.toCoordinateObject(startNode, true);var endCoords = dojo.html.toCoordinateObject(end, true);var outline = document.createElement("div");dojo.html.copyStyle(outline, startNode);if (startNode.explodeClassName) { outline.className = startNode.explodeClassName; }
+dojo.html.setOpacity(outline, 0.3);with(outline.style){position = "absolute";display = "none";backgroundColor = h.getStyle(startNode, "background-color").toLowerCase();}
+dojo.body().appendChild(outline);var props = { opacity: { start: 1.0, end: 0.5 }};dojo.lang.forEach(["height", "width", "top", "left"], function(type){props[type] = { start: startCoords[type], end: endCoords[type] }});var anim = new dojo.lfx.propertyAnimation(outline,props,duration,easing,{"beforeBegin": function(){dojo.html.hide(startNode);dojo.html.show(outline);},"onEnd": function(){outline.parentNode.removeChild(outline);}}
+);if(callback){anim.connect("onEnd", function(){ callback(startNode, anim); });}
+return anim;}
+dojo.lfx.html.highlight = function( nodes,startColor,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var color = dojo.html.getBackgroundColor(node);var bg = dojo.html.getStyle(node, "background-color").toLowerCase();var bgImage = dojo.html.getStyle(node, "background-image");var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)");while(color.length > 3) { color.pop(); }
+var rgb = new dojo.gfx.color.Color(startColor);var endRgb = new dojo.gfx.color.Color(color);var anim = dojo.lfx.propertyAnimation(node,{ "background-color": { start: rgb, end: endRgb }},duration,easing,{"beforeBegin": function(){if(bgImage){node.style.backgroundImage = "none";}
+node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")";},"onEnd": function(){if(bgImage){node.style.backgroundImage = bgImage;}
+if(wasTransparent){node.style.backgroundColor = "transparent";}
+if(callback){callback(node, anim);}}}
+);anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lfx.html.unhighlight = function( nodes,endColor,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));var rgb = new dojo.gfx.color.Color(endColor);var bgImage = dojo.html.getStyle(node, "background-image");var anim = dojo.lfx.propertyAnimation(node,{ "background-color": { start: color, end: rgb }},duration,easing,{"beforeBegin": function(){if(bgImage){node.style.backgroundImage = "none";}
+node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")";},"onEnd": function(){if(callback){callback(node, anim);}}}
+);anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lang.mixin(dojo.lfx, dojo.lfx.html);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/html.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/rounded.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/rounded.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/rounded.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/rounded.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,71 @@
+
+dojo.provide("dojo.lfx.rounded");dojo.require("dojo.lang.common");dojo.require("dojo.html.common");dojo.require("dojo.html.style");dojo.require("dojo.html.display");dojo.require("dojo.html.layout");dojo.lfx.rounded = function(settings ){var options={validTags:settings.validTags || ["div"],autoPad:settings.autoPad!=null ? settings.autoPad : true,antiAlias:settings.antiAlias!=null ? settings.antiAlias : true,radii:{tl:(settings.tl && settings.tl.radius!=null) ? settings.tl.radius:5, 
+tr:(settings.tr && settings.tr.radius!=null) ? settings.tr.radius:5, 
+bl:(settings.bl && settings.bl.radius!=null) ? settings.bl.radius:5, 
+br:(settings.br && settings.br.radius!=null) ? settings.br.radius:5 }};var nodes;if(typeof(arguments[1]) == "string"){nodes=dojo.html.getElementsByClass(arguments[1]);} else if(dojo.lang.isArrayLike(arguments[1])){nodes=arguments[1];for(var i=0; i<nodes.length; i++){ nodes[i]=dojo.byId(nodes[i]); }}
+if(nodes.length == 0) return;for(var i=0; i<nodes.length; i++){dojo.lfx.rounded.applyCorners(options, nodes[i]);}};dojo.lfx.rounded.applyCorners = function(options, node){var top = null;var bottom = null;var contentNode = null;var fns=dojo.lfx.rounded._fns;var width = node.offsetWidth;var height = node.offsetHeight;var borderWidth = parseInt(dojo.html.getComputedStyle(node, "border-top-width"));var borderColor = dojo.html.getComputedStyle(node, "border-top-color");var color = dojo.html.getComputedStyle(node, "background-color");var bgImage = dojo.html.getComputedStyle(node, "background-image");var position = dojo.html.getComputedStyle(node, "position");var padding = parseInt(dojo.html.getComputedStyle(node, "padding-top"));var format={height : height,width : width,borderWidth : borderWidth,color : fns.getRGB(color),padding : padding,borderColor : fns.getRGB(borderColor),borderString : borderWidth + "px" + " solid " + fns.getRGB(borderColor),bgImage : ((bgImage != "none")? bg
 Image : ""),content : node.innerHTML};if(!dojo.html.isPositionAbsolute(node)){ node.style.position="relative"; }
+node.style.padding="0px";if(dojo.render.html.ie && width=="auto" && height=="auto"){ node.style.width="100%"; }
+if(options.autoPad && format.padding>0){node.innerHTML="";}
+var topHeight=Math.max(options.radii.tl, options.radii.tr);var bottomHeight=Math.max(options.radii.bl, options.radii.br);if(options.radii.tl || options.radii.tr){top = document.createElement("div");top.style.width="100%";top.style.fontSize="1px";top.style.overflow="hidden";top.style.position="absolute";top.style.paddingLeft=format.borderWidth+"px";top.style.paddingRight=format.borderWidth+"px";top.style.height=topHeight+"px";top.style.top=(0-topHeight)+"px";top.style.left=(0-format.borderWidth)+"px";node.appendChild(top);}
+if(options.radii.bl || options.radii.br){bottom = document.createElement("div");bottom.style.width="100%";bottom.style.fontSize="1px";bottom.style.overflow="hidden";bottom.style.position="absolute";bottom.style.paddingLeft=format.borderWidth+"px";bottom.style.paddingRight=format.borderWidth+"px";bottom.style.height=bottomHeight+"px";bottom.style.bottom=(0-bottomHeight)+"px";bottom.style.left=(0-format.borderWidth)+"px";node.appendChild(bottom);}
+if(top){ node.style.borderTopWidth = "0px"; }
+if(bottom){ node.style.borderBottomWidth = "0px"; }
+var corners = ["tr", "tl", "br", "bl"];for(var i=0; i<corners.length; i++){var cc=corners[i];if(options.radii[cc]==0){if((cc.charAt(0)=="t"&&top) || (cc.charAt(0)=="b"&&bottom)){var corner=document.createElement("div");corner.style.position="relative";corner.style.fontSize="1px;";corner.style.overflow="hidden";if(format.bgImage==""){corner.style.backgroundColor=format.color;} else {corner.style.backgroundImage=format.bgImage;}
+switch(cc){case "tl":{corner.style.height=topHeight-format.borderWidth+"px";corner.style.marginRight=options.radii[cc]-(format.borderWidth*2)+"px";corner.style.borderLeft=format.borderString;corner.style.borderTop=format.borderString;corner.style.left=-format.borderWidth+"px";break;}
+case "tr":{corner.style.height=topHeight-format.borderWidth+"px";corner.style.marginLeft=options.radii[cc]-(format.borderWidth*2)+"px";corner.style.borderRight=format.borderString;corner.style.borderTop=format.borderString;corner.style.backgroundPosition="-"+(topHeight-format.borderWidth)+"px 0px";corner.style.left=format.borderWidth+"px";break;}
+case "bl":{corner.style.height=bottomHeight-format.borderWidth+"px";corner.style.marginRight=options.radii[cc]-(format.borderWidth*2)+"px";corner.style.borderLeft=format.borderString;corner.style.borderBottom=format.borderString;corner.style.left=format.borderWidth+"px";corner.style.backgroundPosition="-"+format.borderWidth+"px -"+(format.height+(bottomHeight+format.borderWidth))+"px";break;}
+case "br":{corner.style.height=bottomHeight-format.borderWidth+"px";corner.style.marginLeft=options.radii[cc]-(format.borderWidth*2)+"px";corner.style.borderRight=format.borderString;corner.style.borderBottom=format.borderString;corner.style.left=format.borderWidth+"px";corner.style.backgroundPosition="-"+(bottomHeight+format.borderWidth)+"px -"+(format.height+(bottomHeight+format.borderWidth))+"px";break;}}}} else {var corner=document.createElement("div");corner.style.height=options.radii[cc]+"px";corner.style.width=options.radii[cc]+"px";corner.style.position="absolute";corner.style.fontSize="1px";corner.style.overflow="hidden";var borderRadius=Math.floor(options.radii[cc] - format.borderWidth);for(var x=0, j=options.radii[cc]; x<j; x++){var y1=Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow((x+1),2)))-1;if((x+1) >= borderRadius){ var y1=-1; }
+var y2=Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(x,2)));if(x >= borderRadius){ y2=-1; }
+var y3=Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((x+1),2)))-1;if((x+1) >= j){ y3=-1; }
+var y4=Math.ceil(Math.sqrt(Math.pow(j, 2)-Math.pow(x, 2)));if(x >= j){ y4=-1; }
+if(y1 > -1){fns.draw(x, 0, format.color, 100, (y1+1), corner, -1, j, topHeight, format);}
+for(var y=(y1+1); y<y2; y++){if(options.antiAlias){if(format.bgImage != ""){var fract=fns.fraction(x, y, borderRadius)*100;if(fract < 30){fns.draw(x, y, format.borderColor, 100, 1, corner, 0, options.radii[cc], topHeight, format);} else {fns.draw(x, y, format.borderColor, 100, 1, corner, -1, options.radii[cc], topHeight, format);}} else {var clr=fns.blend(format.color, format.borderColor, fns.fraction(x, y, borderRadius));fns.draw(x, y, clr, 100, 1, corner, 0, options.radii[cc], topHeight, format);}}}
+if(options.antiAlias){if(y3 >= y2){if(y2 == -1){ y2 = 0; }
+fns.draw(x, y2, format.borderColor, 100, (y3-y2+1), corner, 0, 0, topHeight, format)} else {if(y3 >= y1){fns.draw(x, (y1+1), format.borderColor, 100, (y3-y1), corner, 0, 0, topHeight, format);}}
+for(var y=(y3+1); y<y4; y++){fns.draw(x, y, format.borderColor, (fns.fraction(x, y, j)*100), 1, corner, (format.borderWidth>0 ? 0:-1), options.radii[cc], topHeight, format);}} else {y3=y1;}}
+if(cc != "br"){for(var t=0, k=corner.childNodes.length; t<k; t++){var bar=corner.childNodes[t];var barTop = parseInt(dojo.html.getComputedStyle(bar, "top"));var barLeft = parseInt(dojo.html.getComputedStyle(bar, "left"));var barHeight = parseInt(dojo.html.getComputedStyle(bar, "height"));if(cc.charAt(1)=="l"){bar.style.left = (options.radii[cc]-barLeft-1)+"px"; }
+if(cc=="tr"){bar.style.top = (options.radii[cc]-barHeight-barTop)+"px";bar.style.backgroundPosition="-"+Math.abs((format.width-options.radii[cc]+format.borderWidth)+barLeft)
++"px -"+Math.abs(options.radii[cc]-barHeight-barTop-format.borderWidth)+"px";} else if (cc=="tl"){bar.style.top = (options.radii[cc]-barHeight-barTop)+"px";bar.style.backgroundPosition="-"+Math.abs((options.radii[cc]-barLeft-1)-format.borderWidth)
++"px -"+Math.abs(options.radii[cc]-barHeight-barTop-format.borderWidth)+"px";} else {bar.style.backgroundPosition="-"+Math.abs((options.radii[cc]+barLeft)+format.borderWidth)
++"px -"+Math.abs((format.height+options.radii[cc]+barTop)-format.borderWidth)+"px";}}}}
+if(corner){var psn=[];if(cc.charAt(0)=="t"){ psn.push("top"); }
+else { psn.push("bottom"); }
+if(cc.charAt(1)=="l"){ psn.push("left"); }
+else { psn.push("right"); }
+if(corner.style.position=="absolute"){for(var z=0; z<psn.length; z++){ corner.style[psn[z]]="0px"; }}
+if(psn[0]=="top"){if(top){ top.appendChild(corner); }} else {if(bottom){ bottom.appendChild(corner); }}}}
+var diff={t: Math.abs(options.radii.tl - options.radii.tr),b: Math.abs(options.radii.bl - options.radii.br)};for(var z in diff){var smaller=(options.radii[z+"l"]<options.radii[z+"r"] ? z+"l":z+"r");var filler=document.createElement("div");filler.style.height=diff[z]+"px";filler.style.width=options.radii[smaller]+"px";filler.style.position="absolute";filler.style.fontSize="1px";filler.style.overflow="hidden";filler.style.backgroundColor=format.color;switch(smaller){case "tl":{filler.style.bottom="0px";filler.style.left="0px";filler.style.borderLeft=format.borderString;top.appendChild(filler);break;}
+case "tr":{filler.style.bottom="0px";filler.style.right="0px";filler.style.borderRight=format.borderString;top.appendChild(filler);break;}
+case "bl":{filler.style.top="0px";filler.style.left="0px";filler.style.borderLeft=format.borderString;bottom.appendChild(filler);break;}
+case "br":{filler.style.top="0px";filler.style.right="0px";filler.style.borderRight=format.borderString;bottom.appendChild(filler);break;}}
+var fillBar=document.createElement("div");fillBar.style.position="relative";fillBar.style.fontSize="1px";fillBar.style.overflow="hidden";fillBar.style.backgroundColor=format.color;fillBar.style.backgroundImage=format.bgImage;if(z=="t"){if(top){if(options.radii.tl && options.radii.tr){fillBar.style.height=(topHeight-format.borderWidth) + "px";fillBar.style.marginLeft=(options.radii.tl-format.borderWidth)+"px";fillBar.style.marginRight=(options.radii.tr-format.borderWidth)+"px";fillBar.style.borderTop=format.borderString;if(format.bgImage!=""){fillBar.style.backgroundPosition="-"+(topHeight+format.borderWidth)+"px 0px";}}
+top.appendChild(fillBar);}} else {if(bottom){if(options.radii.bl && options.radii.br){fillBar.style.height=(bottomHeight-format.borderWidth) + "px";fillBar.style.marginLeft=(options.radii.bl-format.borderWidth)+"px";fillBar.style.marginRight=(options.radii.br-format.borderWidth)+"px";fillBar.style.borderBottom=format.borderString;if(format.bgImage!=""){fillBar.style.backgroundPosition="-"+(bottomHeight+format.borderWidth)+"px -"
++ (format.height + (topHeight+format.borderWidth))+"px";}}
+bottom.appendChild(fillBar);}}}
+if(options.autoPad && format.padding>0){var content=document.createElement("div");content.style.position="relative";content.innerHTML=format.content;content.className="autoPadDiv";if(topHeight < format.padding){content.style.paddingTop = Math.abs(topHeight-format.padding)+"px";}
+if(bottomHeight < format.padding){content.style.paddingBottom = Math.abs(bottomHeight-format.padding)+"px";}
+content.style.paddingLeft=format.padding+"px";content.style.paddingRight=format.padding+"px";node.appendChild(content);}};var count=0;dojo.lfx.rounded._fns={blend:function(clr1, clr2, frac){var c1={r:parseInt(clr1.substr(1,2),16),g:parseInt(clr1.substr(3,2),16),b:parseInt(clr1.substr(5,2),16)};var c2={r:parseInt(clr2.substr(1,2),16),g:parseInt(clr2.substr(3,2),16),b:parseInt(clr2.substr(5,2),16)};if(frac>1||frac<0){ frac=1; }
+var ret=[
+Math.min(Math.max(Math.round((c1.r*frac)+(c2.r*(1-frac))),0),255),Math.min(Math.max(Math.round((c1.g*frac)+(c2.g*(1-frac))),0),255),Math.min(Math.max(Math.round((c1.b*frac)+(c2.b*(1-frac))),0),255)
+];for(var i=0; i<ret.length; i++){var n=ret[i].toString(16);if(n.length<2){ n="0"+n; }
+ret[i]=n;}
+return "#"+ret.join("");},fraction:function(x, y, r){var frac=0;var xval=[];var yval=[];var point=0;var whatsides="";var intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if(intersect >=y && intersect < (y+1)){whatsides="Left";xval[point]=0;yval[point++]=intersect-y;}
+intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if(intersect >=x && intersect < (x+1)){whatsides += "Top";xval[point]=intersect-x;yval[point++]=1;}
+intersect=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if(intersect >= y && intersect < (y+1)){whatsides += "Right";xval[point]=1;yval[point++] = intersect-y;}
+intersect=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if(intersect >=x && intersect < (x+1)){whatsides += "Bottom";xval[point]=intersect-x;yval[point]=1;}
+switch(whatsides){case "LeftRight":
+return Math.min(yval[0],yval[1]) + ((Math.max(yval[0],yval[1])-Math.min(yval[0],yval[1]))/2);case "TopRight":
+return 1-(((1-xval[0])*(1-yval[1]))/2);case "TopBottom":
+return Math.min(xval[0],xval[1]) + ((Math.max(xval[0],xval[1])-Math.min(xval[0],xval[1]))/2);case "LeftBottom":
+return (yval[0]*xval[1])/2;default: return 1;}},draw:function(x, y, color, opac, height, corner, image, radius, top, format){var px=document.createElement("div");px.style.height=height+"px"
+px.style.width="1px";px.style.position="absolute";px.style.fontSize="1px";px.style.overflow="hidden";if(image==-1 && format.bgImage!=""){px.style.backgroundImage=format.bgImage;px.style.backgroundPosition="-"+(format.width-(radius-x)+format.borderWidth)
++"px -"+((format.height+top+y)-format.borderWidth)+"px";} else {px.style.backgroundColor=color; }
+if(opac!=100){ dojo.html.setOpacity(px, (opac/100)); }
+px.style.top=y+"px";px.style.left=x+"px";corner.appendChild(px);},getRGB:function(clr){var ret="#ffffff";if(clr!="" && clr!="transparent"){if(clr.substr(0,3)=="rgb"){var t=clr.substring(4, clr.indexOf(")"));t=t.split(",");for(var i=0; i<t.length; i++){var n=parseInt(t[i]).toString(16);if(n.length<2){ n = "0"+n; }
+t[i]=n;}
+ret = "#"+t.join("");}
+else if(clr.length==4){ret = "#"+clr.substring(1,2)+clr.substring(1,2)
++ clr.substring(2,3)+clr.substring(2,3)
++ clr.substring(3,4)+clr.substring(3,4);}
+else {ret = clr;}}
+return ret;}};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/rounded.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/scroll.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/scroll.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/scroll.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/scroll.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,4 @@
+
+dojo.provide("dojo.lfx.scroll");dojo.require("dojo.html.util");dojo.require("dojo.html.iframe");dojo.require("dojo.lfx.Animation");dojo.lfx.smoothScroll = function( node,win,offset,duration,easing,handlers){var targs = {"window": win,"offset": offset || {x:0,y:0},"target": dojo.html.getAbsolutePositionExt(node,true,dojo.html.boxSizing.BORDER_BOX, win),"duration": duration,"easing": easing||dojo.lfx.easeOut};var anim = new dojo.lfx.Animation({beforeBegin: function(){var current = dojo.withGlobal(targs.window,dojo.html.getScroll).offset;delete this.curve;anim.curve = new dojo.lfx.Line([current.x,current.y],[targs.target.x+targs.offset.x,targs.target.y+targs.offset.y]);},onAnimate: function(value){targs.window.scrollTo(value[0],value[1]);}},duration,null,easing||dojo.lfx.easeOut
+);if(handlers){for(var x in handlers){if(dojo.lang.isFunction(handlers[x])){anim.connect(x, anim, handlers[x]);}}}
+return anim;}
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/scroll.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/shadow.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/shadow.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/shadow.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/shadow.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,8 @@
+
+dojo.provide("dojo.lfx.shadow");dojo.require("dojo.lang.common");dojo.require("dojo.uri.Uri");dojo.lfx.shadow = function(node) {this.shadowPng = dojo.uri.dojoUri("src/html/images/shadow");this.shadowThickness = 8;this.shadowOffset = 15;this.init(node);}
+dojo.extend(dojo.lfx.shadow, {init: function(node){this.node=node;this.pieces={};var x1 = -1 * this.shadowThickness;var y0 = this.shadowOffset;var y1 = this.shadowOffset + this.shadowThickness;this._makePiece("tl", "top", y0, "left", x1);this._makePiece("l", "top", y1, "left", x1, "scale");this._makePiece("tr", "top", y0, "left", 0);this._makePiece("r", "top", y1, "left", 0, "scale");this._makePiece("bl", "top", 0, "left", x1);this._makePiece("b", "top", 0, "left", 0, "crop");this._makePiece("br", "top", 0, "left", 0);},_makePiece: function(name, vertAttach, vertCoord, horzAttach, horzCoord, sizing){var img;var url = this.shadowPng + name.toUpperCase() + ".png";if(dojo.render.html.ie55 || dojo.render.html.ie60){img=dojo.doc().createElement("div");img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+
+(sizing?", sizingMethod='"+sizing+"'":"") + ")";}else{img=dojo.doc().createElement("img");img.src=url;}
+img.style.position="absolute";img.style[vertAttach]=vertCoord+"px";img.style[horzAttach]=horzCoord+"px";img.style.width=this.shadowThickness+"px";img.style.height=this.shadowThickness+"px";this.pieces[name]=img;this.node.appendChild(img);},size: function(width, height){var sideHeight = height - (this.shadowOffset+this.shadowThickness+1);if (sideHeight < 0) { sideHeight = 0; }
+if (height < 1) { height = 1; }
+if (width < 1) { width = 1; }
+with(this.pieces){l.style.height = sideHeight+"px";r.style.height = sideHeight+"px";b.style.width = (width-1)+"px";bl.style.top = (height-1)+"px";b.style.top = (height-1)+"px";br.style.top = (height-1)+"px";tr.style.left = (width-1)+"px";r.style.left = (width-1)+"px";br.style.left = (width-1)+"px";}}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/shadow.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/toggle.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/toggle.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/toggle.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/toggle.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.lfx.toggle");dojo.require("dojo.lfx.*");dojo.lfx.toggle.plain = {show: function(node, duration, easing, callback){dojo.html.show(node);if(dojo.lang.isFunction(callback)){ callback(); }},hide: function(node, duration, easing, callback){dojo.html.hide(node);if(dojo.lang.isFunction(callback)){ callback(); }}}
+dojo.lfx.toggle.fade = {show: function(node, duration, easing, callback){dojo.lfx.fadeShow(node, duration, easing, callback).play();},hide: function(node, duration, easing, callback){dojo.lfx.fadeHide(node, duration, easing, callback).play();}}
+dojo.lfx.toggle.wipe = {show: function(node, duration, easing, callback){dojo.lfx.wipeIn(node, duration, easing, callback).play();},hide: function(node, duration, easing, callback){dojo.lfx.wipeOut(node, duration, easing, callback).play();}}
+dojo.lfx.toggle.explode = {show: function(node, duration, easing, callback, explodeSrc){dojo.lfx.explode(explodeSrc||{x:0,y:0,width:0,height:0}, node, duration, easing, callback).play();},hide: function(node, duration, easing, callback, explodeSrc){dojo.lfx.implode(node, explodeSrc||{x:0,y:0,width:0,height:0}, duration, easing, callback).play();}}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/toggle.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,68 @@
+
+;(function(){var _addHostEnv = {pkgFileName: "__package__",loading_modules_: {},loaded_modules_: {},addedToLoadingCount: [],removedFromLoadingCount: [],inFlightCount: 0,modulePrefixes_: {dojo: {name: "dojo", value: "src"}},setModulePrefix: function(module, prefix){this.modulePrefixes_[module] = {name: module, value: prefix};},moduleHasPrefix: function(module){var mp = this.modulePrefixes_;return Boolean(mp[module] && mp[module].value);},getModulePrefix: function(module){if(this.moduleHasPrefix(module)){return this.modulePrefixes_[module].value;}
+return module;},getTextStack: [],loadUriStack: [],loadedUris: [],post_load_: false,modulesLoadedListeners: [],unloadListeners: [],loadNotifying: false};for(var param in _addHostEnv){dojo.hostenv[param] = _addHostEnv[param];}})();dojo.hostenv.loadPath = function(relpath, module, cb){var uri;if(relpath.charAt(0) == '/' || relpath.match(/^\w+:/)){uri = relpath;}else{uri = this.getBaseScriptUri() + relpath;}
+if(djConfig.cacheBust && dojo.render.html.capable){uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,"");}
+try{return !module ? this.loadUri(uri, cb) : this.loadUriAndCheck(uri, module, cb);}catch(e){dojo.debug(e);return false;}}
+dojo.hostenv.loadUri = function(uri, cb){if(this.loadedUris[uri]){return true;}
+var contents = this.getText(uri, null, true);if(!contents){ return false; }
+this.loadedUris[uri] = true;if(cb){ contents = '('+contents+')'; }
+var value = dj_eval(contents);if(cb){ cb(value); }
+return true;}
+dojo.hostenv.loadUriAndCheck = function(uri, moduleName, cb){var ok = true;try{ok = this.loadUri(uri, cb);}catch(e){dojo.debug("failed loading ", uri, " with error: ", e);}
+return Boolean(ok && this.findModule(moduleName, false));}
+dojo.loaded = function(){ }
+dojo.unloaded = function(){ }
+dojo.hostenv.loaded = function(){this.loadNotifying = true;this.post_load_ = true;var mll = this.modulesLoadedListeners;for(var x=0; x<mll.length; x++){mll[x]();}
+this.modulesLoadedListeners = [];this.loadNotifying = false;dojo.loaded();}
+dojo.hostenv.unloaded = function(){var mll = this.unloadListeners;while(mll.length){(mll.pop())();}
+dojo.unloaded();}
+dojo.addOnLoad = function(obj, functionName) {var dh = dojo.hostenv;if(arguments.length == 1) {dh.modulesLoadedListeners.push(obj);} else if(arguments.length > 1) {dh.modulesLoadedListeners.push(function() {obj[functionName]();});}
+if(dh.post_load_ && dh.inFlightCount == 0 && !dh.loadNotifying){dh.callLoaded();}}
+dojo.addOnUnload = function(obj, functionName){var dh = dojo.hostenv;if(arguments.length == 1){dh.unloadListeners.push(obj);} else if(arguments.length > 1) {dh.unloadListeners.push(function() {obj[functionName]();});}}
+dojo.hostenv.modulesLoaded = function(){if(this.post_load_){ return; }
+if(this.loadUriStack.length==0 && this.getTextStack.length==0){if(this.inFlightCount > 0){dojo.debug("files still in flight!");return;}
+dojo.hostenv.callLoaded();}}
+dojo.hostenv.callLoaded = function(){if(typeof setTimeout == "object"){setTimeout("dojo.hostenv.loaded();", 0);}else{dojo.hostenv.loaded();}}
+dojo.hostenv.getModuleSymbols = function(modulename){var syms = modulename.split(".");for(var i = syms.length; i>0; i--){var parentModule = syms.slice(0, i).join(".");if((i==1) && !this.moduleHasPrefix(parentModule)){syms[0] = "../" + syms[0];}else{var parentModulePath = this.getModulePrefix(parentModule);if(parentModulePath != parentModule){syms.splice(0, i, parentModulePath);break;}}}
+return syms;}
+dojo.hostenv._global_omit_module_check = false;dojo.hostenv.loadModule = function(moduleName, exactOnly, omitModuleCheck){if(!moduleName){ return; }
+omitModuleCheck = this._global_omit_module_check || omitModuleCheck;var module = this.findModule(moduleName, false);if(module){return module;}
+if(dj_undef(moduleName, this.loading_modules_)){this.addedToLoadingCount.push(moduleName);}
+this.loading_modules_[moduleName] = 1;var relpath = moduleName.replace(/\./g, '/') + '.js';var nsyms = moduleName.split(".");var syms = this.getModuleSymbols(moduleName);var startedRelative = ((syms[0].charAt(0) != '/') && !syms[0].match(/^\w+:/));var last = syms[syms.length - 1];var ok;if(last=="*"){moduleName = nsyms.slice(0, -1).join('.');while(syms.length){syms.pop();syms.push(this.pkgFileName);relpath = syms.join("/") + '.js';if(startedRelative && relpath.charAt(0)=="/"){relpath = relpath.slice(1);}
+ok = this.loadPath(relpath, !omitModuleCheck ? moduleName : null);if(ok){ break; }
+syms.pop();}}else{relpath = syms.join("/") + '.js';moduleName = nsyms.join('.');var modArg = !omitModuleCheck ? moduleName : null;ok = this.loadPath(relpath, modArg);if(!ok && !exactOnly){syms.pop();while(syms.length){relpath = syms.join('/') + '.js';ok = this.loadPath(relpath, modArg);if(ok){ break; }
+syms.pop();relpath = syms.join('/') + '/'+this.pkgFileName+'.js';if(startedRelative && relpath.charAt(0)=="/"){relpath = relpath.slice(1);}
+ok = this.loadPath(relpath, modArg);if(ok){ break; }}}
+if(!ok && !omitModuleCheck){dojo.raise("Could not load '" + moduleName + "'; last tried '" + relpath + "'");}}
+if(!omitModuleCheck && !this["isXDomain"]){module = this.findModule(moduleName, false);if(!module){dojo.raise("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'");}}
+return module;}
+dojo.hostenv.startPackage = function(packageName){var fullPkgName = String(packageName);var strippedPkgName = fullPkgName;var syms = packageName.split(/\./);if(syms[syms.length-1]=="*"){syms.pop();strippedPkgName = syms.join(".");}
+var evaledPkg = dojo.evalObjPath(strippedPkgName, true);this.loaded_modules_[fullPkgName] = evaledPkg;this.loaded_modules_[strippedPkgName] = evaledPkg;return evaledPkg;}
+dojo.hostenv.findModule = function(moduleName, mustExist){var lmn = String(moduleName);if(this.loaded_modules_[lmn]){return this.loaded_modules_[lmn];}
+if(mustExist){dojo.raise("no loaded module named '" + moduleName + "'");}
+return null;}
+dojo.kwCompoundRequire = function(modMap){var common = modMap["common"]||[];var result = modMap[dojo.hostenv.name_] ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]);for(var x=0; x<result.length; x++){var curr = result[x];if(curr.constructor == Array){dojo.hostenv.loadModule.apply(dojo.hostenv, curr);}else{dojo.hostenv.loadModule(curr);}}}
+dojo.require = function( resourceName){dojo.hostenv.loadModule.apply(dojo.hostenv, arguments);}
+dojo.requireIf = function( condition,  resourceName){var arg0 = arguments[0];if((arg0 === true)||(arg0=="common")||(arg0 && dojo.render[arg0].capable)){var args = [];for (var i = 1; i < arguments.length; i++) { args.push(arguments[i]); }
+dojo.require.apply(dojo, args);}}
+dojo.requireAfterIf = dojo.requireIf;dojo.provide = function( resourceName){return dojo.hostenv.startPackage.apply(dojo.hostenv, arguments);}
+dojo.registerModulePath = function(module, prefix){return dojo.hostenv.setModulePrefix(module, prefix);}
+dojo.setModulePrefix = function(module, prefix){dojo.deprecated('dojo.setModulePrefix("' + module + '", "' + prefix + '")', "replaced by dojo.registerModulePath", "0.5");return dojo.registerModulePath(module, prefix);}
+dojo.exists = function(obj, name){var p = name.split(".");for(var i = 0; i < p.length; i++){if(!obj[p[i]]){ return false; }
+obj = obj[p[i]];}
+return true;}
+dojo.hostenv.normalizeLocale = function(locale){return locale ? locale.toLowerCase() : dojo.locale;};dojo.hostenv.searchLocalePath = function(locale, down, searchFunc){locale = dojo.hostenv.normalizeLocale(locale);var elements = locale.split('-');var searchlist = [];for(var i = elements.length; i > 0; i--){searchlist.push(elements.slice(0, i).join('-'));}
+searchlist.push(false);if(down){searchlist.reverse();}
+for(var j = searchlist.length - 1; j >= 0; j--){var loc = searchlist[j] || "ROOT";var stop = searchFunc(loc);if(stop){ break; }}}
+dojo.hostenv.localesGenerated ;dojo.hostenv.registerNlsPrefix = function(){dojo.registerModulePath("nls","nls");}
+dojo.hostenv.preloadLocalizations = function(){if(dojo.hostenv.localesGenerated){dojo.hostenv.registerNlsPrefix();function preload(locale){locale = dojo.hostenv.normalizeLocale(locale);dojo.hostenv.searchLocalePath(locale, true, function(loc){for(var i=0; i<dojo.hostenv.localesGenerated.length;i++){if(dojo.hostenv.localesGenerated[i] == loc){dojo["require"]("nls.dojo_"+loc);return true;}}
+return false;});}
+preload();var extra = djConfig.extraLocale||[];for(var i=0; i<extra.length; i++){preload(extra[i]);}}
+dojo.hostenv.preloadLocalizations = function(){};}
+dojo.requireLocalization = function(moduleName, bundleName, locale){dojo.hostenv.preloadLocalizations();var bundlePackage = [moduleName, "nls", bundleName].join(".");var bundle = dojo.hostenv.findModule(bundlePackage);if(bundle){if(djConfig.localizationComplete && bundle._built){return;}
+var jsLoc = dojo.hostenv.normalizeLocale(locale).replace('-', '_');var translationPackage = bundlePackage+"."+jsLoc;if(dojo.hostenv.findModule(translationPackage)){return;}}
+bundle = dojo.hostenv.startPackage(bundlePackage);var syms = dojo.hostenv.getModuleSymbols(moduleName);var modpath = syms.concat("nls").join("/");var parent;dojo.hostenv.searchLocalePath(locale, false, function(loc){var jsLoc = loc.replace('-', '_');var translationPackage = bundlePackage + "." + jsLoc;var loaded = false;if(!dojo.hostenv.findModule(translationPackage)){dojo.hostenv.startPackage(translationPackage);var module = [modpath];if(loc != "ROOT"){module.push(loc);}
+module.push(bundleName);var filespec = module.join("/") + '.js';loaded = dojo.hostenv.loadPath(filespec, null, function(hash){var clazz = function(){};clazz.prototype = parent;bundle[jsLoc] = new clazz();for(var j in hash){ bundle[jsLoc][j] = hash[j]; }});}else{loaded = true;}
+if(loaded && bundle[jsLoc]){parent = bundle[jsLoc];}else{bundle[jsLoc] = parent;}});};(function(){var extra = djConfig.extraLocale;if(extra){if(!extra instanceof Array){extra = [extra];}
+var req = dojo.requireLocalization;dojo.requireLocalization = function(m, b, locale){req(m,b,locale);if(locale){return;}
+for(var i=0; i<extra.length; i++){req(m,b,extra[i]);}};}})();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader_xd.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader_xd.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader_xd.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader_xd.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,58 @@
+
+dojo.hostenv.resetXd = function(){this.isXDomain = djConfig.forceXDomain || false;this.xdTimer = 0;this.xdInFlight = {};this.xdOrderedReqs = [];this.xdDepMap = {};this.xdContents = [];}
+dojo.hostenv.resetXd();dojo.hostenv.createXdPackage = function(contents){var deps = [];var depRegExp = /dojo.(require|requireIf|requireAll|provide|requireAfterIf|requireAfter|kwCompoundRequire|conditionalRequire|hostenv\.conditionalLoadModule|.hostenv\.loadModule|hostenv\.moduleLoaded)\(([\w\W]*?)\)/mg;var match;while((match = depRegExp.exec(contents)) != null){deps.push("\"" + match[1] + "\", " + match[2]);}
+var output = [];output.push("dojo.hostenv.packageLoaded({\n");if(deps.length > 0){output.push("depends: [");for(var i = 0; i < deps.length; i++){if(i > 0){output.push(",\n");}
+output.push("[" + deps[i] + "]");}
+output.push("],");}
+output.push("\ndefinePackage: function(dojo){");output.push(contents);output.push("\n}});");return output.join("");}
+dojo.hostenv.loadPath = function(relpath, module , cb ){var colonIndex = relpath.indexOf(":");var slashIndex = relpath.indexOf("/");var uri;var currentIsXDomain = false;if(colonIndex > 0 && colonIndex < slashIndex){uri = relpath;this.isXDomain = currentIsXDomain = true;}else{uri = this.getBaseScriptUri() + relpath;colonIndex = uri.indexOf(":");slashIndex = uri.indexOf("/");if(colonIndex > 0 && colonIndex < slashIndex && (!location.host || uri.indexOf("http://" + location.host) != 0)){this.isXDomain = currentIsXDomain = true;}}
+if(djConfig.cacheBust && dojo.render.html.capable) { uri += "?" + String(djConfig.cacheBust).replace(/\W+/g,""); }
+try{return ((!module || this.isXDomain) ? this.loadUri(uri, cb, currentIsXDomain, module) : this.loadUriAndCheck(uri, module, cb));}catch(e){dojo.debug(e);return false;}}
+dojo.hostenv.loadUri = function(uri, cb, currentIsXDomain, module){if(this.loadedUris[uri]){return 1;}
+if(this.isXDomain){this.xdOrderedReqs.push(module);if(uri.indexOf("__package__") != -1){module += ".*";}
+this.xdInFlight[module] = true;this.inFlightCount++;if(!this.xdTimer){this.xdTimer = setInterval("dojo.hostenv.watchInFlightXDomain();", 100);}
+this.xdStartTime = (new Date()).getTime();}
+if (currentIsXDomain){var lastIndex = uri.lastIndexOf('.');if(lastIndex <= 0){lastIndex = uri.length - 1;}
+var xdUri = uri.substring(0, lastIndex) + ".xd";if(lastIndex != uri.length - 1){xdUri += uri.substring(lastIndex, uri.length);}
+var element = document.createElement("script");element.type = "text/javascript";element.src = xdUri;if(!this.headElement){this.headElement = document.getElementsByTagName("head")[0];}
+this.headElement.appendChild(element);}else{var contents = this.getText(uri, null, true);if(contents == null){ return 0; }
+if(this.isXDomain){var pkg = this.createXdPackage(contents);dj_eval(pkg);}else{if(cb){ contents = '('+contents+')'; }
+var value = dj_eval(contents);if(cb){cb(value);}}}
+this.loadedUris[uri] = true;return 1;}
+dojo.hostenv.packageLoaded = function(pkg){var deps = pkg.depends;var requireList = null;var requireAfterList = null;var provideList = [];if(deps && deps.length > 0){var dep = null;var insertHint = 0;var attachedPackage = false;for(var i = 0; i < deps.length; i++){dep = deps[i];if (dep[0] == "provide" || dep[0] == "hostenv.moduleLoaded"){provideList.push(dep[1]);}else{if(!requireList){requireList = [];}
+if(!requireAfterList){requireAfterList = [];}
+var unpackedDeps = this.unpackXdDependency(dep);if(unpackedDeps.requires){requireList = requireList.concat(unpackedDeps.requires);}
+if(unpackedDeps.requiresAfter){requireAfterList = requireAfterList.concat(unpackedDeps.requiresAfter);}}
+var depType = dep[0];var objPath = depType.split(".");if(objPath.length == 2){dojo[objPath[0]][objPath[1]].apply(dojo[objPath[0]], dep.slice(1));}else{dojo[depType].apply(dojo, dep.slice(1));}}
+var contentIndex = this.xdContents.push({content: pkg.definePackage, isDefined: false}) - 1;for(var i = 0; i < provideList.length; i++){this.xdDepMap[provideList[i]] = { requires: requireList, requiresAfter: requireAfterList, contentIndex: contentIndex };}
+for(var i = 0; i < provideList.length; i++){this.xdInFlight[provideList[i]] = false;}}}
+dojo.hostenv.xdLoadFlattenedBundle = function(moduleName, bundleName, locale, bundleData){locale = locale || "root";var jsLoc = dojo.hostenv.normalizeLocale(locale).replace('-', '_');var bundlePackage = [moduleName, "nls", bundleName].join(".");var bundle = dojo.hostenv.startPackage(bundlePackage);bundle[jsLoc] = bundleData;var mapName = [moduleName, jsLoc, bundleName].join(".");var bundleMap = dojo.hostenv.xdBundleMap[mapName];if(bundleMap){for(var param in bundleMap){bundle[param] = bundleData;}}};dojo.hostenv.xdBundleMap = {};dojo.xdRequireLocalization = function(moduleName, bundleName, locale, availableLocales){var locales = availableLocales.split(",");var jsLoc = dojo.hostenv.normalizeLocale(locale);var bestLocale = "";for(var i = 0; i < locales.length; i++){if(jsLoc.indexOf(locales[i]) == 0){if(locales[i].length > bestLocale.length){bestLocale = locales[i];}}}
+var fixedBestLocale = bestLocale.replace('-', '_');var bundlePackage = dojo.evalObjPath([moduleName, "nls", bundleName].join("."));if(bundlePackage && bundlePackage[fixedBestLocale]){bundle[jsLoc.replace('-', '_')] = bundlePackage[fixedBestLocale];}else{var mapName = [moduleName, (fixedBestLocale||"root"), bundleName].join(".");var bundleMap = dojo.hostenv.xdBundleMap[mapName];if(!bundleMap){bundleMap = dojo.hostenv.xdBundleMap[mapName] = {};}
+bundleMap[jsLoc.replace('-', '_')] = true;dojo.require(moduleName + ".nls" + (bestLocale ? "." + bestLocale : "") + "." + bundleName);}}
+dojo.hostenv.unpackXdDependency = function(dep){var newDeps = null;var newAfterDeps = null;switch(dep[0]){case "requireIf":
+case "requireAfterIf":
+case "conditionalRequire":
+if((dep[1] === true)||(dep[1]=="common")||(dep[1] && dojo.render[dep[1]].capable)){newDeps = [{name: dep[2], content: null}];}
+break;case "requireAll":
+dep.shift();newDeps = dep;dojo.hostenv.flattenRequireArray(newDeps);break;case "kwCompoundRequire":
+case "hostenv.conditionalLoadModule":
+var modMap = dep[1];var common = modMap["common"]||[];var newDeps = (modMap[dojo.hostenv.name_]) ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]);dojo.hostenv.flattenRequireArray(newDeps);break;case "require":
+case "requireAfter":
+case "hostenv.loadModule":
+newDeps = [{name: dep[1], content: null}];break;}
+if(dep[0] == "requireAfterIf"){newAfterDeps = newDeps;newDeps = null;}
+return {requires: newDeps, requiresAfter: newAfterDeps};}
+dojo.hostenv.xdWalkReqs = function(){var reqChain = null;var req;for(var i = 0; i < this.xdOrderedReqs.length; i++){req = this.xdOrderedReqs[i];if(this.xdDepMap[req]){reqChain = [req];reqChain[req] = true;this.xdEvalReqs(reqChain);}}}
+dojo.hostenv.xdTraceReqs = function(reqs, reqChain){if(reqs && reqs.length > 0){var nextReq;for(var i = 0; i < reqs.length; i++){nextReq = reqs[i].name;if(nextReq && !reqChain[nextReq]){reqChain.push(nextReq);reqChain[nextReq] = true;this.xdEvalReqs(reqChain);}}}}
+dojo.hostenv.xdEvalReqs = function(reqChain){if(reqChain.length > 0){var req = reqChain[reqChain.length - 1];var pkg = this.xdDepMap[req];if(pkg){this.xdTraceReqs(pkg.requires, reqChain);var contents = this.xdContents[pkg.contentIndex];if(!contents.isDefined){contents.content(dojo);contents.isDefined = true;}
+this.xdDepMap[req] = null;this.xdTraceReqs(pkg.requiresAfter, reqChain);}
+reqChain.pop();this.xdEvalReqs(reqChain);}}
+dojo.hostenv.clearXdInterval = function(){clearInterval(this.xdTimer);this.xdTimer = 0;}
+dojo.hostenv.watchInFlightXDomain = function(){var waitInterval = (djConfig.xdWaitSeconds || 30) * 1000;if(this.xdStartTime + waitInterval < (new Date()).getTime()){this.clearXdInterval();var noLoads = "";for(var param in this.xdInFlight){if(this.xdInFlight[param]){noLoads += param + " ";}}
+dojo.raise("Could not load cross-domain packages: " + noLoads);}
+for(var param in this.xdInFlight){if(this.xdInFlight[param]){return;}}
+this.clearXdInterval();this.xdWalkReqs();for(var i = 0; i < this.xdContents.length; i++){var current = this.xdContents[i];if(current.content && !current.isDefined){current.content(dojo);}}
+this.resetXd();this.inFlightCount = 0;this.callLoaded();}
+dojo.hostenv.flattenRequireArray = function(target){if(target){for(var i = 0; i < target.length; i++){if(target[i] instanceof Array){target[i] = {name: target[i][0], content: null};}else{target[i] = {name: target[i], content: null};}}}}
+dojo.hostenv.xdHasCalledPreload = false;dojo.hostenv.xdRealCallLoaded = dojo.hostenv.callLoaded;dojo.hostenv.callLoaded = function(){if(this.xdHasCalledPreload || dojo.hostenv.getModulePrefix("dojo") == "src" || !this.localesGenerated){this.xdRealCallLoaded();this.xdHasCalledPreload = true;}else{if(this.localesGenerated){this.registerNlsPrefix = function(){dojo.registerModulePath("nls", dojo.hostenv.getModulePrefix("dojo") + "/../nls");};this.preloadLocalizations();}
+this.xdHasCalledPreload = true;}}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/loader_xd.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/ConsoleLogger.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/ConsoleLogger.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/ConsoleLogger.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/ConsoleLogger.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,13 @@
+
+dojo.provide("dojo.logging.ConsoleLogger");dojo.require("dojo.logging.Logger");dojo.lang.extend(dojo.logging.MemoryLogHandler,{debug:function(){dojo.hostenv.println.apply(this,arguments);},info:function(){dojo.hostenv.println.apply(this,arguments);},warn:function(){dojo.hostenv.println.apply(this,arguments);},error:function(){dojo.hostenv.println.apply(this,arguments);},critical:function(){dojo.hostenv.println.apply(this,arguments);},emit:function(record){if (!djConfig.isDebug) { return; }
+var funcName=null;switch(record.level){case 1:
+funcName="debug";break;case 2:
+funcName="info";break;case 3:
+funcName="warn";break;case 4:
+funcName="error";break;case 5:
+funcName="critical";break;default:
+funcName="debug";}
+var logStr = String(dojo.log.getLevelName(record.level)+": "
++record.time.toLocaleTimeString())+": "+record.message;if(record.msgArgs && record.msgArgs.length > 0){this[funcName].call(this, logStr, record.msgArgs);} else {this[funcName].call(this, logStr);}
+this.data.push(record);if(this.numRecords != -1){while(this.data.length>this.numRecords){this.data.shift();}}}});if(!dj_undef("console") && !dj_undef("info", console)){dojo.lang.extend(dojo.logging.MemoryLogHandler,{debug:function(){console.debug.apply(this, arguments);},info:function(){console.info.apply(this, arguments);},warn:function(){console.warn.apply(this, arguments);},error:function(){console.error.apply(this, arguments);},critical:function(){console.error.apply(this, arguments);}});dojo.lang.extend(dojo.logging.Logger,{exception: function(msg, e, squelch){var args=[msg];if(e){msg+=" : "+ e.name + " " + (e.description||e.message);args.push(e);}
+this.logType("ERROR", args);if(!squelch){throw e;}}});}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/ConsoleLogger.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/Logger.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/Logger.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/Logger.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/Logger.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,32 @@
+
+dojo.provide("dojo.logging.Logger");dojo.provide("dojo.logging.LogFilter");dojo.provide("dojo.logging.Record");dojo.provide("dojo.log");dojo.require("dojo.lang.common");dojo.require("dojo.lang.declare");dojo.logging.Record = function(logLevel, message){this.level = logLevel;this.message = "";this.msgArgs = [];this.time = new Date();if(dojo.lang.isArray(message)){if(message.length > 0 && dojo.lang.isString(message[0])){this.message=message.shift();}
+this.msgArgs = message;}else{this.message = message;}}
+dojo.logging.LogFilter = function(loggerChain){this.passChain = loggerChain || "";this.filter = function(record){return true;}}
+dojo.logging.Logger = function(){this.cutOffLevel = 0;this.propagate = true;this.parent = null;this.data = [];this.filters = [];this.handlers = [];}
+dojo.extend(dojo.logging.Logger,{_argsToArr: function(args){var ret = [];for(var x=0; x<args.length; x++){ret.push(args[x]);}
+return ret;},setLevel: function(lvl){this.cutOffLevel = parseInt(lvl);},isEnabledFor: function(lvl){return parseInt(lvl) >= this.cutOffLevel;},getEffectiveLevel: function(){if((this.cutOffLevel==0)&&(this.parent)){return this.parent.getEffectiveLevel();}
+return this.cutOffLevel;},addFilter: function(flt){this.filters.push(flt);return this.filters.length-1;},removeFilterByIndex: function(fltIndex){if(this.filters[fltIndex]){delete this.filters[fltIndex];return true;}
+return false;},removeFilter: function(fltRef){for(var x=0; x<this.filters.length; x++){if(this.filters[x]===fltRef){delete this.filters[x];return true;}}
+return false;},removeAllFilters: function(){this.filters = [];},filter: function(rec){for(var x=0; x<this.filters.length; x++){if((this.filters[x]["filter"])&&
+(!this.filters[x].filter(rec))||
+(rec.level<this.cutOffLevel)){return false;}}
+return true;},addHandler: function(hdlr){this.handlers.push(hdlr);return this.handlers.length-1;},handle: function(rec){if((!this.filter(rec))||(rec.level<this.cutOffLevel)){ return false; }
+for(var x=0; x<this.handlers.length; x++){if(this.handlers[x]["handle"]){this.handlers[x].handle(rec);}}
+return true;},log: function(lvl, msg){if(	(this.propagate)&&(this.parent)&&
+(this.parent.rec.level>=this.cutOffLevel)){this.parent.log(lvl, msg);return false;}
+this.handle(new dojo.logging.Record(lvl, msg));return true;},debug:function(msg){return this.logType("DEBUG", this._argsToArr(arguments));},info: function(msg){return this.logType("INFO", this._argsToArr(arguments));},warning: function(msg){return this.logType("WARNING", this._argsToArr(arguments));},error: function(msg){return this.logType("ERROR", this._argsToArr(arguments));},critical: function(msg){return this.logType("CRITICAL", this._argsToArr(arguments));},exception: function(msg, e, squelch){if(e){var eparts = [e.name, (e.description||e.message)];if(e.fileName){eparts.push(e.fileName);eparts.push("line "+e.lineNumber);}
+msg += " "+eparts.join(" : ");}
+this.logType("ERROR", msg);if(!squelch){throw e;}},logType: function(type, args){return this.log.apply(this, [dojo.logging.log.getLevel(type),args]);},warn:function(){this.warning.apply(this,arguments);},err:function(){this.error.apply(this,arguments);},crit:function(){this.critical.apply(this,arguments);}});dojo.logging.LogHandler = function(level){this.cutOffLevel = (level) ? level : 0;this.formatter = null;this.data = [];this.filters = [];}
+dojo.lang.extend(dojo.logging.LogHandler,{setFormatter:function(formatter){dojo.unimplemented("setFormatter");},flush:function(){},close:function(){},handleError:function(){dojo.deprecated("dojo.logging.LogHandler.handleError", "use handle()", "0.6");},handle:function(record){if((this.filter(record))&&(record.level>=this.cutOffLevel)){this.emit(record);}},emit:function(record){dojo.unimplemented("emit");}});void(function(){var names = [
+"setLevel", "addFilter", "removeFilterByIndex", "removeFilter","removeAllFilters", "filter"
+];var tgt = dojo.logging.LogHandler.prototype;var src = dojo.logging.Logger.prototype;for(var x=0; x<names.length; x++){tgt[names[x]] = src[names[x]];}})();dojo.logging.log = new dojo.logging.Logger();dojo.logging.log.levels = [ {"name": "DEBUG", "level": 1},{"name": "INFO", "level": 2},{"name": "WARNING", "level": 3},{"name": "ERROR", "level": 4},{"name": "CRITICAL", "level": 5} ];dojo.logging.log.loggers = {};dojo.logging.log.getLogger = function(name){if(!this.loggers[name]){this.loggers[name] = new dojo.logging.Logger();this.loggers[name].parent = this;}
+return this.loggers[name];}
+dojo.logging.log.getLevelName = function(lvl){for(var x=0; x<this.levels.length; x++){if(this.levels[x].level == lvl){return this.levels[x].name;}}
+return null;}
+dojo.logging.log.getLevel = function(name){for(var x=0; x<this.levels.length; x++){if(this.levels[x].name.toUpperCase() == name.toUpperCase()){return this.levels[x].level;}}
+return null;}
+dojo.declare("dojo.logging.MemoryLogHandler",dojo.logging.LogHandler,{initializer: function(level, recordsToKeep, postType, postInterval){dojo.logging.LogHandler.call(this, level);this.numRecords = (typeof djConfig['loggingNumRecords'] != 'undefined') ? djConfig['loggingNumRecords'] : ((recordsToKeep) ? recordsToKeep : -1);this.postType = (typeof djConfig['loggingPostType'] != 'undefined') ? djConfig['loggingPostType'] : ( postType || -1);this.postInterval = (typeof djConfig['loggingPostInterval'] != 'undefined') ? djConfig['loggingPostInterval'] : ( postType || -1);},emit: function(record){if(!djConfig.isDebug){ return; }
+var logStr = String(dojo.log.getLevelName(record.level)+": "
++record.time.toLocaleTimeString())+": "+record.message;if(!dj_undef("println", dojo.hostenv)){dojo.hostenv.println(logStr, record.msgArgs);}
+this.data.push(record);if(this.numRecords != -1){while(this.data.length>this.numRecords){this.data.shift();}}}}
+);dojo.logging.logQueueHandler = new dojo.logging.MemoryLogHandler(0,50,0,10000);dojo.logging.log.addHandler(dojo.logging.logQueueHandler);dojo.log = dojo.logging.log;
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/Logger.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/__package__.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/__package__.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.kwCompoundRequire({common: [["dojo.logging.Logger", false, false]],rhino: ["dojo.logging.RhinoLogger"]});dojo.provide("dojo.logging.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/logging/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,22 @@
+
+dojo.provide("dojo.math");dojo.math.degToRad = function(x) {return (x*Math.PI) / 180;}
+dojo.math.radToDeg = function(x) {return (x*180) / Math.PI;}
+dojo.math.factorial = function(n){if(n<1){ return 0; }
+var retVal = 1;for(var i=1;i<=n;i++){ retVal *= i; }
+return retVal;}
+dojo.math.permutations = function(n, k) {if(n==0 || k==0) return 1;return (dojo.math.factorial(n) / dojo.math.factorial(n-k));}
+dojo.math.combinations = function (n, r) {if(n==0 || r==0) return 1;return (dojo.math.factorial(n) / (dojo.math.factorial(n-r) * dojo.math.factorial(r)));}
+dojo.math.bernstein = function(t, n, i) {return (dojo.math.combinations(n,i) * Math.pow(t,i) * Math.pow(1-t,n-i));}
+dojo.math.gaussianRandom = function(){var k = 2;do {var i = 2 * Math.random() - 1;var j = 2 * Math.random() - 1;k = i * i + j * j;} while (k >= 1);k = Math.sqrt((-2 * Math.log(k)) / k);return i * k;}
+dojo.math.mean = function() {var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments;var mean = 0;for (var i = 0; i < array.length; i++) { mean += array[i]; }
+return mean / array.length;}
+dojo.math.round = function(number, places) {if (!places) { var shift = 1; }
+else { var shift = Math.pow(10, places); }
+return Math.round(number * shift) / shift;}
+dojo.math.sd = dojo.math.standardDeviation = function(){var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments;return Math.sqrt(dojo.math.variance(array));}
+dojo.math.variance = function() {var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments;var mean = 0, squares = 0;for (var i = 0; i < array.length; i++) {mean += array[i];squares += Math.pow(array[i], 2);}
+return (squares / array.length) - Math.pow(mean / array.length, 2);}
+dojo.math.range = function(a, b, step) {if(arguments.length < 2) {b = a;a = 0;}
+if(arguments.length < 3) {step = 1;}
+var range = [];if(step > 0) {for(var i = a; i < b; i += step) {range.push(i);}} else if(step < 0) {for(var i = a; i > b; i += step) {range.push(i);}} else {throw new Error("dojo.math.range: step must be non-zero");}
+return range;}

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/__package__.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/__package__.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,4 @@
+
+dojo.kwCompoundRequire({common: [
+["dojo.math", false, false],["dojo.math.curves", false, false],["dojo.math.points", false, false]
+]});dojo.provide("dojo.math.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/curves.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/curves.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/curves.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/curves.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,26 @@
+
+dojo.provide("dojo.math.curves");dojo.require("dojo.math");dojo.math.curves = {Line: function(start, end) {this.start = start;this.end = end;this.dimensions = start.length;for(var i = 0; i < start.length; i++) {start[i] = Number(start[i]);}
+for(var i = 0; i < end.length; i++) {end[i] = Number(end[i]);}
+this.getValue = function(n){var retVal = new Array(this.dimensions);for(var i=0;i<this.dimensions;i++)
+retVal[i] = ((this.end[i] - this.start[i]) * n) + this.start[i];return retVal;}
+return this;},Bezier: function(pnts) {this.getValue = function(step) {if(step >= 1) return this.p[this.p.length-1];if(step <= 0) return this.p[0];var retVal = new Array(this.p[0].length);for(var k=0;j<this.p[0].length;k++) { retVal[k]=0; }
+for(var j=0;j<this.p[0].length;j++) {var C=0; var D=0;for(var i=0;i<this.p.length;i++) {C += this.p[i][j] * this.p[this.p.length-1][0]
+* dojo.math.bernstein(step,this.p.length,i);}
+for(var l=0;l<this.p.length;l++) {D += this.p[this.p.length-1][0] * dojo.math.bernstein(step,this.p.length,l);}
+retVal[j] = C/D;}
+return retVal;}
+this.p = pnts;return this;},CatmullRom : function(pnts, c) {this.getValue = function(step) {var percent = step * (this.p.length-1);var node = Math.floor(percent);var progress = percent - node;var i0 = node-1; if(i0 < 0) i0 = 0;var i = node;var i1 = node+1; if(i1 >= this.p.length) i1 = this.p.length-1;var i2 = node+2; if(i2 >= this.p.length) i2 = this.p.length-1;var u = progress;var u2 = progress*progress;var u3 = progress*progress*progress;var retVal = new Array(this.p[0].length);for(var k=0;k<this.p[0].length;k++) {var x1 = ( -this.c * this.p[i0][k] ) + ( (2 - this.c) * this.p[i][k] ) + ( (this.c-2) * this.p[i1][k] ) + ( this.c * this.p[i2][k] );var x2 = ( 2 * this.c * this.p[i0][k] ) + ( (this.c-3) * this.p[i][k] ) + ( (3 - 2 * this.c) * this.p[i1][k] ) + ( -this.c * this.p[i2][k] );var x3 = ( -this.c * this.p[i0][k] ) + ( this.c * this.p[i1][k] );var x4 = this.p[i][k];retVal[k] = x1*u3 + x2*u2 + x3*u + x4;}
+return retVal;}
+if(!c) this.c = 0.7;else this.c = c;this.p = pnts;return this;},Arc : function(start, end, ccw) {var center = dojo.math.points.midpoint(start, end);var sides = dojo.math.points.translate(dojo.math.points.invert(center), start);var rad = Math.sqrt(Math.pow(sides[0], 2) + Math.pow(sides[1], 2));var theta = dojo.math.radToDeg(Math.atan(sides[1]/sides[0]));if( sides[0] < 0 ) {theta -= 90;} else {theta += 90;}
+dojo.math.curves.CenteredArc.call(this, center, rad, theta, theta+(ccw?-180:180));},CenteredArc : function(center, radius, start, end) {this.center = center;this.radius = radius;this.start = start || 0;this.end = end;this.getValue = function(n) {var retVal = new Array(2);var theta = dojo.math.degToRad(this.start+((this.end-this.start)*n));retVal[0] = this.center[0] + this.radius*Math.sin(theta);retVal[1] = this.center[1] - this.radius*Math.cos(theta);return retVal;}
+return this;},Circle : function(center, radius) {dojo.math.curves.CenteredArc.call(this, center, radius, 0, 360);return this;},Path : function() {var curves = [];var weights = [];var ranges = [];var totalWeight = 0;this.add = function(curve, weight) {if( weight < 0 ) { dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0"); }
+curves.push(curve);weights.push(weight);totalWeight += weight;computeRanges();}
+this.remove = function(curve) {for(var i = 0; i < curves.length; i++) {if( curves[i] == curve ) {curves.splice(i, 1);totalWeight -= weights.splice(i, 1)[0];break;}}
+computeRanges();}
+this.removeAll = function() {curves = [];weights = [];totalWeight = 0;}
+this.getValue = function(n) {var found = false, value = 0;for(var i = 0; i < ranges.length; i++) {var r = ranges[i];if( n >= r[0] && n < r[1] ) {var subN = (n - r[0]) / r[2];value = curves[i].getValue(subN);found = true;break;}}
+if( !found ) {value = curves[curves.length-1].getValue(1);}
+for(var j = 0; j < i; j++) {value = dojo.math.points.translate(value, curves[j].getValue(1));}
+return value;}
+function computeRanges() {var start = 0;for(var i = 0; i < weights.length; i++) {var end = start + weights[i] / totalWeight;var len = end - start;ranges[i] = [start, end, len];start = end;}}
+return this;}};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/math/curves.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message