Subversion Repositories Applications.papyrus

Rev

Rev 1318 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1318 Rev 1422
1
/*
1
/*
2
	Copyright (c) 2004-2006, The Dojo Foundation
2
	Copyright (c) 2004-2006, The Dojo Foundation
3
	All Rights Reserved.
3
	All Rights Reserved.
4
 
4
 
5
	Licensed under the Academic Free License version 2.1 or above OR the
5
	Licensed under the Academic Free License version 2.1 or above OR the
6
	modified BSD license. For more information on Dojo licensing, see:
6
	modified BSD license. For more information on Dojo licensing, see:
7
 
7
 
8
		http://dojotoolkit.org/community/licensing.shtml
8
		http://dojotoolkit.org/community/licensing.shtml
9
*/
9
*/
-
 
10
 
-
 
11
 
10
 
12
 
11
dojo.provide("dojo.widget.Slider");
13
dojo.provide("dojo.widget.Slider");
12
dojo.require("dojo.event.*");
14
dojo.require("dojo.event.*");
13
dojo.require("dojo.dnd.*");
15
dojo.require("dojo.dnd.*");
14
dojo.require("dojo.dnd.HtmlDragMove");
16
dojo.require("dojo.dnd.HtmlDragMove");
15
dojo.require("dojo.widget.*");
17
dojo.require("dojo.widget.*");
16
dojo.require("dojo.html.layout");
18
dojo.require("dojo.html.layout");
17
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 cellspacing=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) {
19
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 cellspacing=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) {
18
	if (!evt.key) {
20
	if (!evt.key) {
19
		return;
21
		return;
20
	}
22
	}
21
	if (!evt.ctrlKey && !evt.altKey) {
23
	if (!evt.ctrlKey && !evt.altKey) {
22
		switch (evt.key) {
24
		switch (evt.key) {
23
		  case evt.KEY_LEFT_ARROW:
25
		  case evt.KEY_LEFT_ARROW:
24
			dojo.event.browser.stopEvent(evt);
26
			dojo.event.browser.stopEvent(evt);
25
			this._leftButtonPressed(evt);
27
			this._leftButtonPressed(evt);
26
			return;
28
			return;
27
		  case evt.KEY_RIGHT_ARROW:
29
		  case evt.KEY_RIGHT_ARROW:
28
			dojo.event.browser.stopEvent(evt);
30
			dojo.event.browser.stopEvent(evt);
29
			this._rightButtonPressed(evt);
31
			this._rightButtonPressed(evt);
30
			return;
32
			return;
31
		  case evt.KEY_DOWN_ARROW:
33
		  case evt.KEY_DOWN_ARROW:
32
			dojo.event.browser.stopEvent(evt);
34
			dojo.event.browser.stopEvent(evt);
33
			this._bottomButtonPressed(evt);
35
			this._bottomButtonPressed(evt);
34
			return;
36
			return;
35
		  case evt.KEY_UP_ARROW:
37
		  case evt.KEY_UP_ARROW:
36
			dojo.event.browser.stopEvent(evt);
38
			dojo.event.browser.stopEvent(evt);
37
			this._topButtonPressed(evt);
39
			this._topButtonPressed(evt);
38
			return;
40
			return;
39
		}
41
		}
40
	}
42
	}
41
	this._eventCount++;
43
	this._eventCount++;
42
}, _pressButton:function (buttonNode) {
44
}, _pressButton:function (buttonNode) {
43
	buttonNode.className = buttonNode.className.replace("Outset", "Inset");
45
	buttonNode.className = buttonNode.className.replace("Outset", "Inset");
44
}, _releaseButton:function (buttonNode) {
46
}, _releaseButton:function (buttonNode) {
45
	buttonNode.className = buttonNode.className.replace("Inset", "Outset");
47
	buttonNode.className = buttonNode.className.replace("Inset", "Outset");
46
}, _buttonPressed:function (evt, buttonNode) {
48
}, _buttonPressed:function (evt, buttonNode) {
47
	this._setFocus();
49
	this._setFocus();
48
	if (typeof evt == "object") {
50
	if (typeof evt == "object") {
49
		if (this._typamaticTimer != null) {
51
		if (this._typamaticTimer != null) {
50
			if (this._typamaticNode == buttonNode) {
52
			if (this._typamaticNode == buttonNode) {
51
				return;
53
				return;
52
			}
54
			}
53
			clearTimeout(this._typamaticTimer);
55
			clearTimeout(this._typamaticTimer);
54
		}
56
		}
55
		this._buttonReleased(null);
57
		this._buttonReleased(null);
56
		this._eventCount++;
58
		this._eventCount++;
57
		this._typamaticTimer = null;
59
		this._typamaticTimer = null;
58
		this._currentTimeout = this.defaultTimeout;
60
		this._currentTimeout = this.defaultTimeout;
59
		dojo.event.browser.stopEvent(evt);
61
		dojo.event.browser.stopEvent(evt);
60
	} else {
62
	} else {
61
		if (evt != this._eventCount) {
63
		if (evt != this._eventCount) {
62
			this._buttonReleased(null);
64
			this._buttonReleased(null);
63
			return false;
65
			return false;
64
		}
66
		}
65
	}
67
	}
66
	if (buttonNode == this.leftButtonNode && this.isEnableX) {
68
	if (buttonNode == this.leftButtonNode && this.isEnableX) {
67
		this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") - this._valueSizeX);
69
		this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") - this._valueSizeX);
68
	} else {
70
	} else {
69
		if (buttonNode == this.rightButtonNode && this.isEnableX) {
71
		if (buttonNode == this.rightButtonNode && this.isEnableX) {
70
			this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") + this._valueSizeX);
72
			this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") + this._valueSizeX);
71
		} else {
73
		} else {
72
			if (buttonNode == this.topButtonNode && this.isEnableY) {
74
			if (buttonNode == this.topButtonNode && this.isEnableY) {
73
				this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") - this._valueSizeY);
75
				this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") - this._valueSizeY);
74
			} else {
76
			} else {
75
				if (buttonNode == this.bottomButtonNode && this.isEnableY) {
77
				if (buttonNode == this.bottomButtonNode && this.isEnableY) {
76
					this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") + this._valueSizeY);
78
					this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") + this._valueSizeY);
77
				} else {
79
				} else {
78
					return false;
80
					return false;
79
				}
81
				}
80
			}
82
			}
81
		}
83
		}
82
	}
84
	}
83
	this._pressButton(buttonNode);
85
	this._pressButton(buttonNode);
84
	this.notifyListeners();
86
	this.notifyListeners();
85
	this._typamaticNode = buttonNode;
87
	this._typamaticNode = buttonNode;
86
	this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode);
