a:31:{s:9:"#provides";s:21:"dojox.widget.BarGauge";s:9:"#resource";s:18:"widget/BarGauge.js";s:9:"#requires";a:2:{i:0;a:2:{i:0;s:6:"common";i:1;s:9:"dojox.gfx";}i:1;a:2:{i:0;s:6:"common";i:1;s:25:"dojox.widget.gauge._Gauge";}}s:35:"dojox.widget.gauge.BarLineIndicator";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:29:"dojox.widget.gauge._Indicator";}s:4:"call";a:1:{i:0;s:29:"dojox.widget.gauge._Indicator";}}s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:41:"dojox.widget.gauge.BarLineIndicator.width";a:3:{s:9:"prototype";s:35:"dojox.widget.gauge.BarLineIndicator";s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:46:"dojox.widget.gauge.BarLineIndicator._getShapes";a:5:{s:9:"prototype";s:35:"dojox.widget.gauge.BarLineIndicator";s:4:"type";s:8:"Function";s:6:"source";s:719:" if(!this._gauge){ return null; } var v = this.value; if(v < this._gauge.min){v = this._gauge.min;} if(v > this._gauge.max){v = this._gauge.max;} var pos = this._gauge._getPosition(v); var shapes = []; if(this.width > 1){ shapes[0] = this._gauge.surface.createRect({ x:pos, y:this._gauge.dataY + this.offset, width:this.width, height:this.length }); shapes[0].setStroke({color: this.color}); shapes[0].setFill(this.color); }else{ shapes[0] = this._gauge.surface.createLine({ x1:pos, y1:this._gauge.dataY + this.offset, x2:pos, y2:this._gauge.dataY + this.offset + this.length }); shapes[0].setStroke({color: this.color}); } return shapes;";s:7:"summary";s:175:"Private function for generating the shapes for this indicator. An indicator that behaves the same might override this one and simply replace the shapes (such as BarIndicator).";s:7:"private";b:1;}s:40:"dojox.widget.gauge.BarLineIndicator.draw";a:5:{s:9:"prototype";s:35:"dojox.widget.gauge.BarLineIndicator";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"dontAnimate";a:3:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";s:7:"summary";s:87:"Indicates if the drawing should not be animated (vs. the default of doing an animation)";}}s:6:"source";s:1359:" var i; if(this.shapes){ this._move(dontAnimate); }else{ if(this.shapes){ for(i=0; i this._gauge.max){v = this._gauge.max;} var pos = this._gauge._getPosition(v); this.text = this._gauge.drawText(''+this.label, pos, this._gauge.dataY + this.offset - 5, 'middle','top', this.color, this.font); } for(i=0; i this.max){v = this.max;} var c = this._gauge._getPosition(this.currentValue); this.currentValue = v; v = this._gauge._getPosition(v)-this._gauge.dataX; if(dontAnimate){ this.shapes[0].applyTransform(dojox.gfx.matrix.translate(v-(this.shapes[0].matrix?this.shapes[0].matrix.dx:0),0)); }else{ var anim = new dojo._Animation({curve: [c, v], duration: this.duration, easing: this.easing}); dojo.connect(anim, "onAnimate", dojo.hitch(this, function(jump){ this.shapes[0].applyTransform(dojox.gfx.matrix.translate(jump-(this.shapes[0].matrix?this.shapes[0].matrix.dx:0),0)); })); anim.play(); }";s:7:"summary";s:57:"Moves this indicator (since it's already been drawn once)";s:7:"private";b:1;}s:42:"dojox.widget.gauge.BarLineIndicator.shapes";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:40:"dojox.widget.gauge.BarLineIndicator.text";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:41:"dojox.widget.gauge.BarLineIndicator.color";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:42:"dojox.widget.gauge.BarLineIndicator.length";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:42:"dojox.widget.gauge.BarLineIndicator.offset";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:45:"dojox.widget.gauge.BarLineIndicator.highlight";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:46:"dojox.widget.gauge.BarLineIndicator.highlight2";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:48:"dojox.widget.gauge.BarLineIndicator.currentValue";a:2:{s:8:"instance";s:35:"dojox.widget.gauge.BarLineIndicator";s:7:"summary";s:0:"";}s:21:"dojox.widget.BarGauge";a:5:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:25:"dojox.widget.gauge._Gauge";}s:4:"call";a:1:{i:0;s:25:"dojox.widget.gauge._Gauge";}}s:7:"summary";s:46:"a bar graph built using the dojox.gfx package.";s:11:"description";s:422:"using dojo.gfx (and thus either SVG or VML based on what is supported), this widget builds a bar graph component, used to display numerical data in a familiar format. usage: ...
";s:9:"classlike";b:1;}s:27:"dojox.widget.BarGauge.dataX";a:3:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:6:"Number";s:7:"summary";s:35:"x position of data area (default 5)";}s:27:"dojox.widget.BarGauge.dataY";a:3:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:6:"Number";s:7:"summary";s:35:"y position of data area (default 5)";}s:31:"dojox.widget.BarGauge.dataWidth";a:4:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:8:"instance";s:21:"dojox.widget.BarGauge";s:4:"type";s:6:"Number";s:7:"summary";s:52:"width of data area (default is bar graph width - 10)";}s:32:"dojox.widget.BarGauge.dataHeight";a:4:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:8:"instance";s:21:"dojox.widget.BarGauge";s:4:"type";s:6:"Number";s:7:"summary";s:53:"height of data area (default is bar graph width - 10)";}s:39:"dojox.widget.BarGauge._defaultIndicator";a:4:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"override";s:7:"summary";s:40:"of dojox.widget._Gauge._defaultIndicator";s:7:"private";b:1;}s:29:"dojox.widget.BarGauge.startup";a:4:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"Function";s:6:"source";s:5306:"dojo.provide("dojox.widget.BarGauge"); dojo.require("dojox.gfx"); dojo.require("dojox.widget.gauge._Gauge"); dojo.experimental("dojox.widget.BarGauge"); dojo.declare("dojox.widget.gauge.BarLineIndicator",[dojox.widget.gauge._Indicator],{ width: 1, _getShapes: function(){ // summary: // Private function for generating the shapes for this indicator. An indicator that behaves the // same might override this one and simply replace the shapes (such as BarIndicator). if(!this._gauge){ return null; } var v = this.value; if(v < this._gauge.min){v = this._gauge.min;} if(v > this._gauge.max){v = this._gauge.max;} var pos = this._gauge._getPosition(v); var shapes = []; if(this.width > 1){ shapes[0] = this._gauge.surface.createRect({ x:pos, y:this._gauge.dataY + this.offset, width:this.width, height:this.length }); shapes[0].setStroke({color: this.color}); shapes[0].setFill(this.color); }else{ shapes[0] = this._gauge.surface.createLine({ x1:pos, y1:this._gauge.dataY + this.offset, x2:pos, y2:this._gauge.dataY + this.offset + this.length }); shapes[0].setStroke({color: this.color}); } return shapes; }, draw: function(/*Boolean?*/ dontAnimate){ // summary: // Override of dojox.widget.gauge._Indicator.draw // dontAnimate: Boolean // Indicates if the drawing should not be animated (vs. the default of doing an animation) var i; if(this.shapes){ this._move(dontAnimate); }else{ if(this.shapes){ for(i=0; i this._gauge.max){v = this._gauge.max;} var pos = this._gauge._getPosition(v); this.text = this._gauge.drawText(''+this.label, pos, this._gauge.dataY + this.offset - 5, 'middle','top', this.color, this.font); } for(i=0; i this.max){v = this.max;} var c = this._gauge._getPosition(this.currentValue); this.currentValue = v; v = this._gauge._getPosition(v)-this._gauge.dataX; if(dontAnimate){ this.shapes[0].applyTransform(dojox.gfx.matrix.translate(v-(this.shapes[0].matrix?this.shapes[0].matrix.dx:0),0)); }else{ var anim = new dojo._Animation({curve: [c, v], duration: this.duration, easing: this.easing}); dojo.connect(anim, "onAnimate", dojo.hitch(this, function(jump){ this.shapes[0].applyTransform(dojox.gfx.matrix.translate(jump-(this.shapes[0].matrix?this.shapes[0].matrix.dx:0),0)); })); anim.play(); } } }); dojo.declare("dojox.widget.BarGauge",dojox.widget.gauge._Gauge,{ // summary: // a bar graph built using the dojox.gfx package. // // description: // using dojo.gfx (and thus either SVG or VML based on what is supported), this widget // builds a bar graph component, used to display numerical data in a familiar format. // // usage: // // ... //
//
// dataX: Number // x position of data area (default 5) dataX: 5, // dataY: Number // y position of data area (default 5) dataY: 5, // dataWidth: Number // width of data area (default is bar graph width - 10) dataWidth: 0, // dataHeight: Number // height of data area (default is bar graph width - 10) dataHeight: 0, // _defaultIndicator: override of dojox.widget._Gauge._defaultIndicator _defaultIndicator: dojox.widget.gauge.BarLineIndicator, startup: function(){ // handle settings from HTML by making sure all the options are // converted correctly to numbers // // also connects mouse handling events if(this.getChildren){ dojo.forEach(this.getChildren(), function(child){ child.startup(); }); } if(!this.dataWidth){this.dataWidth = this.gaugeWidth - 10;} if(!this.dataHeight){this.dataHeight = this.gaugeHeight - 10;} this.inherited(arguments);";s:7:"summary";s:0:"";}s:34:"dojox.widget.BarGauge._getPosition";a:6:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:57:"A value to be converted to a position for this bar graph.";}}s:6:"source";s:90:" return this.dataX + Math.floor((value - this.min)/(this.max - this.min)*this.dataWidth);";s:7:"summary";s:103:"This is a helper function used to determine the position that represents a given value on the bar graph";s:7:"private";b:1;}s:42:"dojox.widget.BarGauge._getValueForPosition";a:6:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"pos";a:2:{s:4:"type";s:6:"Number";s:7:"summary";s:38:"A position to be converted to a value.";}}s:6:"source";s:76:" return (pos - this.dataX)*(this.max - this.min)/this.dataWidth + this.min;";s:7:"summary";s:96:"This is a helper function used to determine the value represented by a position on the bar graph";s:7:"private";b:1;}s:26:"dojox.widget.BarGauge.draw";a:5:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"Function";s:6:"source";s:362:" if(!this.surface){this.createSurface();} var i; if(this._rangeData){ for(i=0; i= value)){ range = this._rangeData[i]; } } } return range;";s:7:"summary";s:50:"Determines which range the mouse is currently over";}s:36:"dojox.widget.BarGauge._dragIndicator";a:6:{s:9:"prototype";s:21:"dojox.widget.BarGauge";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:6:"widget";a:1:{s:4:"type";s:6:"Object";}s:5:"event";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:409:" var pos = dojo.coords(widget.gaugeContent); var x = event.clientX - pos.x; var value = widget._getValueForPosition(x); if(value < widget.min){value = widget.min;} if(value > widget.max){value = widget.max;} // update the indicator widget._drag.value = value; // callback widget._drag.onDragMove(widget._drag); // redraw/move indicator(s) widget._drag.draw(true); dojo.stopEvent(event);";s:7:"summary";s:103:"Handles the dragging of an indicator, including moving/re-drawing get new value based on mouse position";s:7:"private";b:1;}s:12:"dojox.widget";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}