# contentView is obsolete (see bug 202391)
# builderView is obsolete (see bug 202393)
#ifdef XP_MACOSX
false
#else
true
#endif
true
0
""
0) {
currentX += cw;
if (currentX - (cw*aThresh) > aX)
return col;
}
lastCol = col;
}
col = col.boxObject.nextSibling;
}
if (aPos) aPos.value = "after";
return lastCol;
]]>
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 keyCol = this.columns.getKeyColumn();
var rowCount = this.view.rowCount;
var start = 1;
var c = this.currentIndex;
if (length > 1) {
start = 0;
if (c < 0)
c = 0;
}
for (var i = 0; i < rowCount; i++) {
var l = (i + start + c) % rowCount;
var cellText = this.view.getCellText(l, keyCol);
cellText = cellText.substring(0, length).toLowerCase();
if (cellText == incrementalString)
return l;
}
return -1;
]]>
0) {
this.currentIndex = this.treeBoxObject.getFirstVisibleRow();
}
]]>
= 0) {
this.view.selection.select(parentIndex);
this.treeBoxObject.ensureRowIsVisible(parentIndex);
}
}
]]>
= 0 && !this.changeOpenState(row, true)) {
var view = this.view;
if (row + 1 < view.rowCount &&
view.getParentIndex(row + 1) == row) {
// If already opened, select the first child.
// The getParentIndex test above ensures that the children
// are already populated and ready.
this.view.selection.timedSelect(row + 1, this._selectDelay);
this.treeBoxObject.ensureRowIsVisible(row + 1);
}
}
]]>
0) {
var p = this.treeBoxObject.getPageLength();
if (f - p >= 0)
i = c - p;
else
i = c - f;
this.treeBoxObject.scrollByPages(-1);
}
this.view.selection.timedSelect(i, this._selectDelay);
]]>
0) {
var p = this.treeBoxObject.getPageLength();
if (f - p >= 0)
i = c - p;
else
i = c - f;
this.treeBoxObject.scrollByPages(-1);
}
// Extend the selection from the existing pivot, if any
this.view.selection.rangedSelect(-1, i, this._isAccelPressed(event));
]]>
0 &&
!event.altKey && !this._isAccelPressed(event) &&
!event.metaKey) {
var l = this.keyNavigate(event);
if (l >= 0) {
this.view.selection.timedSelect(l, this._selectDelay);
this.treeBoxObject.ensureRowIsVisible(l);
}
}
]]>
if ("_ensureColumnOrder" in this.parentNode)
this.parentNode._ensureColumnOrder();
-1
= 0 &&
b.view.isContainerOpen(row.value)) {
var parentIndex = b.view.getParentIndex(b.view.selection.currentIndex);
while (parentIndex >= 0 && parentIndex != row.value)
parentIndex = b.view.getParentIndex(parentIndex);
if (parentIndex == row.value)
b.view.selection.select(parentIndex);
}
this.parentNode.changeOpenState(row.value);
return;
}
if (! b.view.selection.single) {
var augment = this._isAccelPressed(event);
if (event.shiftKey) {
b.view.selection.rangedSelect(-1, row.value, augment);
b.ensureRowIsVisible(row.value);
return;
}
if (augment) {
b.view.selection.toggleSelect(row.value);
b.ensureRowIsVisible(row.value);
b.view.selection.currentIndex = row.value;
return;
}
}
/* We want to deselect all the selected items except what was
clicked, UNLESS it was a right-click. We have to do this
in click rather than mousedown so that you can drag a
selected group of items */
if (!col.value) return;
// if the last row has changed in between the time we
// mousedown and the time we click, don't fire the select handler.
// see bug #92366
if (!col.value.cycler && this._lastSelectedRow == row.value &&
col.value.type != Components.interfaces.nsITreeColumn.TYPE_CHECKBOX) {
b.view.selection.select(row.value);
b.ensureRowIsVisible(row.value);
}
]]>
this.parentNode.parentNode._columnsDirty = true;
0 && sib.parentNode == this.parentNode)
return sib;
sib = sib.boxObject.previousSibling;
}
return null;
]]>
0) ++visible;
if (visible > 1) {
window.addEventListener("mousemove", this.onDragMouseMove, true);
window.addEventListener("mouseup", this.onDragMouseUp, true);
document.treecolDragging = this;
this.mDragGesturing = true;
this.mStartDragX = event.clientX;
this.mStartDragY = event.clientY;
}
}
]]>
2)
aPopup.removeChild(aPopup.firstChild);
var refChild = aPopup.firstChild;
var tree = this.parentNode.parentNode;
for (var currCol = tree.columns.getFirstColumn(); currCol;
currCol = currCol.getNext()) {
// Construct an entry for each column in the row, unless
// it is not being shown.
var currElement = currCol.element;
if (!currElement.hasAttribute("ignoreincolumnpicker")) {
var popupChild = document.createElement("menuitem");
popupChild.setAttribute("type", "checkbox");
var columnName = currElement.getAttribute("display") ||
currElement.getAttribute("label");
popupChild.setAttribute("label", columnName);
popupChild.setAttribute("colindex", currCol.index);
if (currElement.getAttribute("hidden") != "true")
popupChild.setAttribute("checked", "true");
if (currCol.primary)
popupChild.setAttribute("disabled", "true");
aPopup.insertBefore(popupChild, refChild);
}
}
var hidden = !tree.enableColumnDrag;
const anonids = ["menuseparator", "menuitem"];
for (var i = 0; i < anonids.length; i++) {
var element = document.getAnonymousElementByAttribute(this, "anonid", anonids[i]);
element.hidden = hidden;
}
]]>