Packagelunas
Classpublic class CoreStyle
InheritanceCoreStyle Inheritance ConfigurableObject Inheritance CoreEventDispatcher Inheritance Object
Implements Style
Subclasses BackgroundButtonStyle, BitmapFilterButtonStyle, LabelStyle, LevelBarStyle, LightButtonStyle, LightFrameLabelButtonStyle, MediaButtonStyle, SimpleScrollbarStyle, SimpleTextInputStyle, VisualTextInputStyle

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



Public Properties
 PropertyDefined By
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 Inheritedid : *
Returns the id of this object.
ConfigurableObject
 InheritedisConfigurable : Boolean
Indicates if the object is configurable and receive the notification of the ConfigCollector in the setup() method.
ConfigurableObject
  styleSheet : StyleSheet
Indicates the style sheet reference of this object.
CoreStyle
Public Methods
 MethodDefined By
  
CoreStyle(init:* = null, id:* = null)
Creates a new AbstractStyle instance.
CoreStyle
 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
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
  
getStyle(prop:String):*
Returns the value of the specified property if it's exist in the object, else returns null.
CoreStyle
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
  
initialize():void
Invoked in the constructor of the IStyle instance.
CoreStyle
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
Invoked when the style is changed.
CoreStyle
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
  
setStyle(... args):void
This method is invoked to change a style attribute in this IStyle object with a generic object or a key(String)/value pair of arguments.
CoreStyle
  
setup():void
[override] Invoked when this object when the ConfigCollector is run.
CoreStyle
  
Invoked when a style property of this IStyle change.
CoreStyle
  
Invoked when the styleSheet value of this IStyle change.
CoreStyle
  
toString():String
Returns the String representation of this object.
CoreStyle
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
update():void
Update the display.
ConfigurableObject
 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
  
_setID(id:*):void
[override] Sets the id of the object and register it in the StyleCollector if it's possible.
CoreStyle
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Property Detail
styleSheetproperty
styleSheet:StyleSheet

Indicates the style sheet reference of this object.


Implementation
    public function get styleSheet():StyleSheet
    public function set styleSheet(value:StyleSheet):void
Constructor Detail
CoreStyle()Constructor
public function CoreStyle(init:* = null, id:* = null)

Creates a new AbstractStyle instance.

Parameters
init:* (default = null) — An object that contains properties with which to populate the newly Style object. If init is not an object, it is ignored.
 
id:* (default = null) — The id of the object.
Method Detail
_setID()method
override protected function _setID(id:*):void

Sets the id of the object and register it in the StyleCollector if it's possible.

Parameters

id:*

See also

StyleCollector.
getStyle()method 
public function getStyle(prop:String):*

Returns the value of the specified property if it's exist in the object, else returns null.

Parameters

prop:String

Returns
* — the value of the specified property if it's exist in the object or null.
initialize()method 
public function initialize():void

Invoked in the constructor of the IStyle instance.

notifyStyleChanged()method 
public function notifyStyleChanged():void

Invoked when the style is changed.

setStyle()method 
public function setStyle(... args):void

This method is invoked to change a style attribute in this IStyle object with a generic object or a key(String)/value pair of arguments.

Parameters

... args

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

Invoked when this object when the ConfigCollector is run.

styleChanged()method 
public function styleChanged():void

Invoked when a style property of this IStyle change. By default this method is empty, you can override this method.

styleSheetChanged()method 
public function styleSheetChanged():void

Invoked when the styleSheet value of this IStyle change. By default this method is empty, you can override this method.

toString()method 
public function toString():String

Returns the String representation of this object.

Returns
String — the String representation of this object.