Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Copy out from table cells
Copy out from table cells [message #461579] Mon, 26 September 2005 19:32 Go to next message
Anima Gupta is currently offline Anima GuptaFriend
Messages: 44
Registered: July 2009
Member
Hi -

I have use JFACE tableViewer which manages a table with multiple
columns. The user needs the capability to copy out a single table cell
(eg: id or name or upc ) for pasting it in an extenal application. Is
there a way to specify in the lableprovider that the data being shown
should be copieable? What is the best way to acheive this?

I have thought of certain alternatives like, having a readonly text at
the top of the table, whose content changes based of the current row
position of the table, from here the user could copy out data -

Other was providing textCelleditors for all the cells, but returning a
false for on modifyData() - so the data can be copied out, but not changed.

Any other alternatives?

Thanks!

Anima.
Re: Copy out from table cells [message #461701 is a reply to message #461579] Tue, 27 September 2005 14:39 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
You can add copy support to your table. See:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet94.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup

"Anima Gupta" <agupta@netflix.com> wrote in message
news:dh9ige$t5k$1@news.eclipse.org...
> Hi -
>
> I have use JFACE tableViewer which manages a table with multiple columns.
> The user needs the capability to copy out a single table cell (eg: id or
> name or upc ) for pasting it in an extenal application. Is there a way to
> specify in the lableprovider that the data being shown should be
> copieable? What is the best way to acheive this?
>
> I have thought of certain alternatives like, having a readonly text at the
> top of the table, whose content changes based of the current row position
> of the table, from here the user could copy out data -
>
> Other was providing textCelleditors for all the cells, but returning a
> false for on modifyData() - so the data can be copied out, but not
> changed.
>
> Any other alternatives?
>
> Thanks!
>
> Anima.
>
Re: Copy out from table cells [message #461863 is a reply to message #461701] Mon, 03 October 2005 18:18 Go to previous message
Anima Gupta is currently offline Anima GuptaFriend
Messages: 44
Registered: July 2009
Member
thanks -

that link helped me. I added a double click mouse listener and copying
out data after identifying the column based on the click position
co-ordinates - works great.

anima.

Veronika Irvine wrote:
> You can add copy support to your table. See:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet94.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup
>
> "Anima Gupta" <agupta@netflix.com> wrote in message
> news:dh9ige$t5k$1@news.eclipse.org...
>
>>Hi -
>>
>>I have use JFACE tableViewer which manages a table with multiple columns.
>>The user needs the capability to copy out a single table cell (eg: id or
>>name or upc ) for pasting it in an extenal application. Is there a way to
>>specify in the lableprovider that the data being shown should be
>>copieable? What is the best way to acheive this?
>>
>>I have thought of certain alternatives like, having a readonly text at the
>>top of the table, whose content changes based of the current row position
>>of the table, from here the user could copy out data -
>>
>>Other was providing textCelleditors for all the cells, but returning a
>>false for on modifyData() - so the data can be copied out, but not
>>changed.
>>
>>Any other alternatives?
>>
>>Thanks!
>>
>>Anima.
>>
>
>
>
Previous Topic:Weird problems resizing Shell with 'setBounds()'
Next Topic:preserving tree state when updating viewer input
Goto Forum:
  


Current Time: Mon Oct 23 11:32:44 GMT 2017

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

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