88
	this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode);
87
	this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);
89
	this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);
88
	return false;
90
	return false;
89
}, _bottomButtonPressed:function (evt) {
91
}, _bottomButtonPressed:function (evt) {
90
	return this._buttonPressed(evt, this.bottomButtonNode);
92
	return this._buttonPressed(evt, this.bottomButtonNode);
91
}, _bottomButtonDoubleClicked:function (evt) {
93
}, _bottomButtonDoubleClicked:function (evt) {
92
	var rc = this._bottomButtonPressed(evt);
94
	var rc = this._bottomButtonPressed(evt);
93
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
95
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
94
	return rc;
96
	return rc;
95
}, _topButtonPressed:function (evt) {
97
}, _topButtonPressed:function (evt) {
96
	return this._buttonPressed(evt, this.topButtonNode);
98
	return this._buttonPressed(evt, this.topButtonNode);
97
}, _topButtonDoubleClicked:function (evt) {
99
}, _topButtonDoubleClicked:function (evt) {
98
	var rc = this._topButtonPressed(evt);
100
	var rc = this._topButtonPressed(evt);
99
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
101
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
100
	return rc;
102
	return rc;
101
}, _leftButtonPressed:function (evt) {
103
}, _leftButtonPressed:function (evt) {
102
	return this._buttonPressed(evt, this.leftButtonNode);
104
	return this._buttonPressed(evt, this.leftButtonNode);
103
}, _leftButtonDoubleClicked:function (evt) {
105
}, _leftButtonDoubleClicked:function (evt) {
104
	var rc = this._leftButtonPressed(evt);
106
	var rc = this._leftButtonPressed(evt);
105
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
107
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
106
	return rc;
108
	return rc;
107
}, _rightButtonPressed:function (evt) {
109
}, _rightButtonPressed:function (evt) {
108
	return this._buttonPressed(evt, this.rightButtonNode);
110
	return this._buttonPressed(evt, this.rightButtonNode);
109
}, _rightButtonDoubleClicked:function (evt) {
111
}, _rightButtonDoubleClicked:function (evt) {
110
	var rc = this._rightButtonPressed(evt);
112
	var rc = this._rightButtonPressed(evt);
111
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
113
	dojo.lang.setTimeout(this, "_buttonReleased", 50, null);
112
	return rc;
114
	return rc;
113
}, _buttonReleased:function (evt) {
115
}, _buttonReleased:function (evt) {
114
	if (typeof evt == "object" && evt != null && typeof evt.keyCode != "undefined" && evt.keyCode != null) {
116
	if (typeof evt == "object" && evt != null && typeof evt.keyCode != "undefined" && evt.keyCode != null) {
115
		var keyCode = evt.keyCode;
117
		var keyCode = evt.keyCode;
116
		switch (keyCode) {
118
		switch (keyCode) {
117
		  case evt.KEY_LEFT_ARROW:
119
		  case evt.KEY_LEFT_ARROW:
118
		  case evt.KEY_RIGHT_ARROW:
120
		  case evt.KEY_RIGHT_ARROW:
119
		  case evt.KEY_DOWN_ARROW:
121
		  case evt.KEY_DOWN_ARROW:
120
		  case evt.KEY_UP_ARROW:
122
		  case evt.KEY_UP_ARROW:
121
			dojo.event.browser.stopEvent(evt);
123
			dojo.event.browser.stopEvent(evt);
122
			break;
124
			break;
123
		}
125
		}
124
	}
126
	}
125
	this._releaseButton(this.topButtonNode);
127
	this._releaseButton(this.topButtonNode);
126
	this._releaseButton(this.bottomButtonNode);
128
	this._releaseButton(this.bottomButtonNode);
127
	this._releaseButton(this.leftButtonNode);
129
	this._releaseButton(this.leftButtonNode);
128
	this._releaseButton(this.rightButtonNode);
130
	this._releaseButton(this.rightButtonNode);
129
	this._eventCount++;
131
	this._eventCount++;
130
	if (this._typamaticTimer != null) {
132
	if (this._typamaticTimer != null) {
131
		clearTimeout(this._typamaticTimer);
133
		clearTimeout(this._typamaticTimer);
132
	}
134
	}
133
	this._typamaticTimer = null;
135
	this._typamaticTimer = null;
134
	this._currentTimeout = this.defaultTimeout;
136
	this._currentTimeout = this.defaultTimeout;
135
}, _mouseWheeled:function (evt) {
137
}, _mouseWheeled:function (evt) {
136
	var scrollAmount = 0;
138
	var scrollAmount = 0;
137
	if (typeof evt.wheelDelta == "number") {
139
	if (typeof evt.wheelDelta == "number") {
138
		scrollAmount = evt.wheelDelta;
140
		scrollAmount = evt.wheelDelta;
139
	} else {
141
	} else {
140
		if (typeof evt.detail == "number") {
142
		if (typeof evt.detail == "number") {
141
			scrollAmount = -evt.detail;
143
			scrollAmount = -evt.detail;
142
		}
144
		}
143
	}
145
	}
144
	if (this.isEnableY) {
146
	if (this.isEnableY) {
145
		if (scrollAmount > 0) {
147
		if (scrollAmount > 0) {
146
			this._topButtonPressed(evt);
148
			this._topButtonPressed(evt);
147
			this._buttonReleased(evt);
149
			this._buttonReleased(evt);
148
		} else {
150
		} else {
149
			if (scrollAmount < 0) {
151
			if (scrollAmount < 0) {
150
				this._bottomButtonPressed(evt);
152
				this._bottomButtonPressed(evt);
151
				this._buttonReleased(evt);
153
				this._buttonReleased(evt);
152
			}
154
			}
153
		}
155
		}
154
	} else {
156
	} else {
155
		if (this.isEnableX) {
157
		if (this.isEnableX) {
156
			if (scrollAmount > 0) {
158
			if (scrollAmount > 0) {
157
				this._rightButtonPressed(evt);
159
				this._rightButtonPressed(evt);
158
				this._buttonReleased(evt);
160
				this._buttonReleased(evt);
159
			} else {
161
			} else {
160
				if (scrollAmount < 0) {
162
				if (scrollAmount < 0) {
161
					this._leftButtonPressed(evt);
163
					this._leftButtonPressed(evt);
162
					this._buttonReleased(evt);
164
					this._buttonReleased(evt);
163
				}
165
				}
164
			}
166
			}
165
		}
167
		}
166
	}
168
	}
167
}, _discardEvent:function (evt) {
169
}, _discardEvent:function (evt) {
168
	dojo.event.browser.stopEvent(evt);
170
	dojo.event.browser.stopEvent(evt);
169
}, _setFocus:function () {
171
}, _setFocus:function () {
170
	if (this.focusNode.focus) {
172
	if (this.focusNode.focus) {
171
		this.focusNode.focus();
173
		this.focusNode.focus();
172
	}
174
	}
173
}, fillInTemplate:function (args, frag) {
175
}, fillInTemplate:function (args, frag) {
174
	var source = this.getFragNodeRef(frag);
176
	var source = this.getFragNodeRef(frag);
175
	dojo.html.copyStyle(this.domNode, source);
177
	dojo.html.copyStyle(this.domNode, source);
176
	var padding = this.domNode.style.padding;
178
	var padding = this.domNode.style.padding;
177
	if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px") {
179
	if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px") {
178
		this.topBorderNode.style.padding = this.bottomBorderNode.style.padding = padding;
180
		this.topBorderNode.style.padding = this.bottomBorderNode.style.padding = padding;
179
		this.topBorderNode.style.paddingBottom = "0px";
181
		this.topBorderNode.style.paddingBottom = "0px";
180
		this.bottomBorderNode.style.paddingTop = "0px";
182
		this.bottomBorderNode.style.paddingTop = "0px";
181
		this.rightBorderNode.style.paddingRight = this.domNode.style.paddingRight;
183
		this.rightBorderNode.style.paddingRight = this.domNode.style.paddingRight;
182
		this.leftBorderNode.style.paddingLeft = this.domNode.style.paddingLeft;
184
		this.leftBorderNode.style.paddingLeft = this.domNode.style.paddingLeft;
183
		this.domNode.style.padding = "0px 0px 0px 0px";
185
		this.domNode.style.padding = "0px 0px 0px 0px";
184
	}
