Class SwingTimer

java.lang.Object
com.inductiveautomation.snap.swing.SwingTimer

public class SwingTimer extends Object
A UITimer for Swing and SwingOwner.
  • Constructor Details

    • SwingTimer

      public SwingTimer()
  • Method Details

    • init

      public SwingTimer init(SwingOwner anOwner, String aName, int aPeriod)
      Creates a new timer for name and period.
    • getOwner

      public SwingOwner getOwner()
      Returns the owner.
    • getName

      public String getName()
      Returns the name.
    • getPeriod

      public int getPeriod()
      Returns the time in milliseconds between firings.
    • setPeriod

      public void setPeriod(int aPeriod)
      Sets the time in milliseconds between firings.
    • isRunning

      public boolean isRunning()
      Returns whether timer is running.
    • getTime

      public long getTime()
      Returns the number of milliseconds timer has been active since start.
    • getCount

      public int getCount()
      Returns the number of times the timer has fired.
    • start

      public void start()
      Start timer.
    • start

      public void start(long aDelay)
      Start timer.
    • stop

      public void stop()
      Stop timer.
    • sendEventInUIThread

      protected void sendEventInUIThread()
      Sends the event in UI Thread.
    • sendEvent

      protected void sendEvent()
      Sends the event.
    • incrementSendCount

      protected void incrementSendCount()
      Increments the send count.