{ "type": "class", | |
"qname": "mx.styles.CSSStyleDeclaration", | |
"baseClassname": "org.apache.royale.events.EventDispatcher" | |
, | |
"description": "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>\\n Button { color: #FF0000 }\\n </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>\\n .redButton { color: #FF0000 }\\n </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>\\n var buttonDeclaration:CSSStyleDeclaration =\\n StyleManager.getStyleDeclaration("Button");\\n </pre> or a class selector <pre>\\n var redButtonStyleDeclaration:CSSStyleDeclaration =\\n StyleManager.getStyleDeclaration(".redButton");\\n </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>\\n var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration(".bigMargins");\\n newStyleDeclaration.defaultFactory = function():void\\n {\\n leftMargin = 50;\\n rightMargin = 50;\\n }\\n StyleManager.setStyleDeclaration(".bigMargins", newStyleDeclaration, true);\\n </pre> </p>", | |
"tags": [ | |
{ "tagName": "see", | |
"values": ["mx.core.UIComponent", "mx.styles.StyleManager"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "mx.styles.CSSStyleDeclaration", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor. 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 is null the top-level style manager will be used. will only be set if both <code>selector</code> and <code>styleManager</code> are both non-null.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["selector - If the selector is a CSSSelector then advanced", "styleManager - The style manager to set this declaration into. If the", "autoRegisterWithStyleManager - If true set the selector in the styleManager. The selector"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": [{ "name": "selector", "type": "Object"}, | |
{ "name": "styleManager", "type": "mx.styles.IStyleManager2"}, | |
{ "name": "autoRegisterWithStyleManager", "type": "Boolean"}]} | |
, | |
{ "type": "accessor", | |
"access": "read-write", | |
"return": "Function", | |
"qname": "defaultFactory", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "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>", | |
"tags": [ | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ]}, | |
{ "type": "method", | |
"qname": "getStyle", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "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> or <code>undefined</code> if not.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["styleProp The name of the style property."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "return", | |
"values": ["The value of the specified style property if set,"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "*", | |
"params": [{ "name": "styleProp", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "setStyle", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Sets a style property on this CSSStyleDeclaration. 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.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["styleProp The name of the style property.", "newValue The value of the style property."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Flex 3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "void", | |
"params": [{ "name": "styleProp", "type": "String"}, | |
{ "name": "newValue", "type": "*"}]} | |
, | |
{ "type": "accessor", | |
"access": "write-only", | |
"return": "String", | |
"qname": "name", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}}] | |
} |