Skip to content

Commit 32b515a

Browse files
authored
Merge pull request #298 from cubitusgh2/MN_EFA_099_METEO_LEVEL_WIDGETS_250Base
Update NewsMiniWidget.java
2 parents c8ed6fa + 5f930d4 commit 32b515a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

de/nmichael/efa/gui/widgets/NewsMiniWidget.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)