Adobe® Flash® Platform için ActionScript® 3.0 Başvurusu
Ana Sayfa  |  Paket ve Sınıf Listesini Gizle |  Paketler  |  Sınıflar  |  Yenilikler  |  Dizin  |  Ekler  |  Niçin İngilizce?
Filtreler: Sunucudan Veri Alınıyor...
Sunucudan Veri Alınıyor...
mx.styles 

CSSStyleDeclaration  - AS3 Flex

Paketmx.styles
Sınıfpublic class CSSStyleDeclaration
Miras AlmaCSSStyleDeclaration Inheritance EventDispatcher Inheritance Object
Alt Sınıflar AdvancedDataGridColumn, DataGridColumn

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

The CSSStyleDeclaration class represents a set of CSS style rules. The MXML compiler automatically generates one CSSStyleDeclaration object for each selector in the CSS files associated with a Flex application.

A CSS rule such as

      Button { color: #FF0000 }
  
affects every instance of the Button class; a selector like Button is called a type selector and must not start with a dot.

A CSS rule such as

      .redButton { color: #FF0000 }
  
affects only components whose styleName property is set to "redButton"; a selector like .redButton is called a class selector and must start with a dot.

You can access the autogenerated CSSStyleDeclaration objects using the StyleManager.getStyleDeclaration() method, passing it either a type selector

  var buttonDeclaration:CSSStyleDeclaration =
      StyleManager.getStyleDeclaration("Button");
  
or a class selector
  var redButtonStyleDeclaration:CSSStyleDeclaration =
      StyleManager.getStyleDeclaration(".redButton");
  

You can use the getStyle(), setStyle(), and clearStyle() methods to get, set, and clear style properties on a CSSStyleDeclaration.

You can also create and install a CSSStyleDeclaration at run time using the StyleManager.setStyleDeclaration() method:

  var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins");
  newStyleDeclaration.defaultFactory = function():void
  {
      leftMargin = 50;
      rightMargin = 50;
  }
  StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true);
  

İlgili API Öğeleri



Genel Özellikler
 ÖzellikTanımlayan:
 Inheritedconstructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru.
Object
  defaultFactory : Function
This function, if it isn't null, is usually autogenerated by the MXML compiler.
CSSStyleDeclaration
  factory : Function
This function, if it isn't null, is usually autogenerated by the MXML compiler.
CSSStyleDeclaration
  overrides : Object
If the setStyle() method is called on a UIComponent or CSSStyleDeclaration at run time, this object stores the name/value pairs that were set; they override the name/value pairs in the objects produced by the methods specified by the defaultFactory and factory properties.
CSSStyleDeclaration
  selector : CSSSelector
This property is the base selector of a potential chain of selectors and conditions that are used to match CSS style declarations to components.
CSSStyleDeclaration
  selectorIndex : int = 0
The order this CSSStyleDeclaration was added to its StyleManager.
CSSStyleDeclaration
  specificity : int
[salt okunur] Determines the order of precedence when applying multiple style declarations to a component.
CSSStyleDeclaration
  subject : String
[salt okunur] The subject describes the name of a component that may be a potential match for this style declaration.
CSSStyleDeclaration
Genel Yöntemler
 YöntemTanımlayan:
  
CSSStyleDeclaration(selector:Object = null, styleManager:IStyleManager2 = null, autoRegisterWithStyleManager:Boolean = true)
Constructor.
CSSStyleDeclaration
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
EventDispatcher nesnesi olan bir olay dinleyici nesnesini, dinleyicinin bir olayın bildirimini alması için kaydeder.
EventDispatcher
  
Clears a style property on this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
Olay akışına bir olay gönderir.
EventDispatcher
  
getStyle(styleProp:String):*
Gets the value for a specified style property, as determined solely by this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
EventDispatcher nesnesinin belirli bir olay türü için kayıtlı dinleyicisi olup olmadığını kontrol eder.
EventDispatcher
 Inherited
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir.
Object
 Inherited
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir.
Object
  
Determines whether this style declaration applies to the given component based on a match of the selector chain.
CSSStyleDeclaration
 Inherited
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
EventDispatcher nesnesinden bir dinleyiciyi kaldırır.
EventDispatcher
 Inherited
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar.
Object
  
setStyle(styleProp:String, newValue:*):void
Sets a style property on this CSSStyleDeclaration.
CSSStyleDeclaration
 Inherited
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür.
Object
 Inherited
Belirtilen nesnenin dize olarak temsil edilen halini döndürür.
Object
 Inherited
Belirtilen nesnenin temel değerini döndürür.
Object
 Inherited
Bir olay dinleyicisinin bu EventDispatcher nesnesiyle mi, yoksa onun belirtilen olay türüne yönelik üst öğelerinden biriyle mi kayıtlı olduğunu kontrol eder.
EventDispatcher
Olaylar
 Olay Özet Tanımlayan:
 Inherited[broadcast olayı] Flash Player veya AIR uygulaması işletim sistemi odağına gelip etkin olduğunda gönderilir.EventDispatcher
 Inherited[broadcast olayı] Çalışan Flash Player veya AIR uygulaması sistem odağını kaybettiğinde ve etkin olmayan duruma geldiğinde gönderilir.EventDispatcher
Özellik Ayrıntısı

defaultFactory

özellik
defaultFactory:Function

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

This function, if it isn't null, is usually autogenerated by the MXML compiler. It produce copies of a plain Object, such as { leftMargin: 10, rightMargin: 10 }, containing name/value pairs for style properties; the object is used to build a node of the prototype chain for looking up style properties.

If this CSSStyleDeclaration is owned by a UIComponent written in MXML, this function encodes the style attributes that were specified on the root tag of the component definition.

If the UIComponent was written in ActionScript, this property is null.



Uygulama
    public function get defaultFactory():Function
    public function set defaultFactory(value:Function):void

factory

özellik 
factory:Function

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

This function, if it isn't null, is usually autogenerated by the MXML compiler. It produce copies of a plain Object, such as { leftMargin: 10, rightMargin: 10 }, containing name/value pairs for style properties; the object is used to build a node of the prototype chain for looking up style properties.

If this CSSStyleDeclaration is owned by a UIComponent, this function encodes the style attributes that were specified in MXML for an instance of that component.



Uygulama
    public function get factory():Function
    public function set factory(value:Function):void

overrides

özellik 
overrides:Object

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

If the setStyle() method is called on a UIComponent or CSSStyleDeclaration at run time, this object stores the name/value pairs that were set; they override the name/value pairs in the objects produced by the methods specified by the defaultFactory and factory properties.



Uygulama
    public function get overrides():Object
    public function set overrides(value:Object):void

selector

özellik 
selector:CSSSelector

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

This property is the base selector of a potential chain of selectors and conditions that are used to match CSS style declarations to components.



Uygulama
    public function get selector():CSSSelector
    public function set selector(value:CSSSelector):void

selectorIndex

özellik 
public var selectorIndex:int = 0

The order this CSSStyleDeclaration was added to its StyleManager. MatchStyleDeclarations has to return the declarations in the order they were declared

specificity

özellik 
specificity:int  [salt okunur]

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Determines the order of precedence when applying multiple style declarations to a component. If style declarations are of equal precedence, the last one wins.



Uygulama
    public function get specificity():int

subject

özellik 
subject:String  [salt okunur]

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

The subject describes the name of a component that may be a potential match for this style declaration. The subject is determined as right most simple type selector in a potential chain of selectors.



Uygulama
    public function get subject():String
Yapıcı Ayrıntı

CSSStyleDeclaration

()Yapıcı
public function CSSStyleDeclaration(selector:Object = null, styleManager:IStyleManager2 = null, autoRegisterWithStyleManager:Boolean = true)

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

Constructor.

Parametreler
selector:Object (default = null) — - If the selector is a CSSSelector then advanced CSS selectors are supported. If a String is used for the selector then only simple CSS selectors are supported. If the String starts with a dot it is interpreted as a universal class selector, otherwise it must represent a simple type selector. If not null, this CSSStyleDeclaration will be registered with StyleManager.
 
styleManager:IStyleManager2 (default = null) — - The style manager to set this declaration into. If the styleManager is null the top-level style manager will be used.
 
autoRegisterWithStyleManager:Boolean (default = true) — - If true set the selector in the styleManager. The selector will only be set if both selector and styleManager are both non-null.
Yöntem Ayrıntısı

clearStyle

()yöntem
public function clearStyle(styleProp:String):void

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

Clears a style property on this CSSStyleDeclaration. This is the same as setting the style value to undefined.

Parametreler

styleProp:String — The name of the style property.

getStyle

()yöntem 
public function getStyle(styleProp:String):*

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

Gets the value for a specified style property, as determined solely by this CSSStyleDeclaration.

The returned value may be of any type.

The values null, "", false, NaN, and 0 are all valid style values, but the value undefined is not; it indicates that the specified style is not set on this CSSStyleDeclaration. You can use the method StyleManager.isValidStyleValue() to test the value that is returned.

Parametreler

styleProp:String — The name of the style property.

Döndürür
* — The value of the specified style property if set, or undefined if not.

matchesStyleClient

()yöntem 
public function matchesStyleClient(object:IAdvancedStyleClient):Boolean

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 4
Çalışma Zamanı Sürümleri: Flash Player 10, AIR 1.5

Determines whether this style declaration applies to the given component based on a match of the selector chain.

Parametreler

object:IAdvancedStyleClient — The component to match the style declaration against.

Döndürür
Boolean — true if this style declaration applies to the component, otherwise false.

setStyle

()yöntem 
public function setStyle(styleProp:String, newValue:*):void

Dil Sürümü: ActionScript 3.0
Ürün Sürümü: Flex 3
Çalışma Zamanı Sürümleri: Flash Player 9, AIR 1.1

Sets a style property on this CSSStyleDeclaration.

Parametreler

styleProp:String — The name of the style property.
 
newValue:* — The value of the style property. The value may be of any type. The values null, "", false, NaN, and 0 are all valid style values, but the value undefined is not. Setting a style property to the value undefined is the same as calling the clearStyle() method.





[ X ]Niçin İngilizce?
ActionScript 3.0 Başvurusu'ndaki içerik İngilizce görünür

ActionScript 3.0 Başvurusu'nun tüm bölümleri tüm dillere çevrilmemiştir. Bir dil öğesi çevrilmediğinde İngilizce görünür. Örneğin, ga.controls.HelpBox sınıfı hiçbir dile çevrilmez. Bu nedenle, başvurunun Türkçe versiyonunda ga.controls.HelpBox sınıfı İngilizce görünür.