Main Page | Packages | Class Tree | Index | Help

xp.util

class MouseDownTimer

Object
  |
  +--xp.util.MouseDownTimer


class MouseDownTimer
extends Object

Fires an event if the mouse remains down for more than a set period of time.

Tracks how long the mouse button is down and if it exceeds a timeout interval callsback to a function.
Use if you wish to take an action after the mosue button has been held down for a period of time. Contrast to MouseDownRepeater that repeatedly fires an event whilst the mouse button remains down


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Constructor

public
MouseDownTimer ( )
Create a new instance of MouseDownTimer

Method Summary

public
activate ( host: Object, callback: Function, timeout: Number )
Activates the timer

public
deactivate ( )
Deactivates the timer

public
onMouseUp ( )
Mouse button up handler

public
onTimeOut ( params: Array )
The onTimeOut event handler



Constructor Documentation

MouseDownTimer

public function MouseDownTimer()
Create a new instance of MouseDownTimer


Method Documentation

activate

public function activate(host: Object,
 callback: Function,
 timeout: Number)
Activates the timer

Parameters:
host
The host object that will be called when onTimeOut fires
callback
The function to call onTimeOut
timeout
the timeout duration

deactivate

public function deactivate()
Deactivates the timer

onMouseUp

public function onMouseUp()
Mouse button up handler

Clears the timer

onTimeOut

public function onTimeOut(params: Array)
The onTimeOut event handler


The documentation was generated from the following file:


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