Skip to main content



      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 06:34 Go to next message
Eclipse UserFriend
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 06:48 Go to previous messageGo to next message
Eclipse UserFriend
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 07:45 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 02:15:59 EDT 2025

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

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

Back to the top