Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Bypassing a figure for selection but not for a tooltip.
Bypassing a figure for selection but not for a tooltip. [message #215632] Fri, 05 May 2006 19:42 Go to next message
Eclipse UserFriend
Originally posted by: cmahoney.ca.ibm.com

Hello,

I have a figure, call it a decoration, that appears on top of another figure
on the diagram. When the user clicks the mouse over the decoration figure,
I want to select the main figure and not the decoration figure. When the
user hovers over the decoration figure, I want to show a tooltip.

I can get the desired selection behavior by overwriting findFigureAt() in
the decoration figure, but then the tooltip is not shown. Does anyone know
how I can accomplish what I want?

I thought maybe setRequestFocusEnabled(false) or setFocusTraversable(false)
would help but these seem to be only used in specific scenarios (and I'm not
really sure what those are at this point).

Thanks,
Cherie
Re: Bypassing a figure for selection but not for a tooltip. [message #215640 is a reply to message #215632] Fri, 05 May 2006 20:00 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are you really selecting figures, or editparts? If the decoration is really
just a figure, and not a second editpart, and you want to select the main
figure's editpart, all you have to do is register that decoration as a
visual for the editpart. Graphical viewer supports N->1 figure->editpart
mappings. When you click the decoration, you will be clicking the editpart,
so it's drag tracker would select it.

"Cherie Mahoney" <cmahoney@ca.ibm.com> wrote in message
news:e3g9nc$nuj$1@utils.eclipse.org...
> Hello,
>
> I have a figure, call it a decoration, that appears on top of another
> figure
> on the diagram. When the user clicks the mouse over the decoration
> figure,
> I want to select the main figure and not the decoration figure. When the
> user hovers over the decoration figure, I want to show a tooltip.
>
> I can get the desired selection behavior by overwriting findFigureAt() in
> the decoration figure, but then the tooltip is not shown. Does anyone
> know
> how I can accomplish what I want?
>
> I thought maybe setRequestFocusEnabled(false) or
> setFocusTraversable(false)
> would help but these seem to be only used in specific scenarios (and I'm
> not
> really sure what those are at this point).
>
> Thanks,
> Cherie
>
>
Previous Topic:Connection line visible at PolygonDecoration arrow point
Next Topic:can we add jface list & combobox in gef editor
Goto Forum:
  


Current Time: Thu Apr 18 17:00:50 GMT 2024

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

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

Back to the top