Packagelunas.core
Classpublic dynamic class AbstractButton
InheritanceAbstractButton Inheritance AbstractComponent Inheritance CoreSprite Inheritance flash.display.Sprite
ImplementsIButton
SubclassesAquaButton, BackgroundButton, FrameLabelButton, LightButton

This class provides a skeletal implementation of the IButton interface, to minimize the effort required to implement this interface.



Public Properties
 PropertyDefined by
 Inheritedborder : EdgeMetrics
Indicates the thickness, in pixels, of the four edge regions around a visual component.
AbstractComponent
 Inheritedbubbles : Boolean = true
Indicates if the events use bubbling when are dispatched.
AbstractComponent
 Inheritedbuilder : IBuilder
Indicates the IBuilder reference of this instance.
AbstractComponent
  buttonMode : Boolean
[write-only] Specifies whether this object receives mouse messages.
AbstractButton
 InheritedcomponentInspectorSetting : Boolean
Initialize when the Flash component settings are initialized (only in Flash with a compiled component).
AbstractComponent
  data : *
Indicates the data value object of the component.
AbstractButton
 Inheritedenabled : Boolean
Indicates the enabled state of the component.
AbstractComponent
 Inheritedgroup : Boolean
Indicates with a boolean if this object is grouped.
AbstractComponent
 InheritedgroupName : String
Indicates the name of the group of this object.
AbstractComponent
 Inheritedh : Number
(read-only) Indicates the virtual height value of this component.
AbstractComponent
 Inheritedid : *
Returns the id of this object.
CoreSprite
  index : Number
A number value to indicated the index of this IButton.
AbstractButton
 InheritedisConfigurable : Boolean
Indicates if the display is configurable.
CoreSprite
  isReleaseOutside : Boolean = true
Indicates if the button notify a releaseOutside event.
AbstractButton
  label : String
Returns the text label for a button instance.
AbstractButton
 InheritedmaxHeight : Number
This property defined the maximum height of this component.
AbstractComponent
 InheritedmaxWidth : Number
This property defined the maximum width of this component.
AbstractComponent
 InheritedminHeight : Number
This property defined the mimimun height of this component.
AbstractComponent
 InheritedminWidth : Number
This property defined the mimimun width of this component.
AbstractComponent
  mouseEnabled : Boolean
Specifies whether this object receives mouse messages.
AbstractButton
  selected : Boolean
A flag that indicates whether this control is selected.
AbstractButton
 Inheritedstyle : IStyle
Returns the style of this component.
AbstractComponent
  toggle : Boolean
Indicates a boolean value indicating whether the button behaves as a toggle switch (true) or not (false).
AbstractButton
  useHandCursor : Boolean
A Boolean value that, when set to true, indicates whether Flash Player displays the hand cursor when the mouse rolls over a button.
AbstractButton
 Inheritedw : Number
(read-only) Indicates the virtual width value of this component.
AbstractComponent
Protected Properties
 PropertyDefined by
 Inherited_h : Number = 0
The protected virtual height value of the component.
AbstractComponent
  _scope : Sprite
The scope of the active display of this button component.
AbstractButton
 Inherited_w : Number = 0
The protected virtual width value of the component.
AbstractComponent
Public Methods
 MethodDefined by
  
AbstractButton(id:* = null, isConfigurable:Boolean = false, name:String = null)
Creates a new AbstractButton instance.
AbstractButton
 Inherited
doLater():void
Launch an event with a delayed interval.
AbstractComponent
 Inherited
draw(... arguments):void
Draw the view of the component.
AbstractComponent
 Inherited
Returns the IBuilder constructor use to initialize this component.
AbstractComponent
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreSprite
 Inherited
Returns the IStyle constructor use to initialize this component.
AbstractComponent
  
Invoked when the group property or the groupName property changed.
AbstractButton
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreSprite
 Inherited
hide():void
Hides the component.
AbstractComponent
 Inherited
initialize():void
Initialize the component.
AbstractComponent
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreSprite
 Inherited
isVisible():Boolean
Returns true if the component is visible.
AbstractComponent
 Inherited
lock():void
Locks the object.
CoreSprite
 Inherited
move(x:Number, y:Number):void
Moves the component.
AbstractComponent
 Inherited
Notify a change in this component.
AbstractComponent
 Inherited
Notify an event when the enabled property is changed.
AbstractComponent
 Inherited
Notify an event when you resize the component.
AbstractComponent
 Inherited
refresh(init:*):void
Refresh the component with an object of initialization.
AbstractComponent
  
registerView(scope:Sprite = null):void
Register the view in argument.
AbstractButton
 Inherited
resetLock():void
Reset the lock security of the display.
CoreSprite
  
scope():Sprite
Returns the scope reference of this IButton.
AbstractButton
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreSprite
  
setSelected(b:Boolean, flag:Boolean = false):void
Sets a boolean value indicating whether the button is selected (true) or not (false).
AbstractButton
 Inherited
