You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2009/07/16 21:14:56 UTC

svn commit: r794787 [26/34] - in /geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src: ./ animation/ cal/ charting/ charting/svg/ charting/vml/ collections/ crypto/ data/ data/core/ data/old/ data/old/format/ data/old/provider/ date/ debug/...

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,475 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.Slider");
+dojo.require("dojo.event.*");
+dojo.require("dojo.dnd.*");
+dojo.require("dojo.dnd.HtmlDragMove");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.html.layout");
+dojo.widget.defineWidget("dojo.widget.Slider", dojo.widget.HtmlWidget, {minimumX:0, minimumY:0, maximumX:10, maximumY:10, snapValuesX:0, snapValuesY:0, _snapToGrid:true, isEnableX:true, isEnableY:true, _valueSizeX:0, _valueSizeY:0, _minX:0, _minY:0, _constraintWidth:0, _constraintHeight:0, _clipLeft:0, _clipRight:0, _clipTop:0, _clipBottom:0, _clipXdelta:0, _clipYdelta:0, initialValueX:0, initialValueY:0, flipX:false, flipY:false, clickSelect:true, activeDrag:false, templateCssString:".sliderMain {\n  border: 0px !important;\n  border-spacing: 0px !important;\n  line-height: 0px !important;\n  padding: 0px !important;\n  display: -moz-inline-table !important;\n  display: inline !important;\n  -moz-user-focus: normal !important;\n}\n\n.sliderComponent {\n  border: 0px;\n  padding: 0px;\n  margin: 0px;\n}\n\n.sliderHandle { \n  top: 0px;\n  left: 0px;\n  z-index: 1000;\n  position: absolute !important;\n}\n\n.sliderOutsetButton { \n  border-style: outset;\n  border-width: 0px 
 1px 1px 0px;\n  border-color: black;\n}\n\n.sliderInsetButton { \n  border-style: inset;\n  border-width: 1px 0px 0px 1px;\n  border-color: black;\n}\n\n.sliderButtonY {\n  margin: 0px;\n  padding: 0px;\n  z-index: 900;\n}\n\n.sliderButtonX {\n  margin: 0px;\n  padding: 0px;\n  z-index: 900;\n}\n\n.sliderBackground { \n  z-index: 0;\n  display: block !important;\n  position: relative !important;\n}\n\n.sliderProgressBackground { \n  z-index: 800;\n  position: absolute !important;\n  clip: rect(0px,0px,0px,0px);\n}\n\n.sliderBackgroundSizeOnly { \n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Slider.css"), templateString:"<table _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\" \n\tclass=\"sliderMain\" \n\tdojoAttachPoint=\"focusNode\" \n\tdojoAttachEvent=\"onmousedown:_setFocus; onkey:_handleKeyEvents; onkeyup:_buttonReleased; onmouseup:_buttonReleased; onmousewheel:_mouseWheeled;\"\n\ttabindex=\"0\" cols=3 cellpadding=0 cellsp
 acing=0 style=\"\">\n\t<tr valign=middle align=center>\n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=topBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\n\t\t\t\tdojoAttachPoint=topButtonNode \n\t\t\t\tdojoAttachEvent=\"onmousedown:_topButtonPressed; onmousemove:_discardEvent; ondblclick:_topButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.topButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleY}\"\n\t\t></td>\n\t</tr>\n\t<tr valign=middle align=center>\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=leftBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\n\t\t\t\tdojoAttachPoint=leftButtonNode\n\t\t\t\tdojoAttachEvent=\"onmousedown:_leftButtonPressed; onmousemove:_discardEvent; ondblclick:_leftButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.leftButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleX}\"\n\t\t></td>\n\t\t<td dojoAttachPoint=constrainingContainerNode \n\t\t\tclass=\"sliderComponent sliderBackground\"\n\
 t\t\tstyle=\"${this.backgroundStyle}\"\n\t\t\t><img src=\"${this.handleSrc}\" \n\t\t\t\tclass=sliderHandle\n\t\t\t\tdojoAttachPoint=sliderHandleNode\n\t\t\t\tstyle=\"${this.handleStyle}\"\n\t\t\t><img src=\"${this.progressBackgroundSrc}\"\n\t\t\t\tclass=\"sliderBackgroundSizeOnly sliderProgressBackground\"\n\t\t\t\tdojoAttachPoint=progressBackgroundNode\n\t\t\t\tstyle=\"${this.backgroundSize}\"\n\t\t\t><img src=\"${this.backgroundSrc}\" \n\t\t\t\tclass=sliderBackgroundSizeOnly\n\t\t\t\tdojoAttachPoint=sliderBackgroundNode\n\t\t\t\tstyle=\"${this.backgroundSize}\"\n\t\t></td>\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=rightBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\n\t\t\t\tdojoAttachPoint=rightButtonNode\n\t\t\t\tdojoAttachEvent=\"onmousedown:_rightButtonPressed; onmousemove:_discardEvent; ondblclick:_rightButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.rightButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleX}\"\n\t\t></td>\n\t</tr>\n\t
 <tr valign=middle align=center>\n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=bottomBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\n\t\t\t\tdojoAttachPoint=bottomButtonNode \n\t\t\t\tdojoAttachEvent=\"onmousedown:_bottomButtonPressed; onmousemove:_discardEvent; ondblclick:_bottomButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.bottomButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleY}\"\n\t\t></td>\n\t</tr>\n</table>\n", _isDragInProgress:false, bottomButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_down_arrow.png"), topButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_up_arrow.png"), leftButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_left_arrow.png"), rightButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_right_arrow.png"), backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif"), progressBackgroundSrc:dojo.uri.moduleUri("dojo.widget"
 , "templates/images/blank.gif"), backgroundSize:"width:200px;height:200px;", backgroundStyle:"", buttonStyleX:"", buttonStyleY:"", handleStyle:"", handleSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-button.png"), showButtons:true, _eventCount:0, _typamaticTimer:null, _typamaticFunction:null, defaultTimeout:500, timeoutChangeRate:0.9, _currentTimeout:this.defaultTimeout, _handleKeyEvents:function (evt) {
