Package | org.spicefactory.parsley.core.view.impl |
Class | public class DefaultViewConfiguration |
Inheritance | DefaultViewConfiguration Object |
Implements | ViewConfiguration |
Property | Defined By | ||
---|---|---|---|
autoremove : Flag
Indicates whether the target should be removed when the view is removed
from the stage. | DefaultViewConfiguration | ||
configId : String [read-only]
The configuration id to use to look up an object definition
matching this target instance. | DefaultViewConfiguration | ||
definition : DynamicObjectDefinition
The object definition to use to configure the target. | DefaultViewConfiguration | ||
lifecycle : ViewLifecycle
The instance that controls the lifecycle of the view. | DefaultViewConfiguration | ||
processor : ViewProcessor
The processor to use for the target instance. | DefaultViewConfiguration | ||
reuse : Flag
Indicates whether the target instance will be reused in subsequent
lifecycles of the view. | DefaultViewConfiguration | ||
target : Object [read-only]
The target to get processed by the nearest Context in the view hierarchy. | DefaultViewConfiguration | ||
view : DisplayObject [read-only]
The view that demarcates the lifecycle of the target instance. | DefaultViewConfiguration |
Method | Defined By | ||
---|---|---|---|
DefaultViewConfiguration(view:DisplayObject, target:Object = null, configId:String = null)
Creates a new instance. | DefaultViewConfiguration |
autoremove | property |
autoremove:Flag
Indicates whether the target should be removed when the view is removed
from the stage. Only has an effect when no custom ViewLifecycle
has been set. The exact action to be performed when the view gets removed
from the stage is determined by the destroy
method of the
ViewProcessor
.
public function get autoremove():Flag
public function set autoremove(value:Flag):void
configId | property |
configId:String
[read-only] The configuration id to use to look up an object definition matching this target instance. If a definition has already been set for this configuration instance, this value will be ignored.
public function get configId():String
definition | property |
definition:DynamicObjectDefinition
The object definition to use to configure the target. This property is optional. Some ViewProcessors may look for an object definition in the Context that matches the target instance getting processed when this value is null.
public function get definition():DynamicObjectDefinition
public function set definition(value:DynamicObjectDefinition):void
lifecycle | property |
lifecycle:ViewLifecycle
The instance that controls the lifecycle of the view. This property may be null, in this case the default lifecycle installed in the Context for the type of view of this configuration will be used.
public function get lifecycle():ViewLifecycle
public function set lifecycle(value:ViewLifecycle):void
processor | property |
processor:ViewProcessor
The processor to use for the target instance. This property may be null, in this case the default processor installed in the Context will be used.
public function get processor():ViewProcessor
public function set processor(value:ViewProcessor):void
reuse | property |
reuse:Flag
Indicates whether the target instance will be reused in subsequent lifecycles of the view. When set to false the configuration will only be processed once. This value should be true if the application keeps instances of the view in memory and adds them back to the stage later. It should be false if the view will get garbage collected once it has been removed from the stage.
public function get reuse():Flag
public function set reuse(value:Flag):void
target | property |
target:Object
[read-only] The target to get processed by the nearest Context in the view hierarchy.
public function get target():Object
view | property |
view:DisplayObject
[read-only] The view that demarcates the lifecycle of the target instance. The view may be the same instance as the target itself or a different one that just controls the lifecycle. A typical example for the two properties pointing to different instances would be the target being a presentation model that should get added to the Context for the time the view it belongs to is on the stage.
public function get view():DisplayObject
DefaultViewConfiguration | () | Constructor |
public function DefaultViewConfiguration(view:DisplayObject, target:Object = null, configId:String = null)
Creates a new instance. If no target is specified the view itself is used as the target.
Parametersview:DisplayObject — the view that controls the lifecycle of the target
| |
target:Object (default = null ) — the target to get processed by the Context
| |
configId:String (default = null ) — the configuration id to use to fetch matching definitions from the Context
|