Main Page | Packages | Class Tree | Index | Help

xp.util

class Repeater

Object
  |
  +--xp.util.Repeater

All Known Subclasses: KeyDownRepeater, MouseDownRepeater

class Repeater
extends Object

An object that repeatedly makes a callback to a target

The repeater can be used to repeatedly call a method of an object passing in params. It is used by the Button when in repeat mode to continually fire the performPress() function while the mouse button is down.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Constructor

public
Repeater ( target: Object, functionName: String, params: Array, delay: Number, repeat: Number, autoStart: Boolean)
Constructs a Repeater

Method Summary

public
onDelay ( ): Void
Callback at the end of the inital delay

public
onRepeat ( ): Void
Callback on each loop. Executes the function on the target.

public
start ( ): Boolean
Starts the repeater

public
stop ( ): Boolean
Stops the repeater



Constructor Documentation

Repeater

public function Repeater(target: Object,
 functionName: String,
 params: Array,
 delay: Number,
 repeat: Number,
 autoStart: Boolean)
Constructs a Repeater

Parameters:
target
The target object to call
functionName
The function to call on each loop
params
Params to be passed on the call
delay
The intial delay befoer the first event firing
repeat
The timer interval between each loop
autoStart
Controls whether the repeater starts immeditely on creation or requires a manual call to start

Method Documentation

onDelay

public function onDelay(): Void
Callback at the end of the inital delay

onRepeat

public function onRepeat(): Void
Callback on each loop. Executes the function on the target.

start

public function start(): Boolean
Starts the repeater

stop

public function stop(): Boolean
Stops the repeater


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc