# contentView is obsolete (see bug 202391)
# builderView is obsolete (see bug 202393)
#ifdef XP_MACOSX
false
#else
true
#endif
null
-1
null
true
0
""
0) {
currentX += cw;
if (currentX - (cw * aThresh) > aX)
return col.element;
}
lastCol = col;
col = col.getNext();
}
if (aPos) aPos.value = "after";
return lastCol.element;
]]>
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;
]]>
= this.view.rowCount || !column)
return;
if (column.type != Components.interfaces.nsITreeColumn.TYPE_TEXT ||
column.cycler || !this.view.isEditable(row, column))
return;
if (this._editingColumn)
this.stopEditing();
var input = this.inputField;
input.hidden = false;
var box = this.treeBoxObject;
box.ensureCellIsVisible(row, column);
var outx = {}, outy = {}, outwidth = {}, outheight = {};
var coords = box.getCoordsForCellItem(row, column, "text",
outx, outy, outwidth, outheight);
var style = window.getComputedStyle(input, "");
var topadj = parseInt(style.borderTopWidth) + parseInt(style.paddingTop);
input.top = outy.value - topadj;
var left = outx.value;
input.left = left;
input.height = outheight.value + topadj +
parseInt(style.borderBottomWidth) +
parseInt(style.paddingBottom);
coords = box.getCoordsForCellItem(row, column, "cell",
outx, outy, outwidth, outheight);
input.width = outwidth.value - (left - outx.value);
input.value = this.view.getCellText(row, column);
var selectText = function selectText() {
input.select();
input.inputField.focus();
}
setTimeout(selectText, 0);
this._editingRow = row;
this._editingColumn = column;
this.setAttribute("editing", "true");
]]>
0 ? c > edge : c < edge) {
if (this.view.selection.isSelected(edge) && this.view.selection.count <= 1)
return;
c = edge;
}
var cellSelType = this._cellSelType;
if (cellSelType) {
var column = this.view.selection.currentColumn;
if (!column)
return;
while ((offset > 0 ? c <= edge : c >= edge) && !this.view.isSelectable(c, column))
c += offset;
if (offset > 0 ? c > edge : c < edge)
return;
}
if (!this._isAccelPressed(event))
this.view.selection.timedSelect(c, this._selectDelay);
else // Ctrl+Up/Down moves the anchor without selecting
this.currentIndex = c;
this.treeBoxObject.ensureRowIsVisible(c);
]]>
0) {
i += p - 1;
if (c >= i) {
i = c + p;
this.treeBoxObject.ensureRowIsVisible(i > edge ? edge : i);
}
i = i > edge ? edge : i;
} else {
if (c <= i) {
i = c <= p ? 0 : c - p;
this.treeBoxObject.ensureRowIsVisible(i);
}
}
this.view.selection.timedSelect(i, this._selectDelay);
]]>
0) {
i += p - 1;
if (c >= i) {
i = c + p;
this.treeBoxObject.ensureRowIsVisible(i > edge ? edge : i);
}
// Extend the selection from the existing pivot, if any
this.view.selection.rangedSelect(-1, i > edge ? edge : i, this._isAccelPressed(event));
} else {
if (c <= i) {
i = c <= p ? 0 : c - p;
this.treeBoxObject.ensureRowIsVisible(i);
}
// Extend the selection from the existing pivot, if any
this.view.selection.rangedSelect(-1, i, this._isAccelPressed(event));
}
]]>
0) {
this.currentIndex = this.treeBoxObject.getFirstVisibleRow();
}
if (this._cellSelType && !this.view.selection.currentColumn) {
var col = this._getNextColumn(this.currentIndex, false);
this.view.selection.currentColumn = col;
}
]]>
= 0) {
if (cellSelType && !this.view.isSelectable(parentIndex, currentColumn)) {
return;
}
this.view.selection.select(parentIndex);
this.treeBoxObject.ensureRowIsVisible(parentIndex);
return;
}
}
}
if (cellSelType) {
var col = this._getNextColumn(row, true);
if (col) {
this.view.selection.currentColumn = col;
this.treeBoxObject.ensureCellIsVisible(row, col);
}
}
]]>
0 &&
!event.altKey && !this._isAccelPressed(event) &&
!event.metaKey && !event.ctrlKey) {
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) {
var parentSelectable = true;
if (this.parentNode._cellSelType) {
var currentColumn = b.view.selection.currentColumn;
if (!b.view.isSelectable(parentIndex, currentColumn))
parentSelectable = false;
}
if (parentSelectable)
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) {
var cellSelType = this.parentNode._cellSelType;
if (cellSelType == "text" && obj.value != "text" && obj.value != "image")
return;
if (cellSelType) {
if (!col.value.selectable ||
!b.view.isSelectable(row.value, col.value)) {
return;
}
}
b.view.selection.select(row.value);
b.ensureRowIsVisible(row.value);
if (cellSelType) {
b.view.selection.currentColumn = col.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;
}
]]>