Class UpdatingEventController

java.lang.Object
xal.extension.scan.UpdatingEventController

public class UpdatingEventController extends Object
This controller calls actionPerformed method of all registered listeners upon external requests though the call to the "update" method, but with the interval not less that value defined for the instance of this class
Author:
shishlo
  • Constructor Details

    • UpdatingEventController

      public UpdatingEventController()
      Constructor for the UpdatingPlotController object
  • Method Details

    • setUpdateTime

      public void setUpdateTime(double tm)
      Sets the minimal update time.
      Parameters:
      tm - The new minimal sleep time value in sec
    • getUpdateTime

      public double getUpdateTime()
      Returns the minimal update time.
      Returns:
      The minimal sleep time value in sec
    • inProgress

      public boolean inProgress()
      Returns true if the updating has not been accomplished.
      Returns:
      true of false
    • isStop

      public boolean isStop()
      Returns the stop flag
      Returns:
      The stop value
    • setStop

      public void setStop(boolean stop)
      Sets the stop flag
      Parameters:
      stop - The new stop value
    • update

      public void update()
      Reluctantly calls the actionPerformed method of registered listeners.
    • addActionListener

      public void addActionListener(ActionListener al)
      Adds the new ActionListener.
      Parameters:
      al - The new ActionListener.
    • removeActionListener

      public void removeActionListener(ActionListener al)
      Removes the ActionListener.
      Parameters:
      al - The ActionListener to be removed.
    • getActionListeners

      public Vector<ActionListener> getActionListeners()
      Returns all ActionListeners as a Vector
      Returns:
      The vector with references to ActionListeners
    • getSyncObj

      public Object getSyncObj()
      Gets the syncObj attribute of the UpdatingEventController object
      Returns:
      The syncObj value
    • main

      public static void main(String[] args)
      Description of the Method
      Parameters:
      args - Description of the Parameter