Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [jface] Programmatic cell iteration in ColumnViewers
[jface] Programmatic cell iteration in ColumnViewers [message #527137] Wed, 14 April 2010 08:29 Go to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
I would like to ask, whether there exists already official
API for the following use-case: It seems that the complete
column-iteration code (acting on ViewerCell, ViewerColumn,
and ViewerRow) is more or less internal code, even though
the classes themselves are public. Now using column viewers
an often occurring use-case is that tables need to be
exported to clipboard or to Excel or similar programmatic
code that would require a row-by-row and column-by-column
traversal through the visual column data (therefore the
code cannot perform this traversal on the actual model data).
How can this be done in a most efficient way? AFAIK
the CellNavigationStrategy cannot be used for this, and
even though it is possible to reach neighbor cells from
a given ViewerCell there seems to be no way to get the
"first" ViewerCell (e.g. the most upper on the left side).

I would appreciate any ideas or hints.

Thanks and Greetings from Bremen,

Daniel Krügler
Re: [jface] Programmatic cell iteration in ColumnViewers [message #527142 is a reply to message #527137] Wed, 14 April 2010 08:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5406
Registered: July 2009
Senior Member
In our software I simply walk through the underlying Table-Control and
call item.getText(int); and copy this information to clipboard.

Tom

Am 14.04.10 10:29, schrieb Daniel Krügler:
> I would like to ask, whether there exists already official
> API for the following use-case: It seems that the complete
> column-iteration code (acting on ViewerCell, ViewerColumn,
> and ViewerRow) is more or less internal code, even though
> the classes themselves are public. Now using column viewers
> an often occurring use-case is that tables need to be
> exported to clipboard or to Excel or similar programmatic
> code that would require a row-by-row and column-by-column
> traversal through the visual column data (therefore the
> code cannot perform this traversal on the actual model data).
> How can this be done in a most efficient way? AFAIK
> the CellNavigationStrategy cannot be used for this, and
> even though it is possible to reach neighbor cells from
> a given ViewerCell there seems to be no way to get the
> "first" ViewerCell (e.g. the most upper on the left side).
>
> I would appreciate any ideas or hints.
>
> Thanks and Greetings from Bremen,
>
> Daniel Krügler
Re: [jface] Programmatic cell iteration in ColumnViewers [message #527150 is a reply to message #527142] Wed, 14 April 2010 09:09 Go to previous message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 14.04.2010 10:51, Tom Schindl wrote:
> In our software I simply walk through the underlying Table-Control and
> call item.getText(int); and copy this information to clipboard.
>

Thanks for your quick reply, Tom.

I need the complete object here (like the CellLabelProvider),
but this could be considered by working on the data access of
the item. I hoped for an already existing higher level API which
could work on all ColumnViewer (which don't necessarily have a
Table control), but your description implies that there is no
such API. This makes me wonder, because the ViewerCell/ViewerRow
/ViewerColumn classes seem to allow for exactly this kind
of traversal, except that I have to good point to start it.

It seems that I have to define this higher-level-support
on my own. If you have any suggestions how this could be
combined with above mentioned Viewer* classes, I would
appreciate any of your - as usual - valuable ideas.

Thanks,

Daniel
Previous Topic:problem with menu extension
Next Topic:Run Action after New Wizard or Import Wizard finishes
Goto Forum:
  


Current Time: Wed Oct 22 09:40:14 GMT 2014

Powered by FUDForum. Page generated in 0.01819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software