return Components.interfaces.nsIAccessibleProvider.XULListbox; 0 ? this.selectedItems[0] : null; ]]> 0) return this.getIndexOfItem(this.selectedItems[0]); return -1; ]]> = 0) this.selectItem(this.getItemAtIndex(val)); else this.clearSelection(); ]]> 0) return this.selectedItem.value; return null; ]]> if (this._currentItem == val) return val; if (this._currentItem) this._currentItem.current = false; this._currentItem = val; if (val) val.current = true; return val; return this.currentItem ? this.getIndexOfItem(this.currentItem) : -1; = 0) this.currentItem = this.getItemAtIndex(val); else this.currentItem = null; ]]> [] this._selectionStart = null; var suppress = this._suppressOnSelect; this._suppressOnSelect = true; var item = this.getItemAtIndex(0); while (item) { this.addItemToSelection(item); item = this.getNextItem(item, 1); } this._suppressOnSelect = suppress; this._fireOnSelect(); this._selectionStart = null; var suppress = this._suppressOnSelect; this._suppressOnSelect = true; var item = this.getItemAtIndex(0); while (item) { if (item.selected) this.removeItemFromSelection(item); else this.addItemToSelection(item); item = this.getNextItem(item, 1); } this._suppressOnSelect = suppress; this._fireOnSelect(); = 0; --i) this.selectedItems[i].selected = false; this.selectedItems.splice(0, this.selectedItems.length); } this._selectionStart = null; this._fireOnSelect(); ]]> if (val) this.setAttribute("disableKeyNavigation", "true"); else this.removeAttribute("disableKeyNavigation"); return val; numItems - 1) newIndex = numItems - 1; var newItem = this.getItemAtIndex(newIndex); if (newItem) { this.ensureIndexIsVisible(newIndex); if (aIsSelectingRange) this.selectItemRange(null, newItem); else if (aIsSelecting) this.selectItem(newItem); this.currentItem = newItem; } ]]> aMe._fireOnSelect(); aMe._selectTimeout = null; false null null null 0 "" const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var item = this.ownerDocument.createElementNS(XULNS, "listitem"); item.setAttribute("label", aLabel); item.setAttribute("value", aValue); this.appendChild(item); return item; const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var item = this.ownerDocument.createElementNS(XULNS, "listitem"); item.setAttribute("label", aLabel); item.setAttribute("value", aValue); var before = this.getItemAtIndex(aIndex); if (before) this.insertBefore(item, before); else this.appendChild(item); return item; return this.listBoxObject.getIndexOfItem(item); return this.listBoxObject.getItemAtIndex(index); return this.listBoxObject.ensureIndexIsVisible(index); return this.ensureIndexIsVisible(this.listBoxObject.getIndexOfItem(element)); return this.listBoxObject.scrollToIndex(index); return this.listBoxObject.getNumberOfVisibleRows(); return this.listBoxObject.getIndexOfFirstVisibleRow(); return this.listBoxObject.getRowCount(); = maxTop && maxTop > this.currentIndex) { newTop = maxTop; } } else if (newTop < 0) newTop = 0; this.scrollToIndex(newTop); return pageOffset; ]]> 0) { this.currentIndex = this.getIndexOfFirstVisibleRow(); } this._lastKeyTime = 0; ]]> 0 && !event.altKey && !event.ctrlKey && !event.metaKey) { var key = String.fromCharCode(event.charCode); key = key.toLowerCase(); if (event.timeStamp - this._lastKeyTime > 1000) this._incrementalString = key; else this._incrementalString += key; this._lastKeyTime = event.timeStamp; var length = this._incrementalString.length; var incrementalString = this._incrementalString; var charIndex = 1; while (charIndex < length && incrementalString[charIndex] == incrementalString[charIndex - 1]) charIndex++; // If all letters in incremental string are same, just try to match the first one if (charIndex == length) { length = 1; incrementalString = incrementalString.substring(0, length); } var l = this.selectedItems.length; var c = -1; if (l > 0) c = this.getIndexOfItem(this.selectedItems[l-1]); var rowCount = this.getRowCount(); var start = 1; if (length > 1) { start = 0; if (c < 0) c = 0; } for (var i = 0; i < rowCount; i++) { var k = (i + start + c) % rowCount; var item = this.getItemAtIndex(k); //listitem var cellText = item.getAttribute("label"); cellText = cellText.substring(0, length).toLowerCase(); if (cellText == incrementalString) { this.ensureIndexIsVisible(k); this.timedSelect(item, this._selectDelay); break; } } } ]]>