Package 

Class Redrawer

  • All Implemented Interfaces:
    java.lang.Runnable

    
    public class Redrawer
     implements Runnable
                        

    Utility class for invoking Plot.redraw() on a background thread at a set frequency.

    • Constructor Summary

      Constructors 
      Constructor Description
      Redrawer(List<Plot> plots, float maxRefreshRate, boolean startImmediately)
      Redrawer(Plot plot, float maxRefreshRate, boolean startImmediately)
    • Method Summary

      Modifier and Type Method Description
      synchronized void pause() Temporarily stop redrawing the plot.
      synchronized void start() Start/resume redrawing the plot.
      synchronized void finish() Internally, this causesthe refresh thread to exit.
      void run()
      void setMaxRefreshRate(float refreshRate) Set the maximum refresh rate that Redrawer should use.
      • Methods inherited from class java.lang.Runnable

        run
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Redrawer

        Redrawer(List<Plot> plots, float maxRefreshRate, boolean startImmediately)
        Parameters:
        plots - List of Plot instances to be redrawn
        maxRefreshRate - Desired frequency at which to redraw plots.
        startImmediately - If true, invokes run() immediately after construction.
      • Redrawer

        Redrawer(Plot plot, float maxRefreshRate, boolean startImmediately)
    • Method Detail

      • pause

         synchronized void pause()

        Temporarily stop redrawing the plot.

      • start

         synchronized void start()

        Start/resume redrawing the plot.

      • finish

         synchronized void finish()

        Internally, this causesthe refresh thread to exit. Should always be calledbefore exiting the application.

      • run

         void run()
      • setMaxRefreshRate

         void setMaxRefreshRate(float refreshRate)

        Set the maximum refresh rate that Redrawer should use. Actualrefresh rate could be slower.

        Parameters:
        refreshRate - Refresh rate in Hz.