| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="CSSStyleDeclaration,mx.styles.CSSStyleDeclaration,CLASS,ID,NOT_A_COLOR,NO_UNIT,PSEUDO,UNIT_CM,UNIT_DP,UNIT_INCH,UNIT_PT,ancestor,className,className,className,conditions,defaultFactory,factory,filterMap,id,id,id,inheritingStyles,inheritingStyles,inheritingStyles,kind,major,minor,moduleFactory,nonInheritingStyles,nonInheritingStyles,nonInheritingStyles,overrides,parent,pixelValue,revision,selector,selectorIndex,selectors,selectors,source,specificity,specificity,specificity,styleDeclaration,styleDeclaration,styleDeclaration,styleManager,styleName,styleName,styleName,styleParent,styleParent,styleParent,subject,subject,unit,value,value,clearStyle,clearStyle,clearStyle,clearStyle,clearStyleDeclaration,clearStyleDeclaration,compareTo,compareTo,getClassStyleDeclarations,getClassStyleDeclarations,getClassStyleDeclarations,getColorName,getColorName,getColorNames,getColorNames,getMergedStyleDeclaration,getStyle,getStyle,getStyle,getStyle,getStyleDeclaration,getStyleDeclaration,getStyleManager,hasCSSState,hasCSSState,hasCSSState,initialized,isColorName,isColorName,isInheritingStyle,isInheritingStyle,isInheritingTextFormatStyle,isInheritingTextFormatStyle,isParentDisplayListInvalidatingStyle,isParentDisplayListInvalidatingStyle,isParentSizeInvalidatingStyle,isParentSizeInvalidatingStyle,isSizeInvalidatingStyle,isSizeInvalidatingStyle,isValidStyleValue,isValidStyleValue,loadStyleDeclarations,loadStyleDeclarations,matchesCSSState,matchesCSSState,matchesCSSState,matchesCSSType,matchesCSSType,matchesCSSType,matchesStyleClient,matchesStyleClient,matchesStyleClient,notifyStyleChangeInChildren,notifyStyleChangeInChildren,notifyStyleChangeInChildren,regenerateStyleCache,regenerateStyleCache,regenerateStyleCache,registerColorName,registerColorName,registerEffects,registerEffects,registerEffects,registerInheritingStyle,registerInheritingStyle,registerParentDisplayListInvalidatingStyle,registerParentDisplayListInvalidatingStyle,registerParentSizeInvalidatingStyle,registerParentSizeInvalidatingStyle,registerSizeInvalidatingStyle,registerSizeInvalidatingStyle,setDeferredStyles,setStyle,setStyle,setStyle,setStyle,setStyleDeclaration,setStyleDeclaration,setStyleDeclarations,styleChanged,styleChanged,styleChanged,stylesInitialized,stylesInitialized,stylesInitialized,toString,toString,toString,toString,unload,unloadStyleDeclarations,unloadStyleDeclarations"><title>mx.styles.CSSStyleDeclaration</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!-- |
| asdocTitle = 'CSSStyleDeclaration - ApacheFlex API Reference'; |
| var baseRef = '../../'; |
| window.onload = configPage; |
| --></script> |
| <script type="text/javascript"> |
| scrollToNameAnchor(); |
| </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.0 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a> | <a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a> | <a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a> | <a id="framesLink1" href="../../index.html?mx/styles/CSSStyleDeclaration.html&mx/styles/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">CSSStyleDeclaration</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> |
| <!-- |
| |
| if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("CSSStyleDeclaration"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);} |
| --> |
| </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.styles</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class CSSStyleDeclaration</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">CSSStyleDeclaration <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr><tr><td class="classHeaderTableLabel">Subclasses</td><td> <a href="../../mx/controls/advancedDataGridClasses/AdvancedDataGridColumn.html">AdvancedDataGridColumn</a>, <a href="../../mx/controls/dataGridClasses/DataGridColumn.html">DataGridColumn</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p> |
| 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. |
| |
| <p>A CSS rule such as |
| <pre> |
| Button { color: #FF0000 } |
| </pre> |
| affects every instance of the Button class; |
| a selector like <code>Button</code> is called a type selector |
| and must not start with a dot.</p> |
| <p>A CSS rule such as |
| <pre> |
| .redButton { color: #FF0000 } |
| </pre> |
| affects only components whose <code>styleName</code> property |
| is set to <code>"redButton"</code>; |
| a selector like <code>.redButton</code> is called a class selector |
| and must start with a dot.</p> |
| <p>You can access the autogenerated CSSStyleDeclaration objects |
| using the <code>StyleManager.getStyleDeclaration()</code> method, |
| passing it either a type selector |
| <pre> |
| var buttonDeclaration:CSSStyleDeclaration = |
| StyleManager.getStyleDeclaration("Button"); |
| </pre> |
| or a class selector |
| <pre> |
| var redButtonStyleDeclaration:CSSStyleDeclaration = |
| StyleManager.getStyleDeclaration(".redButton"); |
| </pre> |
| </p> |
| <p>You can use the <code>getStyle()</code>, <code>setStyle()</code>, |
| and <code>clearStyle()</code> methods to get, set, and clear |
| style properties on a CSSStyleDeclaration.</p> |
| <p>You can also create and install a CSSStyleDeclaration at run time |
| using the <code>StyleManager.setStyleDeclaration()</code> method: |
| <pre> |
| var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins"); |
| newStyleDeclaration.defaultFactory = function():void |
| { |
| leftMargin = 50; |
| rightMargin = 50; |
| } |
| StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true); |
| </pre> |
| </p> |
| <p></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="../../mx/core/UIComponent.html" target="">mx.core.UIComponent</a><br/><a href="StyleManager.html" target="">mx.styles.StyleManager</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#defaultFactory" class="signatureLink">defaultFactory</a> : Function<div class="summaryTableDescription"> |
| This function, if it isn't null, |
| is usually autogenerated by the MXML compiler.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#factory" class="signatureLink">factory</a> : Function<div class="summaryTableDescription"> |
| This function, if it isn't null, |
| is usually autogenerated by the MXML compiler.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#overrides" class="signatureLink">overrides</a> : Object<div class="summaryTableDescription"> |
| 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.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#selector" class="signatureLink">selector</a> : <a href="../../mx/styles/CSSSelector.html">CSSSelector</a><div class="summaryTableDescription"> |
| This property is the base selector of a potential chain of selectors |
| and conditions that are used to match CSS style declarations to |
| components.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#selectorIndex" class="signatureLink">selectorIndex</a> : int = 0<div class="summaryTableDescription"> |
| The order this CSSStyleDeclaration was added to its StyleManager.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#specificity" class="signatureLink">specificity</a> : int<div class="summaryTableDescription">[read-only] |
| Determines the order of precedence when applying multiple style |
| declarations to a component.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#subject" class="signatureLink">subject</a> : String<div class="summaryTableDescription">[read-only] |
| The subject describes the name of a component that may be a potential |
| match for this style declaration.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#CSSStyleDeclaration()" class="signatureLink">CSSStyleDeclaration</a>(selector:Object = null, styleManager:<a href="../../mx/styles/IStyleManager2.html">IStyleManager2</a> = null, autoRegisterWithStyleManager:Boolean = true)</div><div class="summaryTableDescription"> |
| Constructor.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#clearStyle()" class="signatureLink">clearStyle</a>(styleProp:String):void</div><div class="summaryTableDescription"> |
| Clears a style property on this CSSStyleDeclaration.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getStyle()" class="signatureLink">getStyle</a>(styleProp:String):*</div><div class="summaryTableDescription"> |
| Gets the value for a specified style property, |
| as determined solely by this CSSStyleDeclaration.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#matchesStyleClient()" class="signatureLink">matchesStyleClient</a>(object:<a href="../../mx/styles/IAdvancedStyleClient.html">IAdvancedStyleClient</a>):Boolean</div><div class="summaryTableDescription"> |
| Determines whether this style declaration applies to the given component |
| based on a match of the selector chain.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setStyle()" class="signatureLink">setStyle</a>(styleProp:String, newValue:*):void</div><div class="summaryTableDescription"> |
| Sets a style property on this CSSStyleDeclaration.</div></td><td class="summaryTableOwnerCol">CSSStyleDeclaration</td></tr></table></div><script language="javascript" type="text/javascript"><!-- |
| showHideInherited(); |
| --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="defaultFactory"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">defaultFactory</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>defaultFactory:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| This function, if it isn't <code>null</code>, |
| is usually autogenerated by the MXML compiler. |
| It produce copies of a plain Object, such as |
| <code>{ leftMargin: 10, rightMargin: 10 }</code>, |
| containing name/value pairs for style properties; the object is used |
| to build a node of the prototype chain for looking up style properties. |
| <p>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.</p> |
| <p>If the UIComponent was written in ActionScript, |
| this property is <code>null</code>.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get defaultFactory():Function</code><br/><code> public function set defaultFactory(value:Function):void</code><br/></div><a name="propertyDetail"></a><a name="factory"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">factory</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>factory:Function</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| This function, if it isn't <code>null</code>, |
| is usually autogenerated by the MXML compiler. |
| It produce copies of a plain Object, such as |
| <code>{ leftMargin: 10, rightMargin: 10 }</code>, |
| containing name/value pairs for style properties; the object is used |
| to build a node of the prototype chain for looking up style properties. |
| <p>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.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get factory():Function</code><br/><code> public function set factory(value:Function):void</code><br/></div><a name="propertyDetail"></a><a name="overrides"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">overrides</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>overrides:Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| If the <code>setStyle()</code> 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 <code>defaultFactory</code> and |
| <code>factory</code> properties. |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get overrides():Object</code><br/><code> public function set overrides(value:Object):void</code><br/></div><a name="propertyDetail"></a><a name="selector"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">selector</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>selector:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| This property is the base selector of a potential chain of selectors |
| and conditions that are used to match CSS style declarations to |
| components. |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get selector():<a href="../../mx/styles/CSSSelector.html">CSSSelector</a></code><br/><code> public function set selector(value:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a>):void</code><br/></div><a name="propertyDetail"></a><a name="selectorIndex"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">selectorIndex</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>public var selectorIndex:int = 0</code><p></p><p></p><p> |
| The order this CSSStyleDeclaration was added to its StyleManager. |
| MatchStyleDeclarations has to return the declarations in the order |
| they were declared |
| </p></div><a name="propertyDetail"></a><a name="specificity"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">specificity</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>specificity:int</code> [read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| Determines the order of precedence when applying multiple style |
| declarations to a component. If style declarations are of equal |
| precedence, the last one wins. |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get specificity():int</code><br/></div><a name="propertyDetail"></a><a name="subject"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">subject</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>subject:String</code> [read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| 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. |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get subject():String</code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="CSSStyleDeclaration()"></a><a name="CSSStyleDeclaration(Object,mx.styles.IStyleManager2,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">CSSStyleDeclaration</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function CSSStyleDeclaration(selector:Object = null, styleManager:<a href="../../mx/styles/IStyleManager2.html">IStyleManager2</a> = null, autoRegisterWithStyleManager:Boolean = true)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p> |
| Constructor. |
| </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">selector</span>:Object</code> (default = <code>null</code>)<code></code> — - 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. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">styleManager</span>:<a href="../../mx/styles/IStyleManager2.html">IStyleManager2</a></code> (default = <code>null</code>)<code></code> — - The style manager to set this declaration into. If the |
| styleManager is null the top-level style manager will be used. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">autoRegisterWithStyleManager</span>:Boolean</code> (default = <code>true</code>)<code></code> — - If true set the selector in the styleManager. The selector |
| will only be set if both <code>selector</code> and <code>styleManager</code> are |
| both non-null. |
| </td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="clearStyle()"></a><a name="clearStyle(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">clearStyle</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function clearStyle(styleProp:String):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Clears a style property on this CSSStyleDeclaration. |
| This is the same as setting the style value to <code>undefined</code>. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">styleProp</span>:String</code> — The name of the style property. |
| |
| </td></tr></table></p></div><a name="getStyle()"></a><a name="getStyle(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getStyle</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function getStyle(styleProp:String):*</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Gets the value for a specified style property, |
| as determined solely by this CSSStyleDeclaration. |
| <p>The returned value may be of any type.</p> |
| <p>The values <code>null</code>, <code>""</code>, <code>false</code>, |
| <code>NaN</code>, and <code>0</code> are all valid style values, |
| but the value <code>undefined</code> is not; it indicates that |
| the specified style is not set on this CSSStyleDeclaration. |
| You can use the method <code>StyleManager.isValidStyleValue()</code> |
| to test the value that is returned.</p> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">styleProp</span>:String</code> — The name of the style property. |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>*</code> — The value of the specified style property if set, |
| or <code>undefined</code> if not. |
| |
| </td></tr></table></div><a name="matchesStyleClient()"></a><a name="matchesStyleClient(mx.styles.IAdvancedStyleClient)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">matchesStyleClient</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function matchesStyleClient(object:<a href="../../mx/styles/IAdvancedStyleClient.html">IAdvancedStyleClient</a>):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 4</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p> |
| Determines whether this style declaration applies to the given component |
| based on a match of the selector chain. |
| |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">object</span>:<a href="../../mx/styles/IAdvancedStyleClient.html">IAdvancedStyleClient</a></code> — The component to match the style declaration against. |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> — true if this style declaration applies to the component, |
| otherwise false. |
| |
| </td></tr></table></div><a name="setStyle()"></a><a name="setStyle(String,any)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setStyle</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function setStyle(styleProp:String, newValue:*):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Sets a style property on this CSSStyleDeclaration. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">styleProp</span>:String</code> — The name of the style property. |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">newValue</span>:*</code> — The value of the style property. |
| The value may be of any type. |
| The values <code>null</code>, <code>""</code>, <code>false</code>, |
| <code>NaN</code>, and <code>0</code> are all valid style values, |
| but the value <code>undefined</code> is not. |
| Setting a style property to the value <code>undefined</code> |
| is the same as calling the <code>clearStyle()</code> method. |
| |
| </td></tr></table></p></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Sun Mar 5 2017, 03:42 PM +11:00 </center></div></body></html><!--The Apache Software Foundation<br/>Sun Mar 5 2017, 03:42 PM +11:00 --> |