diff options
author | Mark Wielaard <mark@gcc.gnu.org> | 2006-08-14 23:12:35 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2006-08-14 23:12:35 +0000 |
commit | ac1ed908de999523efc36f38e69bca1aadfe0808 (patch) | |
tree | 97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/javax/swing/event | |
parent | abab460491408e05ea93fb85e1975296a87df504 (diff) | |
download | gcc-ac1ed908de999523efc36f38e69bca1aadfe0808.zip gcc-ac1ed908de999523efc36f38e69bca1aadfe0808.tar.gz gcc-ac1ed908de999523efc36f38e69bca1aadfe0808.tar.bz2 |
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
Diffstat (limited to 'libjava/classpath/javax/swing/event')
4 files changed, 75 insertions, 41 deletions
diff --git a/libjava/classpath/javax/swing/event/EventListenerList.java b/libjava/classpath/javax/swing/event/EventListenerList.java index 6a2f34e..bde8b3c 100644 --- a/libjava/classpath/javax/swing/event/EventListenerList.java +++ b/libjava/classpath/javax/swing/event/EventListenerList.java @@ -108,7 +108,7 @@ public class EventListenerList * An array with all currently registered listeners. The array has * twice as many elements as there are listeners. For an even * integer <code>i</code>, <code>listenerList[i]</code> indicates - * the registered class, and <code>listenerList[i+1]</code> is the + * the registered class, and <code>listenerList[i + 1]</code> is the * listener. */ protected transient Object[] listenerList = NO_LISTENERS; diff --git a/libjava/classpath/javax/swing/event/ListDataEvent.java b/libjava/classpath/javax/swing/event/ListDataEvent.java index 2a6e6db..897fc12 100644 --- a/libjava/classpath/javax/swing/event/ListDataEvent.java +++ b/libjava/classpath/javax/swing/event/ListDataEvent.java @@ -1,5 +1,5 @@ /* ListDataEvent.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -41,6 +41,9 @@ package javax.swing.event; import java.util.EventObject; /** + * An event that contains information about a modification to the content of + * a list. + * * @author Andrew Selkirk * @author Ronald Veldema */ @@ -48,32 +51,46 @@ public class ListDataEvent extends EventObject { private static final long serialVersionUID = 2510353260071004774L; + /** An event type indicating that the list content has been modified. */ public static final int CONTENTS_CHANGED = 0; + + /** An event type indicating that an interval has been added to the list. */ public static final int INTERVAL_ADDED = 1; + + /** + * An event type indicating that an interval has been removed from the + * list. + */ public static final int INTERVAL_REMOVED = 2; - private int type = 0; - private int index0 = 0; - private int index1 = 0; + private int type; + private int index0; + private int index1; /** * Creates a <code>ListDataEvent</code> object. * - * @param source The source of the event. - * @param type The type of the event - * @param index0 Bottom of range - * @param index1 Top of range + * @param source the source of the event (<code>null</code> not permitted). + * @param type the type of the event (should be one of + * {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or + * {@link #INTERVAL_REMOVED}, although this is not enforced). + * @param index0 the index for one end of the modified range of list + * elements. + * @param index1 the index for the other end of the modified range of list + * elements. */ public ListDataEvent(Object source, int type, int index0, int index1) { super(source); this.type = type; - this.index0 = index0; - this.index1 = index1; + this.index0 = Math.min(index0, index1); + this.index1 = Math.max(index0, index1); } /** - * Returns the bottom index. + * Returns the index of the first item in the range of modified list items. + * + * @return The index of the first item in the range of modified list items. */ public int getIndex0() { @@ -81,7 +98,9 @@ public class ListDataEvent extends EventObject } /** - * Returns the top index. + * Returns the index of the last item in the range of modified list items. + * + * @return The index of the last item in the range of modified list items. */ public int getIndex1() { @@ -89,10 +108,25 @@ public class ListDataEvent extends EventObject } /** - * Returns the type of this event. + * Returns a code representing the type of this event, which is usually one + * of {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or + * {@link #INTERVAL_REMOVED}. + * + * @return The event type. */ public int getType() { return type; } + + /** + * Returns a string representing the state of this event. + * + * @return A string. + */ + public String toString() + { + return getClass().getName() + "[type=" + type + ",index0=" + index0 + + ",index1=" + index1 + "]"; + } } diff --git a/libjava/classpath/javax/swing/event/MenuEvent.java b/libjava/classpath/javax/swing/event/MenuEvent.java index 35bb5b9..8ba3292 100644 --- a/libjava/classpath/javax/swing/event/MenuEvent.java +++ b/libjava/classpath/javax/swing/event/MenuEvent.java @@ -1,5 +1,5 @@ /* MenuEvent.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -37,7 +37,6 @@ exception statement from your version. */ package javax.swing.event; -// Imports import java.util.EventObject; /** @@ -45,15 +44,16 @@ import java.util.EventObject; * @author Andrew Selkirk * @author Ronald Veldema */ -public class MenuEvent extends EventObject { - - /** - * Constructor MenuEvent - * @param source Source object - */ - public MenuEvent(Object source) { - super(source); - } // MenuEvent() - - -} // MenuEvent +public class MenuEvent extends EventObject +{ + + /** + * Constructor MenuEvent + * @param source Source object + */ + public MenuEvent(Object source) + { + super(source); + } + +} diff --git a/libjava/classpath/javax/swing/event/TreeExpansionListener.java b/libjava/classpath/javax/swing/event/TreeExpansionListener.java index 08507a0..45a5ef9 100644 --- a/libjava/classpath/javax/swing/event/TreeExpansionListener.java +++ b/libjava/classpath/javax/swing/event/TreeExpansionListener.java @@ -37,26 +37,26 @@ exception statement from your version. */ package javax.swing.event; -// Imports import java.util.EventListener; /** * TreeExpansionListener public interface * @author Andrew Selkirk */ -public interface TreeExpansionListener extends EventListener { +public interface TreeExpansionListener extends EventListener +{ - /** - * Tree collapsed - * @param event Tree Expansion Event - */ - void treeCollapsed(TreeExpansionEvent event); + /** + * Tree collapsed + * @param event Tree Expansion Event + */ + void treeCollapsed(TreeExpansionEvent event); - /** - * Tree expanded - * @param event Tree Expansion Event - */ - void treeExpanded(TreeExpansionEvent event); + /** + * Tree expanded + * @param event Tree Expansion Event + */ + void treeExpanded(TreeExpansionEvent event); -} // TreeExpansionListener +} |