How to create a completely new data-driven component in flex 3?
A fairly broad question I know, apologies for that!
So I have a data set that I need to represent in a flex application. It needs to be repre开发者_Python百科sented in 2 ways, firstly as a list of components which is done using a List component and a custom ItemRenderer as normal. Secondly, it also must be represented as 'annotations' on a diagram in 2D. Since this doesn't really fit with a List, DataGrid, Chart etc. I think I need to create a new Component to render the data. I'd like to set it up so that you can specify 'itemRenderer' and 'dataProvider' properties on the component, exactly in the same way you would for a datagrid or list. The difference here is that each item of data will have mandatory X and Y coordinates which place it within the containing component.
My initial attempts subclassed UIComponent and implemented IDataRenderer but I'm unsure what other interfaces I need to implement to make the component properly data-driven?
I've already written a simple ItemRenderer / ItemEditor which will render each item of data correctly, I just need the component that will contain these....
thanks for any help
Why not just use the spark DataGroup, which lets you put things wherever you want?
精彩评论