diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
commit | 97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/java/awt/dnd/DragGestureRecognizer.java | |
parent | c648dedbde727ca3f883bb5fd773aa4af70d3369 (diff) | |
download | gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.zip gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.gz gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.bz2 |
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/classpath/java/awt/dnd/DragGestureRecognizer.java')
-rw-r--r-- | libjava/classpath/java/awt/dnd/DragGestureRecognizer.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libjava/classpath/java/awt/dnd/DragGestureRecognizer.java b/libjava/classpath/java/awt/dnd/DragGestureRecognizer.java index 32bbc56..3973e52 100644 --- a/libjava/classpath/java/awt/dnd/DragGestureRecognizer.java +++ b/libjava/classpath/java/awt/dnd/DragGestureRecognizer.java @@ -1,5 +1,5 @@ /* DragGestureRecognizer.java -- - Copyright (C) 2002,2006 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -38,8 +38,6 @@ exception statement from your version. */ package java.awt.dnd; -import gnu.classpath.NotImplementedException; - import java.awt.Component; import java.awt.Point; import java.awt.event.InputEvent; @@ -52,6 +50,8 @@ import java.util.TooManyListenersException; /** * STUBBED + * @author Michael Koch (konqueror@gmx.de) + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.2 */ public abstract class DragGestureRecognizer implements Serializable @@ -65,7 +65,7 @@ public abstract class DragGestureRecognizer implements Serializable protected Component component; protected transient DragGestureListener dragGestureListener; protected int sourceActions; - protected ArrayList events = new ArrayList(); + protected ArrayList<InputEvent> events = new ArrayList<InputEvent>(); protected DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl) @@ -127,11 +127,12 @@ public abstract class DragGestureRecognizer implements Serializable return events.size() > 0 ? (InputEvent) events.get(0) : null; } + /** + * Resets the recognizer. If a gesture is currently recognize, discard it. + */ public void resetRecognizer() - throws NotImplementedException { - events = new ArrayList(); - // FIXME: Not implemented fully. + events.clear(); } /** @@ -164,6 +165,7 @@ public abstract class DragGestureRecognizer implements Serializable if(dragGestureListener != null) dragGestureListener.dragGestureRecognized (new DragGestureEvent(this, dragAction, p, events)); + resetRecognizer(); } protected void appendEvent(InputEvent e) |