Packagelunas.core
Classpublic class AbstractComponent
InheritanceAbstractComponent Inheritance CoreSprite Inheritance flash.display.Sprite
ImplementsIComponent
SubclassesAbstractButton, AbstractProgress, AbstractTextInput, Container

This class provides a skeletal implementation of all the components in Lunas, to minimize the effort required to implement this interface.



Public Properties
 PropertyDefined by
  border : EdgeMetrics
Indicates the thickness, in pixels, of the four edge regions around a visual component.
AbstractComponent
  bubbles : Boolean = true
Indicates if the events use bubbling when are dispatched.
AbstractComponent
  builder : IBuilder
Indicates the IBuilder reference of this instance.
AbstractComponent
  componentInspectorSetting : Boolean
Initialize when the Flash component settings are initialized (only in Flash with a compiled component).
AbstractComponent
  enabled : Boolean
Indicates the enabled state of the component.
AbstractComponent
  group : Boolean
Indicates with a boolean if this object is grouped.
AbstractComponent
  groupName : String
Indicates the name of the group of this object.
AbstractComponent
  h : Number
(read-only) Indicates the virtual height value of this component.
AbstractComponent
 Inheritedid : *
Returns the id of this object.
CoreSprite
 InheritedisConfigurable : Boolean
Indicates if the display is configurable.
CoreSprite
  maxHeight : Number
This property defined the maximum height of this component.
AbstractComponent
  maxWidth : Number
This property defined the maximum width of this component.
AbstractComponent
  minHeight : Number
This property defined the mimimun height of this component.
AbstractComponent
  minWidth : Number
This property defined the mimimun width of this component.
AbstractComponent
  style : IStyle
Returns the style of this component.
AbstractComponent
  w : Number
(read-only) Indicates the virtual width value of this component.
AbstractComponent
Protected Properties
 PropertyDefined by
  _h : Number = 0
The protected virtual height value of the component.
AbstractComponent
  _w : Number = 0
The protected virtual width value of the component.
AbstractComponent
Public Methods
 MethodDefined by
  
AbstractComponent(id:* = null, isConfigurable:Boolean = false, name:String = null)
Creates a new AbstractComponentDisplay instance.
AbstractComponent
  
doLater():void
Launch an event with a delayed interval.
AbstractComponent
  
draw(... arguments):void
Draw the view of the component.
AbstractComponent
  
Returns the IBuilder constructor use to initialize this component.
AbstractComponent
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreSprite
  
Returns the IStyle constructor use to initialize this component.
AbstractComponent
  
Invoked when the group property or the groupName property changed.
AbstractComponent
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreSprite
  
hide():void
Hides the component.
AbstractComponent
  
initialize():void
Initialize the component.
AbstractComponent
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreSprite
  
isVisible():Boolean
Returns true if the component is visible.
AbstractComponent
 Inherited
lock():void
Locks the object.
CoreSprite
  
move(x:Number, y:Number):void
Moves the component.
AbstractComponent
  
Notify a change in this component.
AbstractComponent
  
Notify an event when the enabled property is changed.
AbstractComponent
  
Notify an event when you resize the component.
AbstractComponent
  
refresh(init:*):void
Refresh the component with an object of initialization.
AbstractComponent
 Inherited
resetLock():void
Reset the lock security of the display.
CoreSprite
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreSprite
  
setSize(w:Number, h:Number):void
Sets the virtuals width and height of the component.
AbstractComponent
  
setStyle(... args):void
Sets the style property on the style declaration or object.
AbstractComponent
 Inherited
setup():void
Setup the IConfigurable object.
CoreSprite
  
show():void
Shows the component.
AbstractComponent
 Inherited
toString():String
Returns the String representation of this object.
CoreSprite
 Inherited
unlock():void
Unlocks the display.
CoreSprite
  
update():void
Updates the component.
AbstractComponent
  
viewChanged():void
Invoked after the draw method and when the IBuilder is updated.
AbstractComponent
  
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.
AbstractComponent
  
viewResize():void
Invoked when the component is resized.
AbstractComponent
  
viewStyleChanged(e:Event = null):void
Invoked when the component IStyle changed.
AbstractComponent
Protected Methods
 MethodDefined by
 Inherited
addedToStage(e:Event = null):void
Invoked when the display is added to the stage.
CoreSprite
  
fireComponentEvent(type:String):void
Dispatchs a ComponentEvent with the specified type.
AbstractComponent
 Inherited
removedFromStage(e:Event = null):void
Invoked when the display is removed from the stage.
CoreSprite
Property detail
borderproperty
border:EdgeMetrics  [read-write]

Indicates the thickness, in pixels, of the four edge regions around a visual component.

Implementation
    public function get border():EdgeMetrics
    public function set border(value:EdgeMetrics):void
