[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?
|
Hi,
Would you like to make an example out of it an add it to our Snippet
collection?
Then please file a bugzilla under
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI&bug_severity=enhancement&rep_platform=All&op_sys=All&short_desc=[Snippets]
Tom
Daniel Krügler schrieb:
> Hi,
>
> I recently needed a table-like ColumnViewer that is capable to
> show hyper-links in the column cells. As usually recommended,
> I did not embed real hyper-link controls, but instead used
> owner-drawn label providers, which are of great advantage
> therefore. I could realize both the perfect link color/underlining
> as well as mouse cursor changes. You can see that in the code
> provided as attachment and you are invited to use it according
> to the EPL.
>
> Now my actual question: I would really love to realize an even
> more "living" behavior of the links such that it corresponds even
> more to that of the hyper-link widgets of SWT. Just open the PDE
> editor and move the mouse above such a link, and you will notice
> that the color changes during the time the mouse cursor has
> switched to the "hand form" between active and non active link
> color. I would like to realize the same behavior, even though
> I guess that this is probably not trivial. It seems sufficient
> to store information of the last active cell, because there can
> only be one active cell per column. The question is, how this
> information can be represented given the fact that such a table
> may be refreshed (not done in the example below). I assume I have
> to use this information to return to the previously active cell
> and switch that to the inactive color (Viewer.update maybe?)
>
> Besides the question of the backtracking, performance is another
> critical issue, because the mouse-form test happens on each mouse-
> move. E.g. I could /not/ use Object.equals on the cell elements,
> because that could be too costly for the real-objects I have in my
> mind. Maybe I should save the last cell item reference?
>
> If anyone has an idea how to realize that, I would be happy
> to add his or her contribution to the shared code ;-)
>
> Thanks & Greetings from Bremen,
>
> Daniel Krügler
>