[Patch] javax.swing.Timer
Michael Koch
konqueror@gmx.de
Thu Apr 28 20:49:00 GMT 2005
Hi list,
I just commited the attached patch to merge the latest fixes for
javax.swing.Timer from GNu classpath to HEAD.
Michael
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.
-------------- next part --------------
Index: javax/swing/Timer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/Timer.java,v
retrieving revision 1.13
diff -u -r1.13 Timer.java
--- javax/swing/Timer.java 28 Apr 2005 20:25:43 -0000 1.13
+++ javax/swing/Timer.java 28 Apr 2005 20:47:21 -0000
@@ -70,6 +70,8 @@
{
sleep(initialDelay);
+ queueEvent();
+
while (running)
{
try
@@ -92,6 +94,8 @@
}
catch (Exception e)
{
+ // The timer is no longer running.
+ running = false;
}
}
}
@@ -189,6 +193,7 @@
public Timer(int d, ActionListener listener)
{
delay = d;
+ initialDelay = d;
if (listener != null)
addActionListener(listener);
@@ -468,7 +473,7 @@
* Post a scheduled event to the event queue.
* Package-private to avoid an accessor method.
*/
- private void queueEvent()
+ void queueEvent()
{
synchronized (queueLock)
{
More information about the Java-patches
mailing list