tuned, following hints by IntelliJ IDEA;
authorwenzelm
Fri, 12 Aug 2022 11:47:41 +0200
changeset 75811 74d6d09e1a36
parent 75810 51867c8ad109
child 75812 d6e8d12494be
tuned, following hints by IntelliJ IDEA;
src/Tools/jEdit/src/process_indicator.scala
--- a/src/Tools/jEdit/src/process_indicator.scala	Fri Aug 12 11:47:12 2022 +0200
+++ b/src/Tools/jEdit/src/process_indicator.scala	Fri Aug 12 11:47:41 2022 +0200
@@ -27,26 +27,24 @@
   private class Animation extends ImageIcon(passive_icon) {
     private var current_frame = 0
     private val timer =
-      new Timer(0, new ActionListener {
-        override def actionPerformed(e: ActionEvent): Unit = {
-          current_frame = (current_frame + 1) % active_icons.length
-          setImage(active_icons(current_frame))
-          label.repaint()
-        }
+      new Timer(0, { (_: ActionEvent) =>
+        current_frame = (current_frame + 1) % active_icons.length
+        setImage(active_icons(current_frame))
+        label.repaint()
       })
     timer.setRepeats(true)
 
     def update(rate: Int): Unit = {
       if (rate == 0) {
         setImage(passive_icon)
-        timer.stop
+        timer.stop()
         label.repaint()
       }
       else {
         val delay = 1000 / rate
         timer.setInitialDelay(delay)
         timer.setDelay(delay)
-        timer.restart
+        timer.restart()
       }
     }
   }