Пример #1
0
 def __init__(self, timeInterval, function, parameters=[], repeat=True):
    """Specify time interval (in milliseconds), which function to call when the time interval has passed
       and the parameters to pass this function, and whether to repeat (True) or do it only once."""
       
    self.timeListener = TimerListener(function, parameters)    # define the timer event listener and provide function and parameters to be called 
    
    JTimer.__init__(self, int(timeInterval), self.timeListener)
    self.setRepeats( repeat )      # should we do this once or forever? 
Пример #2
0
    def __init__(self, timeInterval, function, parameters=[], repeat=True):
        """Specify time interval (in milliseconds), which function to call when the time interval has passed
         and the parameters to pass this function, and whether to repeat (True) or do it only once."""

        self.timeListener = TimerListener(
            function, parameters
        )  # define the timer event listener and provide function and parameters to be called

        JTimer.__init__(self, int(timeInterval), self.timeListener)
        self.setRepeats(repeat)  # should we do this once or forever?
Пример #3
0
   def __init__(self, timeInterval, function, parameters=[], repeat=True):
      """Specify time interval (in milliseconds), which function to call when the time interval has passed
         and the parameters to pass this function, and whether to repeat (True) or do it only once."""

      self.timeListener = TimerListener(function, parameters)    # define the timer event listener and provide function and parameters to be called

      JSwing_Timer.__init__(self, int(timeInterval), self.timeListener)
      self.setRepeats( repeat )      # should we do this once or forever?

      # remember that this timer has been created and is active (so that it can be stopped/terminated by JEM, if desired)
      __ActiveTimers__.append(self)
Пример #4
0
 def __init__(self, timeInterval, function, parameters=[], repeat=True):
    """Specify time interval (in milliseconds), which function to call when the time interval has passed
       and the parameters to pass this function, and whether to repeat (True) or do it only once."""
       
    self.timeListener = TimerListener(function, parameters)    # define the timer event listener and provide function and parameters to be called 
    
    JTimer.__init__(self, int(timeInterval), self.timeListener)
    self.setRepeats( repeat )      # should we do this once or forever? 
    
    # remember that this timer has been created and is active (so that it can be stopped/terminated by JEM, if desired)
    __ActiveTimers__.append(self)