swfapplication.js revision fc2967b5bbf7bb08d68bd05189ba521717c31749
/**
* Create data visualizations with line graphs, histograms, and other methods.
* @module swfApplication
*
*
* Note: SWFApplication is a temporary class that has been created for the purposes of observing and testing the current state of the underlying flash swfApplication rendering engine. This file
* will be replaced in future iterations and its api will vary significantly.
*/
/**
* The SWFApplication widget is the base class for hybrid flash applications.
* @module swfApplication
* @title SWFApplication
* @requires yahoo, dom, event, swfWidget, container
* @namespace YAHOO.widget
*/
/**
* Creates the SWFApplication instance and contains initialization data
*
* @class SWFApplication
* @extends Y.Container
* @constructor
* @param {Object} config Configuration parameters for the SWFApplication.
* <ul>
* <li><code>parent</code>: {String} id of dom element to be used as a container for the swfApplication swf</li>
* <li><code>flashvar</code>:hash of key value pairs that can be passed to the swf.</li>
* <li><code>autoLoad</code>:indicates whether the loadswf method will be automatically called on instantiation.</li>
* <li><code>styles/code>:hash of style properties to be applied to the SWFApplication application.</li>
* </ul>
*/
function SWFApplication ( config )
{
}
SWFApplication.ATTRS = {
/**
* URL used for swf
*/
{
},
/**
* Collection of attributes to be used for the swf embed.
*/
{
{
version: "10.0.0",
useExpressInstall: true,
},
lazyAdd: false,
setOnce: true,
{
useExpressInstall: true,
},
{
}
},
/**
* Key value pairs passed to application swf at load time.
*/
{
lazyAdd:false,
setOnce: true,
{
if(!val)
{
return;
}
{
}
{
}
else
{
}
},
{
}
},
/**
* Indicates whether or not to call the loadswf method upon instantiation.
*/
{
value: true
},
/**
* Indicates whether the swf draws automatically.
*
* @private
*/
{
lazyAdd: false,
value: true,
{
return this.setAutoRender(val);
}
},
/**
* Id used to insantiate a ChartDataProvider in the flash application.
*
* @private
*/
{
value: null
},
/**
* Reference to the dataProvider for the SWFApplication.
* @private
*/
{
value: null,
{
this._initDataProvider();
},
getter: function()
{
}
}
};
{
_events: {},
/**
* Reference to corresponding Actionscript class.
*/
AS_CLASS: "CartesianCanvas",
/**
* Constant used to generate unique id.
*/
GUID: "yuiSWFApplication",
/**
* Creates swf instance and event listeners for the application.
*/
loadswf: function()
{
},
initializer: function(cfg)
{
if(this.get("autoLoad"))
{
this.loadswf();
}
},
/**
* Event handler for the swfReady event.
*/
{
this._setAutoRender();
this.swfReadyFlag = true;
if(this._dataProvider)
{
this._initDataProvider();
}
this._addBackground();
if(len < 1)
{
return;
}
for(i = 0; i < len; i++)
{
}
this._updateStyles();
this._addSWFEventListeners();
this.fire("appReady");
},
/**
* Instantiates a DataProvider in the flash application.
*
* @private
*/
_initDataProvider: function()
{
if(this.appswf && this.swfReadyFlag)
{
}
},
/**
* Adds an item to a container instance.
*
* @param {Object} item to be added to the container instance.
* @props {Object} hash of layout information to be used by the parent container.
*/
{
{
}
},
/**
* Sets the autoRender property for the swf.
*/
setAutoRender: function(value)
{
if(value != this._autoRender)
{
this._autoRender = value;
this._setAutoRender();
}
},
/**
* Updates the autoRender property of the application swf.
*/
_setAutoRender: function()
{
if(this.appswf)
{
}
},
});