Packagelunas.core
Classpublic class AbstractButtonBuilder
InheritanceAbstractButtonBuilder Inheritance AbstractBuilder Inheritance CoreEventDispatcher Inheritance CoreObject
ImplementsIBuilder
SubclassesAquaButtonBuilder, BackgroundButtonBuilder, FrameLabelButtonBuilder, LightButtonBuilder

This class provides a skeletal implementation of the button IBuilder objects.



Public Properties
 PropertyDefined by
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inheritedtarget : DisplayObject
(read-write) Indicates the target reference of the component.
AbstractBuilder
Public Methods
 MethodDefined by
  
AbstractButtonBuilder(target:DisplayObject, bGlobal:Boolean = false, sChannel:String = null)
Creates a new AbstractButtonBuilder instance.
AbstractButtonBuilder
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
 Inherited
clear():void
Clear the view of the component.
AbstractBuilder
  
containsType(type:String):Boolean
Returns true if the specified type is register in the object.
AbstractButtonBuilder
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
  
initType():void
Initialize all register type of this builder.
AbstractButtonBuilder
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
  
registerType(type:String, callback:Function = null):void
Registers the ButtonEvent type passed in argument.
AbstractButtonBuilder
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Runs the build of the component.
AbstractBuilder
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
  
unregisterType(type:String):void
Unregisters the ButtonEvent type passed in argument.
AbstractButtonBuilder
 Inherited
update():void
Update the view of the component.
AbstractBuilder
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Protected Methods
 MethodDefined by
  
refreshState(e:Event):void
Invoked when a ButtonEvent register in this builder is dispatched.
AbstractButtonBuilder
Constructor detail
AbstractButtonBuilder()constructor
public function AbstractButtonBuilder(target:DisplayObject, bGlobal:Boolean = false, sChannel:String = null)

Creates a new AbstractButtonBuilder instance.

Parameters
target:DisplayObject — the target of the component reference to build.
 
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
Method detail
containsType()method
public function containsType(type:String):Boolean

Returns true if the specified type is register in the object.

Parameters
type:String

Returns
Booleantrue if the specified type is register in the object.
initType()method 
public function initType():void

Initialize all register type of this builder. Overrides this method in the concrete implementations.

refreshState()method 
protected function refreshState(e:Event):void

Invoked when a ButtonEvent register in this builder is dispatched.

Parameters
e:Event
registerType()method 
public function registerType(type:String, callback:Function = null):void

Registers the ButtonEvent type passed in argument.

Parameters
type:String — The type of the frame event to register (choose your event in the ButtonEvent static enumeration).
 
callback:Function (default = null) — The optional method of the button to launch
unregisterType()method 
public function unregisterType(type:String):void

Unregisters the ButtonEvent type passed in argument.

Parameters
type:String