186
	}
185
	var borderWidth = this.domNode.style.borderWidth;
187
	var borderWidth = this.domNode.style.borderWidth;
186
	if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "0px 0px 0px 0px") {
188
	if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "0px 0px 0px 0px") {
187
		this.topBorderNode.style.borderStyle = this.rightBorderNode.style.borderStyle = this.bottomBorderNode.style.borderStyle = this.leftBorderNode.style.borderStyle = this.domNode.style.borderStyle;
189
		this.topBorderNode.style.borderStyle = this.rightBorderNode.style.borderStyle = this.bottomBorderNode.style.borderStyle = this.leftBorderNode.style.borderStyle = this.domNode.style.borderStyle;
188
		this.topBorderNode.style.borderColor = this.rightBorderNode.style.borderColor = this.bottomBorderNode.style.borderColor = this.leftBorderNode.style.borderColor = this.domNode.style.borderColor;
190
		this.topBorderNode.style.borderColor = this.rightBorderNode.style.borderColor = this.bottomBorderNode.style.borderColor = this.leftBorderNode.style.borderColor = this.domNode.style.borderColor;
189
		this.topBorderNode.style.borderWidth = this.bottomBorderNode.style.borderWidth = borderWidth;
191
		this.topBorderNode.style.borderWidth = this.bottomBorderNode.style.borderWidth = borderWidth;
190
		this.topBorderNode.style.borderBottomWidth = "0px";
192
		this.topBorderNode.style.borderBottomWidth = "0px";
191
		this.bottomBorderNode.style.borderTopWidth = "0px";
193
		this.bottomBorderNode.style.borderTopWidth = "0px";
192
		this.rightBorderNode.style.borderRightWidth = this.domNode.style.borderRightWidth;
194
		this.rightBorderNode.style.borderRightWidth = this.domNode.style.borderRightWidth;
193
		this.leftBorderNode.style.borderLeftWidth = this.domNode.style.borderLeftWidth;
195
		this.leftBorderNode.style.borderLeftWidth = this.domNode.style.borderLeftWidth;
194
		this.domNode.style.borderWidth = "0px 0px 0px 0px";
196
		this.domNode.style.borderWidth = "0px 0px 0px 0px";
195
	}
