Class Ext.util.ClickRepeater
A wrapper class which can be applied to any element. Fires a "click" event while the
mouse is pressed. The interval between firings may be specified in the config but
defaults to 10 milliseconds.
Optionally, a CSS class may be applied to the element during the time it is pressed.
Properties
-
Methods
-
Events
-
Config Options
Public Properties
This class has no public properties.
Public Methods
|
ClickRepeater(String/HTMLElement/Element el , Object config ) |
ClickRepeater |
|
|
addEvents(Object object ) : void |
Observable |
Copies any events from the passed object onto this object if they do not already exist. The passed object
must also ... |
|
addListener(String eventName , Function handler , [Object options ]) : void |
Observable |
Appends an event handler to this component |
|
fireEvent(String eventName , Object... args ) : Boolean |
Observable |
Fires the specified event with the passed parameters (minus the event name). |
|
hasListener(String eventName ) : Boolean |
Observable |
Checks to see if this object is currently listening for a specified event |
|
on(String eventName , Function handler , [Object options ]) : void |
Observable |
Appends an event handler to this element (shorthand for addListener) |
|
purgeListeners() : void |
Observable |
Removes all listeners for this object |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener |
|
un(String eventName , Function handler , [Object scope ]) : void |
Observable |
Removes a listener (shorthand for removeListener) |
Public Events
|
click : (Ext.util.ClickRepeater this ) |
ClickRepeater |
Fires on a specified interval during the time the element is pressed. |
|
mousedown : (Ext.util.ClickRepeater this ) |
ClickRepeater |
Fires when the mouse button is depressed. |
|
mouseup : (Ext.util.ClickRepeater this ) |
ClickRepeater |
Fires when the mouse key is released. |
Config Options
|
accelerate : Boolean |
ClickRepeater |
True if autorepeating should start slowly and accelerate. "interval" and "delay" are ignored. "immediate" is honored. |
|
delay : Number |
ClickRepeater |
The initial delay before the repeating event begins firing. Similar to an autorepeat key delay. |
|
el : String/HTMLElement/Element |
ClickRepeater |
The element to act as a button. |
|
interval : Number |
ClickRepeater |
The interval between firings of the "fire" event. Default 10 ms. |
|
pressClass : String |
ClickRepeater |
A CSS class name to be applied to the element while pressed. |
|
preventDefault : Boolean |
ClickRepeater |
True to prevent the default click event |
|
stopDefault : Boolean |
ClickRepeater |
True to stop the default click event |
Constructor Details
ClickRepeater
public function ClickRepeater(String/HTMLElement/Element el
, Object config
)
Parameters:
el
: String/HTMLElement/ElementThe element to listen on
config
: Object
Method Details
addEvents
public function addEvents(Object object
)
Copies any events from the passed object onto this object if they do not already exist. The passed object
must also inherit from Observable for this method to have any effect.
addListener
public function addListener(String eventName
, Function handler
, [Object options
])
Appends an event handler to this component
fireEvent
public function fireEvent(String eventName
, Object... args
)
Fires the specified event with the passed parameters (minus the event name).
hasListener
public function hasListener(String eventName
)
Checks to see if this object is currently listening for a specified event
on
public function on(String eventName
, Function handler
, [Object options
])
Appends an event handler to this element (shorthand for addListener)
purgeListeners
public function purgeListeners()
Removes all listeners for this object
removeListener
public function removeListener(String eventName
, Function handler
, [Object scope
])
un
public function un(String eventName
, Function handler
, [Object scope
])
Removes a listener (shorthand for removeListener)
Event Details
click
public event click
Fires on a specified interval during the time the element is pressed.
Subscribers will be called with the following parameters:
this
: Ext.util.ClickRepeater
This event is defined by ClickRepeater.
mousedown
public event mousedown
Fires when the mouse button is depressed.
Subscribers will be called with the following parameters:
this
: Ext.util.ClickRepeater
This event is defined by ClickRepeater.
mouseup
public event mouseup
Fires when the mouse key is released.
Subscribers will be called with the following parameters:
this
: Ext.util.ClickRepeater
This event is defined by ClickRepeater.
Config Details
accelerate
accelerate : Boolean
True if autorepeating should start slowly and accelerate. "interval" and "delay" are ignored. "immediate" is honored.
This config option is defined by ClickRepeater.
delay
delay : Number
The initial delay before the repeating event begins firing. Similar to an autorepeat key delay.
This config option is defined by ClickRepeater.
el
el : String/HTMLElement/Element
The element to act as a button.
This config option is defined by ClickRepeater.
interval
interval : Number
The interval between firings of the "fire" event. Default 10 ms.
This config option is defined by ClickRepeater.
pressClass
pressClass : String
A CSS class name to be applied to the element while pressed.
This config option is defined by ClickRepeater.
preventDefault
preventDefault : Boolean
True to prevent the default click event
This config option is defined by ClickRepeater.
stopDefault
stopDefault : Boolean
True to stop the default click event
This config option is defined by ClickRepeater.