| <!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="CSSSelector,mx.styles.CSSSelector,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.CSSSelector</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 = 'CSSSelector - 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.1 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/CSSSelector.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">CSSSelector</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("CSSSelector"); 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 CSSSelector</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">CSSSelector <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</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 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></p><p></p> |
| Represents a selector node in a potential chain of selectors used to match |
| CSS style declarations to components. |
| |
| <p></p><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="#ancestor" class="signatureLink">ancestor</a> : <a href="../../mx/styles/CSSSelector.html">CSSSelector</a><div class="summaryTableDescription">[read-only] |
| If this selector is part of a descendant selector it may have a further |
| selector defined for an arbitrary ancestor.</div></td><td class="summaryTableOwnerCol">CSSSelector</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a href="#conditions" class="signatureLink">conditions</a> : Array<div class="summaryTableDescription">[read-only] |
| This selector may match a subset of components by specifying further |
| conditions (for example, a matching component must have a particular id, |
| styleName (equivalent to a 'class' condition in CSS) or state |
| (equivalent to a 'pseudo' condition in CSS)).</div></td><td class="summaryTableOwnerCol">CSSSelector</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] |
| Calculates the specificity of a selector chain in order to determine |
| the precedence when applying several matching style declarations.</div></td><td class="summaryTableOwnerCol">CSSSelector</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 of this selector node (only).</div></td><td class="summaryTableOwnerCol">CSSSelector</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="#CSSSelector()" class="signatureLink">CSSSelector</a>(subject:String, conditions:Array = null, ancestor:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a> = null)</div><div class="summaryTableDescription"> |
| Constructor.</div></td><td class="summaryTableOwnerCol">CSSSelector</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 selector matches the given component.</div></td><td class="summaryTableOwnerCol">CSSSelector</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>():String</div><div class="summaryTableDescription"> |
| Returns a String representation of this selector.</div></td><td class="summaryTableOwnerCol">CSSSelector</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="ancestor"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">ancestor</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>ancestor:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a></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> |
| If this selector is part of a descendant selector it may have a further |
| selector defined for an arbitrary ancestor. |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get ancestor():<a href="../../mx/styles/CSSSelector.html">CSSSelector</a></code><br/></div><a name="propertyDetail"></a><a name="conditions"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">conditions</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code>conditions:Array</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> |
| This selector may match a subset of components by specifying further |
| conditions (for example, a matching component must have a particular id, |
| styleName (equivalent to a 'class' condition in CSS) or state |
| (equivalent to a 'pseudo' condition in CSS)). |
| |
| <p>If no conditions are specified, this property is null.</p> |
| |
| </p><br/><span class="label"> Implementation </span><br/><code> public function get conditions():Array</code><br/></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> |
| Calculates the specificity of a selector chain in order to determine |
| the precedence when applying several matching style declarations. Note |
| that id conditions contribute 100 points, pseudo and class conditions |
| each contribute 10 points, types (including descendants in a chain of |
| selectors) contribute 1 point. Universal selectors (") contribute |
| nothing. The result is the sum of these contributions. Selectors with a |
| higher specificity override selectors of lower specificity. If |
| selectors have equal specificity, the declaration order determines |
| the 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 of this selector node (only). To get a String representation |
| of all conditions and descendants of this selector call the <code>toString()</code> |
| method. |
| |
| <p>If this selector represents the root node of a potential chain of |
| selectors, the subject also represents the subject of the entire selector |
| expression.</p> |
| |
| </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="CSSSelector()"></a><a name="CSSSelector(String,Array,mx.styles.CSSSelector)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">CSSSelector</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function CSSSelector(subject:String, conditions:Array = null, ancestor:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a> = null)</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> |
| Constructor. |
| |
| </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">subject</span>:String</code> — The plain representation of this selector without |
| conditions or ancestors. This is typically a fully-qualified class name; for example, |
| "spark.components.Button". You can use " to match all components or "global" for a global selector. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">conditions</span>:Array</code> (default = <code>null</code>)<code></code> — An optional Array of objects of type CSSCondition that is used to match a |
| subset of component instances. Currently only a single or a pair of |
| conditions are supported. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">ancestor</span>:<a href="../../mx/styles/CSSSelector.html">CSSSelector</a></code> (default = <code>null</code>)<code></code> — An optional selector to match on a component that |
| descends from an arbitrary ancestor. |
| |
| </td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</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></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 selector matches the given component. |
| |
| </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 which the selector may apply. |
| </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 component is a match, or false if not. |
| |
| </td></tr></table></div><a name="toString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public function toString():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 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> |
| Returns a String representation of this selector. |
| |
| </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> — A String representation of this selector including all of its |
| syntax, conditions and ancestors. |
| |
| </td></tr></table></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 --> |