Referenshandbok för ActionScript® 3.0 i Adobe® Flash®-plattformen
Hem  |  Dölj paket och klasslista |  Paket  |  Klasser  |  Nyheter  |  Index  |  Bilagor  |  Varför på engelska?
Filter: Hämtar data från servern ...
Hämtar data från servern ...
mx.styles 

StyleProxy  - AS3 Flex

Paketmx.styles
Klasspublic class StyleProxy
ArvStyleProxy Inheritance Object
Implementerar IAdvancedStyleClient

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Wraps an object that implements the IAdvancedStyleClient interface. This interface supports a filterMap property that contains style-source/style-destination pairs.

Fler exempel

Relaterade API-element



Publika egenskaper
 EgenskapDefinieras med
  className : String
[skrivskyddad] The name of the component class.
StyleProxy
 Inheritedconstructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans.
Object
  filterMap : Object
A set of string pairs.
StyleProxy
  id : String
[skrivskyddad] The identity of the component.
StyleProxy
  inheritingStyles : Object
An object containing the inheritable styles for this component.
StyleProxy
  nonInheritingStyles : Object
An object containing the noninheritable styles for this component.
StyleProxy
  source : IStyleClient
The object that implements the IStyleClient interface.
StyleProxy
  styleDeclaration : CSSStyleDeclaration
The style declaration that holds the inline styles declared by this object.
StyleProxy
  styleName : Object
The source of this object's style values.
StyleProxy
  styleParent : IAdvancedStyleClient
The parent of this IAdvancedStyleClient..
StyleProxy
Publika metoder
 MetodDefinieras med
  
StyleProxy(source:IStyleClient, filterMap:Object)
Constructor.
StyleProxy
  
Deletes a style property from this component instance.
StyleProxy
  
Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.
StyleProxy
  
getStyle(styleProp:String):*
Gets a style property that has been set anywhere in this component's style lookup chain.
StyleProxy
  
Returns true if currentCSSState is not null.
StyleProxy
 Inherited
Anger om det finns en egenskap angiven för ett objekt.
Object
 Inherited
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter.
Object
  
Returns true if cssState matches currentCSSState.
StyleProxy
  
Determines whether this instance is the same as, or is a subclass of, the given type.
StyleProxy
  
Propagates style changes to the children of this component.
StyleProxy
 Inherited
Anger om den angivna egenskapen finns och är uppräkningsbar.
Object
  
Sets up the internal style cache values so that the getStyle() method functions.
StyleProxy
  
Registers the EffectManager as one of the event listeners for each effect event.
StyleProxy
 Inherited
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder.
Object
  
setStyle(styleProp:String, newValue:*):void
Sets a style property on this component instance.
StyleProxy
  
Called when the value of a style property is changed.
StyleProxy
  
Flex calls the stylesInitialized() method when the styles for a component are first initialized.
StyleProxy
 Inherited
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner.
Object
 Inherited
Returnerar det angivna objektets strängbeteckning.
Object
 Inherited
Returnerar det angivna objektets primitiva värde.
Object
Egenskapsdetaljer

className

egenskap
className:String  [skrivskyddad]

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

The name of the component class.



Implementering
    public function get className():String

filterMap

egenskap 
filterMap:Object

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

A set of string pairs. The first item of the string pair is the name of the style in the source component. The second item of the String pair is the name of the style in the subcomponent. With this object, you can map a particular style in the parent component to a different style in the subcomponent. This is useful if both the parent component and the subcomponent share the same style, but you want to be able to control the values seperately.



Implementering
    public function get filterMap():Object
    public function set filterMap(value:Object):void

id

egenskap 
id:String  [skrivskyddad]

Språkversion: ActionScript 3.0
Produktversion: Flex 4
Körningsmiljöversioner: Flash Player 10, AIR 1.5

The identity of the component.



Implementering
    public function get id():String

inheritingStyles

egenskap 
inheritingStyles:Object

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

An object containing the inheritable styles for this component.



