[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: TreeViewerFocusCellManager support for SWT.MULTI
|
Greg Babcock schrieb:
> Tom,
>
> Thanks for the timely response and the insight.
>
> One of the things I realized is that if the SWT.MULTI flag is set the
> highligted cell is probably (I have only done limited testing) belongs to
> the last element in the selection list. It may be wise to add an Assert
> !SWT.MULTI to the FocusCellOwnerDrawHighlighter.
>
> In any case I have been able to get the selection behavior I was looking for
> by only performing cell highlighing when there is a single selection.
> Instead of going though the effort to link in the source for the entire
> jface class to my I just copied the FocusCellOwnerDrawHighlighter class to
> my workspace and made the modification. To do so I had to replace
> viewer.getViewerRowFromItem(event.item); with focusCell.getViewerRow();
> because the first one was hidden. Under what circumstances would the two
> methods return different results?
When a ViewerCell is detached from the viewer we clone it because we
internally reuse the ViewerRow and Viewercell IIRC.
I guess I didn't get what you describe do you have a fully running
example so that I can see the modified behaviour? Maybe it is feasable
and a common use case so that we could provide a switch between the 2?
Tom
--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------