+	if (!evt.key) {
+		return;
+	}
+	if (!evt.ctrlKey && !evt.altKey) {
+		switch (evt.key) {
+		  case evt.KEY_LEFT_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._leftButtonPressed(evt);
+			return;
+		  case evt.KEY_RIGHT_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._rightButtonPressed(evt);
+			return;
+		  case evt.KEY_DOWN_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._bottomButtonPressed(evt);
+			return;
+		  case evt.KEY_UP_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._topButtonPressed(evt);
+			return;
+		}
+	}
+	this._eventCount++;
+}, _pressButton:function (buttonNode) {
+	buttonNode.className = buttonNode.className.replace("Outset", "Inset");
+}, _releaseButton:function (buttonNode) {
+	buttonNode.className = buttonNode.className.replace("Inset", "Outset");
+}, _buttonPressed:function (evt, buttonNode) {
+	this._setFocus();
+	if (typeof evt == "object") {
+		if (this._typamaticTimer != null) {
+			if (this._typamaticNode == buttonNode) {
+				return;
+			}
+			clearTimeout(this._typamaticTimer);
+		}
+		this._buttonReleased(null);
+		this._eventCount++;
+		this._typamaticTimer = null;
+		this._currentTimeout = this.defaultTimeout;
+		dojo.event.browser.stopEvent(evt);
+	} else {
+		if (evt != this._eventCount) {
+			this._buttonReleased(null);
+			return false;
+		}
+	}
+	if (buttonNode == this.leftButtonNode && this.isEnableX) {
+		this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") - this._valueSizeX);
+	} else {
+		if (buttonNode == this.rightButtonNode && this.isEnableX) {
+			this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") + this._valueSizeX);
+		} else {
+			if (buttonNode == this.topButtonNode && this.isEnableY) {
+				this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") - this._valueSizeY);
+			} else {
+				if (buttonNode == this.bottomButtonNode && this.isEnableY) {
+					this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") + this._valueSizeY);
+				} else {
+					return false;
+				}
+			}
+		}
+	}
+	this._pressButton(buttonNode);
+	this.notifyListeners();
+	this._typamaticNode = buttonNode;
+	this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode);
+	this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);
+	return false;
+}, _bottomButtonPressed:function (evt) {
+	return this._buttonPressed(evt, this.bottomButtonNode);
+}, _bottomButtonDoubleClicked:function (evt) {
+	var rc = this._bottomButtonPressed(evt);
+	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
+	return rc;
+}, _topButtonPressed:function (evt) {
+	return this._buttonPressed(evt, this.topButtonNode);
+}, _topButtonDoubleClicked:function (evt) {
+	var rc = this._topButtonPressed(evt);
+	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
+	return rc;
+}, _leftButtonPressed:function (evt) {
+	return this._buttonPressed(evt, this.leftButtonNode);
+}, _leftButtonDoubleClicked:function (evt) {
+	var rc = this._leftButtonPressed(evt);
+	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
+	return rc;
+}, _rightButtonPressed:function (evt) {
+	return this._buttonPressed(evt, this.rightButtonNode);
+}, _rightButtonDoubleClicked:function (evt) {
+	var rc = this._rightButtonPressed(evt);
+	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
+	return rc;
+}, _buttonReleased:function (evt) {
+	if (typeof evt == "object" && evt != null && typeof evt.keyCode != "undefined" && evt.keyCode != null) {
+		var keyCode = evt.keyCode;
+		switch (keyCode) {
+		  case evt.KEY_LEFT_ARROW:
+		  case evt.KEY_RIGHT_ARROW:
+		  case evt.KEY_DOWN_ARROW:
+		  case evt.KEY_UP_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			break;
+		}
+	}
+	this._releaseButton(this.topButtonNode);
+	this._releaseButton(this.bottomButtonNode);
+	this._releaseButton(this.leftButtonNode);
+	this._releaseButton(this.rightButtonNode);
+	this._eventCount++;
+	if (this._typamaticTimer != null) {
+		clearTimeout(this._typamaticTimer);
+	}
+	this._typamaticTimer = null;
+	this._currentTimeout = this.defaultTimeout;
+}, _mouseWheeled:function (evt) {
+	var scrollAmount = 0;
+	if (typeof evt.wheelDelta == "number") {
+		scrollAmount = evt.wheelDelta;
+	} else {
+		if (typeof evt.detail == "number") {
+			scrollAmount = -evt.detail;
+		}
+	}
+	if (this.isEnableY) {
+		if (scrollAmount > 0) {
+			this._topButtonPressed(evt);
+			this._buttonReleased(evt);
+		} else {
+			if (scrollAmount < 0) {
+				this._bottomButtonPressed(evt);
+				this._buttonReleased(evt);
+			}
+		}
+	} else {
+		if (this.isEnableX) {
+			if (scrollAmount > 0) {
+				this._rightButtonPressed(evt);
+				this._buttonReleased(evt);
+			} else {
+				if (scrollAmount < 0) {
+					this._leftButtonPressed(evt);
+					this._buttonReleased(evt);
+				}
+			}
+		}
+	}
+}, _discardEvent:function (evt) {
+	dojo.event.browser.stopEvent(evt);
+}, _setFocus:function () {
+	if (this.focusNode.focus) {
+		this.focusNode.focus();
+	}
+}, fillInTemplate:function (args, frag) {
+	var source = this.getFragNodeRef(frag);
+	dojo.html.copyStyle(this.domNode, source);
+	var padding = this.domNode.style.padding;
+	if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px") {
+		this.topBorderNode.style.padding = this.bottomBorderNode.style.padding = padding;
+		this.topBorderNode.style.paddingBottom = "0px";
+		this.bottomBorderNode.style.paddingTop = "0px";
+		this.rightBorderNode.style.paddingRight = this.domNode.style.paddingRight;
+		this.leftBorderNode.style.paddingLeft = this.domNode.style.paddingLeft;
+		this.domNode.style.padding = "0px 0px 0px 0px";
+	}
+	var borderWidth = this.domNode.style.borderWidth;
+	if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "0px 0px 0px 0px") {
+		this.topBorderNode.style.borderStyle = this.rightBorderNode.style.borderStyle = this.bottomBorderNode.style.borderStyle = this.leftBorderNode.style.borderStyle = this.domNode.style.borderStyle;
+		this.topBorderNode.style.borderColor = this.rightBorderNode.style.borderColor = this.bottomBorderNode.style.borderColor = this.leftBorderNode.style.borderColor = this.domNode.style.borderColor;
+		this.topBorderNode.style.borderWidth = this.bottomBorderNode.style.borderWidth = borderWidth;
+		this.topBorderNode.style.borderBottomWidth = "0px";
+		this.bottomBorderNode.style.borderTopWidth = "0px";
+		this.rightBorderNode.style.borderRightWidth = this.domNode.style.borderRightWidth;
+		this.leftBorderNode.style.borderLeftWidth = this.domNode.style.borderLeftWidth;
+		this.domNode.style.borderWidth = "0px 0px 0px 0px";
+	}
+	this._handleMove = new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);
+	this._handleMove.setParent(this);
+	if (this.clickSelect) {
+		dojo.event.connect(this.constrainingContainerNode, "onmousedown", this, "_onClick");
+	}
+	if (this.isEnableX) {
+		this.setValueX(!isNaN(this.initialValueX) ? this.initialValueX : (!isNaN(this.minimumX) ? this.minimumX : 0));
+	}
+	if (!this.isEnableX || !this.showButtons) {
+		this.rightButtonNode.style.width = "1px";
+		this.rightButtonNode.style.visibility = "hidden";
+		this.leftButtonNode.style.width = "1px";
+		this.leftButtonNode.style.visibility = "hidden";
+	}
+	if (this.isEnableY) {
+		this.setValueY(!isNaN(this.initialValueY) ? this.initialValueY : (!isNaN(this.minimumY) ? this.minimumY : 0));
+	}
+	if (!this.isEnableY || !this.showButtons) {
+		this.bottomButtonNode.style.width = "1px";
+		this.bottomButtonNode.style.visibility = "hidden";
+		this.topButtonNode.style.width = "1px";
+		this.topButtonNode.style.visibility = "hidden";
+	}
+	if (this.focusNode.addEventListener) {
+		this.focusNode.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false);
+	}
+}, _snapX:function (x) {
+	if (x < 0) {
+		x = 0;
+	} else {
+		if (x > this._constraintWidth) {
+			x = this._constraintWidth;
+		} else {
+			var selectedValue = Math.round(x / this._valueSizeX);
+			x = Math.round(selectedValue * this._valueSizeX);
+		}
+	}
+	this.sliderHandleNode.style.left = x + "px";
+	if (this.flipX) {
+		this._clipLeft = x + this._clipXdelta;
+	} else {
+		this._clipRight = x + this._clipXdelta;
+	}
+	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
+}, _calc_valueSizeX:function () {
+	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
+	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
+	if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0) {
+		return false;
+	}
+	this._constraintWidth = constrainingCtrBox.width + dojo.html.getPadding(this.constrainingContainerNode).width - sliderHandleBox.width;
+	if (this.flipX) {
+		this._clipLeft = this._clipRight = constrainingCtrBox.width;
+	} else {
+		this._clipLeft = this._clipRight = 0;
+	}
+	this._clipXdelta = sliderHandleBox.width >> 1;
+	if (!this.isEnableY) {
+		this._clipTop = 0;
+		this._clipBottom = constrainingCtrBox.height;
+	}
+	if (this._constraintWidth <= 0) {
+		return false;
+	}
+	if (this.snapValuesX == 0) {
+		this.snapValuesX = this._constraintWidth + 1;
+	}
+	this._valueSizeX = this._constraintWidth / (this.snapValuesX - 1);
+	return true;
+}, setValueX:function (value) {
+	if (0 == this._valueSizeX) {
+		if (this._calc_valueSizeX() == false) {
+			dojo.lang.setTimeout(this, "setValueX", 100, value);
+			return;
+		}
+	}
+	if (isNaN(value)) {
+		value = 0;
+	}
+	if (value > this.maximumX) {
+		value = this.maximumX;
+	} else {
+		if (value < this.minimumX) {
+			value = this.minimumX;
+		}
+	}
+	var pixelPercent = (value - this.minimumX) / (this.maximumX - this.minimumX);
+	if (this.flipX) {
+		pixelPercent = 1 - pixelPercent;
+	}
+	this._snapX(pixelPercent * this._constraintWidth);
+	this.notifyListeners();
+}, getValueX:function () {
+	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "left") / this._constraintWidth;
+	if (this.flipX) {
+		pixelPercent = 1 - pixelPercent;
+	}
+	return Math.round(pixelPercent * (this.snapValuesX - 1)) * ((this.maximumX - this.minimumX) / (this.snapValuesX - 1)) + this.minimumX;
+}, _snapY:function (y) {
+	if (y < 0) {
+		y = 0;
+	} else {
+		if (y > this._constraintHeight) {
+			y = this._constraintHeight;
+		} else {
+			var selectedValue = Math.round(y / this._valueSizeY);
+			y = Math.round(selectedValue * this._valueSizeY);
+		}
+	}
+	this.sliderHandleNode.style.top = y + "px";
+	if (this.flipY) {
+		this._clipTop = y + this._clipYdelta;
+	} else {
+		this._clipBottom = y + this._clipYdelta;
+	}
+	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
+}, _calc_valueSizeY:function () {
+	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
+	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
+	if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0) {
+		return false;
+	}
+	this._constraintHeight = constrainingCtrBox.height + dojo.html.getPadding(this.constrainingContainerNode).height - sliderHandleBox.height;
+	if (this.flipY) {
+		this._clipTop = this._clipBottom = constrainingCtrBox.height;
+	} else {
+		this._clipTop = this._clipBottom = 0;
+	}
+	this._clipYdelta = sliderHandleBox.height >> 1;
+	if (!this.isEnableX) {
+		this._clipLeft = 0;
+		this._clipRight = constrainingCtrBox.width;
+	}
+	if (this._constraintHeight <= 0) {
+		return false;
+	}
+	if (this.snapValuesY == 0) {
+		this.snapValuesY = this._constraintHeight + 1;
+	}
+	this._valueSizeY = this._constraintHeight / (this.snapValuesY - 1);
+	return true;
+}, setValueY:function (value) {
+	if (0 == this._valueSizeY) {
+		if (this._calc_valueSizeY() == false) {
+			dojo.lang.setTimeout(this, "setValueY", 100, value);
+			return;
+		}
+	}
+	if (isNaN(value)) {
+		value = 0;
+	}
+	if (value > this.maximumY) {
+		value = this.maximumY;
+	} else {
+		if (value < this.minimumY) {
+			value = this.minimumY;
+		}
+	}
+	var pixelPercent = (value - this.minimumY) / (this.maximumY - this.minimumY);
+	if (this.flipY) {
+		pixelPercent = 1 - pixelPercent;
+	}
+	this._snapY(pixelPercent * this._constraintHeight);
+	this.notifyListeners();
+}, getValueY:function () {
+	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "top") / this._constraintHeight;
+	if (this.flipY) {
+		pixelPercent = 1 - pixelPercent;
+	}
+	return Math.round(pixelPercent * (this.snapValuesY - 1)) * ((this.maximumY - this.minimumY) / (this.snapValuesY - 1)) + this.minimumY;
+}, _onClick:function (evt) {
+	if (this._isDragInProgress) {
+		return;
+	}
+	var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX);
+	var content = dojo.html.getContentBox(this._handleMove.domNode);
+	if (this.isEnableX) {
+		var x = evt.pageX - parent.x - (content.width >> 1);
+		this._snapX(x);
+	}
+	if (this.isEnableY) {
+		var y = evt.pageY - parent.y - (content.height >> 1);
+		this._snapY(y);
+	}
+	this.notifyListeners();
+}, notifyListeners:function () {
+	this.onValueChanged(this.getValueX(), this.getValueY());
+}, onValueChanged:function (x, y) {
+}});
+dojo.widget.defineWidget("dojo.widget.SliderHorizontal", dojo.widget.Slider, {isEnableX:true, isEnableY:false, initialValue:"", snapValues:"", minimum:"", maximum:"", buttonStyle:"", backgroundSize:"height:10px;width:200px;", backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-bg.gif"), flip:false, postMixInProperties:function () {
+	dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this, arguments);
+	if (!isNaN(parseFloat(this.initialValue))) {
+		this.initialValueX = parseFloat(this.initialValue);
+	}
+	if (!isNaN(parseFloat(this.minimum))) {
+		this.minimumX = parseFloat(this.minimum);
+	}
+	if (!isNaN(parseFloat(this.maximum))) {
+		this.maximumX = parseFloat(this.maximum);
+	}
+	if (!isNaN(parseInt(this.snapValues))) {
+		this.snapValuesX = parseInt(this.snapValues);
+	}
+	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
+		this.buttonStyleX = this.buttonStyle;
+	}
+	if (dojo.lang.isBoolean(this.flip)) {
+		this.flipX = this.flip;
+	}
+}, notifyListeners:function () {
+	this.onValueChanged(this.getValueX());
+}, getValue:function () {
+	return this.getValueX();
+}, setValue:function (value) {
+	this.setValueX(value);
+}, onValueChanged:function (value) {
+}});
+dojo.widget.defineWidget("dojo.widget.SliderVertical", dojo.widget.Slider, {isEnableX:false, isEnableY:true, initialValue:"", snapValues:"", minimum:"", maximum:"", buttonStyle:"", backgroundSize:"width:10px;height:200px;", backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-bg-vert.gif"), flip:false, postMixInProperties:function () {
+	dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this, arguments);
+	if (!isNaN(parseFloat(this.initialValue))) {
+		this.initialValueY = parseFloat(this.initialValue);
+	}
+	if (!isNaN(parseFloat(this.minimum))) {
+		this.minimumY = parseFloat(this.minimum);
+	}
+	if (!isNaN(parseFloat(this.maximum))) {
+		this.maximumY = parseFloat(this.maximum);
+	}
+	if (!isNaN(parseInt(this.snapValues))) {
+		this.snapValuesY = parseInt(this.snapValues);
+	}
+	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
+		this.buttonStyleY = this.buttonStyle;
+	}
+	if (dojo.lang.isBoolean(this.flip)) {
+		this.flipY = this.flip;
+	}
+}, notifyListeners:function () {
+	this.onValueChanged(this.getValueY());
+}, getValue:function () {
+	return this.getValueY();
+}, setValue:function (value) {
+	this.setValueY(value);
+}, onValueChanged:function (value) {
+}});
+dojo.declare("dojo.widget._SliderDragMoveSource", dojo.dnd.HtmlDragMoveSource, {slider:null, onDragStart:function (evt) {
+	this.slider._isDragInProgress = true;
+	var dragObj = this.createDragMoveObject();
+	this.slider.notifyListeners();
+	return dragObj;
+}, onDragEnd:function (evt) {
+	this.slider._isDragInProgress = false;
+	this.slider.notifyListeners();
+}, createDragMoveObject:function () {
+	var dragObj = new dojo.widget._SliderDragMoveObject(this.dragObject, this.type);
+	dragObj.slider = this.slider;
+	if (this.dragClass) {
+		dragObj.dragClass = this.dragClass;
+	}
+	return dragObj;
+}, setParent:function (slider) {
+	this.slider = slider;
+}});
+dojo.declare("dojo.widget._SliderDragMoveObject", dojo.dnd.HtmlDragMoveObject, {slider:null, onDragMove:function (evt) {
+	this.updateDragOffset();
+	if (this.slider.isEnableX) {
+		var x = this.dragOffset.x + evt.pageX;
+		this.slider._snapX(x);
+	}
+	if (this.slider.isEnableY) {
+		var y = this.dragOffset.y + evt.pageY;
+		this.slider._snapY(y);
+	}
+	if (this.slider.activeDrag) {
+		this.slider.notifyListeners();
+	}
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Slider.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,500 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.SortableTable");
+dojo.deprecated("SortableTable will be removed in favor of FilteringTable.", "0.5");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.date.format");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.html.util");
+dojo.require("dojo.html.style");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.widget.defineWidget("dojo.widget.SortableTable", dojo.widget.HtmlWidget, function () {
+	this.data = [];
+	this.selected = [];
+	this.columns = [];
+}, {enableMultipleSelect:false, maximumNumberOfSelections:0, enableAlternateRows:false, minRows:0, defaultDateFormat:"%D", sortIndex:0, sortDirection:0, valueField:"Id", headClass:"", tbodyClass:"", headerClass:"", headerSortUpClass:"selected", headerSortDownClass:"selected", rowClass:"", rowAlternateClass:"alt", rowSelectedClass:"selected", columnSelected:"sorted-column", isContainer:false, templatePath:null, templateCssPath:null, getTypeFromString:function (s) {
+	var parts = s.split("."), i = 0, obj = dj_global;
+	do {
+		obj = obj[parts[i++]];
+	} while (i < parts.length && obj);
+	return (obj != dj_global) ? obj : null;
+}, compare:function (o1, o2) {
+	for (var p in o1) {
+		if (!(p in o2)) {
+			return false;
+		}
+		if (o1[p].valueOf() != o2[p].valueOf()) {
+			return false;
+		}
+	}
+	return true;
+}, isSelected:function (o) {
+	for (var i = 0; i < this.selected.length; i++) {
+		if (this.compare(this.selected[i], o)) {
+			return true;
+		}
+	}
+	return false;
+}, removeFromSelected:function (o) {
+	var idx = -1;
+	for (var i = 0; i < this.selected.length; i++) {
+		if (this.compare(this.selected[i], o)) {
+			idx = i;
+			break;
+		}
+	}
+	if (idx >= 0) {
+		this.selected.splice(idx, 1);
+	}
+}, getSelection:function () {
+	return this.selected;
+}, getValue:function () {
+	var a = [];
+	for (var i = 0; i < this.selected.length; i++) {
+		if (this.selected[i][this.valueField]) {
+			a.push(this.selected[i][this.valueField]);
+		}
+	}
+	return a.join();
+}, reset:function () {
+	this.columns = [];
+	this.data = [];
+	this.resetSelections(this.domNode.getElementsByTagName("tbody")[0]);
+}, resetSelections:function (body) {
+	this.selected = [];
+	var idx = 0;
+	var rows = body.getElementsByTagName("tr");
+	for (var i = 0; i < rows.length; i++) {
+		if (rows[i].parentNode == body) {
+			rows[i].removeAttribute("selected");
+			if (this.enableAlternateRows && idx % 2 == 1) {
+				rows[i].className = this.rowAlternateClass;
+			} else {
+				rows[i].className = "";
+			}
+			idx++;
+		}
+	}
+}, getObjectFromRow:function (row) {
+	var cells = row.getElementsByTagName("td");
+	var o = {};
+	for (var i = 0; i < this.columns.length; i++) {
+		if (this.columns[i].sortType == "__markup__") {
+			o[this.columns[i].getField()] = cells[i].innerHTML;
+		} else {
+			var text = dojo.html.renderedTextContent(cells[i]);
+			var val = text;
+			if (this.columns[i].getType() != String) {
+				var val = new (this.columns[i].getType())(text);
+			}
+			o[this.columns[i].getField()] = val;
+		}
+	}
+	if (dojo.html.hasAttribute(row, "value")) {
+		o[this.valueField] = dojo.html.getAttribute(row, "value");
+	}
+	return o;
+}, setSelectionByRow:function (row) {
+	var o = this.getObjectFromRow(row);
+	var b = false;
+	for (var i = 0; i < this.selected.length; i++) {
+		if (this.compare(this.selected[i], o)) {
+			b = true;
+			break;
+		}
+	}
+	if (!b) {
+		this.selected.push(o);
+	}
+}, parseColumns:function (node) {
+	this.reset();
+	var row = node.getElementsByTagName("tr")[0];
+	var cells = row.getElementsByTagName("td");
+	if (cells.length == 0) {
+		cells = row.getElementsByTagName("th");
+	}
+	for (var i = 0; i < cells.length; i++) {
+		var o = {field:null, format:null, noSort:false, sortType:"String", dataType:String, sortFunction:null, label:null, align:"left", valign:"middle", getField:function () {
+			return this.field || this.label;
+		}, getType:function () {
+			return this.dataType;
+		}};
+		if (dojo.html.hasAttribute(cells[i], "align")) {
+			o.align = dojo.html.getAttribute(cells[i], "align");
+		}
+		if (dojo.html.hasAttribute(cells[i], "valign")) {
+			o.valign = dojo.html.getAttribute(cells[i], "valign");
+		}
+		if (dojo.html.hasAttribute(cells[i], "nosort")) {
+			o.noSort = dojo.html.getAttribute(cells[i], "nosort") == "true";
+		}
+		if (dojo.html.hasAttribute(cells[i], "sortusing")) {
+			var trans = dojo.html.getAttribute(cells[i], "sortusing");
+			var f = this.getTypeFromString(trans);
+			if (f != null && f != window && typeof (f) == "function") {
+				o.sortFunction = f;
+			}
+		}
+		if (dojo.html.hasAttribute(cells[i], "field")) {
+			o.field = dojo.html.getAttribute(cells[i], "field");
+		}
+		if (dojo.html.hasAttribute(cells[i], "format")) {
+			o.format = dojo.html.getAttribute(cells[i], "format");
+		}
+		if (dojo.html.hasAttribute(cells[i], "dataType")) {
+			var sortType = dojo.html.getAttribute(cells[i], "dataType");
+			if (sortType.toLowerCase() == "html" || sortType.toLowerCase() == "markup") {
+				o.sortType = "__markup__";
+				o.noSort = true;
+			} else {
+				var type = this.getTypeFromString(sortType);
+				if (type) {
+					o.sortType = sortType;
+					o.dataType = type;
+				}
+			}
+		}
+		o.label = dojo.html.renderedTextContent(cells[i]);
+		this.columns.push(o);
+		if (dojo.html.hasAttribute(cells[i], "sort")) {
+			this.sortIndex = i;
+			var dir = dojo.html.getAttribute(cells[i], "sort");
+			if (!isNaN(parseInt(dir))) {
+				dir = parseInt(dir);
+				this.sortDirection = (dir != 0) ? 1 : 0;
+			} else {
+				this.sortDirection = (dir.toLowerCase() == "desc") ? 1 : 0;
+			}
+		}
+	}
+}, parseData:function (data) {
+	this.data = [];
+	this.selected = [];
+	for (var i = 0; i < data.length; i++) {
+		var o = {};
+		for (var j = 0; j < this.columns.length; j++) {
+			var field = this.columns[j].getField();
+			if (this.columns[j].sortType == "__markup__") {
+				o[field] = String(data[i][field]);
+			} else {
+				var type = this.columns[j].getType();
+				var val = data[i][field];
+				var t = this.columns[j].sortType.toLowerCase();
+				if (type == String) {
+					o[field] = val;
+				} else {
+					if (val != null) {
+						o[field] = new type(val);
+					} else {
+						o[field] = new type();
+					}
+				}
+			}
+		}
+		if (data[i][this.valueField] && !o[this.valueField]) {
+			o[this.valueField] = data[i][this.valueField];
+		}
+		this.data.push(o);
+	}
+}, parseDataFromTable:function (tbody) {
+	this.data = [];
+	this.selected = [];
+	var rows = tbody.getElementsByTagName("tr");
+	for (var i = 0; i < rows.length; i++) {
+		if (dojo.html.getAttribute(rows[i], "ignoreIfParsed") == "true") {
+			continue;
+		}
+		var o = {};
+		var cells = rows[i].getElementsByTagName("td");
+		for (var j = 0; j < this.columns.length; j++) {
+			var field = this.columns[j].getField();
+			if (this.columns[j].sortType == "__markup__") {
+				o[field] = cells[j].innerHTML;
+			} else {
+				var type = this.columns[j].getType();
+				var val = dojo.html.renderedTextContent(cells[j]);
+				if (type == String) {
+					o[field] = val;
+				} else {
+					if (val != null) {
+						o[field] = new type(val);
+					} else {
+						o[field] = new type();
+					}
+				}
+			}
+		}
+		if (dojo.html.hasAttribute(rows[i], "value") && !o[this.valueField]) {
+			o[this.valueField] = dojo.html.getAttribute(rows[i], "value");
+		}
+		this.data.push(o);
+		if (dojo.html.getAttribute(rows[i], "selected") == "true") {
+			this.selected.push(o);
+		}
+	}
+}, showSelections:function () {
+	var body = this.domNode.getElementsByTagName("tbody")[0];
+	var rows = body.getElementsByTagName("tr");
+	var idx = 0;
+	for (var i = 0; i < rows.length; i++) {
+		if (rows[i].parentNode == body) {
+			if (dojo.html.getAttribute(rows[i], "selected") == "true") {
+				rows[i].className = this.rowSelectedClass;
+			} else {
+				if (this.enableAlternateRows && idx % 2 == 1) {
+					rows[i].className = this.rowAlternateClass;
+				} else {
+					rows[i].className = "";
+				}
+			}
+			idx++;
+		}
+	}
+}, render:function (bDontPreserve) {
+	var data = [];
+	var body = this.domNode.getElementsByTagName("tbody")[0];
+	if (!bDontPreserve) {
+		this.parseDataFromTable(body);
+	}
+	for (var i = 0; i < this.data.length; i++) {
+		data.push(this.data[i]);
+	}
+	var col = this.columns[this.sortIndex];
+	if (!col.noSort) {
+		var field = col.getField();
+		if (col.sortFunction) {
+			var sort = col.sortFunction;
+		} else {
+			var sort = function (a, b) {
+				if (a[field] > b[field]) {
+					return 1;
+				}
+				if (a[field] < b[field]) {
+					return -1;
+				}
+				return 0;
+			};
+		}
+		data.sort(sort);
+		if (this.sortDirection != 0) {
+			data.reverse();
+		}
+	}
+	while (body.childNodes.length > 0) {
+		body.removeChild(body.childNodes[0]);
+	}
+	for (var i = 0; i < data.length; i++) {
+		var row = document.createElement("tr");
+		dojo.html.disableSelection(row);
+		if (data[i][this.valueField]) {
+			row.setAttribute("value", data[i][this.valueField]);
+		}
+		if (this.isSelected(data[i])) {
+			row.className = this.rowSelectedClass;
+			row.setAttribute("selected", "true");
+		} else {
+			if (this.enableAlternateRows && i % 2 == 1) {
+				row.className = this.rowAlternateClass;
+			}
+		}
+		for (var j = 0; j < this.columns.length; j++) {
+			var cell = document.createElement("td");
+			cell.setAttribute("align", this.columns[j].align);
+			cell.setAttribute("valign", this.columns[j].valign);
+			dojo.html.disableSelection(cell);
+			if (this.sortIndex == j) {
+				cell.className = this.columnSelected;
+			}
+			if (this.columns[j].sortType == "__markup__") {
+				cell.innerHTML = data[i][this.columns[j].getField()];
+				for (var k = 0; k < cell.childNodes.length; k++) {
+					var node = cell.childNodes[k];
+					if (node && node.nodeType == dojo.html.ELEMENT_NODE) {
+						dojo.html.disableSelection(node);
+					}
+				}
+			} else {
+				if (this.columns[j].getType() == Date) {
+					var format = this.defaultDateFormat;
+					if (this.columns[j].format) {
+						format = this.columns[j].format;
+					}
+					cell.appendChild(document.createTextNode(dojo.date.strftime(data[i][this.columns[j].getField()], format)));
+				} else {
+					cell.appendChild(document.createTextNode(data[i][this.columns[j].getField()]));
+				}
+			}
+			row.appendChild(cell);
+		}
+		body.appendChild(row);
+		dojo.event.connect(row, "onclick", this, "onUISelect");
+	}
+	var minRows = parseInt(this.minRows);
+	if (!isNaN(minRows) && minRows > 0 && data.length < minRows) {
+		var mod = 0;
+		if (data.length % 2 == 0) {
+			mod = 1;
+		}
+		var nRows = minRows - data.length;
+		for (var i = 0; i < nRows; i++) {
+			var row = document.createElement("tr");
+			row.setAttribute("ignoreIfParsed", "true");
+			if (this.enableAlternateRows && i % 2 == mod) {
+				row.className = this.rowAlternateClass;
+			}
+			for (var j = 0; j < this.columns.length; j++) {
+				var cell = document.createElement("td");
+				cell.appendChild(document.createTextNode("\xa0"));
+				row.appendChild(cell);
+			}
+			body.appendChild(row);
+		}
+	}
+}, onSelect:function (e) {
+}, onUISelect:function (e) {
+	var row = dojo.html.getParentByType(e.target, "tr");
+	var body = dojo.html.getParentByType(row, "tbody");
+	if (this.enableMultipleSelect) {
+		if (e.metaKey || e.ctrlKey) {
+			if (this.isSelected(this.getObjectFromRow(row))) {
+				this.removeFromSelected(this.getObjectFromRow(row));
+				row.removeAttribute("selected");
+			} else {
+				this.setSelectionByRow(row);
+				row.setAttribute("selected", "true");
+			}
+		} else {
+			if (e.shiftKey) {
+				var startRow;
+				var rows = body.getElementsByTagName("tr");
+				for (var i = 0; i < rows.length; i++) {
+					if (rows[i].parentNode == body) {
+						if (rows[i] == row) {
+							break;
+						}
+						if (dojo.html.getAttribute(rows[i], "selected") == "true") {
+							startRow = rows[i];
+						}
+					}
+				}
+				if (!startRow) {
+					startRow = row;
+					for (; i < rows.length; i++) {
+						if (dojo.html.getAttribute(rows[i], "selected") == "true") {
+							row = rows[i];
+							break;
+						}
+					}
+				}
+				this.resetSelections(body);
+				if (startRow == row) {
+					row.setAttribute("selected", "true");
+					this.setSelectionByRow(row);
+				} else {
+					var doSelect = false;
+					for (var i = 0; i < rows.length; i++) {
+						if (rows[i].parentNode == body) {
+							rows[i].removeAttribute("selected");
+							if (rows[i] == startRow) {
+								doSelect = true;
+							}
+							if (doSelect) {
+								this.setSelectionByRow(rows[i]);
+								rows[i].setAttribute("selected", "true");
+							}
+							if (rows[i] == row) {
+								doSelect = false;
+							}
+						}
+					}
+				}
+			} else {
+				this.resetSelections(body);
+				row.setAttribute("selected", "true");
+				this.setSelectionByRow(row);
+			}
+		}
+	} else {
+		this.resetSelections(body);
+		row.setAttribute("selected", "true");
+		this.setSelectionByRow(row);
+	}
+	this.showSelections();
+	this.onSelect(e);
+	e.stopPropagation();
+	e.preventDefault();
+}, onHeaderClick:function (e) {
+	var oldIndex = this.sortIndex;
+	var oldDirection = this.sortDirection;
+	var source = e.target;
+	var row = dojo.html.getParentByType(source, "tr");
+	var cellTag = "td";
+	if (row.getElementsByTagName(cellTag).length == 0) {
+		cellTag = "th";
+	}
+	var headers = row.getElementsByTagName(cellTag);
+	var header = dojo.html.getParentByType(source, cellTag);
+	for (var i = 0; i < headers.length; i++) {
+		if (headers[i] == header) {
+			if (i != oldIndex) {
+				this.sortIndex = i;
+				this.sortDirection = 0;
+				headers[i].className = this.headerSortDownClass;
+			} else {
+				this.sortDirection = (oldDirection == 0) ? 1 : 0;
+				if (this.sortDirection == 0) {
+					headers[i].className = this.headerSortDownClass;
+				} else {
+					headers[i].className = this.headerSortUpClass;
+				}
+			}
+		} else {
+			headers[i].className = this.headerClass;
+		}
+	}
+	this.render();
+}, postCreate:function () {
+	var thead = this.domNode.getElementsByTagName("thead")[0];
+	if (this.headClass.length > 0) {
+		thead.className = this.headClass;
+	}
+	dojo.html.disableSelection(this.domNode);
+	this.parseColumns(thead);
+	var header = "td";
+	if (thead.getElementsByTagName(header).length == 0) {
+		header = "th";
+	}
+	var headers = thead.getElementsByTagName(header);
+	for (var i = 0; i < headers.length; i++) {
+		if (!this.columns[i].noSort) {
+			dojo.event.connect(headers[i], "onclick", this, "onHeaderClick");
+		}
+		if (this.sortIndex == i) {
+			if (this.sortDirection == 0) {
+				headers[i].className = this.headerSortDownClass;
+			} else {
+				headers[i].className = this.headerSortUpClass;
+			}
+		}
+	}
+	var tbody = this.domNode.getElementsByTagName("tbody")[0];
+	if (this.tbodyClass.length > 0) {
+		tbody.className = this.tbodyClass;
+	}
+	this.parseDataFromTable(tbody);
+	this.render(true);
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SortableTable.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,526 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.Spinner");
+dojo.require("dojo.io.*");
+dojo.require("dojo.lfx.*");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.string");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.IntegerTextbox");
+dojo.require("dojo.widget.RealNumberTextbox");
+dojo.require("dojo.widget.DateTextbox");
+dojo.require("dojo.experimental");
+dojo.declare("dojo.widget.Spinner", null, {_typamaticTimer:null, _typamaticFunction:null, _currentTimeout:this.defaultTimeout, _eventCount:0, defaultTimeout:500, timeoutChangeRate:0.9, templateString:"<span _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\"\n\tstyle='float:${this.htmlfloat};'\n\t><table cellpadding=0 cellspacing=0 class=\"dojoSpinner\">\n\t\t<tr>\n\t\t\t<td\n\t\t\t\t><input\n\t\t\t\t\tdojoAttachPoint='textbox' type='${this.type}'\n\t\t\t\t\tdojoAttachEvent='onblur;onfocus;onkey:_handleKeyEvents;onKeyUp:_onSpinnerKeyUp;onresize:_resize'\n\t\t\t\t\tid='${this.widgetId}' name='${this.name}' size='${this.size}' maxlength='${this.maxlength}'\n\t\t\t\t\tvalue='${this.value}' class='${this.className}' autocomplete=\"off\"\n\t\t\t></td>\n\t\t\t<td\n\t\t\t\t><img dojoAttachPoint=\"upArrowNode\"\n\t\t\t\t\tdojoAttachEvent=\"onDblClick: _upArrowDoubleClicked;  onMouseDown: _upArrowPressed; onMouseUp: _arrowReleased; onMouseOut: _arrowReleased;
  onMouseMove: _discardEvent;\"\n\t\t\t\t\tsrc=\"${this.incrementSrc}\" style=\"width: ${this.buttonSize.width}px; height: ${this.buttonSize.height}px;\"\n\t\t\t\t><img dojoAttachPoint=\"downArrowNode\"\n\t\t\t\t\tdojoAttachEvent=\"onDblClick: _downArrowDoubleClicked;  onMouseDown: _downArrowPressed; onMouseUp: _arrowReleased; onMouseOut: _arrowReleased; onMouseMove: _discardEvent;\"\n\t\t\t\t\tsrc=\"${this.decrementSrc}\" style=\"width: ${this.buttonSize.width}px; height: ${this.buttonSize.height}px;\"\n\t\t\t></td>\n\t\t</tr>\n\t</table\n\t><span dojoAttachPoint='invalidSpan' class='${this.invalidClass}'>${this.messages.invalidMessage}</span\n\t><span dojoAttachPoint='missingSpan' class='${this.missingClass}'>${this.messages.missingMessage}</span\n\t><span dojoAttachPoint='rangeSpan' class='${this.rangeClass}'>${this.messages.rangeMessage}</span\n></span>\n", templateCssString:"/* inline the table holding the <input> and buttons (method varies by browser) */\n.ie .dojoSpinn
 er, .safari .dojoSpinner {\n\tdisplay: inline;\n}\n\n.moz .dojoSpinner {\n\tdisplay: -moz-inline-box;\n}\n\n.opera .dojoSpinner {\n\tdisplay: inline-table;\n}\n\n/* generic stuff for the table */\n.dojoSpinner td {\n\tpadding:0px;\n\tmargin:0px;\n\tvertical-align: middle;\n}\ntable.dojoSpinner {\n\tborder:0px;\n\tborder-spacing:0px;\n\tline-height:0px;\n\tpadding:0px;\n\tmargin: 0px;\n\tvertical-align: middle;\n}\n\n/* the buttons */\n.dojoSpinner img {\n\tdisplay: block;\n\tborder-width:0px 1px 1px 0px;\n\tborder-style:outset;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Spinner.css"), incrementSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/spinnerIncrement.gif"), decrementSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/spinnerDecrement.gif"), _handleKeyEvents:function (evt) {
+	if (!evt.key) {
+		return;
+	}
+	if (!evt.ctrlKey && !evt.altKey) {
+		switch (evt.key) {
+		  case evt.KEY_DOWN_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._downArrowPressed(evt);
+			return;
+		  case evt.KEY_UP_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			this._upArrowPressed(evt);
+			return;
+		}
+	}
+	this._eventCount++;
+}, _onSpinnerKeyUp:function (evt) {
+	this._arrowReleased(evt);
+	this.onkeyup(evt);
+}, _resize:function () {
+	var inputSize = dojo.html.getBorderBox(this.textbox);
+	this.buttonSize = {width:inputSize.height / 2, height:inputSize.height / 2};
+	if (this.upArrowNode) {
+		dojo.html.setMarginBox(this.upArrowNode, this.buttonSize);
+		dojo.html.setMarginBox(this.downArrowNode, this.buttonSize);
+	}
+}, _pressButton:function (node) {
+	node.style.borderWidth = "1px 0px 0px 1px";
+	node.style.borderStyle = "inset";
+}, _releaseButton:function (node) {
+	node.style.borderWidth = "0px 1px 1px 0px";
+	node.style.borderStyle = "outset";
+}, _arrowPressed:function (evt, direction) {
+	var nodePressed = (direction == -1) ? this.downArrowNode : this.upArrowNode;
+	var nodeReleased = (direction == +1) ? this.downArrowNode : this.upArrowNode;
+	if (typeof evt != "number") {
+		if (this._typamaticTimer != null) {
+			if (this._typamaticNode == nodePressed) {
+				return;
+			}
+			dojo.lang.clearTimeout(this._typamaticTimer);
+		}
+		this._releaseButton(nodeReleased);
+		this._eventCount++;
+		this._typamaticTimer = null;
+		this._currentTimeout = this.defaultTimeout;
+	} else {
+		if (evt != this._eventCount) {
+			this._releaseButton(nodePressed);
+			return;
+		}
+	}
+	this._pressButton(nodePressed);
+	this._setCursorX(this.adjustValue(direction, this._getCursorX()));
+	this._typamaticNode = nodePressed;
+	this._typamaticTimer = dojo.lang.setTimeout(this, "_arrowPressed", this._currentTimeout, this._eventCount, direction);
+	this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);
+}, _downArrowPressed:function (evt) {
+	return this._arrowPressed(evt, -1);
+}, _downArrowDoubleClicked:function (evt) {
+	var rc = this._downArrowPressed(evt);
+	dojo.lang.setTimeout(this, "_arrowReleased", 50, null);
+	return rc;
+}, _upArrowPressed:function (evt) {
+	return this._arrowPressed(evt, +1);
+}, _upArrowDoubleClicked:function (evt) {
+	var rc = this._upArrowPressed(evt);
+	dojo.lang.setTimeout(this, "_arrowReleased", 50, null);
+	return rc;
+}, _arrowReleased:function (evt) {
+	this.textbox.focus();
+	if (evt != null && typeof evt == "object" && evt.keyCode && evt.keyCode != null) {
+		var keyCode = evt.keyCode;
+		var k = dojo.event.browser.keys;
+		switch (keyCode) {
+		  case k.KEY_DOWN_ARROW:
+		  case k.KEY_UP_ARROW:
+			dojo.event.browser.stopEvent(evt);
+			break;
+		}
+	}
+	this._releaseButton(this.upArrowNode);
+	this._releaseButton(this.downArrowNode);
+	this._eventCount++;
+	if (this._typamaticTimer != null) {
+		dojo.lang.clearTimeout(this._typamaticTimer);
+	}
+	this._typamaticTimer = null;
+	this._currentTimeout = this.defaultTimeout;
+}, _mouseWheeled:function (evt) {
+	var scrollAmount = 0;
+	if (typeof evt.wheelDelta == "number") {
+		scrollAmount = evt.wheelDelta;
+	} else {
+		if (typeof evt.detail == "number") {
+			scrollAmount = -evt.detail;
+		}
+	}
+	if (scrollAmount > 0) {
+		this._upArrowPressed(evt);
+		this._arrowReleased(evt);
+	} else {
+		if (scrollAmount < 0) {
+			this._downArrowPressed(evt);
+			this._arrowReleased(evt);
+		}
+	}
+}, _discardEvent:function (evt) {
+	dojo.event.browser.stopEvent(evt);
+}, _getCursorX:function () {
+	var x = -1;
+	try {
+		this.textbox.focus();
+		if (typeof this.textbox.selectionEnd == "number") {
+			x = this.textbox.selectionEnd;
+		} else {
+			if (document.selection && document.selection.createRange) {
+				var range = document.selection.createRange().duplicate();
+				if (range.parentElement() == this.textbox) {
+					range.moveStart("textedit", -1);
+					x = range.text.length;
+				}
+			}
+		}
+	}
+	catch (e) {
+	}
+	return x;
+}, _setCursorX:function (x) {
+	try {
+		this.textbox.focus();
+		if (!x) {
+			x = 0;
+		}
+		if (typeof this.textbox.selectionEnd == "number") {
+			this.textbox.selectionEnd = x;
+		} else {
+			if (this.textbox.createTextRange) {
+				var range = this.textbox.createTextRange();
+				range.collapse(true);
+				range.moveEnd("character", x);
+				range.moveStart("character", x);
+				range.select();
+			}
+		}
+	}
+	catch (e) {
+	}
+}, _spinnerPostMixInProperties:function (args, frag) {
+	var inputNode = this.getFragNodeRef(frag);
+	var inputSize = dojo.html.getBorderBox(inputNode);
+	this.buttonSize = {width:inputSize.height / 2 - 1, height:inputSize.height / 2 - 1};
+}, _spinnerPostCreate:function (args, frag) {
+	if (this.textbox.addEventListener) {
+		this.textbox.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false);
+	} else {
+		dojo.event.connect(this.textbox, "onmousewheel", this, "_mouseWheeled");
+	}
+}});
+dojo.widget.defineWidget("dojo.widget.IntegerSpinner", [dojo.widget.IntegerTextbox, dojo.widget.Spinner], {delta:"1", postMixInProperties:function (args, frag) {
+	dojo.widget.IntegerSpinner.superclass.postMixInProperties.apply(this, arguments);
+	this._spinnerPostMixInProperties(args, frag);
+}, postCreate:function (args, frag) {
+	dojo.widget.IntegerSpinner.superclass.postCreate.apply(this, arguments);
+	this._spinnerPostCreate(args, frag);
+}, adjustValue:function (direction, x) {
+	var val = this.getValue().replace(/[^\-+\d]/g, "");
+	if (val.length == 0) {
+		return;
+	}
+	var num = Math.min(Math.max((parseInt(val) + (parseInt(this.delta) * direction)), (this.flags.min ? this.flags.min : -Infinity)), (this.flags.max ? this.flags.max : +Infinity));
+	val = num.toString();
+	if (num >= 0) {
+		val = ((this.flags.signed == true) ? "+" : " ") + val;
+	}
+	if (this.flags.separator.length > 0) {
+		for (var i = val.length - 3; i > 1; i -= 3) {
+			val = val.substr(0, i) + this.flags.separator + val.substr(i);
+		}
+	}
+	if (val.substr(0, 1) == " ") {
+		val = val.substr(1);
+	}
+	this.setValue(val);
+	return val.length;
+}});
+dojo.widget.defineWidget("dojo.widget.RealNumberSpinner", [dojo.widget.RealNumberTextbox, dojo.widget.Spinner], function () {
+	dojo.experimental("dojo.widget.RealNumberSpinner");
+}, {delta:"1e1", postMixInProperties:function (args, frag) {
+	dojo.widget.RealNumberSpinner.superclass.postMixInProperties.apply(this, arguments);
+	this._spinnerPostMixInProperties(args, frag);
+}, postCreate:function (args, frag) {
+	dojo.widget.RealNumberSpinner.superclass.postCreate.apply(this, arguments);
+	this._spinnerPostCreate(args, frag);
+}, adjustValue:function (direction, x) {
+	var val = this.getValue().replace(/[^\-+\.eE\d]/g, "");
+	if (!val.length) {
+		return;
+	}
+	var num = parseFloat(val);
+	if (isNaN(num)) {
+		return;
+	}
+	var delta = this.delta.split(/[eE]/);
+	if (!delta.length) {
+		delta = [1, 1];
+	} else {
+		delta[0] = parseFloat(delta[0].replace(/[^\-+\.\d]/g, ""));
+		if (isNaN(delta[0])) {
+			delta[0] = 1;
+		}
+		if (delta.length > 1) {
+			delta[1] = parseInt(delta[1]);
+		}
+		if (isNaN(delta[1])) {
+			delta[1] = 1;
+		}
+	}
+	val = this.getValue().split(/[eE]/);
+	if (!val.length) {
+		return;
+	}
+	var numBase = parseFloat(val[0].replace(/[^\-+\.\d]/g, ""));
+	if (val.length == 1) {
+		var numExp = 0;
+	} else {
+		var numExp = parseInt(val[1].replace(/[^\-+\d]/g, ""));
+	}
+	if (x <= val[0].length) {
+		x = 0;
+		numBase += delta[0] * direction;
+	} else {
+		x = Number.MAX_VALUE;
+		numExp += delta[1] * direction;
+		if (this.flags.eSigned == false && numExp < 0) {
+			numExp = 0;
+		}
+	}
+	num = Math.min(Math.max((numBase * Math.pow(10, numExp)), (this.flags.min ? this.flags.min : -Infinity)), (this.flags.max ? this.flags.max : +Infinity));
+	if ((this.flags.exponent == true || (this.flags.exponent != false && x != 0)) && num.toExponential) {
+		if (isNaN(this.flags.places) || this.flags.places == Infinity) {
+			val = num.toExponential();
+		} else {
+			val = num.toExponential(this.flags.places);
+		}
+	} else {
+		if (num.toFixed && num.toPrecision) {
+			if (isNaN(this.flags.places) || this.flags.places == Infinity) {
+				val = num.toPrecision((1 / 3).toString().length - 1);
+			} else {
+				val = num.toFixed(this.flags.places);
+			}
+		} else {
+			val = num.toString();
+		}
+	}
+	if (num >= 0) {
+		if (this.flags.signed == true) {
+			val = "+" + val;
+		}
+	}
+	val = val.split(/[eE]/);
+	if (this.flags.separator.length > 0) {
+		if (num >= 0 && val[0].substr(0, 1) != "+") {
+			val[0] = " " + val[0];
+		}
+		var i = val[0].lastIndexOf(".");
+		if (i >= 0) {
+			i -= 3;
+		} else {
+			i = val[0].length - 3;
+		}
+		for (; i > 1; i -= 3) {
+			val[0] = val[0].substr(0, i) + this.flags.separator + val[0].substr(i);
+		}
+		if (val[0].substr(0, 1) == " ") {
+			val[0] = val[0].substr(1);
+		}
+	}
+	if (val.length > 1) {
+		if ((this.flags.eSigned == true) && (val[1].substr(0, 1) != "+")) {
+			val[1] = "+" + val[1];
+		} else {
+			if ((!this.flags.eSigned) && (val[1].substr(0, 1) == "+")) {
+				val[1] = val[1].substr(1);
+			} else {
+				if ((!this.flags.eSigned) && (val[1].substr(0, 1) == "-") && (num.toFixed && num.toPrecision)) {
+					if (isNaN(this.flags.places)) {
+						val[0] = num.toPrecision((1 / 3).toString().length - 1);
+					} else {
+						val[0] = num.toFixed(this.flags.places).toString();
+					}
+					val[1] = "0";
+				}
+			}
+		}
+		val[0] += "e" + val[1];
+	}
+	this.setValue(val[0]);
+	if (x > val[0].length) {
+		x = val[0].length;
+	}
+	return x;
+}});
+dojo.widget.defineWidget("dojo.widget.TimeSpinner", [dojo.widget.TimeTextbox, dojo.widget.Spinner], function () {
+	dojo.experimental("dojo.widget.TimeSpinner");
+}, {postMixInProperties:function (args, frag) {
+	dojo.widget.TimeSpinner.superclass.postMixInProperties.apply(this, arguments);
+	this._spinnerPostMixInProperties(args, frag);
+}, postCreate:function (args, frag) {
+	dojo.widget.TimeSpinner.superclass.postCreate.apply(this, arguments);
+	this._spinnerPostCreate(args, frag);
+}, adjustValue:function (direction, x) {
+	var val = this.getValue();
+	var format = (this.flags.format && this.flags.format.search(/[Hhmst]/) >= 0) ? this.flags.format : "hh:mm:ss t";
+	if (direction == 0 || !val.length || !this.isValid()) {
+		return;
+	}
+	if (!this.flags.amSymbol) {
+		this.flags.amSymbol = "AM";
+	}
+	if (!this.flags.pmSymbol) {
+		this.flags.pmSymbol = "PM";
+	}
+	var re = dojo.regexp.time(this.flags);
+	var qualifiers = format.replace(/H/g, "h").replace(/[^hmst]/g, "").replace(/([hmst])\1/g, "$1");
+	var hourPos = qualifiers.indexOf("h") + 1;
+	var minPos = qualifiers.indexOf("m") + 1;
+	var secPos = qualifiers.indexOf("s") + 1;
+	var ampmPos = qualifiers.indexOf("t") + 1;
+	var cursorFormat = format;
+	var ampm = "";
+	if (ampmPos > 0) {
+		ampm = val.replace(new RegExp(re), "$" + ampmPos);
+		cursorFormat = cursorFormat.replace(/t+/, ampm.replace(/./g, "t"));
+	}
+	var hour = 0;
+	var deltaHour = 1;
+	if (hourPos > 0) {
+		hour = val.replace(new RegExp(re), "$" + hourPos);
+		if (dojo.lang.isString(this.delta)) {
+			deltaHour = this.delta.replace(new RegExp(re), "$" + hourPos);
+		}
+		if (isNaN(deltaHour)) {
+			deltaHour = 1;
+		} else {
+			deltaHour = parseInt(deltaHour);
+		}
+		if (hour.length == 2) {
+			cursorFormat = cursorFormat.replace(/([Hh])+/, "$1$1");
+		} else {
+			cursorFormat = cursorFormat.replace(/([Hh])+/, "$1");
+		}
+		if (isNaN(hour)) {
+			hour = 0;
+		} else {
+			hour = parseInt(hour.replace(/^0(\d)/, "$1"));
+		}
+	}
+	var min = 0;
+	var deltaMin = 1;
+	if (minPos > 0) {
+		min = val.replace(new RegExp(re), "$" + minPos);
+		if (dojo.lang.isString(this.delta)) {
+			deltaMin = this.delta.replace(new RegExp(re), "$" + minPos);
+		}
+		if (isNaN(deltaMin)) {
+			deltaMin = 1;
+		} else {
+			deltaMin = parseInt(deltaMin);
+		}
+		cursorFormat = cursorFormat.replace(/m+/, min.replace(/./g, "m"));
+		if (isNaN(min)) {
+			min = 0;
+		} else {
+			min = parseInt(min.replace(/^0(\d)/, "$1"));
+		}
+	}
+	var sec = 0;
+	var deltaSec = 1;
+	if (secPos > 0) {
+		sec = val.replace(new RegExp(re), "$" + secPos);
+		if (dojo.lang.isString(this.delta)) {
+			deltaSec = this.delta.replace(new RegExp(re), "$" + secPos);
+		}
+		if (isNaN(deltaSec)) {
+			deltaSec = 1;
+		} else {
+			deltaSec = parseInt(deltaSec);
+		}
+		cursorFormat = cursorFormat.replace(/s+/, sec.replace(/./g, "s"));
+		if (isNaN(sec)) {
+			sec = 0;
+		} else {
+			sec = parseInt(sec.replace(/^0(\d)/, "$1"));
+		}
+	}
+	if (isNaN(x) || x >= cursorFormat.length) {
+		x = cursorFormat.length - 1;
+	}
+	var cursorToken = cursorFormat.charAt(x);
+	switch (cursorToken) {
+	  case "t":
+		if (ampm == this.flags.amSymbol) {
+			ampm = this.flags.pmSymbol;
+		} else {
+			if (ampm == this.flags.pmSymbol) {
+				ampm = this.flags.amSymbol;
+			}
+		}
+		break;
+	  default:
+		if (hour >= 1 && hour < 12 && ampm == this.flags.pmSymbol) {
+			hour += 12;
+		}
+		if (hour == 12 && ampm == this.flags.amSymbol) {
+			hour = 0;
+		}
+		switch (cursorToken) {
+		  case "s":
+			sec += deltaSec * direction;
+			while (sec < 0) {
+				min--;
+				sec += 60;
+			}
+			while (sec >= 60) {
+				min++;
+				sec -= 60;
+			}
+		  case "m":
+			if (cursorToken == "m") {
+				min += deltaMin * direction;
+			}
+			while (min < 0) {
+				hour--;
+				min += 60;
+			}
+			while (min >= 60) {
+				hour++;
+				min -= 60;
+			}
+		  case "h":
+		  case "H":
+			if (cursorToken == "h" || cursorToken == "H") {
+				hour += deltaHour * direction;
+			}
+			while (hour < 0) {
+				hour += 24;
+			}
+			while (hour >= 24) {
+				hour -= 24;
+			}
+			break;
+		  default:
+			return;
+		}
+		if (hour >= 12) {
+			ampm = this.flags.pmSymbol;
+			if (format.indexOf("h") >= 0 && hour >= 13) {
+				hour -= 12;
+			}
+		} else {
+			ampm = this.flags.amSymbol;
+			if (format.indexOf("h") >= 0 && hour == 0) {
+				hour = 12;
+			}
+		}
+	}
+	cursorFormat = format;
+	if (hour >= 0 && hour < 10 && format.search(/[hH]{2}/) >= 0) {
+		hour = "0" + hour.toString();
+	}
+	if (hour >= 10 && cursorFormat.search(/[hH]{2}/) < 0) {
+		cursorFormat = cursorFormat.replace(/(h|H)/, "$1$1");
+	}
+	if (min >= 0 && min < 10 && cursorFormat.search(/mm/) >= 0) {
+		min = "0" + min.toString();
+	}
+	if (min >= 10 && cursorFormat.search(/mm/) < 0) {
+		cursorFormat = cursorFormat.replace(/m/, "$1$1");
+	}
+	if (sec >= 0 && sec < 10 && cursorFormat.search(/ss/) >= 0) {
+		sec = "0" + sec.toString();
+	}
+	if (sec >= 10 && cursorFormat.search(/ss/) < 0) {
+		cursorFormat = cursorFormat.replace(/s/, "$1$1");
+	}
+	x = cursorFormat.indexOf(cursorToken);
+	if (x == -1) {
+		x = format.length;
+	}
+	format = format.replace(/[hH]+/, hour);
+	format = format.replace(/m+/, min);
+	format = format.replace(/s+/, sec);
+	format = format.replace(/t/, ampm);
+	this.setValue(format);
+	if (x > format.length) {
+		x = format.length;
+	}
+	return x;
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Spinner.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,325 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.SplitContainer");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.ContentPane");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.html.style");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.io.cookie");
+dojo.widget.defineWidget("dojo.widget.SplitContainer", dojo.widget.HtmlWidget, function () {
+	this.sizers = [];
+}, {isContainer:true, templateCssString:".dojoSplitContainer{\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: block;\n}\n\n.dojoSplitPane{\n\tposition: absolute;\n}\n\n.dojoSplitContainerSizerH,\n.dojoSplitContainerSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDFace;\n\tborder: 1px solid;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tmargin: 0;\n}\n\n.dojoSplitContainerSizerV {\n\tcursor: n-resize;\n}\n\n.dojoSplitContainerVirtualSizerH,\n.dojoSplitContainerVirtualSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDShadow;\n\t-moz-opacity: 0.5;\n\topacity: 0.5;\n\tfilter: Alpha(Opacity=50);\n\tmargin: 0;\n}\n\n.dojoSplitContainerVirtualSizerV {\n\tcursor: n-resize;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/SplitContainer.css"), activeSizing:false, sizerWidth:15, orientation:"horizontal", persist:true, postMixInProperties:fu
 nction () {
+	dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this, arguments);
+	this.isHorizontal = (this.orientation == "horizontal");
+}, fillInTemplate:function () {
+	dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this, arguments);
+	dojo.html.addClass(this.domNode, "dojoSplitContainer");
+	if (dojo.render.html.moz) {
+		this.domNode.style.overflow = "-moz-scrollbars-none";
+	}
+	var content = dojo.html.getContentBox(this.domNode);
+	this.paneWidth = content.width;
+	this.paneHeight = content.height;
+}, onResized:function (e) {
+	var content = dojo.html.getContentBox(this.domNode);
+	this.paneWidth = content.width;
+	this.paneHeight = content.height;
+	this._layoutPanels();
+}, postCreate:function (args, fragment, parentComp) {
+	dojo.widget.SplitContainer.superclass.postCreate.apply(this, arguments);
+	for (var i = 0; i < this.children.length; i++) {
+		with (this.children[i].domNode.style) {
+			position = "absolute";
+		}
+		dojo.html.addClass(this.children[i].domNode, "dojoSplitPane");
+		if (i == this.children.length - 1) {
+			break;
+		}
+		this._addSizer();
+	}
+	if (typeof this.sizerWidth == "object") {
+		try {
+			this.sizerWidth = parseInt(this.sizerWidth.toString());
+		}
+		catch (e) {
+			this.sizerWidth = 15;
+		}
+	}
+	this.virtualSizer = document.createElement("div");
+	this.virtualSizer.style.position = "absolute";
+	this.virtualSizer.style.display = "none";
+	this.virtualSizer.style.zIndex = 10;
+	this.virtualSizer.className = this.isHorizontal ? "dojoSplitContainerVirtualSizerH" : "dojoSplitContainerVirtualSizerV";
+	this.domNode.appendChild(this.virtualSizer);
+	dojo.html.disableSelection(this.virtualSizer);
+	if (this.persist) {
+		this._restoreState();
+	}
+	this.resizeSoon();
+}, _injectChild:function (child) {
+	with (child.domNode.style) {
+		position = "absolute";
+	}
+	dojo.html.addClass(child.domNode, "dojoSplitPane");
+}, _addSizer:function () {
+	var i = this.sizers.length;
+	this.sizers[i] = document.createElement("div");
+	this.sizers[i].style.position = "absolute";
+	this.sizers[i].className = this.isHorizontal ? "dojoSplitContainerSizerH" : "dojoSplitContainerSizerV";
+	var self = this;
+	var handler = (function () {
+		var sizer_i = i;
+		return function (e) {
+			self.beginSizing(e, sizer_i);
+		};
+	})();
+	dojo.event.connect(this.sizers[i], "onmousedown", handler);
+	this.domNode.appendChild(this.sizers[i]);
+	dojo.html.disableSelection(this.sizers[i]);
+}, removeChild:function (widget) {
+	if (this.sizers.length > 0) {
+		for (var x = 0; x < this.children.length; x++) {
+			if (this.children[x] === widget) {
+				var i = this.sizers.length - 1;
+				this.domNode.removeChild(this.sizers[i]);
+				this.sizers.length = i;
+				break;
+			}
+		}
+	}
+	dojo.widget.SplitContainer.superclass.removeChild.call(this, widget, arguments);
+	this.onResized();
+}, addChild:function (widget) {
+	dojo.widget.SplitContainer.superclass.addChild.apply(this, arguments);
+	this._injectChild(widget);
+	if (this.children.length > 1) {
+		this._addSizer();
+	}
+	this._layoutPanels();
+}, _layoutPanels:function () {
+	if (this.children.length == 0) {
+		return;
+	}
+	var space = this.isHorizontal ? this.paneWidth : this.paneHeight;
+	if (this.children.length > 1) {
+		space -= this.sizerWidth * (this.children.length - 1);
+	}
+	var out_of = 0;
+	for (var i = 0; i < this.children.length; i++) {
+		out_of += this.children[i].sizeShare;
+	}
+	var pix_per_unit = space / out_of;
+	var total_size = 0;
+	for (var i = 0; i < this.children.length - 1; i++) {
+		var size = Math.round(pix_per_unit * this.children[i].sizeShare);
+		this.children[i].sizeActual = size;
+		total_size += size;
+	}
+	this.children[this.children.length - 1].sizeActual = space - total_size;
+	this._checkSizes();
+	var pos = 0;
+	var size = this.children[0].sizeActual;
+	this._movePanel(this.children[0], pos, size);
+	this.children[0].position = pos;
+	pos += size;
+	for (var i = 1; i < this.children.length; i++) {
+		this._moveSlider(this.sizers[i - 1], pos, this.sizerWidth);
+		this.sizers[i - 1].position = pos;
+		pos += this.sizerWidth;
+		size = this.children[i].sizeActual;
+		this._movePanel(this.children[i], pos, size);
+		this.children[i].position = pos;
+		pos += size;
+	}
+}, _movePanel:function (panel, pos, size) {
+	if (this.isHorizontal) {
+		panel.domNode.style.left = pos + "px";
+		panel.domNode.style.top = 0;
+		panel.resizeTo(size, this.paneHeight);
+	} else {
+		panel.domNode.style.left = 0;
+		panel.domNode.style.top = pos + "px";
+		panel.resizeTo(this.paneWidth, size);
+	}
+}, _moveSlider:function (slider, pos, size) {
+	if (this.isHorizontal) {
+		slider.style.left = pos + "px";
+		slider.style.top = 0;
+		dojo.html.setMarginBox(slider, {width:size, height:this.paneHeight});
+	} else {
+		slider.style.left = 0;
+		slider.style.top = pos + "px";
+		dojo.html.setMarginBox(slider, {width:this.paneWidth, height:size});
+	}
+}, _growPane:function (growth, pane) {
+	if (growth > 0) {
+		if (pane.sizeActual > pane.sizeMin) {
+			if ((pane.sizeActual - pane.sizeMin) > growth) {
+				pane.sizeActual = pane.sizeActual - growth;
+				growth = 0;
+			} else {
+				growth -= pane.sizeActual - pane.sizeMin;
+				pane.sizeActual = pane.sizeMin;
+			}
+		}
+	}
+	return growth;
+}, _checkSizes:function () {
+	var total_min_size = 0;
+	var total_size = 0;
+	for (var i = 0; i < this.children.length; i++) {
+		total_size += this.children[i].sizeActual;
+		total_min_size += this.children[i].sizeMin;
+	}
+	if (total_min_size <= total_size) {
+		var growth = 0;
+		for (var i = 0; i < this.children.length; i++) {
+			if (this.children[i].sizeActual < this.children[i].sizeMin) {
+				growth += this.children[i].sizeMin - this.children[i].sizeActual;
+				this.children[i].sizeActual = this.children[i].sizeMin;
+			}
+		}
+		if (growth > 0) {
+			if (this.isDraggingLeft) {
+				for (var i = this.children.length - 1; i >= 0; i--) {
+					growth = this._growPane(growth, this.children[i]);
+				}
+			} else {
+				for (var i = 0; i < this.children.length; i++) {
+					growth = this._growPane(growth, this.children[i]);
+				}
+			}
+		}
+	} else {
+		for (var i = 0; i < this.children.length; i++) {
+			this.children[i].sizeActual = Math.round(total_size * (this.children[i].sizeMin / total_min_size));
+		}
+	}
+}, beginSizing:function (e, i) {
+	this.paneBefore = this.children[i];
+	this.paneAfter = this.children[i + 1];
+	this.isSizing = true;
+	this.sizingSplitter = this.sizers[i];
+	this.originPos = dojo.html.getAbsolutePosition(this.children[0].domNode, true, dojo.html.boxSizing.MARGIN_BOX);
+	if (this.isHorizontal) {
+		var client = (e.layerX ? e.layerX : e.offsetX);
+		var screen = e.pageX;
+		this.originPos = this.originPos.x;
+	} else {
+		var client = (e.layerY ? e.layerY : e.offsetY);
+		var screen = e.pageY;
+		this.originPos = this.originPos.y;
+	}
+	this.startPoint = this.lastPoint = screen;
+	this.screenToClientOffset = screen - client;
+	this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position;
+	if (!this.activeSizing) {
+		this._showSizingLine();
+	}
+	dojo.event.connect(document.documentElement, "onmousemove", this, "changeSizing");
+	dojo.event.connect(document.documentElement, "onmouseup", this, "endSizing");
+	dojo.event.browser.stopEvent(e);
+}, changeSizing:function (e) {
+	this.lastPoint = this.isHorizontal ? e.pageX : e.pageY;
+	if (this.activeSizing) {
+		this.movePoint();
+		this._updateSize();
+	} else {
+		this.movePoint();
+		this._moveSizingLine();
+	}
+	dojo.event.browser.stopEvent(e);
+}, endSizing:function (e) {
+	if (!this.activeSizing) {
+		this._hideSizingLine();
+	}
+	this._updateSize();
+	this.isSizing = false;
+	dojo.event.disconnect(document.documentElement, "onmousemove", this, "changeSizing");
+	dojo.event.disconnect(document.documentElement, "onmouseup", this, "endSizing");
+	if (this.persist) {
+		this._saveState(this);
+	}
+}, movePoint:function () {
+	var p = this.lastPoint - this.screenToClientOffset;
+	var a = p - this.dragOffset;
+	a = this.legaliseSplitPoint(a);
+	p = a + this.dragOffset;
+	this.lastPoint = p + this.screenToClientOffset;
+}, legaliseSplitPoint:function (a) {
+	a += this.sizingSplitter.position;
+	this.isDraggingLeft = (a > 0) ? true : false;
+	if (!this.activeSizing) {
+		if (a < this.paneBefore.position + this.paneBefore.sizeMin) {
+			a = this.paneBefore.position + this.paneBefore.sizeMin;
+		}
+		if (a > this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin))) {
+			a = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin));
+		}
+	}
+	a -= this.sizingSplitter.position;
+	this._checkSizes();
+	return a;
+}, _updateSize:function () {
+	var pos = this.lastPoint - this.dragOffset - this.originPos;
+	var start_region = this.paneBefore.position;
+	var end_region = this.paneAfter.position + this.paneAfter.sizeActual;
+	this.paneBefore.sizeActual = pos - start_region;
+	this.paneAfter.position = pos + this.sizerWidth;
+	this.paneAfter.sizeActual = end_region - this.paneAfter.position;
+	for (var i = 0; i < this.children.length; i++) {
+		this.children[i].sizeShare = this.children[i].sizeActual;
+	}
+	this._layoutPanels();
+}, _showSizingLine:function () {
+	this._moveSizingLine();
+	if (this.isHorizontal) {
+		dojo.html.setMarginBox(this.virtualSizer, {width:this.sizerWidth, height:this.paneHeight});
+	} else {
+		dojo.html.setMarginBox(this.virtualSizer, {width:this.paneWidth, height:this.sizerWidth});
+	}
+	this.virtualSizer.style.display = "block";
+}, _hideSizingLine:function () {
+	this.virtualSizer.style.display = "none";
+}, _moveSizingLine:function () {
+	var pos = this.lastPoint - this.startPoint + this.sizingSplitter.position;
+	if (this.isHorizontal) {
+		this.virtualSizer.style.left = pos + "px";
+	} else {
+		var pos = (this.lastPoint - this.startPoint) + this.sizingSplitter.position;
+		this.virtualSizer.style.top = pos + "px";
+	}
+}, _getCookieName:function (i) {
+	return this.widgetId + "_" + i;
+}, _restoreState:function () {
+	for (var i = 0; i < this.children.length; i++) {
+		var cookieName = this._getCookieName(i);
+		var cookieValue = dojo.io.cookie.getCookie(cookieName);
+		if (cookieValue != null) {
+			var pos = parseInt(cookieValue);
+			if (typeof pos == "number") {
+				this.children[i].sizeShare = pos;
+			}
+		}
+	}
+}, _saveState:function () {
+	for (var i = 0; i < this.children.length; i++) {
+		var cookieName = this._getCookieName(i);
+		dojo.io.cookie.setCookie(cookieName, this.children[i].sizeShare, null, null, null, null);
+	}
+}});
+dojo.lang.extend(dojo.widget.Widget, {sizeMin:10, sizeShare:10});
+dojo.widget.defineWidget("dojo.widget.SplitContainerPanel", dojo.widget.ContentPane, {});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SplitContainer.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,100 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.SvgButton");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.SvgButton");
+dojo.widget.SvgButton = function () {
+	dojo.widget.DomButton.call(this);
+	dojo.widget.SvgWidget.call(this);
+	this.onFoo = function () {
+		alert("bar");
+	};
+	this.label = "huzzah!";
+	this.setLabel = function (x, y, textSize, label, shape) {
+		var coords = dojo.widget.SvgButton.prototype.coordinates(x, y, textSize, label, shape);
+		var textString = "";
+		switch (shape) {
+		  case "ellipse":
+			textString = "<text x='" + coords[6] + "' y='" + coords[7] + "'>" + label + "</text>";
+			break;
+		  case "rectangle":
+			textString = "";
+			break;
+		  case "circle":
+			textString = "";
+			break;
+		}
+		return textString;
+	};
+	this.fillInTemplate = function (x, y, textSize, label, shape) {
+		this.textSize = textSize || 12;
+		this.label = label;
+		var textWidth = this.label.length * this.textSize;
+	};
+};
+dojo.inherits(dojo.widget.SvgButton, dojo.widget.DomButton);
+dojo.widget.SvgButton.prototype.shapeString = function (x, y, textSize, label, shape) {
+	switch (shape) {
+	  case "ellipse":
+		var coords = dojo.widget.SvgButton.prototype.coordinates(x, y, textSize, label, shape);
+		return "<ellipse cx='" + coords[4] + "' cy='" + coords[5] + "' rx='" + coords[2] + "' ry='" + coords[3] + "'/>";
+		break;
+	  case "rect":
+		return "";
+		break;
+	  case "circle":
+		return "";
+		break;
+	}
+};
+dojo.widget.SvgButton.prototype.coordinates = function (x, y, textSize, label, shape) {
+	switch (shape) {
+	  case "ellipse":
+		var buttonWidth = label.length * textSize;
+		var buttonHeight = textSize * 2.5;
+		var rx = buttonWidth / 2;
+		var ry = buttonHeight / 2;
+		var cx = rx + x;
+		var cy = ry + y;
+		var textX = cx - rx * textSize / 25;
+		var textY = cy * 1.1;
+		return [buttonWidth, buttonHeight, rx, ry, cx, cy, textX, textY];
+		break;
+	  case "rectangle":
+		return "";
+		break;
+	  case "circle":
+		return "";
+		break;
+	}
+};
+dojo.widget.SvgButton.prototype.labelString = function (x, y, textSize, label, shape) {
+	var textString = "";
+	var coords = dojo.widget.SvgButton.prototype.coordinates(x, y, textSize, label, shape);
+	switch (shape) {
+	  case "ellipse":
+		textString = "<text x='" + coords[6] + "' y='" + coords[7] + "'>" + label + "</text>";
+		break;
+	  case "rectangle":
+		textString = "";
+		break;
+	  case "circle":
+		textString = "";
+		break;
+	}
+	return textString;
+};
+dojo.widget.SvgButton.prototype.templateString = function (x, y, textSize, label, shape) {
+	return "<g class='dojoButton' dojoAttachEvent='onClick; onMouseMove: onFoo;' dojoAttachPoint='labelNode'>" + dojo.widgets.SVGButton.prototype.shapeString(x, y, textSize, label, shape) + dojo.widget.SVGButton.prototype.labelString(x, y, textSize, label, shape) + "</g>";
+};
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgButton.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,71 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.require("dojo.widget.DomWidget");
+dojo.provide("dojo.widget.SvgWidget");
+dojo.provide("dojo.widget.SVGWidget");
+dojo.require("dojo.dom");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.SvgWidget");
+dojo.widget.declare("dojo.widget.SvgWidget", dojo.widget.DomWidget, {createNodesFromText:function (txt, wrap) {
+	return dojo.svg.createNodesFromText(txt, wrap);
+}});
+dojo.widget.SVGWidget = dojo.widget.SvgWidget;
+try {
+	(function () {
+		var tf = function () {
+			var rw = new function () {
+				dojo.widget.SvgWidget.call(this);
+				this.buildRendering = function () {
+					return;
+				};
+				this.destroyRendering = function () {
+					return;
+				};
+				this.postInitialize = function () {
+					return;
+				};
+				this.widgetType = "SVGRootWidget";
+				this.domNode = document.documentElement;
+			};
+			var wm = dojo.widget.manager;
+			wm.root = rw;
+			wm.add(rw);
+			wm.getWidgetFromNode = function (node) {
+				var filter = function (x) {
+					if (x.domNode == node) {
+						return true;
+					}
+				};
+				var widgets = [];
+				while ((node) && (widgets.length < 1)) {
+					widgets = this.getWidgetsByFilter(filter);
+					node = node.parentNode;
+				}
+				if (widgets.length > 0) {
+					return widgets[0];
+				} else {
+					return null;
+				}
+			};
+			wm.getWidgetFromEvent = function (domEvt) {
+				return this.getWidgetFromNode(domEvt.target);
+			};
+			wm.getWidgetFromPrimitive = wm.getWidgetFromNode;
+		};
+		dojo.event.connect(dojo.hostenv, "loaded", tf);
+	})();
+}
+catch (e) {
+	alert(e);
+}
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SvgWidget.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,54 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.SwtWidget");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.SwtWidget");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.Widget");
+dojo.require("dojo.uri.*");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.lang.extras");
+try {
+	importPackage(Packages.org.eclipse.swt.widgets);
+	dojo.declare("dojo.widget.SwtWidget", dojo.widget.Widget, function () {
+		if ((arguments.length > 0) && (typeof arguments[0] == "object")) {
+			this.create(arguments[0]);
+		}
+	}, {display:null, shell:null, show:function () {
+	}, hide:function () {
+	}, addChild:function () {
+	}, registerChild:function () {
+	}, addWidgetAsDirectChild:function () {
+	}, removeChild:function () {
+	}, destroyRendering:function () {
+	}, postInitialize:function () {
+	}});
+	dojo.widget.SwtWidget.prototype.display = new Display();
+	dojo.widget.SwtWidget.prototype.shell = new Shell(dojo.widget.SwtWidget.prototype.display);
+	dojo.widget.manager.startShell = function () {
+		var sh = dojo.widget.SwtWidget.prototype.shell;
+		var d = dojo.widget.SwtWidget.prototype.display;
+		sh.open();
+		while (!sh.isDisposed()) {
+			dojo.widget.manager.doNext();
+			if (!d.readAndDispatch()) {
+				d.sleep();
+			}
+		}
+		d.dispose();
+	};
+}
+catch (e) {
+	dojo.debug("dojo.widget.SwtWidget not loaded. SWT classes not available");
+}
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/SwtWidget.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain