%xformsDTD; ]> aControl.textContent = aLabel; aControl.setAttribute("class", aType); if (aControl) aControl.setAttribute("selected", "selected"); if (aControl) aControl.removeAttribute("selected"); if (aNode.localName != "td" || aNode.namespaceURI != this.XHTML_NS) return false; return true; if (!this._dayContainer) this._dayContainer = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "dayContainer"); return this._dayContainer; null var target = event.originalTarget; if (this.isDayControl(target)) this.processAction(target.getAttribute("class"), target.textContent); var target = event.originalTarget; if (this.isDayControl(target)) this.processAction(target.getAttribute("class"), target.textContent); this.refreshInternal(aCurrentDay, aDaysRefreshOnly); var dateLabel = new Date(this.year, this.month - 1).toLocaleFormat("%B %Y"); this.dateLabel.textContent = dateLabel; var selection = this.ownerDocument.defaultView.getSelection(); if (!selection) return null; var focused = selection.focusNode; if (!focused) return null; // focusNode returns html:td if focused element is inside table cell // (see bug 365900). if (focused.localName != "input") { input = focused.getElementsByTagNameNS(this.XHTML_NS, "input")[0]; if (input) return input; } return focused; if (!this._dateLabel) { this._dateLabel = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "date-label"); } return this._dateLabel; null if (!this._backButton) { this._backButton = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "back-button"); } return this._backButton; null if (!this._fwdButton) { this._fwdButton = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "fwd-button"); } return this._fwdButton; null switch (event.originalTarget) { case this.backButton: this.processAction("prevMonth", null, true); break; case this.fwdButton: this.processAction("nextMonth", null, true); break; } if (!this.hasAttribute("internaltabhandling")) return; event.preventDefault(); var focused = getFocusedElement(); if (!focused) return; if (focused == this.backButton) { this.fwdButton.focus(); } else if (focused == this.fwdButton) { this.focus(); } else { this.backButton.focus(); } if (!this.hasAttribute("internaltabhandling")) return; event.preventDefault(); var focused = getFocusedElement(); if (!focused) return; if (focused == this.backButton) { this.focus(); } else if (focused == this.fwdButton) { this.backButton.focus(); } else { this.fwdButton.focus(); } return parseFloat(this.getAttribute("value")); this.max) value = this.max; var boxobj = this.sliderController; if (this.value != value) this.eraseSlider(boxobj.getXCoordFromValue(this.value)); this.drawSlider(boxobj.getXCoordFromValue(value)); this.setAttribute("value", value); ]]> if (!isNaN(parseFloat(aMin)) || !isNaN(parseFloat(aMax)) || !isNaN(parseFloat(aStep))) { this.setMin(aMin, false); this.setMax(aMax, false); this.setStep(aStep, false); this.drawScale(); } if (!isNaN(aValue)) this.value = aValue; this.canvas.focus(); return true; if (!isNaN(parseFloat(aValue))) { this.setAttribute("min", aValue); this.minLabel.textContent = aValue; if (aRefresh) { this.drawScale(); this.value = this.value; } } if (!isNaN(parseFloat(aValue))) { this.setAttribute("max", aValue); this.maxLabel.textContent = aValue; if (aRefresh) { this.drawScale(); this.value = this.value; } } if (!isNaN(parseFloat(aValue))) { this.setAttribute("step", aValue); if (aRefresh) { this.drawScale(); this.value = this.value; } } this.barWidth + this.barMargin) { x = this.barWidth + this.barMargin; } return x; }, // Takes a x position and calculates value. getValueFromXCoord: function(aX) { return Math.round(aX / this.stepIndent) * this.step + this.min; }, // Return nearest x position of steps grid. getFittedXCoord: function(aX) { return this.getXCoordFromValue(this.getValueFromXCoord(aX)); }, get boxObject() { return this.slider.ownerDocument. getBoxObjectFor(this.slider.canvas); } }; ]]> if (!this._context) { this._context = this.canvas.getContext("2d"); this._context.globalAlpha = 1.0; } return this._context; null "#8f9ca4" "red" this.strokeStyle "#eff3f1" // We fire 'ValueChange' event because this event is handled by // accessibility to know when value of widget is changed. var event = this.ownerDocument.createEvent("Events"); event.initEvent("ValueChange", false, false); this.dispatchEvent(event); if (!this._minlabel) { this._minlabel = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "minlabel"); } return this._minlabel; null if (!this._maxlabel) { this._maxlabel = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "maxlabel"); } return this._maxlabel; null if (!this._canvas) { this._canvas = this.ownerDocument. getAnonymousElementByAttribute(this, "anonid", "canvas"); } return this._canvas; null nsIEvent = Components.interfaces.nsIDOMKeyEvent; switch (event.keyCode) { case nsIEvent.DOM_VK_RIGHT: case nsIEvent.DOM_VK_DOWN: this.value += this.step; break; case nsIEvent.DOM_VK_LEFT: case nsIEvent.DOM_VK_UP: this.value -= this.step; break; // delta is at least as large as step and no more than 20% of the // scale. case nsIEvent.DOM_VK_PAGE_DOWN: var delta = parseInt((this.max - this.min) / 5 / this.step) * this.step; this.value += delta ? delta : this.step; break; case nsIEvent.DOM_VK_PAGE_UP: var delta = parseInt((this.max - this.min) / 5 / this.step) * this.step; this.value -= delta ? delta : this.step; break; case nsIEvent.DOM_VK_END: this.value = this.max; break; case nsIEvent.DOM_VK_HOME: this.value = this.min; break; default: return; } this.dispatchChangeEvent(); return Components.interfaces.nsIAccessibleProvider.XFormsDropmarkerWidget;