diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-28 20:47:50 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-28 20:47:50 +0000 |
commit | 14321893db58a975cf737cf18631ce7d0ab28cdf (patch) | |
tree | 06eb652b3609caca03d3e01b21e026495497dc38 /libjava/javax | |
parent | 0ed5554eefb0055a4d5d5b5ed2e58fed7bf6b806 (diff) | |
download | gcc-14321893db58a975cf737cf18631ce7d0ab28cdf.tar.gz |
2005-04-28 Tom Tromey <tromey@redhat.com>
* javax/swing/Timer.java
(drainEvents, queueEvent): Now package-private.
2005-04-28 Audrius Meskauskas <audriusa@bluewin.ch>
* javax/swing/Timer.java
(constructor): Assigning initialDelay.
2005-04-28 Audrius Meskauskas <audriusa@bluewin.ch>
* javax/swing/Timer.java
(Waker.run): firing the first action event.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98939 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/javax')
-rw-r--r-- | libjava/javax/swing/Timer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libjava/javax/swing/Timer.java b/libjava/javax/swing/Timer.java index eac5832a381..5b5380f87e4 100644 --- a/libjava/javax/swing/Timer.java +++ b/libjava/javax/swing/Timer.java @@ -70,6 +70,8 @@ public class Timer { sleep(initialDelay); + queueEvent(); + while (running) { try @@ -92,6 +94,8 @@ public class Timer } catch (Exception e) { + // The timer is no longer running. + running = false; } } } @@ -189,6 +193,7 @@ public class Timer public Timer(int d, ActionListener listener) { delay = d; + initialDelay = d; if (listener != null) addActionListener(listener); @@ -468,7 +473,7 @@ public class Timer * Post a scheduled event to the event queue. * Package-private to avoid an accessor method. */ - private void queueEvent() + void queueEvent() { synchronized (queueLock) { |