197
	}
196
	this._handleMove = new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);
198
	this._handleMove = new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);
197
	this._handleMove.setParent(this);
199
	this._handleMove.setParent(this);
198
	if (this.clickSelect) {
200
	if (this.clickSelect) {
199
		dojo.event.connect(this.constrainingContainerNode, "onmousedown", this, "_onClick");
201
		dojo.event.connect(this.constrainingContainerNode, "onmousedown", this, "_onClick");
200
	}
202
	}
201
	if (this.isEnableX) {
203
	if (this.isEnableX) {
202
		this.setValueX(!isNaN(this.initialValueX) ? this.initialValueX : (!isNaN(this.minimumX) ? this.minimumX : 0));
204
		this.setValueX(!isNaN(this.initialValueX) ? this.initialValueX : (!isNaN(this.minimumX) ? this.minimumX : 0));
203
	}
205
	}
204
	if (!this.isEnableX || !this.showButtons) {
206
	if (!this.isEnableX || !this.showButtons) {
205
		this.rightButtonNode.style.width = "1px";
207
		this.rightButtonNode.style.width = "1px";
206
		this.rightButtonNode.style.visibility = "hidden";
208
		this.rightButtonNode.style.visibility = "hidden";
207
		this.leftButtonNode.style.width = "1px";
209
		this.leftButtonNode.style.width = "1px";
208
		this.leftButtonNode.style.visibility = "hidden";
210
		this.leftButtonNode.style.visibility = "hidden";
209
	}
211
	}
210
	if (this.isEnableY) {
212
	if (this.isEnableY) {
211
		this.setValueY(!isNaN(this.initialValueY) ? this.initialValueY : (!isNaN(this.minimumY) ? this.minimumY : 0));
213
		this.setValueY(!isNaN(this.initialValueY) ? this.initialValueY : (!isNaN(this.minimumY) ? this.minimumY : 0));
212
	}
214
	}
213
	if (!this.isEnableY || !this.showButtons) {
215
	if (!this.isEnableY || !this.showButtons) {
214
		this.bottomButtonNode.style.width = "1px";
216
		this.bottomButtonNode.style.width = "1px";
215
		this.bottomButtonNode.style.visibility = "hidden";
217
		this.bottomButtonNode.style.visibility = "hidden";
216
		this.topButtonNode.style.width = "1px";
218
		this.topButtonNode.style.width = "1px";
217
		this.topButtonNode.style.visibility = "hidden";
219
		this.topButtonNode.style.visibility = "hidden";
218
	}
220
	}
219
	if (this.focusNode.addEventListener) {
221
	if (this.focusNode.addEventListener) {
220
		this.focusNode.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false);
222
		this.focusNode.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false);
