패키지 | mx.styles |
클래스 | public class AdvancedStyleClient |
상속 | AdvancedStyleClient EventDispatcher Object |
구현 | IAdvancedStyleClient, IFlexModule, IMXMLObject |
하위 클래스 | GlobalizationBase, Sort, SortField |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
IAdvancedStyleClient
interface. The base class supplies
implementations of the methods and properties required for an object
to participate in the style subsystem.
In addition to the IAdvancedStyleClient
interface,
this object also implements the IFlexModule
and
IMXMLObject
interfaces. The IMXMLObject
interface contains an initialized
method that is called
when the class is instantiated using an MXML declaration.
The implementation of the initialized
method provided
by this base class will add the class instance to the document object
that contains the MXML declaration. For more details, see the description
of the initilized
method.
관련 API 요소
속성 | 정의 주체 | ||
---|---|---|---|
className : String [읽기 전용]
The name of the component class. | AdvancedStyleClient | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
id : String
The identity of the component. | AdvancedStyleClient | ||
inheritingStyles : Object
An object containing the inheritable styles for this non-visual
style client instance. | AdvancedStyleClient | ||
moduleFactory : IFlexModuleFactory
A module factory is used as context for
finding the style manager that controls the styles for this
non-visual style client instance. | AdvancedStyleClient | ||
nonInheritingStyles : Object
The beginning of this component's chain of non-inheriting styles. | AdvancedStyleClient | ||
styleDeclaration : CSSStyleDeclaration
The style declaration that holds the inline styles declared by this
object. | AdvancedStyleClient | ||
styleManager : IStyleManager2 [읽기 전용]
Returns the StyleManager instance used by this component. | AdvancedStyleClient | ||
styleName : Object
The source of this object's style values. | AdvancedStyleClient | ||
styleParent : IAdvancedStyleClient
A component's parent is used to evaluate descendant selectors. | AdvancedStyleClient |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | AdvancedStyleClient | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Deletes a style property from this component instance. | AdvancedStyleClient | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
Returns an Array of CSSStyleDeclaration objects for the type selector
that applies to this component, or null if none exist. | AdvancedStyleClient | ||
Gets a style property that has been set anywhere in this
component's style lookup chain. | AdvancedStyleClient | ||
Returns true if currentCSSState is not null. | AdvancedStyleClient | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
The initialized method is called when this class or a class that
extends this class is used in an MXML declaration. | AdvancedStyleClient | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
Returns true if cssState matches currentCSSState. | AdvancedStyleClient | ||
Determines whether this instance is the same as, or is a subclass of,
the given type. | AdvancedStyleClient | ||
Propagates style changes to the children of this style client
instance. | AdvancedStyleClient | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
Sets up the internal style cache values so that the
getStyle()
method functions. | AdvancedStyleClient | ||
Registers the EffectManager as one of the event listeners
for each effect event. | AdvancedStyleClient | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
Sets a style property on this component instance. | AdvancedStyleClient | ||
Detects changes to style properties. | AdvancedStyleClient | ||
Flex calls the stylesInitialized() method when
the styles for a component are first initialized. | AdvancedStyleClient | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher |
className | 속성 |
id | 속성 |
inheritingStyles | 속성 |
moduleFactory | 속성 |
moduleFactory:IFlexModuleFactory
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
A module factory is used as context for finding the style manager that controls the styles for this non-visual style client instance.
구현
public function get moduleFactory():IFlexModuleFactory
public function set moduleFactory(value:IFlexModuleFactory):void
nonInheritingStyles | 속성 |
nonInheritingStyles:Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
The beginning of this component's chain of non-inheriting styles.
The getStyle()
method simply accesses
nonInheritingStyles[styleName]
to search the entire
prototype-linked chain.
This object is set up by initProtoChain()
.
Developers typically never need to access this property directly.
구현
public function get nonInheritingStyles():Object
public function set nonInheritingStyles(value:Object):void
styleDeclaration | 속성 |
styleDeclaration:CSSStyleDeclaration
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
The style declaration that holds the inline styles declared by this object.
구현
public function get styleDeclaration():CSSStyleDeclaration
public function set styleDeclaration(value:CSSStyleDeclaration):void
관련 API 요소
styleManager | 속성 |
styleManager:IStyleManager2
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Returns the StyleManager instance used by this component.
구현
public function get styleManager():IStyleManager2
styleName | 속성 |
styleName:Object
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
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.
구현
public function get styleName():Object
public function set styleName(value:Object):void
styleParent | 속성 |
styleParent:IAdvancedStyleClient
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
A component's parent is used to evaluate descendant selectors. A parent must also be an IAdvancedStyleClient to participate in advanced style declarations.
구현
public function get styleParent():IAdvancedStyleClient
public function set styleParent(value:IAdvancedStyleClient):void
AdvancedStyleClient | () | 생성자 |
public function AdvancedStyleClient()
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Constructor.
clearStyle | () | 메서드 |
public function clearStyle(styleProp:String):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Deletes a style property from this component instance.
This does not necessarily cause the getStyle()
method to return
undefined
.
매개 변수
styleProp:String — Name of the style property.
|
getClassStyleDeclarations | () | 메서드 |
public function getClassStyleDeclarations():Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
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.
반환값Array — Array of CSSStyleDeclaration objects.
|
getStyle | () | 메서드 |
public function getStyle(styleProp:String):*
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
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.
매개 변수
styleProp:String — Name of the style property.
|
* — Style value.
|
hasCSSState | () | 메서드 |
public function hasCSSState():Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.6 |
런타임 버전: | 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.
Boolean — true if currentCSSState is not null .
By default, currentCSSState is the same as currentState .
If no state exists, return false.
|
initialized | () | 메서드 |
public function initialized(document:Object, id:String):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
The initialized method is called when this class or a class that extends this class is used in an MXML declaration. It is called after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
If the document that created this object is a UIComponent
,
(e.g. Application, Module, etc.) then the UIComponent's
addStyleClient
method will be called to add this object to the
UIComponent's list of non-visual style clients. This allows the
object to inherit styles from the document.
매개 변수
document:Object — The MXML document that created this object.
| |
id:String — The identifier used by the document object to refer to
this object.
|
matchesCSSState | () | 메서드 |
public function matchesCSSState(cssState:String):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.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.
매개 변수
cssState:String — A possible value of CSSCondition.value .
It represents the current state of this component used to match CSS pseudo-selectors.
|
Boolean — true if cssState matches currentCSSState .
By default, currentCSSState is the same as currentState .
If no state exists, return null.
|
matchesCSSType | () | 메서드 |
public function matchesCSSType(cssType:String):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.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.
매개 변수
cssType:String — A CSSSelector object.
|
Boolean — true if cssType is in the hierarchy of qualified type selectors.
|
notifyStyleChangeInChildren | () | 메서드 |
public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Propagates style changes to the children of this style client instance. A non-visual style client (i.e. a style client that is not a DisplayObject) does not have children, therefore this method does not do anything for non-visual style clients.
매개 변수
styleProp:String — Name of the style property.
| |
recursive:Boolean — Whether to propagate the style changes to the
children's children.
|
regenerateStyleCache | () | 메서드 |
registerEffects | () | 메서드 |
setStyle | () | 메서드 |
public function setStyle(styleProp:String, newValue:*):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
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.
매개 변수
styleProp:String — Name of the style property.
| |
newValue:* — New value for the style.
|
styleChanged | () | 메서드 |
public function styleChanged(styleProp:String):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Detects changes to style properties. When any style property is set,
Flex calls the styleChanged()
method,
passing to it the name of the style being set.
This is an advanced method that you might override
when creating a subclass of AdvancedStyleClient
.
When you create a custom class,
you can override the styleChanged()
method
to check the style name passed to it, and handle the change
accordingly.
This lets you override the default behavior of an existing style,
or add your own custom style properties.
매개 변수
styleProp:String — The name of the style property, or null if all
styles for this
style client have changed.
|
stylesInitialized | () | 메서드 |
public function stylesInitialized():void
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 4.5 |
런타임 버전: | Flash Player 10, AIR 2.5 |
Flex calls the stylesInitialized()
method when
the styles for a component are first initialized.
Tue Jun 12 2018, 03:17 PM Z