Packagecom.adobe.portfolio.properties
Classpublic class PropertyContext
InheritancePropertyContext Inheritance flash.events.EventDispatcher
Implements IPropertyContext

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

This class provides support for groups of properties displayed in the user interface.

The PropertyContext object represents a grouping of properties that are relevant to each other. Property contexts can be global, which indicates that the group of properties they contain are always suitable for presentation in the UI, or transient, in which case the properties may or may not be relevant depending on the user's actions.

A PropertyContext object contains information for displaying a group of properties in the UI. The getProperty function allows a navigator host to trigger the creation of Property objects, while still allowing the Navigator on the other side of the bridge to actually create them. The navigator host can create its needed properties, configure them, and then set their values.

Note that the full set of properties available at any point is the union of the global properties (those perperties whose global property is true) and the properties relevant to the current context.



Public Properties
 PropertyDefined By
  description : String
[read-only] The localized description of the PropertyContext
PropertyContext
  dirty : Boolean
true if this PropertyContext has been modified and needs to be saved; false otherwise.
PropertyContext
  global : Boolean
[read-only] Returns a value of true if the controls for this context are always suitable for display in the user interface.
PropertyContext
  label : String
[read-only] The localized label for the PropertyContext
PropertyContext
  name : String
[read-only] Returns a unique string identifier for this PropertyContext.
PropertyContext
  properties : Array
[read-only] The array of properties
PropertyContext
  url : String
[read-only] The URL of the PropertyContext
PropertyContext
Protected Properties
 PropertyDefined By
  descriptionDefault : String
The default description string to be used when the localized description is unavailable.
PropertyContext
  descriptionKey : String
The string used as a key to request a localized description string.
PropertyContext
  labelDefault : String
The default label string to be used when the localized label is unavailable.
PropertyContext
  labelKey : String
The string used as a key to request a localized label string.
PropertyContext
Public Methods
 MethodDefined By
  
PropertyContext(url:String, target:IEventDispatcher = null)
Constructor
PropertyContext
  
Create a set of XML elements from the PropertyContext.
PropertyContext
  
Returns the PropertyValue of the property with the given name, null otherwise.
PropertyContext
  
loadFromXML(contextXML:XML, forceGlobal:Boolean = false):Boolean
Load the PropertyContext from an XML object and localize the values.
PropertyContext
  
updatePropertyFromHost(propertyName:String, newValue:*):void
Set a new value for a property that is supplied by the host
PropertyContext
Property Detail
descriptionproperty
description:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The localized description of the PropertyContext


Implementation
    public function get description():String
descriptionDefaultproperty 
protected var descriptionDefault:String

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The default description string to be used when the localized description is unavailable.

descriptionKeyproperty 
protected var descriptionKey:String

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The string used as a key to request a localized description string.

dirtyproperty 
dirty:Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

true if this PropertyContext has been modified and needs to be saved; false otherwise.


Implementation
    public function get dirty():Boolean
    public function set dirty(value:Boolean):void
globalproperty 
global:Boolean  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns a value of true if the controls for this context are always suitable for display in the user interface. Returns false if the controls for this context should only be displayed when it is set as the current context.


Implementation
    public function get global():Boolean
labelproperty 
label:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The localized label for the PropertyContext


Implementation
    public function get label():String
labelDefaultproperty 
protected var labelDefault:String

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The default label string to be used when the localized label is unavailable.

labelKeyproperty 
protected var labelKey:String

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The string used as a key to request a localized label string.

nameproperty 
name:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns a unique string identifier for this PropertyContext.


Implementation
    public function get name():String
propertiesproperty 
properties:Array  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The array of properties


Implementation
    public function get properties():Array
urlproperty 
url:String  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The URL of the PropertyContext


Implementation
    public function get url():String
Constructor Detail
PropertyContext()Constructor
public function PropertyContext(url:String, target:IEventDispatcher = null)

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Constructor

Parameters
url:String — The URL of the property context. The default is ""
 
target:IEventDispatcher (default = null) — The event dispatcher to be passed to the host The default is null
Method Detail
generateXML()method
public function generateXML():XML

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Create a set of XML elements from the PropertyContext.

Returns
XML
getProperty()method 
public function getProperty(name:String):PropertyValue

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the PropertyValue of the property with the given name, null otherwise.

Parameters

name:String — the name of the specified property

Returns
PropertyValue
loadFromXML()method 
public function loadFromXML(contextXML:XML, forceGlobal:Boolean = false):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Load the PropertyContext from an XML object and localize the values.

Parameters

contextXML:XML
 
forceGlobal:Boolean (default = false)

Returns
Boolean
updatePropertyFromHost()method 
public function updatePropertyFromHost(propertyName:String, newValue:*):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Set a new value for a property that is supplied by the host

Parameters

propertyName:String — The name of the property that is to be updated.
 
newValue:* — the new value to be set for the property