class org.aswing.util.AbstractImpulser extends EventDispatcher

Provides common routines for classes implemented Impulse interface.

@author paling @author Igor Sadovskiy

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

function new(delay:Int, ?repeats:Int = 0): Void

Constructs AbstractImpulser.

function addActionListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void

Adds an action listener to the AbstractImpulser instance.

 * @param listener the listener
 * @param priority the priority
 * @param useWeakReference Determines whether the reference to the listener is strong or weak.
 * @see org.aswing.event.AWEvent#ACT

function getDelay(): Int

Returns the delay between firings of events.

@see #setDelay() @see #getInitialDelay()

function getInitialDelay(): Int

Returns the AbstractImpulser's initial delay.

@see #setInitialDelay() @see #setDelay()

function isRepeats(): Bool

Returns true (the default) if the AbstractImpulser will send an action event to its listeners multiple times.

@see #setRepeats()

function isRunning(): Bool

function removeActionListener(listener:Dynamic ->Void): Void

Removes a action listener. @see org.aswing.event.AWEvent#ACT

listener

the listener to be removed.

function restart(): Void

function setDelay(delay:Int): Void

Sets the AbstractImpulser's delay between fired events.

@see #setInitialDelay()

delay

the delay

function setInitialDelay(initialDelay:Int): Void

Sets the AbstractImpulser's initial delay, which by default is the same as the between-event delay. This is used only for the first action event. Subsequent events are spaced using the delay property.

@see #setDelay()

initialDelay

the delay between the invocation of the start method and the first event fired by this impulser

function setRepeats(flag:Int): Void

If flag is false, instructs the AbstractImpulser to send only once action event to its listeners after a start.

flag

specify false to make the impulser stop after sending its first action event. Default value is true.

function start(): Void

function stop(): Void