Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.effects 
IEffectTargetHost 
Packagemx.effects
Interfacepublic interface IEffectTargetHost
Implementors AdvancedListBase, ListBase

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The IEffectTargetHost interface defines the interface that lets you access the target list-based control of a data effect. All list-based controls implement this interface. This interface enables an instance of an effect class to communicate with the list-based control on which the effect is playing. This interface is also used for determining whether to play an effect based on if a data item is added, removed, or replaced in the target control.

See also



Public Methods
 MethodDefined By
  
Adds an item renderer if a data change effect is running.
IEffectTargetHost
  
getRendererSemanticValue(target:Object, semanticProperty:String):Object
Returns true or false to indicates whether the effect should play on the target.
IEffectTargetHost
  
Removes an item renderer if a data change effect is running.
IEffectTargetHost
  
Called by an UnconstrainItemAction effect as part of a data change effect if the item renderers corresponding to certain data items need to move outside the normal positions of item renderers in the control.
IEffectTargetHost
Method Detail

addDataEffectItem

()method
public function addDataEffectItem(target:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Adds an item renderer if a data change effect is running. The item renderer should correspond to a recently added data item in the data provider's collection that isn't yet being displayed.

This function will be called by an AddItemAction effect as part of a data change effect to specify the point at which a data item added to a collection begins to be displayed by the control using an item renderer.

Parameters

target:Object — The item renderer to add to the control's layout.

getRendererSemanticValue

()method 
public function getRendererSemanticValue(target:Object, semanticProperty:String):Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns true or false to indicates whether the effect should play on the target. The EffectTargetFilter class calls this method when you set the filter property on a data effect. For example, you set filter property to addItem or removeItem.

Parameters

target:Object — An item renderer
 
semanticProperty:String — The semantic property of the renderer whose value will be returned.

Returns
Objecttrue or false to indicates whether the effect should play on the target.

removeDataEffectItem

()method 
public function removeDataEffectItem(target:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Removes an item renderer if a data change effect is running. The item renderer must correspond to data that has already been removed from the data provider collection. This function will be called by a RemoveItemAction effect as part of a data change effect to specify the point at which a data item ceases to displayed by the control using an item renderer.

Parameters

target:Object — The item renderer to remove from the control's layout.

unconstrainRenderer

()method 
public function unconstrainRenderer(item:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Called by an UnconstrainItemAction effect as part of a data change effect if the item renderers corresponding to certain data items need to move outside the normal positions of item renderers in the control. The control does not attempt to position the item render for the duration of the effect.

Parameters

item:Object — The item renderer that is a target of the effect.