swfwidget.js revision 106cc795c2891f2d2d142772cadefbcb5975bcfa
/**
*
* SWFWidget is the base class for all JS classes that manage styles
* and communicates with a SWF Application.
*/
/**
* Creates the SWFWidget instance and contains initialization data
*
* @param {Object} config (optional) Configuration parameters for the Chart.
* @class SWFWidget
* @constructor
*/
{
this._createId();
}
/**
* Attribute config
* @private
*/
/**
* Reference to the application class
*/
app: {
getter: function()
{
return this._app;
},
{
return val;
}
},
/**
* Parent element for the SWFWidget instance.
*/
parent:{
lazyAdd:false,
getter: function()
{
return this._parent;
},
{
if(val instanceof Y.SWFApplication)
{
}
{
}
}
},
/**
* Indicates whether item has been added to its parent.
*/
{
value:false
},
/**
* Reference to corresponding Actionscript class.
*/
{
readOnly:true,
getter: function()
{
return this.AS_CLASS;
}
},
/**
* Hash of style properties for class
*/
{
value: {},
{
this._updateStyles();
return val;
},
{
}
},
/**
* Id for instance
*/
id:
{
getter: function()
{
return this._id;
}
}
};
{
/**
* @private
* Storage for parent
*/
_parent: null,
/**
* @private
* Storage for app
*/
_app: null,
/**
* Creates unique id for class instance.
*
* @private
*/
_createId: function()
{
},
/**
* Reference to corresponding Actionscript class.
*/
AS_CLASS: "SWFWidget",
/**
* Indicates whether or not the swf has initialized.
* @type Boolean
*/
swfReadyFlag: false,
/**
* Constant used to generate unique id.
*/
GUID: "yuiswfwidget",
/**
* @private
*
* Returns a hash of default styles for the class.
*/
_getDefaultStyles:function()
{
return {};
},
/**
* @private
*
* Hash of child references with style objects.
*/
_styleObjHash: null,
/**
* Sets multiple style properties on the instance.
*
* @method _setStyles
* @param {Object} styles Hash of styles to be applied.
*/
_setStyles: function(newstyles)
{
styleHash = this._styleObjHash;
{
{
if(j instanceof SWFWidget)
{
}
{
}
else
{
}
}
else
{
j = this._id;
{
}
else
{
}
}
}, this);
return styles;
},
/**
* Merges to object literals only overriding properties explicitly.
*
* @private
* @param {Object} newHash hash of properties to set
* @param {Object} default hash of properties to be overwritten
* @return {Object}
*/
_mergeStyles: function(a, b)
{
{
{
}
else
{
}
}, this);
return b;
},
/**
* Updates and applies styles to the appropriate object in the flash application.
*
* @method _updateStyles
* @private
*/
_updateStyles: function()
{
var styleHash = this._styleObjHash,
{
if(this._id === key || (styleHash && styleHash.hasOwnProperty(key) && !(styleHash[key] instanceof SWFWidget)))
{
}
}, this);
},
/**
* @private (override)
*/
{
},
/**
* @private
* Dispatches events from flash.
*/
_eventHandler: function(event)
{
},
/**
* Calls a method on the SWF
*/
{
},
/**
* Creates a class instance on the SWF.
*/
{
},
/**
* Calls a method on an Actionscript class instance.
*/
{
},
/**
* Exposes a method on an Actionscript class instance.
*/
{
},
/**
* Returns the value of a property on an Actionscript class instance.
*/
{
},
/**
* Sets the value of a property on an Actionscript class instance.
*/
{
}
});