Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / DefaultListSelectionModel.js
index 64182f3..411363b 100644 (file)
-Clazz.declarePackage ("javax.swing");\r
-Clazz.load (["javax.swing.ListSelectionModel", "java.util.BitSet", "javax.swing.event.EventListenerList"], "javax.swing.DefaultListSelectionModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ListSelectionEvent", "$.ListSelectionListener"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.selectionMode = 2;\r
-this.minIndex = 2147483647;\r
-this.maxIndex = -1;\r
-this.anchorIndex = -1;\r
-this.leadIndex = -1;\r
-this.firstAdjustedIndex = 2147483647;\r
-this.lastAdjustedIndex = -1;\r
-this.isAdjusting = false;\r
-this.firstChangedIndex = 2147483647;\r
-this.lastChangedIndex = -1;\r
-this.value = null;\r
-this.listenerList = null;\r
-this.leadAnchorNotificationEnabled = true;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing, "DefaultListSelectionModel", null, [javax.swing.ListSelectionModel, Cloneable]);\r
-Clazz.prepareFields (c$, function () {\r
-this.value =  new java.util.BitSet (32);\r
-this.listenerList =  new javax.swing.event.EventListenerList ();\r
-});\r
-Clazz.overrideMethod (c$, "getMinSelectionIndex", \r
-function () {\r
-return this.isSelectionEmpty () ? -1 : this.minIndex;\r
-});\r
-Clazz.overrideMethod (c$, "getMaxSelectionIndex", \r
-function () {\r
-return this.maxIndex;\r
-});\r
-Clazz.overrideMethod (c$, "getValueIsAdjusting", \r
-function () {\r
-return this.isAdjusting;\r
-});\r
-Clazz.overrideMethod (c$, "getSelectionMode", \r
-function () {\r
-return this.selectionMode;\r
-});\r
-Clazz.overrideMethod (c$, "setSelectionMode", \r
-function (selectionMode) {\r
-switch (selectionMode) {\r
-case 0:\r
-case 1:\r
-case 2:\r
-this.selectionMode = selectionMode;\r
-break;\r
-default:\r
-throw  new IllegalArgumentException ("invalid selectionMode");\r
-}\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "isSelectedIndex", \r
-function (index) {\r
-return ((index < this.minIndex) || (index > this.maxIndex)) ? false : this.value.get (index);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "isSelectionEmpty", \r
-function () {\r
-return (this.minIndex > this.maxIndex);\r
-});\r
-Clazz.overrideMethod (c$, "addListSelectionListener", \r
-function (l) {\r
-this.listenerList.add (javax.swing.event.ListSelectionListener, l);\r
-}, "javax.swing.event.ListSelectionListener");\r
-Clazz.overrideMethod (c$, "removeListSelectionListener", \r
-function (l) {\r
-this.listenerList.remove (javax.swing.event.ListSelectionListener, l);\r
-}, "javax.swing.event.ListSelectionListener");\r
-Clazz.defineMethod (c$, "getListSelectionListeners", \r
-function () {\r
-return this.listenerList.getListeners (javax.swing.event.ListSelectionListener);\r
-});\r
-Clazz.defineMethod (c$, "fireValueChanged", \r
-function (isAdjusting) {\r
-if (this.lastChangedIndex == -1) {\r
-return;\r
-}var oldFirstChangedIndex = this.firstChangedIndex;\r
-var oldLastChangedIndex = this.lastChangedIndex;\r
-this.firstChangedIndex = 2147483647;\r
-this.lastChangedIndex = -1;\r
-this.fireValueChanged (oldFirstChangedIndex, oldLastChangedIndex, isAdjusting);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "fireValueChanged", \r
-function (firstIndex, lastIndex) {\r
-this.fireValueChanged (firstIndex, lastIndex, this.getValueIsAdjusting ());\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "fireValueChanged", \r
-function (firstIndex, lastIndex, isAdjusting) {\r
-var listeners = this.listenerList.getListenerList ();\r
-var e = null;\r
-for (var i = listeners.length - 2; i >= 0; i -= 2) {\r
-if (listeners[i] === javax.swing.event.ListSelectionListener) {\r
-if (e == null) {\r
-e =  new javax.swing.event.ListSelectionEvent (this, firstIndex, lastIndex, isAdjusting);\r
-}(listeners[i + 1]).valueChanged (e);\r
-}}\r
-}, "~N,~N,~B");\r
-Clazz.defineMethod (c$, "fireValueChanged", \r
- function () {\r
-if (this.lastAdjustedIndex == -1) {\r
-return;\r
-}if (this.getValueIsAdjusting ()) {\r
-this.firstChangedIndex = Math.min (this.firstChangedIndex, this.firstAdjustedIndex);\r
-this.lastChangedIndex = Math.max (this.lastChangedIndex, this.lastAdjustedIndex);\r
-}var oldFirstAdjustedIndex = this.firstAdjustedIndex;\r
-var oldLastAdjustedIndex = this.lastAdjustedIndex;\r
-this.firstAdjustedIndex = 2147483647;\r
-this.lastAdjustedIndex = -1;\r
-this.fireValueChanged (oldFirstAdjustedIndex, oldLastAdjustedIndex);\r
-});\r
-Clazz.defineMethod (c$, "getListeners", \r
-function (listenerType) {\r
-return this.listenerList.getListeners (listenerType);\r
-}, "Class");\r
-Clazz.defineMethod (c$, "markAsDirty", \r
- function (r) {\r
-this.firstAdjustedIndex = Math.min (this.firstAdjustedIndex, r);\r
-this.lastAdjustedIndex = Math.max (this.lastAdjustedIndex, r);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "set", \r
- function (r) {\r
-if (this.value.get (r)) {\r
-return;\r
-}this.value.set (r);\r
-this.markAsDirty (r);\r
-this.minIndex = Math.min (this.minIndex, r);\r
-this.maxIndex = Math.max (this.maxIndex, r);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "clear", \r
- function (r) {\r
-if (!this.value.get (r)) {\r
-return;\r
-}this.value.clear (r);\r
-this.markAsDirty (r);\r
-if (r == this.minIndex) {\r
-for (this.minIndex = this.minIndex + 1; this.minIndex <= this.maxIndex; this.minIndex++) {\r
-if (this.value.get (this.minIndex)) {\r
-break;\r
-}}\r
-}if (r == this.maxIndex) {\r
-for (this.maxIndex = this.maxIndex - 1; this.minIndex <= this.maxIndex; this.maxIndex--) {\r
-if (this.value.get (this.maxIndex)) {\r
-break;\r
-}}\r
-}if (this.isSelectionEmpty ()) {\r
-this.minIndex = 2147483647;\r
-this.maxIndex = -1;\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "setLeadAnchorNotificationEnabled", \r
-function (flag) {\r
-this.leadAnchorNotificationEnabled = flag;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isLeadAnchorNotificationEnabled", \r
-function () {\r
-return this.leadAnchorNotificationEnabled;\r
-});\r
-Clazz.defineMethod (c$, "updateLeadAnchorIndices", \r
- function (anchorIndex, leadIndex) {\r
-if (this.leadAnchorNotificationEnabled) {\r
-if (this.anchorIndex != anchorIndex) {\r
-if (this.anchorIndex != -1) {\r
-this.markAsDirty (this.anchorIndex);\r
-}this.markAsDirty (anchorIndex);\r
-}if (this.leadIndex != leadIndex) {\r
-if (this.leadIndex != -1) {\r
-this.markAsDirty (this.leadIndex);\r
-}this.markAsDirty (leadIndex);\r
-}}this.anchorIndex = anchorIndex;\r
-this.leadIndex = leadIndex;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "contains", \r
- function (a, b, i) {\r
-return (i >= a) && (i <= b);\r
-}, "~N,~N,~N");\r
-Clazz.defineMethod (c$, "changeSelection", \r
- function (clearMin, clearMax, setMin, setMax, clearFirst) {\r
-for (var i = Math.min (setMin, clearMin); i <= Math.max (setMax, clearMax); i++) {\r
-var shouldClear = this.contains (clearMin, clearMax, i);\r
-var shouldSet = this.contains (setMin, setMax, i);\r
-if (shouldSet && shouldClear) {\r
-if (clearFirst) {\r
-shouldClear = false;\r
-} else {\r
-shouldSet = false;\r
-}}if (shouldSet) {\r
-this.set (i);\r
-}if (shouldClear) {\r
-this.clear (i);\r
-}}\r
-this.fireValueChanged ();\r
-}, "~N,~N,~N,~N,~B");\r
-Clazz.defineMethod (c$, "changeSelection", \r
- function (clearMin, clearMax, setMin, setMax) {\r
-this.changeSelection (clearMin, clearMax, setMin, setMax, true);\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "clearSelection", \r
-function () {\r
-this.removeSelectionIntervalImpl (this.minIndex, this.maxIndex, false);\r
-});\r
-Clazz.overrideMethod (c$, "setSelectionInterval", \r
-function (index0, index1) {\r
-if (index0 == -1 || index1 == -1) {\r
-return;\r
-}if (this.getSelectionMode () == 0) {\r
-index0 = index1;\r
-}this.updateLeadAnchorIndices (index0, index1);\r
-var clearMin = this.minIndex;\r
-var clearMax = this.maxIndex;\r
-var setMin = Math.min (index0, index1);\r
-var setMax = Math.max (index0, index1);\r
-this.changeSelection (clearMin, clearMax, setMin, setMax);\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "addSelectionInterval", \r
-function (index0, index1) {\r
-if (index0 == -1 || index1 == -1) {\r
-return;\r
-}if (this.getSelectionMode () == 0) {\r
-this.setSelectionInterval (index0, index1);\r
-return;\r
-}this.updateLeadAnchorIndices (index0, index1);\r
-var clearMin = 2147483647;\r
-var clearMax = -1;\r
-var setMin = Math.min (index0, index1);\r
-var setMax = Math.max (index0, index1);\r
-if (this.getSelectionMode () == 1 && (setMax < this.minIndex - 1 || setMin > this.maxIndex + 1)) {\r
-this.setSelectionInterval (index0, index1);\r
-return;\r
-}this.changeSelection (clearMin, clearMax, setMin, setMax);\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "removeSelectionInterval", \r
-function (index0, index1) {\r
-this.removeSelectionIntervalImpl (index0, index1, true);\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "removeSelectionIntervalImpl", \r
- function (index0, index1, changeLeadAnchor) {\r
-if (index0 == -1 || index1 == -1) {\r
-return;\r
-}if (changeLeadAnchor) {\r
-this.updateLeadAnchorIndices (index0, index1);\r
-}var clearMin = Math.min (index0, index1);\r
-var clearMax = Math.max (index0, index1);\r
-var setMin = 2147483647;\r
-var setMax = -1;\r
-if (this.getSelectionMode () != 2 && clearMin > this.minIndex && clearMax < this.maxIndex) {\r
-clearMax = this.maxIndex;\r
-}this.changeSelection (clearMin, clearMax, setMin, setMax);\r
-}, "~N,~N,~B");\r
-Clazz.defineMethod (c$, "setState", \r
- function (index, state) {\r
-if (state) {\r
-this.set (index);\r
-} else {\r
-this.clear (index);\r
-}}, "~N,~B");\r
-Clazz.overrideMethod (c$, "insertIndexInterval", \r
-function (index, length, before) {\r
-var insMinIndex = (before) ? index : index + 1;\r
-var insMaxIndex = (insMinIndex + length) - 1;\r
-for (var i = this.maxIndex; i >= insMinIndex; i--) {\r
-this.setState (i + length, this.value.get (i));\r
-}\r
-var setInsertedValues = ((this.getSelectionMode () == 0) ? false : this.value.get (index));\r
-for (var i = insMinIndex; i <= insMaxIndex; i++) {\r
-this.setState (i, setInsertedValues);\r
-}\r
-var leadIndex = this.leadIndex;\r
-if (leadIndex > index || (before && leadIndex == index)) {\r
-leadIndex = this.leadIndex + length;\r
-}var anchorIndex = this.anchorIndex;\r
-if (anchorIndex > index || (before && anchorIndex == index)) {\r
-anchorIndex = this.anchorIndex + length;\r
-}if (leadIndex != this.leadIndex || anchorIndex != this.anchorIndex) {\r
-this.updateLeadAnchorIndices (anchorIndex, leadIndex);\r
-}this.fireValueChanged ();\r
-}, "~N,~N,~B");\r
-Clazz.overrideMethod (c$, "removeIndexInterval", \r
-function (index0, index1) {\r
-var rmMinIndex = Math.min (index0, index1);\r
-var rmMaxIndex = Math.max (index0, index1);\r
-var gapLength = (rmMaxIndex - rmMinIndex) + 1;\r
-for (var i = rmMinIndex; i <= this.maxIndex; i++) {\r
-this.setState (i, this.value.get (i + gapLength));\r
-}\r
-var leadIndex = this.leadIndex;\r
-if (leadIndex == 0 && rmMinIndex == 0) {\r
-} else if (leadIndex > rmMaxIndex) {\r
-leadIndex = this.leadIndex - gapLength;\r
-} else if (leadIndex >= rmMinIndex) {\r
-leadIndex = rmMinIndex - 1;\r
-}var anchorIndex = this.anchorIndex;\r
-if (anchorIndex == 0 && rmMinIndex == 0) {\r
-} else if (anchorIndex > rmMaxIndex) {\r
-anchorIndex = this.anchorIndex - gapLength;\r
-} else if (anchorIndex >= rmMinIndex) {\r
-anchorIndex = rmMinIndex - 1;\r
-}if (leadIndex != this.leadIndex || anchorIndex != this.anchorIndex) {\r
-this.updateLeadAnchorIndices (anchorIndex, leadIndex);\r
-}this.fireValueChanged ();\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "setValueIsAdjusting", \r
-function (isAdjusting) {\r
-if (isAdjusting != this.isAdjusting) {\r
-this.isAdjusting = isAdjusting;\r
-this.fireValueChanged (isAdjusting);\r
-}}, "~B");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-var s = ((this.getValueIsAdjusting ()) ? "~" : "=") + this.value.toString ();\r
-return this.getClass ().getName () + " " + Integer.toString (this.hashCode ()) + " " + s;\r
-});\r
-Clazz.defineMethod (c$, "clone", \r
-function () {\r
-var clone = Clazz.superCall (this, javax.swing.DefaultListSelectionModel, "clone", []);\r
-clone.value = this.value.clone ();\r
-clone.listenerList =  new javax.swing.event.EventListenerList ();\r
-return clone;\r
-});\r
-Clazz.overrideMethod (c$, "getAnchorSelectionIndex", \r
-function () {\r
-return this.anchorIndex;\r
-});\r
-Clazz.overrideMethod (c$, "getLeadSelectionIndex", \r
-function () {\r
-return this.leadIndex;\r
-});\r
-Clazz.overrideMethod (c$, "setAnchorSelectionIndex", \r
-function (anchorIndex) {\r
-this.updateLeadAnchorIndices (anchorIndex, this.leadIndex);\r
-this.fireValueChanged ();\r
-}, "~N");\r
-Clazz.defineMethod (c$, "moveLeadSelectionIndex", \r
-function (leadIndex) {\r
-if (leadIndex == -1) {\r
-if (this.anchorIndex != -1) {\r
-return;\r
-}}this.updateLeadAnchorIndices (this.anchorIndex, leadIndex);\r
-this.fireValueChanged ();\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "setLeadSelectionIndex", \r
-function (leadIndex) {\r
-var anchorIndex = this.anchorIndex;\r
-if (leadIndex == -1) {\r
-if (anchorIndex == -1) {\r
-this.updateLeadAnchorIndices (anchorIndex, leadIndex);\r
-this.fireValueChanged ();\r
-}return;\r
-} else if (anchorIndex == -1) {\r
-return;\r
-}if (this.leadIndex == -1) {\r
-this.leadIndex = leadIndex;\r
-}var shouldSelect = this.value.get (this.anchorIndex);\r
-if (this.getSelectionMode () == 0) {\r
-anchorIndex = leadIndex;\r
-shouldSelect = true;\r
-}var oldMin = Math.min (this.anchorIndex, this.leadIndex);\r
-var oldMax = Math.max (this.anchorIndex, this.leadIndex);\r
-var newMin = Math.min (anchorIndex, leadIndex);\r
-var newMax = Math.max (anchorIndex, leadIndex);\r
-this.updateLeadAnchorIndices (anchorIndex, leadIndex);\r
-if (shouldSelect) {\r
-this.changeSelection (oldMin, oldMax, newMin, newMax);\r
-} else {\r
-this.changeSelection (newMin, newMax, oldMin, oldMax, false);\r
-}}, "~N");\r
-Clazz.defineStatics (c$,\r
-"MIN", -1,\r
-"MAX", 2147483647);\r
-});\r
+Clazz.declarePackage ("javax.swing");
+Clazz.load (["javax.swing.ListSelectionModel", "java.util.BitSet", "javax.swing.event.EventListenerList"], "javax.swing.DefaultListSelectionModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ListSelectionEvent", "$.ListSelectionListener"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.selectionMode = 2;
+this.minIndex = 2147483647;
+this.maxIndex = -1;
+this.anchorIndex = -1;
+this.leadIndex = -1;
+this.firstAdjustedIndex = 2147483647;
+this.lastAdjustedIndex = -1;
+this.isAdjusting = false;
+this.firstChangedIndex = 2147483647;
+this.lastChangedIndex = -1;
+this.value = null;
+this.listenerList = null;
+this.leadAnchorNotificationEnabled = true;
+Clazz.instantialize (this, arguments);
+}, javax.swing, "DefaultListSelectionModel", null, [javax.swing.ListSelectionModel, Cloneable]);
+Clazz.prepareFields (c$, function () {
+this.value =  new java.util.BitSet (32);
+this.listenerList =  new javax.swing.event.EventListenerList ();
+});
+Clazz.overrideMethod (c$, "getMinSelectionIndex", 
+function () {
+return this.isSelectionEmpty () ? -1 : this.minIndex;
+});
+Clazz.overrideMethod (c$, "getMaxSelectionIndex", 
+function () {
+return this.maxIndex;
+});
+Clazz.overrideMethod (c$, "getValueIsAdjusting", 
+function () {
+return this.isAdjusting;
+});
+Clazz.overrideMethod (c$, "getSelectionMode", 
+function () {
+return this.selectionMode;
+});
+Clazz.overrideMethod (c$, "setSelectionMode", 
+function (selectionMode) {
+switch (selectionMode) {
+case 0:
+case 1:
+case 2:
+this.selectionMode = selectionMode;
+break;
+default:
+throw  new IllegalArgumentException ("invalid selectionMode");
+}
+}, "~N");
+Clazz.overrideMethod (c$, "isSelectedIndex", 
+function (index) {
+return ((index < this.minIndex) || (index > this.maxIndex)) ? false : this.value.get (index);
+}, "~N");
+Clazz.overrideMethod (c$, "isSelectionEmpty", 
+function () {
+return (this.minIndex > this.maxIndex);
+});
+Clazz.overrideMethod (c$, "addListSelectionListener", 
+function (l) {
+this.listenerList.add (javax.swing.event.ListSelectionListener, l);
+}, "javax.swing.event.ListSelectionListener");
+Clazz.overrideMethod (c$, "removeListSelectionListener", 
+function (l) {
+this.listenerList.remove (javax.swing.event.ListSelectionListener, l);
+}, "javax.swing.event.ListSelectionListener");
+Clazz.defineMethod (c$, "getListSelectionListeners", 
+function () {
+return this.listenerList.getListeners (javax.swing.event.ListSelectionListener);
+});
+Clazz.defineMethod (c$, "fireValueChanged", 
+function (isAdjusting) {
+if (this.lastChangedIndex == -1) {
+return;
+}var oldFirstChangedIndex = this.firstChangedIndex;
+var oldLastChangedIndex = this.lastChangedIndex;
+this.firstChangedIndex = 2147483647;
+this.lastChangedIndex = -1;
+this.fireValueChanged (oldFirstChangedIndex, oldLastChangedIndex, isAdjusting);
+}, "~B");
+Clazz.defineMethod (c$, "fireValueChanged", 
+function (firstIndex, lastIndex) {
+this.fireValueChanged (firstIndex, lastIndex, this.getValueIsAdjusting ());
+}, "~N,~N");
+Clazz.defineMethod (c$, "fireValueChanged", 
+function (firstIndex, lastIndex, isAdjusting) {
+var listeners = this.listenerList.getListenerList ();
+var e = null;
+for (var i = listeners.length - 2; i >= 0; i -= 2) {
+if (listeners[i] === javax.swing.event.ListSelectionListener) {
+if (e == null) {
+e =  new javax.swing.event.ListSelectionEvent (this, firstIndex, lastIndex, isAdjusting);
+}(listeners[i + 1]).valueChanged (e);
+}}
+}, "~N,~N,~B");
+Clazz.defineMethod (c$, "fireValueChanged", 
+ function () {
+if (this.lastAdjustedIndex == -1) {
+return;
+}if (this.getValueIsAdjusting ()) {
+this.firstChangedIndex = Math.min (this.firstChangedIndex, this.firstAdjustedIndex);
+this.lastChangedIndex = Math.max (this.lastChangedIndex, this.lastAdjustedIndex);
+}var oldFirstAdjustedIndex = this.firstAdjustedIndex;
+var oldLastAdjustedIndex = this.lastAdjustedIndex;
+this.firstAdjustedIndex = 2147483647;
+this.lastAdjustedIndex = -1;
+this.fireValueChanged (oldFirstAdjustedIndex, oldLastAdjustedIndex);
+});
+Clazz.defineMethod (c$, "getListeners", 
+function (listenerType) {
+return this.listenerList.getListeners (listenerType);
+}, "Class");
+Clazz.defineMethod (c$, "markAsDirty", 
+ function (r) {
+this.firstAdjustedIndex = Math.min (this.firstAdjustedIndex, r);
+this.lastAdjustedIndex = Math.max (this.lastAdjustedIndex, r);
+}, "~N");
+Clazz.defineMethod (c$, "set", 
+ function (r) {
+if (this.value.get (r)) {
+return;
+}this.value.set (r);
+this.markAsDirty (r);
+this.minIndex = Math.min (this.minIndex, r);
+this.maxIndex = Math.max (this.maxIndex, r);
+}, "~N");
+Clazz.defineMethod (c$, "clear", 
+ function (r) {
+if (!this.value.get (r)) {
+return;
+}this.value.clear (r);
+this.markAsDirty (r);
+if (r == this.minIndex) {
+for (this.minIndex = this.minIndex + 1; this.minIndex <= this.maxIndex; this.minIndex++) {
+if (this.value.get (this.minIndex)) {
+break;
+}}
+}if (r == this.maxIndex) {
+for (this.maxIndex = this.maxIndex - 1; this.minIndex <= this.maxIndex; this.maxIndex--) {
+if (this.value.get (this.maxIndex)) {
+break;
+}}
+}if (this.isSelectionEmpty ()) {
+this.minIndex = 2147483647;
+this.maxIndex = -1;
+}}, "~N");
+Clazz.defineMethod (c$, "setLeadAnchorNotificationEnabled", 
+function (flag) {
+this.leadAnchorNotificationEnabled = flag;
+}, "~B");
+Clazz.defineMethod (c$, "isLeadAnchorNotificationEnabled", 
+function () {
+return this.leadAnchorNotificationEnabled;
+});
+Clazz.defineMethod (c$, "updateLeadAnchorIndices", 
+ function (anchorIndex, leadIndex) {
+if (this.leadAnchorNotificationEnabled) {
+if (this.anchorIndex != anchorIndex) {
+if (this.anchorIndex != -1) {
+this.markAsDirty (this.anchorIndex);
+}this.markAsDirty (anchorIndex);
+}if (this.leadIndex != leadIndex) {
+if (this.leadIndex != -1) {
+this.markAsDirty (this.leadIndex);
+}this.markAsDirty (leadIndex);
+}}this.anchorIndex = anchorIndex;
+this.leadIndex = leadIndex;
+}, "~N,~N");
+Clazz.defineMethod (c$, "contains", 
+ function (a, b, i) {
+return (i >= a) && (i <= b);
+}, "~N,~N,~N");
+Clazz.defineMethod (c$, "changeSelection", 
+ function (clearMin, clearMax, setMin, setMax, clearFirst) {
+for (var i = Math.min (setMin, clearMin); i <= Math.max (setMax, clearMax); i++) {
+var shouldClear = this.contains (clearMin, clearMax, i);
+var shouldSet = this.contains (setMin, setMax, i);
+if (shouldSet && shouldClear) {
+if (clearFirst) {
+shouldClear = false;
+} else {
+shouldSet = false;
+}}if (shouldSet) {
+this.set (i);
+}if (shouldClear) {
+this.clear (i);
+}}
+this.fireValueChanged ();
+}, "~N,~N,~N,~N,~B");
+Clazz.defineMethod (c$, "changeSelection", 
+ function (clearMin, clearMax, setMin, setMax) {
+this.changeSelection (clearMin, clearMax, setMin, setMax, true);
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "clearSelection", 
+function () {
+this.removeSelectionIntervalImpl (this.minIndex, this.maxIndex, false);
+});
+Clazz.overrideMethod (c$, "setSelectionInterval", 
+function (index0, index1) {
+if (index0 == -1 || index1 == -1) {
+return;
+}if (this.getSelectionMode () == 0) {
+index0 = index1;
+}this.updateLeadAnchorIndices (index0, index1);
+var clearMin = this.minIndex;
+var clearMax = this.maxIndex;
+var setMin = Math.min (index0, index1);
+var setMax = Math.max (index0, index1);
+this.changeSelection (clearMin, clearMax, setMin, setMax);
+}, "~N,~N");
+Clazz.overrideMethod (c$, "addSelectionInterval", 
+function (index0, index1) {
+if (index0 == -1 || index1 == -1) {
+return;
+}if (this.getSelectionMode () == 0) {
+this.setSelectionInterval (index0, index1);
+return;
+}this.updateLeadAnchorIndices (index0, index1);
+var clearMin = 2147483647;
+var clearMax = -1;
+var setMin = Math.min (index0, index1);
+var setMax = Math.max (index0, index1);
+if (this.getSelectionMode () == 1 && (setMax < this.minIndex - 1 || setMin > this.maxIndex + 1)) {
+this.setSelectionInterval (index0, index1);
+return;
+}this.changeSelection (clearMin, clearMax, setMin, setMax);
+}, "~N,~N");
+Clazz.overrideMethod (c$, "removeSelectionInterval", 
+function (index0, index1) {
+this.removeSelectionIntervalImpl (index0, index1, true);
+}, "~N,~N");
+Clazz.defineMethod (c$, "removeSelectionIntervalImpl", 
+ function (index0, index1, changeLeadAnchor) {
+if (index0 == -1 || index1 == -1) {
+return;
+}if (changeLeadAnchor) {
+this.updateLeadAnchorIndices (index0, index1);
+}var clearMin = Math.min (index0, index1);
+var clearMax = Math.max (index0, index1);
+var setMin = 2147483647;
+var setMax = -1;
+if (this.getSelectionMode () != 2 && clearMin > this.minIndex && clearMax < this.maxIndex) {
+clearMax = this.maxIndex;
+}this.changeSelection (clearMin, clearMax, setMin, setMax);
+}, "~N,~N,~B");
+Clazz.defineMethod (c$, "setState", 
+ function (index, state) {
+if (state) {
+this.set (index);
+} else {
+this.clear (index);
+}}, "~N,~B");
+Clazz.overrideMethod (c$, "insertIndexInterval", 
+function (index, length, before) {
+var insMinIndex = (before) ? index : index + 1;
+var insMaxIndex = (insMinIndex + length) - 1;
+for (var i = this.maxIndex; i >= insMinIndex; i--) {
+this.setState (i + length, this.value.get (i));
+}
+var setInsertedValues = ((this.getSelectionMode () == 0) ? false : this.value.get (index));
+for (var i = insMinIndex; i <= insMaxIndex; i++) {
+this.setState (i, setInsertedValues);
+}
+var leadIndex = this.leadIndex;
+if (leadIndex > index || (before && leadIndex == index)) {
+leadIndex = this.leadIndex + length;
+}var anchorIndex = this.anchorIndex;
+if (anchorIndex > index || (before && anchorIndex == index)) {
+anchorIndex = this.anchorIndex + length;
+}if (leadIndex != this.leadIndex || anchorIndex != this.anchorIndex) {
+this.updateLeadAnchorIndices (anchorIndex, leadIndex);
+}this.fireValueChanged ();
+}, "~N,~N,~B");
+Clazz.overrideMethod (c$, "removeIndexInterval", 
+function (index0, index1) {
+var rmMinIndex = Math.min (index0, index1);
+var rmMaxIndex = Math.max (index0, index1);
+var gapLength = (rmMaxIndex - rmMinIndex) + 1;
+for (var i = rmMinIndex; i <= this.maxIndex; i++) {
+this.setState (i, this.value.get (i + gapLength));
+}
+var leadIndex = this.leadIndex;
+if (leadIndex == 0 && rmMinIndex == 0) {
+} else if (leadIndex > rmMaxIndex) {
+leadIndex = this.leadIndex - gapLength;
+} else if (leadIndex >= rmMinIndex) {
+leadIndex = rmMinIndex - 1;
+}var anchorIndex = this.anchorIndex;
+if (anchorIndex == 0 && rmMinIndex == 0) {
+} else if (anchorIndex > rmMaxIndex) {
+anchorIndex = this.anchorIndex - gapLength;
+} else if (anchorIndex >= rmMinIndex) {
+anchorIndex = rmMinIndex - 1;
+}if (leadIndex != this.leadIndex || anchorIndex != this.anchorIndex) {
+this.updateLeadAnchorIndices (anchorIndex, leadIndex);
+}this.fireValueChanged ();
+}, "~N,~N");
+Clazz.overrideMethod (c$, "setValueIsAdjusting", 
+function (isAdjusting) {
+if (isAdjusting != this.isAdjusting) {
+this.isAdjusting = isAdjusting;
+this.fireValueChanged (isAdjusting);
+}}, "~B");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+var s = ((this.getValueIsAdjusting ()) ? "~" : "=") + this.value.toString ();
+return this.getClass ().getName () + " " + Integer.toString (this.hashCode ()) + " " + s;
+});
+Clazz.defineMethod (c$, "clone", 
+function () {
+var clone = Clazz.superCall (this, javax.swing.DefaultListSelectionModel, "clone", []);
+clone.value = this.value.clone ();
+clone.listenerList =  new javax.swing.event.EventListenerList ();
+return clone;
+});
+Clazz.overrideMethod (c$, "getAnchorSelectionIndex", 
+function () {
+return this.anchorIndex;
+});
+Clazz.overrideMethod (c$, "getLeadSelectionIndex", 
+function () {
+return this.leadIndex;
+});
+Clazz.overrideMethod (c$, "setAnchorSelectionIndex", 
+function (anchorIndex) {
+this.updateLeadAnchorIndices (anchorIndex, this.leadIndex);
+this.fireValueChanged ();
+}, "~N");
+Clazz.defineMethod (c$, "moveLeadSelectionIndex", 
+function (leadIndex) {
+if (leadIndex == -1) {
+if (this.anchorIndex != -1) {
+return;
+}}this.updateLeadAnchorIndices (this.anchorIndex, leadIndex);
+this.fireValueChanged ();
+}, "~N");
+Clazz.overrideMethod (c$, "setLeadSelectionIndex", 
+function (leadIndex) {
+var anchorIndex = this.anchorIndex;
+if (leadIndex == -1) {
+if (anchorIndex == -1) {
+this.updateLeadAnchorIndices (anchorIndex, leadIndex);
+this.fireValueChanged ();
+}return;
+} else if (anchorIndex == -1) {
+return;
+}if (this.leadIndex == -1) {
+this.leadIndex = leadIndex;
+}var shouldSelect = this.value.get (this.anchorIndex);
+if (this.getSelectionMode () == 0) {
+anchorIndex = leadIndex;
+shouldSelect = true;
+}var oldMin = Math.min (this.anchorIndex, this.leadIndex);
+var oldMax = Math.max (this.anchorIndex, this.leadIndex);
+var newMin = Math.min (anchorIndex, leadIndex);
+var newMax = Math.max (anchorIndex, leadIndex);
+this.updateLeadAnchorIndices (anchorIndex, leadIndex);
+if (shouldSelect) {
+this.changeSelection (oldMin, oldMax, newMin, newMax);
+} else {
+this.changeSelection (newMin, newMax, oldMin, oldMax, false);
+}}, "~N");
+Clazz.defineStatics (c$,
+"MIN", -1,
+"MAX", 2147483647);
+});