패키지 | mx.effects |
클래스 | public class EffectTargetFilter |
상속 | EffectTargetFilter ![]() |
하위 클래스 | AddRemoveEffectTargetFilter, HideShowEffectTargetFilter |
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The EffectTargetFilter class defines a
defaultFilterFunction()
method that uses the
filterProperties
and filterStyles
properties
to determine whether to play the effect on each effect target.
You can also define a custom filter function
to implement your own filtering logic.
To do so, define your filter function, and then specify that function
to an EffectTargetFilter object using the filterFunction
property.
To configure an effect to use a custom filter, you pass an
EffectTargetFilter object to the Effect.customFilter
property
of the effect.
기타 예제
속성 | 정의 주체 | ||
---|---|---|---|
![]() | constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | |
filterFunction : Function
A function that defines custom filter logic. | EffectTargetFilter | ||
filterProperties : Array
An Array of Strings specifying component properties. | EffectTargetFilter | ||
filterStyles : Array
An Array of Strings specifying style properties. | EffectTargetFilter | ||
requiredSemantics : Object = null
A collection of properties and associated values which must be associated
with a target for the effect to be played. | EffectTargetFilter |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | EffectTargetFilter | ||
filterInstance(propChanges:Array, semanticsProvider:mx.effects:IEffectTargetHost, target:Object):Boolean
Determines whether a target should be filtered, returning true if it should be
included in an effect. | EffectTargetFilter | ||
![]() |
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | |
![]() |
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | |
![]() |
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | |
![]() |
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | |
![]() |
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 프리미티브 값을 반환합니다. | Object |
메서드 | 정의 주체 | ||
---|---|---|---|
The default filter function for the EffectTargetFilter class. | EffectTargetFilter |
filterFunction | 속성 |
public var filterFunction:Function
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
A function that defines custom filter logic.
Flex calls this method on every target of the effect.
If the function returns true
,
the effect plays on the target;
if it returns false
, the target is skipped by the effect.
A custom filter function gives you greater control over filtering
than the Effect.filter
property.
The filter function has the following signature:
filterFunc(propChanges:Array, instanceTarget:Object):Boolean { // Return true to play the effect on instanceTarget, // or false to not play the effect. }
where:
propChanges
- An Array of PropertyChanges objects,
one object per target component of the effect.
If a property of a target is not modified by the transition,
it is not included in this Array.
instanceTarget
- The specific target component
of the effect that you want to filter.
Within the custom filter function, you first search the
propChanges
Array for the PropertyChanges object
that matches the instanceTarget
argument
by comparing the instanceTarget
argument
to the propChanges.target
property.
관련 API 요소
filterProperties | 속성 |
public var filterProperties:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
An Array of Strings specifying component properties. If any of the properties in the Array changed on the target component, play the effect on the target.
If you define a custom filter function, you can examine the
filterProperties
property from within your function.
filterStyles | 속성 |
public var filterStyles:Array
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
An Array of Strings specifying style properties. If any of the style properties in the Array changed on the target component, play the effect on the target.
If you define a custom filter function, you can examine the
filterStyles
property from within your function.
requiredSemantics | 속성 |
public var requiredSemantics:Object = null
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
A collection of properties and associated values which must be associated with a target for the effect to be played.
When working with data effects, you can use this property to filter effects. If you want to play a data effect on all targets of a list control that are not added by the effect, meaning targets that is removed, replaced, moved, or affected in any other way, you can write the effect definition as shown below:
<mx:Blur> <mx:customFilter> <mx:EffectTargetFilter requiredSemantics="{{'added':false}}"/> </mx:customFilter> </mx:Blur>
To play a data effect on all targets that are not added or not removed by the effect, you can write the effect definition as shown below:
<mx:Blur> <mx:customFilter> <mx:EffectTargetFilter requiredSemantics="{{'added':false}, {'removed':false}}"/> </mx:customFilter> </mx:Blur>
The allowed list of properties that you can specify includes added
,
removed
, replaced
, and replacement
.
The allowed values for the properties are true
and false
.
EffectTargetFilter | () | 생성자 |
public function EffectTargetFilter()
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
defaultFilterFunction | () | 메서드 |
protected function defaultFilterFunction(propChanges:Array, instanceTarget:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
The default filter function for the EffectTargetFilter class.
If the instanceTarget
has different start and end values
for any of the values specified by the filterProperties
or filterStyles
properties, play the effect on the target.
매개 변수
propChanges:Array — An Array of PropertyChanges objects.
The target property of each PropertyChanges object
is equal to the effect's target.
If a property of a target is not modified by a transition, the
corresponding PropertyChanges
object is not included in this array.
| |
instanceTarget:Object — The target of the EffectInstance
that calls this function.
If an effect has multiple targets,
this function is called once per target.
|
Boolean — Returns true to allow the effect instance to play.
|
관련 API 요소
filterInstance | () | 메서드 |
public function filterInstance(propChanges:Array, semanticsProvider:mx.effects:IEffectTargetHost, target:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Flex 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Determines whether a target should be filtered, returning true if it should be included in an effect. The determination is made by calling filterFunction and semanticFilterFunction, returning true if and only if both functions return true. The default functions with the default values will always return true. Typically, an EffectTargetFilter will use one type of filter or the other, but not both.
매개 변수
propChanges:Array — An Array of PropertyChanges objects. The target property of
each PropertyChanges object is equal to the effect's target. If a property of
a target is not modified by a transition, the corresponding PropertyChanges
object is not included in this array.
| |
semanticsProvider:mx.effects:IEffectTargetHost — The IEffectTargetHost used to evaluate the properties
specified in requiredSemantics for the target, normally the effectTargetHost of
the effect. For item change effects, when the targets of the effect are item
renderers, this will be the List or TileList containing the item renderers.
| |
target:Object — The target of the EffectInstance that calls this function. If an
effect has multiple targets, this function is called once per target.
|
Boolean — Returna true , if the target should be included in the effect;
otherwise returns false .
|
Tue Jun 12 2018, 03:17 PM Z