221
	}
223
	}
222
}, _snapX:function (x) {
224
}, _snapX:function (x) {
223
	if (x < 0) {
225
	if (x < 0) {
224
		x = 0;
226
		x = 0;
225
	} else {
227
	} else {
226
		if (x > this._constraintWidth) {
228
		if (x > this._constraintWidth) {
227
			x = this._constraintWidth;
229
			x = this._constraintWidth;
228
		} else {
230
		} else {
229
			var selectedValue = Math.round(x / this._valueSizeX);
231
			var selectedValue = Math.round(x / this._valueSizeX);
230
			x = Math.round(selectedValue * this._valueSizeX);
232
			x = Math.round(selectedValue * this._valueSizeX);
231
		}
233
		}
232
	}
234
	}
233
	this.sliderHandleNode.style.left = x + "px";
235
	this.sliderHandleNode.style.left = x + "px";
234
	if (this.flipX) {
236
	if (this.flipX) {
235
		this._clipLeft = x + this._clipXdelta;
237
		this._clipLeft = x + this._clipXdelta;
236
	} else {
238
	} else {
237
		this._clipRight = x + this._clipXdelta;
239
		this._clipRight = x + this._clipXdelta;
238
	}
240
	}
239
	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
241
	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
240
}, _calc_valueSizeX:function () {
242
}, _calc_valueSizeX:function () {
241
	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
243
	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
242
	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
244
	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
243
	if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0) {
245
	if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0) {
244
		return false;
246
		return false;
245
	}
247
	}
246
	this._constraintWidth = constrainingCtrBox.width + dojo.html.getPadding(this.constrainingContainerNode).width - sliderHandleBox.width;
248
	this._constraintWidth = constrainingCtrBox.width + dojo.html.getPadding(this.constrainingContainerNode).width - sliderHandleBox.width;
247
	if (this.flipX) {
249
	if (this.flipX) {
248
		this._clipLeft = this._clipRight = constrainingCtrBox.width;
250
		this._clipLeft = this._clipRight = constrainingCtrBox.width;
249
	} else {
251
	} else {
250
		this._clipLeft = this._clipRight = 0;
252
		this._clipLeft = this._clipRight = 0;
251
	}
253
	}
252
	this._clipXdelta = sliderHandleBox.width >> 1;
254
	this._clipXdelta = sliderHandleBox.width >> 1;
253
	if (!this.isEnableY) {
255
	if (!this.isEnableY) {
254
		this._clipTop = 0;
256
		this._clipTop = 0;
255
		this._clipBottom = constrainingCtrBox.height;
257
		this._clipBottom = constrainingCtrBox.height;
256
	}
258
	}
257
	if (this._constraintWidth <= 0) {
259
	if (this._constraintWidth <= 0) {
258
		return false;
260
		return false;
259
	}
261
	}
260
	if (this.snapValuesX == 0) {
262
	if (this.snapValuesX == 0) {
261
		this.snapValuesX = this._constraintWidth + 1;
263
		this.snapValuesX = this._constraintWidth + 1;
262
	}
264
	}
263
	this._valueSizeX = this._constraintWidth / (this.snapValuesX - 1);
265
	this._valueSizeX = this._constraintWidth / (this.snapValuesX - 1);
264
	return true;
266
	return true;
265
}, setValueX:function (value) {
267
}, setValueX:function (value) {
266
	if (0 == this._valueSizeX) {
268
	if (0 == this._valueSizeX) {
267
		if (this._calc_valueSizeX() == false) {
269
		if (this._calc_valueSizeX() == false) {
268
			dojo.lang.setTimeout(this, "setValueX", 100, value);
270
			dojo.lang.setTimeout(this, "setValueX", 100, value);
269
			return;
271
			return;
270
		}
272
		}
271
	}
273
	}
272
	if (isNaN(value)) {
274
	if (isNaN(value)) {
273
		value = 0;
275
		value = 0;
274
	}
276
	}
275
	if (value > this.maximumX) {
277
	if (value > this.maximumX) {
276
		value = this.maximumX;
278
		value = this.maximumX;
277
	} else {
279
	} else {
278
		if (value < this.minimumX) {
280
		if (value < this.minimumX) {
279
			value = this.minimumX;
281
			value = this.minimumX;
280
		}
282
		}
281
	}
283
	}
282
	var pixelPercent = (value - this.minimumX) / (this.maximumX - this.minimumX);
284
	var pixelPercent = (value - this.minimumX) / (this.maximumX - this.minimumX);
283
	if (this.flipX) {
285
	if (this.flipX) {
284
		pixelPercent = 1 - pixelPercent;
286
		pixelPercent = 1 - pixelPercent;
285
	}
287
	}
286
	this._snapX(pixelPercent * this._constraintWidth);
288
	this._snapX(pixelPercent * this._constraintWidth);
287
	this.notifyListeners();
289
	this.notifyListeners();
288
}, getValueX:function () {
290
}, getValueX:function () {
289
	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "left") / this._constraintWidth;