bubblesproperty 
public var bubbles:Boolean = true

Indicates if the events use bubbling when are dispatched.

builderproperty 
builder:IBuilder  [read-write]

Indicates the IBuilder reference of this instance.

Implementation
    public function get builder():IBuilder
    public function set builder(value:IBuilder):void
componentInspectorSettingproperty 
componentInspectorSetting:Boolean  [read-write]

Initialize when the Flash component settings are initialized (only in Flash with a compiled component).

Implementation
    public function get componentInspectorSetting():Boolean
    public function set componentInspectorSetting(value:Boolean):void
enabledproperty 
enabled:Boolean  [read-write]

Indicates the enabled state of the component.

Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
groupproperty 
group:Boolean  [read-write]

Indicates with a boolean if this object is grouped.

Implementation
    public function get group():Boolean
    public function set group(value:Boolean):void
groupNameproperty 
groupName:String  [read-write]

Indicates the name of the group of this object.

Implementation
    public function get groupName():String
    public function set groupName(value:String):void
_hproperty 
protected var _h:Number = 0

The protected virtual height value of the component.

hproperty 
h:Number  [read-write]

(read-only) Indicates the virtual height value of this component.

Implementation
    public function get h():Number
    public function set h(value:Number):void
maxHeightproperty 
public var maxHeight:Number

This property defined the maximum height of this component.

maxWidthproperty 
public var maxWidth:Number

This property defined the maximum width of this component.

minHeightproperty 
public var minHeight:Number

This property defined the mimimun height of this component.

minWidthproperty 
public var minWidth:Number

This property defined the mimimun width of this component.

styleproperty 
style:IStyle  [read-write]

Returns the style of this component.

Implementation
    public function get style():IStyle
    public function set style(value:IStyle):void
_wproperty 
protected var _w:Number = 0

The protected virtual width value of the component.

wproperty 
w:Number  [read-write]

(read-only) Indicates the virtual width value of this component.

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

Creates a new AbstractComponentDisplay 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
doLater()method
public function doLater():void

Launch an event with a delayed interval.

draw()method 
public function draw(... arguments):void

Draw the view of the component.

Parameters
... arguments
fireComponentEvent()method 
protected function fireComponentEvent(type:String):void

Dispatchs a ComponentEvent with the specified type.

Parameters
type:String
getBuilderRenderer()method 
public function getBuilderRenderer():Class

Returns the IBuilder constructor use to initialize this component.

Returns
Class — the IBuilder constructor use to initialize this component.
getStyleRenderer()method 
public function getStyleRenderer():Class

Returns the IStyle constructor use to initialize this component.

Returns
Class — the IStyle constructor use to initialize this component.
groupPolicyChanged()method 
public function groupPolicyChanged():void

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

hide()method 
public function hide():void

Hides the component.

initialize()method 
public function initialize():void

Initialize the component. You can override this method.

isVisible()method 
public function isVisible():Boolean

Returns true if the component is visible.

Returns
Booleantrue if the component is visible.
move()method 
public function move(x:Number, y:Number):void

Moves the component.

Parameters
x:Number — The x position of the component.
 
y:Number — The y position of the component.
notifyChanged()method 
public function notifyChanged():void

Notify a change in this component.

notifyEnabled()method 
public function notifyEnabled():void

Notify an event when the enabled property is changed. This event can be a ComponentEvent.ENABLED or ComponentEvent.DISABLED event.

notifyResized()method 
public function notifyResized():void

Notify an event when you resize the component.

refresh()method 
public function refresh(init:*):void

Refresh the component with an object of initialization. This method launch the update() method.

Parameters
init:*
setSize()method 
public function setSize(w:Number, h:Number):void

Sets the virtuals width and height of the component.

Parameters
w:Number
 
h:Number
setStyle()method 
public function setStyle(... args):void

Sets the style property on the style declaration or object.

Parameters
... args
show()method 
public function show():void

Shows the component.

update()method 
public override function update():void

Updates the component. This method is invoked when the component must be refresh.

viewChanged()method 
public function viewChanged():void

Invoked after the draw method and when the IBuilder is updated. This method is empty you can override it.

viewDestroyed()method 
public function viewDestroyed(e:Event = null):void

Invoked when the component is destroyed with a removeMovieClip. Overrides this method.

Parameters
e:Event (default = null)
viewEnabled()method 
public function viewEnabled():void

Invoked when the enabled property of the component change. Overrides this method.

viewResize()method 
public function viewResize():void

Invoked when the component is resized. Overrides this method.

viewStyleChanged()method 
public function viewStyleChanged(e:Event = null):void

Invoked when the component IStyle changed. Overrides this method.

Parameters
e:Event (default = null)