Main Page | Packages | Class Tree | Index | Help

xp.util

class KeyDownRepeater

Object
  |
  +--xp.util.Repeater
        |
        +--xp.util.KeyDownRepeater


class KeyDownRepeater
extends Repeater

An object that repeatedly makes a callback to a target as long as the key is down

The repeater can be used to repeatedly call a method of an object passing in params. It will automatically stop when the key is up.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Constructor

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

Method Summary

public
onKeyUp ( )
KeyUp event handler

public
start ( ): Boolean
Starts the repeater

public
stop ( ): Boolean
Stops the repeater

Methods inherited from class xp.util.Repeater

onDelay, onRepeat, start, stop



Constructor Documentation

KeyDownRepeater

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

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

onKeyUp

public function onKeyUp()
KeyUp event handler

Part of the KeyListener interface

start

public function start(): Boolean
Starts the repeater

Adds the KeyListener

Overrides:

stop

public function stop(): Boolean
Stops the repeater

Removes the KeyListener

Overrides:


The documentation was generated from the following file:


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