Bypassing a figure for selection but not for a tooltip. [message #215632] |
Fri, 05 May 2006 19:42 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03129 seconds