Packagecom.adobe.portfolio.utils
Classpublic class ClickHandler
InheritanceClickHandler Inheritance Object

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The ClickHandler class is a utility class that allows components to dispatch click events only when certain time or drag limits are not exceeded.



Protected Properties
 PropertyDefined By
  component : UIComponent
ClickHandler
  disallowClick : Boolean
ClickHandler
  listeningForMove : Boolean
ClickHandler
  listeningForUp : Boolean
ClickHandler
  singleClickHandler : Function
ClickHandler
  stageX : Number
ClickHandler
  stageY : Number
ClickHandler
  startTimer : Timer
ClickHandler
  timeLimit : uint
ClickHandler
  translationLimit : uint
ClickHandler
Public Methods
 MethodDefined By
  
ClickHandler(component:UIComponent, singleClickHandler:Function, translationLimit:uint = 5, timeLimit:uint = 0, priority:int = -50)
Constructor.
ClickHandler
  
Removes all event listeners.
ClickHandler
Protected Methods
 MethodDefined By
  
mouseClickHandler(event:MouseEvent):void
ClickHandler
  
mouseDownHandler(event:MouseEvent):void
ClickHandler
  
mouseMoveHandler(event:MouseEvent):void
ClickHandler
  
mouseUpHandler(event:MouseEvent):void
ClickHandler
  
timeoutHandler(e:TimerEvent):void
ClickHandler
Property Detail
componentproperty
protected var component:UIComponent

disallowClickproperty 
protected var disallowClick:Boolean

listeningForMoveproperty 
protected var listeningForMove:Boolean

listeningForUpproperty 
protected var listeningForUp:Boolean

singleClickHandlerproperty 
protected var singleClickHandler:Function

stageXproperty 
protected var stageX:Number

stageYproperty 
protected var stageY:Number

startTimerproperty 
protected var startTimer:Timer

timeLimitproperty 
protected var timeLimit:uint

translationLimitproperty 
protected var translationLimit:uint

Constructor Detail
ClickHandler()Constructor
public function ClickHandler(component:UIComponent, singleClickHandler:Function, translationLimit:uint = 5, timeLimit:uint = 0, priority:int = -50)

Constructor.

Parameters
component:UIComponent — The host component (listen to its events)
 
singleClickHandler:Function — The function to call if a single click is detected. The function takes the form: singleClickHandler(e:MouseEvent):void.
 
translationLimit:uint (default = 5) — The number of units the user must drag, either horizontally or vertically, before a click event is canceled.
 
timeLimit:uint (default = 0) — The number of milliseconds the user must delay before a click event is canceled.
 
priority:int (default = -50) — The event priority to use for the mouse event listeners on component.
Method Detail
mouseClickHandler()method
protected function mouseClickHandler(event:MouseEvent):void

Parameters

event:MouseEvent

mouseDownHandler()method 
protected function mouseDownHandler(event:MouseEvent):void

Parameters

event:MouseEvent

mouseMoveHandler()method 
protected function mouseMoveHandler(event:MouseEvent):void

Parameters

event:MouseEvent

mouseUpHandler()method 
protected function mouseUpHandler(event:MouseEvent):void

Parameters

event:MouseEvent

removeAllListeners()method 
public function removeAllListeners():void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Removes all event listeners.

timeoutHandler()method 
protected function timeoutHandler(e:TimerEvent):void

Parameters

e:TimerEvent