Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » getting the selected cell, or other way of putting a link in a table cell
getting the selected cell, or other way of putting a link in a table cell [message #118376] Tue, 13 January 2009 11:34 Go to next message
Tom H is currently offline Tom HFriend
Messages: 139
Registered: July 2009
Senior Member
Hi,
I apologise for asking what appear to be very simple questions, but I
really am struggling to find an answer in google or the jfaces docs...

I would really like to be able to know which cell is selected in a
TableViewer or alternatively insert a link into the cell which I would
attached a listener to, but I can't find much on it...

Any ideas?

Thanks,

T
Re: getting the selected cell, or other way of putting a link in a table cell [message #118634 is a reply to message #118376] Mon, 19 January 2009 11:48 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Tom,

the underlying table widget does not support the concept of cells.
To work around this, you could try to use mouse listeners and derive
the selected cell from the x/y coordinates. The CellEditor code does
something similar, look there for more info.
If the amount of data to display is rather small, you may be better
off with a custom widget, e.g. composed out of Link widgets with an
appropriate layout.

HTH
Rüdiger


Tom H wrote:
> Hi,
> I apologise for asking what appear to be very simple questions, but I
> really am struggling to find an answer in google or the jfaces docs...
>
> I would really like to be able to know which cell is selected in a
> TableViewer or alternatively insert a link into the cell which I would
> attached a listener to, but I can't find much on it...
>
> Any ideas?
>
> Thanks,
>
> T
>
Re: getting the selected cell, or other way of putting a link in a table cell [message #118660 is a reply to message #118634] Mon, 19 January 2009 12:45 Go to previous message
David Donohue is currently offline David DonohueFriend
Messages: 104
Registered: July 2009
Senior Member
I made a custom table widget and i put links in it. I followed the
approach Rudiger mentioned. It also supports having text which scrolls
multiple lines. I have not had time to package it and genericize it but
works for me so far. Probably a bit of work for you to implement not sure.

To use it, you subclass this class:
http://code.google.com/p/inqle/source/browse/trunk/org.inqle .ui.rap/src/main/org/inqle/ui/rap/widgets/AScrolledTable.jav a

Also need to have this class:
http://code.google.com/p/inqle/source/browse/trunk/org.inqle .ui.rap/src/main/org/inqle/ui/rap/widgets/AScrolledWidget.ja va

An example implementation is here
http://code.google.com/p/inqle/source/browse/trunk/org.inqle .ui.rap/src/main/org/inqle/ui/rap/widgets/ResultSetTable.jav a
Previous Topic:Drag and drop in RAP applications
Next Topic:TextCellEditor in M4
Goto Forum:
  


Current Time: Fri Mar 29 12:43:09 GMT 2024

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

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

Back to the top