291
	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "left") / this._constraintWidth;
290
	if (this.flipX) {
292
	if (this.flipX) {
291
		pixelPercent = 1 - pixelPercent;
293
		pixelPercent = 1 - pixelPercent;
292
	}
294
	}
293
	return Math.round(pixelPercent * (this.snapValuesX - 1)) * ((this.maximumX - this.minimumX) / (this.snapValuesX - 1)) + this.minimumX;
295
	return Math.round(pixelPercent * (this.snapValuesX - 1)) * ((this.maximumX - this.minimumX) / (this.snapValuesX - 1)) + this.minimumX;
294
}, _snapY:function (y) {
296
}, _snapY:function (y) {
295
	if (y < 0) {
297
	if (y < 0) {
296
		y = 0;
298
		y = 0;
297
	} else {
299
	} else {
298
		if (y > this._constraintHeight) {
300
		if (y > this._constraintHeight) {
299
			y = this._constraintHeight;
301
			y = this._constraintHeight;
300
		} else {
302
		} else {
301
			var selectedValue = Math.round(y / this._valueSizeY);
303
			var selectedValue = Math.round(y / this._valueSizeY);
302
			y = Math.round(selectedValue * this._valueSizeY);
304
			y = Math.round(selectedValue * this._valueSizeY);
303
		}
305
		}
304
	}
306
	}
305
	this.sliderHandleNode.style.top = y + "px";
307
	this.sliderHandleNode.style.top = y + "px";
306
	if (this.flipY) {
308
	if (this.flipY) {
307
		this._clipTop = y + this._clipYdelta;
309
		this._clipTop = y + this._clipYdelta;
308
	} else {
310
	} else {
309
		this._clipBottom = y + this._clipYdelta;
311
		this._clipBottom = y + this._clipYdelta;
310
	}
312
	}
311
	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
313
	this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)";
312
}, _calc_valueSizeY:function () {
314
}, _calc_valueSizeY:function () {
313
	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
315
	var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);
314
	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
316
	var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);
315
	if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0) {
317
	if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0) {
316
		return false;
318
		return false;
317
	}
319
	}
318
	this._constraintHeight = constrainingCtrBox.height + dojo.html.getPadding(this.constrainingContainerNode).height - sliderHandleBox.height;
320
	this._constraintHeight = constrainingCtrBox.height + dojo.html.getPadding(this.constrainingContainerNode).height - sliderHandleBox.height;
319
	if (this.flipY) {
321
	if (this.flipY) {
320
		this._clipTop = this._clipBottom = constrainingCtrBox.height;
322
		this._clipTop = this._clipBottom = constrainingCtrBox.height;
321
	} else {
323
	} else {
322
		this._clipTop = this._clipBottom = 0;
324
		this._clipTop = this._clipBottom = 0;
323
	}
325
	}
324
	this._clipYdelta = sliderHandleBox.height >> 1;
326
	this._clipYdelta = sliderHandleBox.height >> 1;
325
	if (!this.isEnableX) {
327
	if (!this.isEnableX) {
326
		this._clipLeft = 0;
328
		this._clipLeft = 0;
327
		this._clipRight = constrainingCtrBox.width;
329
		this._clipRight = constrainingCtrBox.width;
328
	}
330
	}
329
	if (this._constraintHeight <= 0) {
331
	if (this._constraintHeight <= 0) {
330
		return false;
332
		return false;
331
	}
333
	}
332
	if (this.snapValuesY == 0) {
334
	if (this.snapValuesY == 0) {
333
		this.snapValuesY = this._constraintHeight + 1;
335
		this.snapValuesY = this._constraintHeight + 1;
334
	}
336
	}
335
	this._valueSizeY = this._constraintHeight / (this.snapValuesY - 1);
337
	this._valueSizeY = this._constraintHeight / (this.snapValuesY - 1);
336
	return true;
338
	return true;
337
}, setValueY:function (value) {
339
}, setValueY:function (value) {
338
	if (0 == this._valueSizeY) {
340
	if (0 == this._valueSizeY) {
339
		if (this._calc_valueSizeY() == false) {
341
		if (this._calc_valueSizeY() == false) {
340
			dojo.lang.setTimeout(this, "setValueY", 100, value);
342
			dojo.lang.setTimeout(this, "setValueY", 100, value);
341
			return;
343
			return;
342
		}
344
		}
343
	}
345
	}
344
	if (isNaN(value)) {
346
	if (isNaN(value)) {
345
		value = 0;
347
		value = 0;
346
	}
348
	}
347
	if (value > this.maximumY) {
349
	if (value > this.maximumY) {
348
		value = this.maximumY;
350
		value = this.maximumY;
349
	} else {
351
	} else {
350
		if (value < this.minimumY) {
352
		if (value < this.minimumY) {
351
			value = this.minimumY;
353
			value = this.minimumY;
352
		}
354
		}
353
	}
355
	}
354
	var pixelPercent = (value - this.minimumY) / (this.maximumY - this.minimumY);
356
	var pixelPercent = (value - this.minimumY) / (this.maximumY - this.minimumY);
355
	if (this.flipY) {
357
	if (this.flipY) {
356
		pixelPercent = 1 - pixelPercent;
358
		pixelPercent = 1 - pixelPercent;
357
	}
359
	}
358
	this._snapY(pixelPercent * this._constraintHeight);
360
	this._snapY(pixelPercent * this._constraintHeight);
359
	this.notifyListeners();
361
	this.notifyListeners();
360
}, getValueY:function () {
362
}, getValueY:function () {
361
	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "top") / this._constraintHeight;