Implementering
    public function get inheritingStyles():Object
    public function set inheritingStyles(value:Object):void

nonInheritingStyles

egenskap 
nonInheritingStyles:Object

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

An object containing the noninheritable styles for this component.



Implementering
    public function get nonInheritingStyles():Object
    public function set nonInheritingStyles(value:Object):void

source

egenskap 
source:IStyleClient

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

The object that implements the IStyleClient interface. This is the object that is being proxied.



Implementering
    public function get source():IStyleClient
    public function set source(value:IStyleClient):void

styleDeclaration

egenskap 
styleDeclaration:CSSStyleDeclaration

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

The style declaration that holds the inline styles declared by this object.



Implementering
    public function get styleDeclaration():CSSStyleDeclaration
    public function set styleDeclaration(value:CSSStyleDeclaration):void

styleName

egenskap 
styleName:Object

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

The source of this object's style values. The value of the styleName property can be one of three possible types:

  • String, such as "headerStyle". The String names a class selector that is defined in a CSS style sheet.
  • CSSStyleDeclaration, such as StyleManager.getStyleDeclaration(".headerStyle").
  • UIComponent. The object that implements this interface inherits all the style values from the referenced UIComponent.



Implementering
    public function get styleName():Object
    public function set styleName(value:Object):void

styleParent

egenskap 
styleParent:IAdvancedStyleClient

Språkversion: ActionScript 3.0
Produktversion: Flex 4
Körningsmiljöversioner: Flash Player 10, AIR 1.5

The parent of this IAdvancedStyleClient.. Typically, you do not assign this property directly. It is set by the addChild, addChildAt, removeChild, and removeChildAt methods of the flash.display.DisplayObjectContainer and the mx.core.UIComponent.addStyleClient() and the mx.core.UIComponent.removeStyleClient() methods. If it is assigned a value directly, without calling one of the above mentioned methods the instance of the class that implements this interface will not inherit styles from the UIComponent or DisplayObject. Also if assigned a value directly without, first removing the object from the current parent with the remove methods listed above, a memory leak could occur.



Implementering
    public function get styleParent():IAdvancedStyleClient
    public function set styleParent(value:IAdvancedStyleClient):void
Konstruktordetaljer

StyleProxy

()Konstruktor
public function StyleProxy(source:IStyleClient, filterMap:Object)

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Constructor.

Parametrar
source:IStyleClient — The object that implements the IStyleClient interface.
 
filterMap:Object — The set of styles to pass from the source to the subcomponent.
Metoddetaljer

clearStyle

()metod
public function clearStyle(styleProp:String):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Deletes a style property from this component instance.

This does not necessarily cause the getStyle() method to return undefined.

Parametrar

styleProp:String — Name of the style property.

getClassStyleDeclarations

()metod 
public function getClassStyleDeclarations():Array

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Returns an Array of CSSStyleDeclaration objects for the type selector that applies to this component, or null if none exist.

For example, suppose that component MyButton extends Button. This method first looks for a MyButton selector; then, it looks for a Button type selector; finally, it looks for a UIComponent type selector.

Returnerar
Array — Array of CSSStyleDeclaration objects.

getStyle

()metod 
public function getStyle(styleProp:String):*

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Gets a style property that has been set anywhere in this component's style lookup chain.

This same method is used to get any kind of style property, so the value returned may be a Boolean, String, Number, int, uint (for an RGB color), Class (for a skin), or any kind of object. Therefore the return type is specified as *.

If you are getting a particular style property, you will know its type and will often want to store the result in a variable of that type. You can use either the as operator or coercion to do this. For example:

      var backgroundColor:uint = getStyle("backgroundColor") as int;
      
      or
      
      var backgroundColor:uint = int(getStyle("backgroundColor"));
      

If the style property has not been set anywhere in the style lookup chain, the value returned by the getStyle() method is undefined. Note that undefined is a special value that is not the same as false, the empty String (""), NaN, 0, or null. No valid style value is ever undefined. You can use the static method StyleManager.isValidStyleValue() to test whether the value was set.

