Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Animation on Connection.
Animation on Connection. [message #234709] Tue, 29 May 2007 10:19 Go to next message
Eclipse UserFriend
Originally posted by:


I want to animate connection figure.

There are 2 editparts and there is a polyline connection between two
I want to draw a small ball image which moves just above the connection
line, which moves from source to target editpart. This should happen on
event based.

I tried in following manner but doesn't help.



outlinedShape(Graphics g){...} method and trying to draw an image on the
graphics but didn't find the way to remove the image from Graphics and
are not happening smoothly.

Any pointer? I need some help immediately.

Thanks in Adavnce.

Re: Animation on Connection. [message #234760 is a reply to message #234709] Wed, 30 May 2007 06:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

After I post a question on news group, I found an answer.
Better way to handle the situation doing animation job on feedback layer
of Editor in separate thread. Just add Figure to FeedbackLayer and remove
it after some interval before you add new one. For better understanding
just see the code below.

This code is written in one of the Connection Editpart.

Image image =
ServicemodelDiagramEditorPlugin.getBundledImageDescriptor("\\icons\\go_over.gif ").createImage();
final ImageFigure imageFigure = new ImageFigure(image);
new Thread(){
public void run() {
int x = 100;
for(int i = 0; i< 1000;i++){
if(x > 400)
x = 100;
imageFigure.setBounds(new Rectangle(x,100,16,16));
if(i== 999)
x = x+16;
try {
} catch (InterruptedException e) {

Hope this might help to somebody.

Re: Animation on Connection. [message #642726 is a reply to message #234760] Thu, 02 December 2010 14:14 Go to previous message
Mostafa ElShafei is currently offline Mostafa ElShafeiFriend
Messages: 39
Registered: October 2010
Hello Rakesh,

I really need to implement this but with GMF not GEF.
I've searched allover the internet nothing showed up :(:(Sad

can you please give me any clue???

Thanks in advance for your help. Smile
Previous Topic:Contributing menu/toolbar items to my GEF/RCP app
Next Topic:How to show high resolution images to draw2D ImageFigure
Goto Forum:

Current Time: Mon Aug 08 23:40:56 GMT 2022

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

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

Back to the top