363
	var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "top") / this._constraintHeight;
362
	if (this.flipY) {
364
	if (this.flipY) {
363
		pixelPercent = 1 - pixelPercent;
365
		pixelPercent = 1 - pixelPercent;
364
	}
366
	}
365
	return Math.round(pixelPercent * (this.snapValuesY - 1)) * ((this.maximumY - this.minimumY) / (this.snapValuesY - 1)) + this.minimumY;
367
	return Math.round(pixelPercent * (this.snapValuesY - 1)) * ((this.maximumY - this.minimumY) / (this.snapValuesY - 1)) + this.minimumY;
366
}, _onClick:function (evt) {
368
}, _onClick:function (evt) {
367
	if (this._isDragInProgress) {
369
	if (this._isDragInProgress) {
368
		return;
370
		return;
369
	}
371
	}
370
	var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX);
372
	var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX);
371
	var content = dojo.html.getContentBox(this._handleMove.domNode);
373
	var content = dojo.html.getContentBox(this._handleMove.domNode);
372
	if (this.isEnableX) {
374
	if (this.isEnableX) {
373
		var x = evt.pageX - parent.x - (content.width >> 1);
375
		var x = evt.pageX - parent.x - (content.width >> 1);
374
		this._snapX(x);
376
		this._snapX(x);
375
	}
377
	}
376
	if (this.isEnableY) {
378
	if (this.isEnableY) {
377
		var y = evt.pageY - parent.y - (content.height >> 1);
379
		var y = evt.pageY - parent.y - (content.height >> 1);
378
		this._snapY(y);
380
		this._snapY(y);
379
	}
381
	}
380
	this.notifyListeners();
382
	this.notifyListeners();
381
}, notifyListeners:function () {
383
}, notifyListeners:function () {
382
	this.onValueChanged(this.getValueX(), this.getValueY());
384
	this.onValueChanged(this.getValueX(), this.getValueY());
383
}, onValueChanged:function (x, y) {
385
}, onValueChanged:function (x, y) {
384
}});
386
}});
385
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 () {
387
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 () {
386
	dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this, arguments);
388
	dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this, arguments);
387
	if (!isNaN(parseFloat(this.initialValue))) {
389
	if (!isNaN(parseFloat(this.initialValue))) {
388
		this.initialValueX = parseFloat(this.initialValue);
390
		this.initialValueX = parseFloat(this.initialValue);
389
	}
391
	}
390
	if (!isNaN(parseFloat(this.minimum))) {
392
	if (!isNaN(parseFloat(this.minimum))) {
391
		this.minimumX = parseFloat(this.minimum);
393
		this.minimumX = parseFloat(this.minimum);
392
	}
394
	}
393
	if (!isNaN(parseFloat(this.maximum))) {
395
	if (!isNaN(parseFloat(this.maximum))) {
394
		this.maximumX = parseFloat(this.maximum);
396
		this.maximumX = parseFloat(this.maximum);
395
	}
397
	}
396
	if (!isNaN(parseInt(this.snapValues))) {
398
	if (!isNaN(parseInt(this.snapValues))) {
397
		this.snapValuesX = parseInt(this.snapValues);
399
		this.snapValuesX = parseInt(this.snapValues);
398
	}
400
	}
399
	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
401
	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
400
		this.buttonStyleX = this.buttonStyle;
402
		this.buttonStyleX = this.buttonStyle;
401
	}
403
	}
402
	if (dojo.lang.isBoolean(this.flip)) {
404
	if (dojo.lang.isBoolean(this.flip)) {
403
		this.flipX = this.flip;
405
		this.flipX = this.flip;
404
	}
406
	}
405
}, notifyListeners:function () {
407
}, notifyListeners:function () {
406
	this.onValueChanged(this.getValueX());
408
	this.onValueChanged(this.getValueX());
407
}, getValue:function () {
409
}, getValue:function () {
408
	return this.getValueX();
410
	return this.getValueX();
409
}, setValue:function (value) {
411
}, setValue:function (value) {
410
	this.setValueX(value);
412
	this.setValueX(value);
411
}, onValueChanged:function (value) {
413
}, onValueChanged:function (value) {
412
}});
414
}});
413
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 () {
415
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 () {
414
	dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this, arguments);
416
	dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this, arguments);