Parametrar

styleProp:String — Name of the style property.

Returnerar
* — Style value.

hasCSSState

()metod 
public function hasCSSState():Boolean

Språkversion: ActionScript 3.0
Produktversion: Flex 4.6
Körningsmiljöversioner: Flash Player 10, AIR 2.5

Returns true if currentCSSState is not null. Typically, you do not call this method directly. It is called by the mx.styles.CSSCondition.matchesStyleClient() method.

Note Spark components use their skin state as the pseudo state. Halo components use the currentState property.

Returnerar
Booleantrue if currentCSSState is not null. By default, currentCSSState is the same as currentState. If no state exists, return false.

matchesCSSState

()metod 
public function matchesCSSState(cssState:String):Boolean

Språkversion: ActionScript 3.0
Produktversion: Flex 4
Körningsmiljöversioner: Flash Player 10, AIR 1.5

Returns true if cssState matches currentCSSState. Typically, you do not call this method directly. It is called by the mx.styles.CSSCondition.matchesStyleClient() method.

Note Spark components use their skin state as the pseudo state. Halo components use the currentState property.

Parametrar

cssState:String — A possible value of CSSCondition.value. It represents the current state of this component used to match CSS pseudo-selectors.

Returnerar
Booleantrue if cssState matches currentCSSState. By default, currentCSSState is the same as currentState. If no state exists, return null.

matchesCSSType

()metod 
public function matchesCSSType(cssType:String):Boolean

Språkversion: ActionScript 3.0
Produktversion: Flex 4
Körningsmiljöversioner: Flash Player 10, AIR 1.5

Determines whether this instance is the same as, or is a subclass of, the given type. Typically, you do not call this method directly. It is called by the mx.styles.CSSCondition.matchesStyleClient() method.

Parametrar

cssType:String — A CSSSelector object.

Returnerar
Booleantrue if cssType is in the hierarchy of qualified type selectors.

notifyStyleChangeInChildren

()metod 
public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Propagates style changes to the children of this component.

Parametrar

styleProp:String — Name of the style property.
 
recursive:Boolean — Whether to propagate the style changes to the children's children.

regenerateStyleCache

()metod 
public function regenerateStyleCache(recursive:Boolean):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Sets up the internal style cache values so that the getStyle() method functions. If this object already has children, then reinitialize the children's style caches.

Parametrar

recursive:Boolean — Regenerate the proto chains of the children.

registerEffects

()metod 
public function registerEffects(effects:Array):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Registers the EffectManager as one of the event listeners for each effect event.

Parametrar

effects:Array — An Array of Strings of effect names.

setStyle

()metod 
public function setStyle(styleProp:String, newValue:*):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Sets a style property on this component instance.

This may override a style that was set globally.

Calling the setStyle() method can result in decreased performance. Use it only when necessary.

Parametrar

styleProp:String — Name of the style property.
 
newValue:* — New value for the style.

styleChanged

()metod 
public function styleChanged(styleProp:String):void

Språkversion: ActionScript 3.0
Produktversion: Flex 3
Körningsmiljöversioner: Flash Player 9, AIR 1.1

Called when the value of a style property is changed.

Parametrar

styleProp:String — The name of the style property that changed.

stylesInitialized

()metod 
public function stylesInitialized():void

Språkversion: ActionScript 3.0
Produktversion: Flex 4
Körningsmiljöversioner: Flash Player 10, AIR 1.5

Flex calls the stylesInitialized() method when the styles for a component are first initialized.





[ X ]Varför på engelska?
Innehåll i Referenshandbok för ActionScript 3.0 i Adobe Flash-plattformen är på engelska

Det är inte alla delar av Referenshandbok för ActionScript 3.0 i Adobe Flash-plattformen som översätts till alla språk. Om ett språkelement inte översätts visas det på engelska. Klassen ga.controls.HelpBox översätts till exempel inte till något språk. I den svenska versionen av referenshandboken visas därför klassen ga.controls.HelpBox på engelska.