* Patch: DnDTest fix
@ 2006-08-15 15:39 Lillian Angel
0 siblings, 0 replies; only message in thread
From: Lillian Angel @ 2006-08-15 15:39 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
Another small fix
2006-08-13 Lillian Angel <langel@redhat.com>
* gnu/testlet/java/awt/dnd/DnDTest.java:
(MouseThread.run): Reformatted and set unsuccessful
field to true in catch-block.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 2386 bytes --]
Index: gnu/testlet/java/awt/dnd/DnDTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/dnd/DnDTest.java,v
retrieving revision 1.3
diff -u -r1.3 DnDTest.java
--- gnu/testlet/java/awt/dnd/DnDTest.java 14 Aug 2006 17:56:22 -0000 1.3
+++ gnu/testlet/java/awt/dnd/DnDTest.java 15 Aug 2006 15:36:43 -0000
@@ -160,39 +160,45 @@
r.mouseRelease(InputEvent.BUTTON1_MASK);
}
- class MouseThread extends Thread
+ class MouseThread
+ extends Thread
{
- public boolean shouldStop;
- public void run()
- {
- try
- {
- shouldStop=false;
- Robot robot=new Robot();
+ public boolean shouldStop;
- for(;;)
- {
-
- for(int i=start;i<end;i++)
- {
- if(shouldStop)break;
- robot.mouseMove(150,i);
- yield();
- }
- for(int i=end;i>start;i--)
- {
- if(shouldStop)break;
- robot.mouseMove(150,i);
- yield();
- }
- if(shouldStop)break;
- }
- }
- catch(Exception e)
- {
- System.out.println(e);
- }
- }
+ public void run()
+ {
+ try
+ {
+ shouldStop = false;
+ Robot robot = new Robot();
+
+ for (;;)
+ {
+ for (int i = start; i < end; i++)
+ {
+ if (shouldStop)
+ break;
+
+ robot.mouseMove(150, i);
+ yield();
+ }
+ for (int i = end; i > start; i--)
+ {
+ if (shouldStop)
+ break;
+
+ robot.mouseMove(150, i);
+ yield();
+ }
+ if (shouldStop)
+ break;
+ }
+ }
+ catch (Exception e)
+ {
+ unsuccessful = true;
+ }
+ }
}
public void actionPerformed(ActionEvent e)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-15 15:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-15 15:39 Patch: DnDTest fix Lillian Angel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).