setSize(w:Number, h:Number):void
Sets the virtuals width and height of the component.
AbstractComponent
 Inherited
setStyle(... args):void
Sets the style property on the style declaration or object.
AbstractComponent
 Inherited
setup():void
Setup the IConfigurable object.
CoreSprite
 Inherited
show():void
Shows the component.
AbstractComponent
 Inherited
toString():String
Returns the String representation of this object.
CoreSprite
 Inherited
unlock():void
Unlocks the display.
CoreSprite
  
Unregister the view of this button.
AbstractButton
 Inherited
update():void
Updates the component.
AbstractComponent
 Inherited
viewChanged():void
Invoked after the draw method and when the IBuilder is updated.
AbstractComponent
 Inherited
viewDestroyed(e:Event = null):void
Invoked when the component is destroyed with a removeMovieClip.
AbstractComponent
  
viewEnabled():void
Invoked when the enabled property of the component change.
AbstractButton
  
Invoked when the label property of the component change.
AbstractButton
 Inherited
viewResize():void
Invoked when the component is resized.
AbstractComponent
 Inherited
viewStyleChanged(e:Event = null):void
Invoked when the component IStyle changed.
AbstractComponent
Protected Methods
 MethodDefined by
  
_fireButtonEvent(type:String):void
Dispatchs a ButtonEvent with the specified type.
AbstractButton
 Inherited
addedToStage(e:Event = null):void
Invoked when the display is added to the stage.
CoreSprite
 Inherited
fireComponentEvent(type:String):void
Dispatchs a ComponentEvent with the specified type.
AbstractComponent
  
removedFromStage(e:Event = null):void
Invoked when the display is removed from the stage.
AbstractButton
Property detail
buttonModeproperty
buttonMode:Boolean  [write-only]

Specifies whether this object receives mouse messages.

Implementation
    public function set buttonMode(value:Boolean):void
dataproperty 
data:*  [read-write]

Indicates the data value object of the component.

Implementation
    public function get data():*
    public function set data(value:*):void
indexproperty 
public var index:Number

A number value to indicated the index of this IButton.

isReleaseOutsideproperty 
public var isReleaseOutside:Boolean = true

Indicates if the button notify a releaseOutside event.

labelproperty 
label:String  [read-write]

Returns the text label for a button instance.

Implementation
    public function get label():String
    public function set label(value:String):void
mouseEnabledproperty 
mouseEnabled:Boolean  [read-write]

Specifies whether this object receives mouse messages.

Implementation
    public function get mouseEnabled():Boolean
    public function set mouseEnabled(value:Boolean):void
_scopeproperty 
protected var _scope:Sprite

The scope of the active display of this button component.

selectedproperty 
selected:Boolean  [read-write]

A flag that indicates whether this control is selected.

Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
toggleproperty 
toggle:Boolean  [read-write]

Indicates a boolean value indicating whether the button behaves as a toggle switch (true) or not (false).

Implementation
    public function get toggle():Boolean
    public function set toggle(value:Boolean):void
useHandCursorproperty 
useHandCursor:Boolean  [read-write]

A Boolean value that, when set to true, indicates whether Flash Player displays the hand cursor when the mouse rolls over a button.

Implementation
    public function get useHandCursor():Boolean
    public function set useHandCursor(value:Boolean):void
Constructor detail
AbstractButton()constructor
public function AbstractButton(id:* = null, isConfigurable:Boolean = false, name:String = null)

Creates a new AbstractButton instance.

Parameters
id:* (default = null) — Indicates the id of the object.
 
isConfigurable:Boolean (default = false) — This flag indicates if the IConfigurable object is register in the ConfigCollector.
 
name:String (default = null) — Indicates the instance name of the object.
Method detail
_fireButtonEvent()method
protected function _fireButtonEvent(type:String):void

Dispatchs a ButtonEvent with the specified type.

Parameters
type:String
groupPolicyChanged()method 
public override function groupPolicyChanged():void

Invoked when the group property or the groupName property changed. Overrides this method in concrete class.

registerView()method 
public function registerView(scope:Sprite = null):void

Register the view in argument.

Parameters
scope:Sprite (default = null)
removedFromStage()method 
protected override function removedFromStage(e:Event = null):void

Invoked when the display is removed from the stage.

Parameters
e:Event (default = null)
scope()method 
public function scope():Sprite

Returns the scope reference of this IButton.

Returns
Sprite — the scope reference of this IButton.
setSelected()method 
public function setSelected(b:Boolean, flag:Boolean = false):void

Sets a boolean value indicating whether the button is selected (true) or not (false). The default value is false.

Parameters
b:Boolean
 
flag:Boolean (default = false)
unregisterView()method 
public function unregisterView():void

Unregister the view of this button.

viewEnabled()method 
public final override function viewEnabled():void

Invoked when the enabled property of the component change.

viewLabelChanged()method 
public function viewLabelChanged():void

Invoked when the label property of the component change.