@@ -81,7 +81,7 @@ public final class NewsUpdater {
8181 private Timer timer ;
8282
8383 // 1 Stunde in Millisekunden
84- private static final int INVISIBLE_DELAY = 60 * 60 * 1000 ;
84+ private static final int INVISIBLE_DELAY = 60 * 1000 ;
8585
8686 public NewsUpdater (NewsMiniWidgetPanel panel , String initialText , int initialSpeed ) {
8787 this .mainNewsWidgetPanel = panel ;
@@ -127,6 +127,7 @@ private synchronized void schedule(int delayMs) {
127127 return ;
128128 }
129129 timer .setInitialDelay (delayMs );
130+ timer .setDelay (delayMs );
130131 timer .restart ();
131132 }
132133
@@ -135,20 +136,26 @@ private synchronized void schedule(int delayMs) {
135136 public synchronized void setText (String newText ) {
136137 this .text = " " + newText + " " ;
137138 if (timer != null ) {
139+ timer .setInitialDelay (this .scrollSpeed );
140+ timer .setDelay (this .scrollSpeed );
138141 timer .restart (); // sofortige Wirkung
139142 }
140143 }
141144
142145 public synchronized void setScrollSpeed (int speed ) {
143146 this .scrollSpeed = speed ;
144147 if (timer != null ) {
148+ timer .setInitialDelay (this .scrollSpeed );
149+ timer .setDelay (this .scrollSpeed );
145150 timer .restart ();
146151 }
147152 }
148153
149154 public synchronized void setVisible (boolean value ) {
150155 this .visible = value ;
151156 if (timer != null ) {
157+ timer .setInitialDelay (this .scrollSpeed );
158+ timer .setDelay (this .scrollSpeed );
152159 timer .restart ();
153160 }
154161 }
0 commit comments