Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to implement ToolTips on Table-Cells ?
How to implement ToolTips on Table-Cells ? [message #110030] Tue, 21 October 2008 16:16 Go to next message
Stefan Hansel is currently offline Stefan HanselFriend
Messages: 103
Registered: July 2009
Senior Member
We want to provide tooltips on table-cells.

As the corresponding JFace-API is not available yet (will it be in RAP 1.2
?), we did a workaround, which we now want to improve to come as close to
real tooltips as possible.

Currently we have written a small yellow tooltip-window, which will open
when a table cell is clicked. This window is closed automatically, when
the user clicks somewhere else.
Of course we'd rather want it to open, when the mouse stays above the
table-cell for a while without having the user to click ?

Do you have any suggestions, how this can be achieved ? We'd be happy
about any idea, don't mind if it is crazy and involves hacking some
RAP-classes :D ...

Could we send a custom JS-Script which informes RAP when the user stopped
moving his mouse ? Could RAP calculate the widget given the
mouse-coordinates from the client window ?
Are there any events, that already do this kind of stuff ?

Any help appreciated !

Regards,
Stefan
Re: How to implement ToolTips on Table-Cells ? [message #110163 is a reply to message #110030] Wed, 22 October 2008 07:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erdal.karaca.airbus.com

This is what I need, too.
IMHO, qooxdoo already supports mouse-events and tooltips.
I was told that this (related to cell editors) will be fixed when rap,
too, will support mouse-events.

stefan.hansel@tolina.de wrote:

> We want to provide tooltips on table-cells.

> As the corresponding JFace-API is not available yet (will it be in RAP 1.2
> ?), we did a workaround, which we now want to improve to come as close to
> real tooltips as possible.

> Currently we have written a small yellow tooltip-window, which will open
> when a table cell is clicked. This window is closed automatically, when
> the user clicks somewhere else.
> Of course we'd rather want it to open, when the mouse stays above the
> table-cell for a while without having the user to click ?

> Do you have any suggestions, how this can be achieved ? We'd be happy
> about any idea, don't mind if it is crazy and involves hacking some
> RAP-classes :D ...

> Could we send a custom JS-Script which informes RAP when the user stopped
> moving his mouse ? Could RAP calculate the widget given the
> mouse-coordinates from the client window ?
> Are there any events, that already do this kind of stuff ?

> Any help appreciated !

> Regards,
> Stefan
Re: How to implement ToolTips on Table-Cells ? [message #110251 is a reply to message #110030] Thu, 23 October 2008 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

stefan.hansel@tolina.de wrote:
> We want to provide tooltips on table-cells.
>
> As the corresponding JFace-API is not available yet (will it be in RAP 1.2
> ?), we did a workaround, which we now want to improve to come as close to
> real tooltips as possible.
Currently, JFace Tooltips aren't on the 1.2 plan.

>
> Currently we have written a small yellow tooltip-window, which will open
> when a table cell is clicked. This window is closed automatically, when
> the user clicks somewhere else.
> Of course we'd rather want it to open, when the mouse stays above the
> table-cell for a while without having the user to click ?
>
> Do you have any suggestions, how this can be achieved ? We'd be happy
> about any idea, don't mind if it is crazy and involves hacking some
> RAP-classes :D ...
>
> Could we send a custom JS-Script which informes RAP when the user stopped
> moving his mouse ? Could RAP calculate the widget given the
> mouse-coordinates from the client window ?
> Are there any events, that already do this kind of stuff ?
This is the approach I would try first.
To send Javascript you need to register the Javascript file as a
resource. See the Custom Widget Tutorial [1] on how to do this.

On the client-side, it should be sufficient to add one mouse
listener to the document (or its qx-wrapper
qx.ui.core.ClientDocument.getInstance()). This listener would then
send a request when the mouse stopped or whatever you activation
strategy is.

To process the request server-side you could use a PhaseListener. In
the before-read-data event you could read the request parameters
open a tooltip if it was requested.

It should be possible to determine a widget from some absolute
coordinates. There is a class WidgetTreeVisitor to iterate over the
widget hierarchy.
A example for coordinate mapping can be found in
ControlLCAUtil#readXYParams().


>
> Any help appreciated !
>
> Regards,
> Stefan
>
>

[1]
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.rap.help/help/html/advanced/custom-widget.html
Re: How to implement ToolTips on Table-Cells ? [message #110277 is a reply to message #110163] Thu, 23 October 2008 08:25 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Erdal Karaca wrote:
> This is what I need, too.
> IMHO, qooxdoo already supports mouse-events and tooltips.
Right. The qx mouse events are used for RAP mouse events. Qx
tooltips are used for Control#setToolTipText(). JFace tooltips are
composed of Shells, thus qx tooltips aren't helpful here.

The most difficult thing with JFace tooltips is probably when to
show and hide them.

> I was told that this (related to cell editors) will be fixed when rap,
> too, will support mouse-events.
To clarify: RAP already supports mouse events (mouseUp, mouseDown,
mouseDoubleClick). Mouse-move events aren't supported and probably
will never be.
Cell editors are in the works but tooltips aren't part of this.
JFace tooltips are currently not planned for 1.2


>
> stefan.hansel@tolina.de wrote:
>
>> We want to provide tooltips on table-cells.
>
>> As the corresponding JFace-API is not available yet (will it be in RAP
>> 1.2 ?), we did a workaround, which we now want to improve to come as
>> close to real tooltips as possible.
>
>> Currently we have written a small yellow tooltip-window, which will
>> open when a table cell is clicked. This window is closed
>> automatically, when the user clicks somewhere else.
>> Of course we'd rather want it to open, when the mouse stays above the
>> table-cell for a while without having the user to click ?
>
>> Do you have any suggestions, how this can be achieved ? We'd be happy
>> about any idea, don't mind if it is crazy and involves hacking some
>> RAP-classes :D ...
>
>> Could we send a custom JS-Script which informes RAP when the user
>> stopped moving his mouse ? Could RAP calculate the widget given the
>> mouse-coordinates from the client window ?
>> Are there any events, that already do this kind of stuff ?
>
>> Any help appreciated !
>
>> Regards, Stefan
>
>
Previous Topic:Action AS_DROP_DOWN_MENU does`nt work properly.
Next Topic:can Table cells wrap lines?
Goto Forum:
  


Current Time: Thu Feb 02 14:09:00 GMT 2023

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

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

Back to the top