415
	if (!isNaN(parseFloat(this.initialValue))) {
417
	if (!isNaN(parseFloat(this.initialValue))) {
416
		this.initialValueY = parseFloat(this.initialValue);
418
		this.initialValueY = parseFloat(this.initialValue);
417
	}
419
	}
418
	if (!isNaN(parseFloat(this.minimum))) {
420
	if (!isNaN(parseFloat(this.minimum))) {
419
		this.minimumY = parseFloat(this.minimum);
421
		this.minimumY = parseFloat(this.minimum);
420
	}
422
	}
421
	if (!isNaN(parseFloat(this.maximum))) {
423
	if (!isNaN(parseFloat(this.maximum))) {
422
		this.maximumY = parseFloat(this.maximum);
424
		this.maximumY = parseFloat(this.maximum);
423
	}
425
	}
424
	if (!isNaN(parseInt(this.snapValues))) {
426
	if (!isNaN(parseInt(this.snapValues))) {
425
		this.snapValuesY = parseInt(this.snapValues);
427
		this.snapValuesY = parseInt(this.snapValues);
426
	}
428
	}
427
	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
429
	if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") {
428
		this.buttonStyleY = this.buttonStyle;
430
		this.buttonStyleY = this.buttonStyle;
429
	}
431
	}
430
	if (dojo.lang.isBoolean(this.flip)) {
432
	if (dojo.lang.isBoolean(this.flip)) {
431
		this.flipY = this.flip;
433
		this.flipY = this.flip;
432
	}
434
	}
433
}, notifyListeners:function () {
435
}, notifyListeners:function () {
434
	this.onValueChanged(this.getValueY());
436
	this.onValueChanged(this.getValueY());
435
}, getValue:function () {
437
}, getValue:function () {
436
	return this.getValueY();
438
	return this.getValueY();
437
}, setValue:function (value) {
439
}, setValue:function (value) {
438
	this.setValueY(value);
440
	this.setValueY(value);
439
}, onValueChanged:function (value) {
441
}, onValueChanged:function (value) {
440
}});
442
}});
441
dojo.declare("dojo.widget._SliderDragMoveSource", dojo.dnd.HtmlDragMoveSource, {slider:null, onDragStart:function (evt) {
443
dojo.declare("dojo.widget._SliderDragMoveSource", dojo.dnd.HtmlDragMoveSource, {slider:null, onDragStart:function (evt) {
442
	this.slider._isDragInProgress = true;
444
	this.slider._isDragInProgress = true;
443
	var dragObj = this.createDragMoveObject();
445
	var dragObj = this.createDragMoveObject();
444
	this.slider.notifyListeners();
446
	this.slider.notifyListeners();
445
	return dragObj;
447
	return dragObj;
446
}, onDragEnd:function (evt) {
448
}, onDragEnd:function (evt) {
447
	this.slider._isDragInProgress = false;
449
	this.slider._isDragInProgress = false;
448
	this.slider.notifyListeners();
450
	this.slider.notifyListeners();
449
}, createDragMoveObject:function () {
451
}, createDragMoveObject:function () {
450
	var dragObj = new dojo.widget._SliderDragMoveObject(this.dragObject, this.type);
452
	var dragObj = new dojo.widget._SliderDragMoveObject(this.dragObject, this.type);
451
	dragObj.slider = this.slider;
453
	dragObj.slider = this.slider;
452
	if (this.dragClass) {
454
	if (this.dragClass) {
453
		dragObj.dragClass = this.dragClass;
455
		dragObj.dragClass = this.dragClass;
454
	}
456
	}
455
	return dragObj;
457
	return dragObj;
456
}, setParent:function (slider) {
458
}, setParent:function (slider) {
457
	this.slider = slider;
459
	this.slider = slider;
458
}});
460
}});
459
dojo.declare("dojo.widget._SliderDragMoveObject", dojo.dnd.HtmlDragMoveObject, {slider:null, onDragMove:function (evt) {
461
dojo.declare("dojo.widget._SliderDragMoveObject", dojo.dnd.HtmlDragMoveObject, {slider:null, onDragMove:function (evt) {
460
	this.updateDragOffset();
462
	this.updateDragOffset();
461
	if (this.slider.isEnableX) {
463
	if (this.slider.isEnableX) {
462
		var x = this.dragOffset.x + evt.pageX;
464
		var x = this.dragOffset.x + evt.pageX;
463
		this.slider._snapX(x);
465
		this.slider._snapX(x);
464
	}
466
	}
465
	if (this.slider.isEnableY) {
467
	if (this.slider.isEnableY) {
466
		var y = this.dragOffset.y + evt.pageY;
468
		var y = this.dragOffset.y + evt.pageY;
467
		this.slider._snapY(y);
469
		this.slider._snapY(y);
468
	}
470
	}
469
	if (this.slider.activeDrag) {
471
	if (this.slider.activeDrag) {
470
		this.slider.notifyListeners();
472
		this.slider.notifyListeners();
471
	}
473
	}
472
}});
474
}});
473
 
475