我需要在数据网格单元格上绘制叠加层。我希望叠加层位于底层单元格数据之上并显示剖面线图案,即:水平线和垂直线,就像单元格中的迷你网格一样。
覆盖的想法是表明,当一段时间内没有收到数据时,数据就已经过时或过时了。
我很确定我需要在渲染器的 updateDisplayList() 中做一些事情,但我还没有使用绘图 API,所以我不知道如何做到这一点。
任何帮助将不胜感激。
谢谢
标记
I need to draw an overlay over a datagrid cell. I want the overlay to sit ontop of the underlying cell data and to display a crosshatch pattern ie: horizontal and vertical lines, like a mini-grid in the cell.
The idea of the overlay is to show that when no data has been received for a while then the data has become old or stale.
I'm pretty sure I need to do something in the updateDisplayList() of the renderer, but I haven't used the Drawing API so I am not sure how to do this.
Any help would be greatly appreaciated.
Thanks
Mark
发布评论
评论(1)
所以我想 ItemRenderer 有 2 种状态,一种称为“新”,一种称为“旧”,对吧?
一个好消息:您不需要重写 updateDisplayList 函数。 Flex SDK 4+ 为您提供名为 FXG 的图形实用程序。您可以访问此链接了解更多信息:http://help.adobe.com/en_US/flex/using/WS145DAB0B-A958-423f-8A01-12B679BA0CC7.html
在你的情况下,你可以这样做:
想法:创建一条路径(绘制网格)并将其置于“旧”状态,每当项目更改为“旧”状态时,网格就会出现。
So I suppose you have 2 states for the ItemRenderer, one called "new", one "old", right?
One good news: You don't need to override updateDisplayList function. Flex SDK 4+ provides you graphics utility named FXG. You can visit this link for more information: http://help.adobe.com/en_US/flex/using/WS145DAB0B-A958-423f-8A01-12B679BA0CC7.html
In your case, you can do something like this:
Idea: Create a path (draw your grid) and put it in state "old", whenever the item change to state "old", the grid will appear.