[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] Re: [jface.viewers] How do discriminate active and non-active links in ColumnViewer?
|
Daniel Krügler schrieb:
> Tom Schindl wrote:
>> Only for the snippet.
>
> OK.
>
> I have no clue yet how to optimize your strategy
>> beside using a MouseMove-Listener and fetching the hovered cell using
>> ColumnViewer#getCell(Point).
>
> My main question is: What would you use as the actual identifier
> of the last "hot-spot-selection"? I assume that ViewerCell's are
> basically volatile in nature and may simply be recreated from one point
> to another, is that correct?
Yes it is recreated whenever you call getViewerCell(Point) but from a
performance PoV it's not that bad as you might think it is.
We ourselves do such tracking when you are using our ToolTip support so
maybe you take a look at it :-)
> Do you suggest to use the previous object reference?
Yes you need to store this information so that your label provider has
access to it. Whenever the hovered cell changes you need to issue a
redraw (ideally only from the areas that changed which are 2 rectangles).
> Do you think that the idea of the local update is the right way to go?
>
Yes but naturally your LabelProvider also has to be implemented in a way
that global updates work (I'm not 100% sure any more how the owner draw
listeners but when I implemented the cell navigation I think I also used
redrawing of local areas instead of the whole client-area).
Tom