Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Feedback on connection anchors
Feedback on connection anchors [message #76244] Tue, 22 April 2003 17:01 Go to next message
Bruno GRIEDER is currently offline Bruno GRIEDERFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

For a part that has multiple connection anchors, I would like to display
feedback to the user (say higlight a small square in red) when the user
is dragging the connection tool over an anchor location.

Where is the best place to do that: in getSourceConnectionAnchor(Request
request)/getTargetConnectionAnchor(Request request)?

How do I - properly - generate the event to repaint the figure with the
anchor highlighted?

Many thanks

Bruno
Re: Feedback on connection anchors [message #76295 is a reply to message #76244] Tue, 22 April 2003 22:13 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The best place is in your NodeEditPolicy.showFeedback(Request)
and eraseFeedback(..) methods.

If you figure has some helper API on it like "highlightAnchor(int index)",
then the implementation of that might call the repaint() method on the
figure (which triggers a paint(Graphics) ). You could also use the feedback
layer to place a highlight figure anywhere you want, including outside the
bounds of the node. This is useful if you want the highlight to be slightly
larger than the ?anchor.

"Bruno Grieder" <bgrieder@quadrem.com> wrote in message
news:b83rpa$672$1@rogue.oti.com...
> Hi,
>
> For a part that has multiple connection anchors, I would like to display
> feedback to the user (say higlight a small square in red) when the user
> is dragging the connection tool over an anchor location.
>
> Where is the best place to do that: in getSourceConnectionAnchor(Request
> request)/getTargetConnectionAnchor(Request request)?
>
> How do I - properly - generate the event to repaint the figure with the
> anchor highlighted?
>
> Many thanks
>
> Bruno
>
Previous Topic:hit testing on drop in container nodes
Next Topic:painting Grid
Goto Forum:
  


Current Time: Sat Jul 13 20:29:14 GMT 2024

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

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

Back to the top