Legato.Util.LayerValueAccessor

Small helper class which implements some sort of an setter, getter Pattern.  With this class you’re able to wrap some other classes so that the wrapped classed is accessed just with the getter setter Pattern.

Summary
Legato.Util.LayerValueAccessorSmall helper class which implements some sort of an setter, getter Pattern.
Properties
target{Object} The wrapped target class
fieldIf defined the field will be used if existing in target
setterIf defined this function will be used as setter if existing in target
getterIf defined this function will be used as getter if existing in target
Functions
initializeBasic ctor for the accessor class
setValueSetter for wraped target instance value
getValueGetter for wraped target instance value

Properties

target

{Object} The wrapped target class

field

If defined the field will be used if existing in target

setter

If defined this function will be used as setter if existing in target

getter

If defined this function will be used as getter if existing in target

Functions

initialize

initialize : function(options)

Basic ctor for the accessor class

Parameters

options{Object} A Hashmap containing option parameters for this class The following keys are supported
  • target {Object} the used target instance
  • field {String} Optional field specification.  Will be used as getter and setter if defined
  • setter {String} Optional function specification which must exists in target
  • getter {String} Optional function specification which must exists in target

setValue

setValue : function(value)

Setter for wraped target instance value

Parameters

value{Object} The value to set.  Could be any type

getValue

getValue : function()

Getter for wraped target instance value

Returns

{Object} Could be any type

initialize : function(options)
Basic ctor for the accessor class
setValue : function(value)
Setter for wraped target instance value
getValue : function()
Getter for wraped target instance value