Imported GNU Classpath 0.92

2006-08-14  Mark Wielaard  <mark@klomp.org>

       Imported GNU Classpath 0.92
       * HACKING: Add more importing hints. Update automake version
       requirement.

       * configure.ac (gconf-peer): New enable AC argument.
       Add --disable-gconf-peer and --enable-default-preferences-peer
       to classpath configure when gconf is disabled.
       * scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
       gnu/java/awt/dnd/peer/gtk to bc. Classify
       gnu/java/security/Configuration.java as generated source file.

       * gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
       gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
       gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
       gnu/java/lang/management/VMThreadMXBeanImpl.java,
       gnu/java/lang/management/VMMemoryMXBeanImpl.java,
       gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
       classes.
       * java/lang/management/VMManagementFactory.java: Likewise.
       * java/net/VMURLConnection.java: Likewise.
       * gnu/java/nio/VMChannel.java: Likewise.

       * java/lang/Thread.java (getState): Add stub implementation.
       * java/lang/Class.java (isEnum): Likewise.
       * java/lang/Class.h (isEnum): Likewise.

       * gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.

       * javax/naming/spi/NamingManager.java: New override for StackWalker
       functionality.

       * configure, sources.am, Makefile.in, gcj/Makefile.in,
       include/Makefile.in, testsuite/Makefile.in: Regenerated.

From-SVN: r116139
This commit is contained in:
Mark Wielaard 2006-08-14 23:12:35 +00:00
parent abab460491
commit ac1ed908de
1294 changed files with 99479 additions and 35933 deletions

View file

@ -150,9 +150,14 @@ public class DefaultListSelectionModel implements Cloneable,
boolean setLeadCalledFromAdd = false;
/**
* Gets the value of the {@link #selectionMode} property.
*
* @return The current value of the property
* Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
* {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}. The default value is
* {@link #MULTIPLE_INTERVAL_SELECTION}.
*
* @return The selection mode.
*
* @see #setSelectionMode(int)
*/
public int getSelectionMode()
{
@ -187,13 +192,19 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #anchorSelectionIndex} property.
*
* @param anchorIndex The new property value
* @param index The new property value
*
* @see #getAnchorSelectionIndex
*/
public void setAnchorSelectionIndex(int anchorIndex)
public void setAnchorSelectionIndex(int index)
{
anchorSelectionIndex = anchorIndex;
if (anchorSelectionIndex != index)
{
int old = anchorSelectionIndex;
anchorSelectionIndex = index;
if (leadAnchorNotificationEnabled)
fireValueChanged(index, old);
}
}
/**
@ -459,12 +470,14 @@ public class DefaultListSelectionModel implements Cloneable,
if (index0 == -1 || index1 == -1)
return;
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval(index0, index1);
else
{
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
oldSel = sel.clone();
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval(index0, index1);
// COMPAT: Like Sun (but not like IBM), we allow calls to
// addSelectionInterval when selectionMode is
@ -503,6 +516,7 @@ public class DefaultListSelectionModel implements Cloneable,
sel.set(lo, hi+1);
fireDifference(sel, (BitSet) oldSel);
}
}
}
@ -588,27 +602,82 @@ public class DefaultListSelectionModel implements Cloneable,
* the current selection mode is <code>SINGLE_SELECTION</code> only the
* index <code>index2</code> is selected.
*
* @param index0 The low end of the new selection
* @param index1 The high end of the new selection
* @param anchor the anchor selection index.
* @param lead the lead selection index.
*/
public void setSelectionInterval(int index0, int index1)
public void setSelectionInterval(int anchor, int lead)
{
if (index0 == -1 || index1 == -1)
if (anchor == -1 || lead == -1)
return;
BitSet oldSel = (BitSet) sel.clone();
sel.clear();
if (selectionMode == SINGLE_SELECTION)
index0 = index1;
{
int lo = lead;
int hi = lead;
int selected = sel.nextSetBit(0);
if (selected == lead)
return; // the selection is not changing
if (selected >= 0)
{
lo = Math.min(lo, selected);
hi = Math.max(hi, selected);
}
if (anchorSelectionIndex >= 0)
{
lo = Math.min(lo, anchorSelectionIndex);
hi = Math.max(hi, anchorSelectionIndex);
}
sel.clear();
sel.set(lead);
leadSelectionIndex = lead;
anchorSelectionIndex = lead;
fireValueChanged(lo, hi);
}
else if (selectionMode == SINGLE_INTERVAL_SELECTION)
{
// determine the current interval
int first = sel.nextSetBit(0);
int last = first;
if (first >= 0)
last += (sel.cardinality() - 1);
// update the selection
int lo = Math.min(anchor, lead);
int hi = Math.max(anchor, lead);
if (lo == first && hi == last)
return; // selected interval is not being changed
sel.clear();
sel.set(lo, hi + 1);
// include the old selection in the event range
if (first >= 0)
lo = Math.min(lo, first);
if (last >= 0)
hi = Math.max(hi, last);
if (anchorSelectionIndex >= 0)
{
lo = Math.min(lo, anchorSelectionIndex);
hi = Math.max(hi, anchorSelectionIndex);
}
anchorSelectionIndex = anchor;
leadSelectionIndex = lead;
fireValueChanged(lo, hi);
}
else
{
BitSet oldSel = (BitSet) sel.clone();
sel.clear();
if (selectionMode == SINGLE_SELECTION)
anchor = lead;
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
sel.set(lo, hi+1);
// update the anchorSelectionIndex and leadSelectionIndex variables
setAnchorSelectionIndex(index0);
leadSelectionIndex=index1;
int lo = Math.min(anchor, lead);
int hi = Math.max(anchor, lead);
sel.set(lo, hi+1);
// update the anchorSelectionIndex and leadSelectionIndex variables
setAnchorSelectionIndex(anchor);
leadSelectionIndex = lead;
fireDifference(sel, oldSel);
fireDifference(sel, oldSel);
}
}
/**