Class AutoSaveManager

java.lang.Object
java.util.TimerTask
com.example.brickpaint.AutoSaveManager
All Implemented Interfaces:
Runnable

public class AutoSaveManager extends TimerTask
Threading implementation of a timer that updates a visual countdown and runs save all when completed
  • Field Details

    • time

      public int time
  • Constructor Details

    • AutoSaveManager

      public AutoSaveManager(int numb, ButtonManager main)
      Default constructor for the AutoSaveManager class
      Parameters:
      numb - The time interval in seconds between saves
      main - The ButtonManager class that owns this thread
  • Method Details

    • run

      public void run()
      The tasks that the Thread shall run, it will count down the timer until it hits 0 updating the label as needed when it reaches 0 it will fire the saveAll method in the controller class
      Specified by:
      run in interface Runnable
      Specified by:
      run in class TimerTask