Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Defining icon as link decoration
[Eugenia] Defining icon as link decoration [message #989473] Thu, 06 December 2012 11:14 Go to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Hey guys,

I'm just wondering how it's possible to define a link decoration with my own icon. In the supported annotations for Eugenia it says "the fully qualified name of a java class that implements an appropriate interface". I'm not sure how to do this.
Is it meant like the image instead of a shape for the gmf.node http://www.eclipse.org/epsilon/doc/articles/eugenia-nodes-with-images/)?

Would be great if someone can give me a hint. I'm not that familiar at all with this whole stuff, but would be able to define some transformations ect..

Cheers,
Phil
Re: [Eugenia] Defining icon as link decoration [message #989478 is a reply to message #989473] Thu, 06 December 2012 11:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Phil,

Yes. You'll need to provide the fully qualified name (e.g. x.y.CustomArrow) of a Java class that implements the org.eclipse.draw2d.RotatableDecoration interface (I've updated the tutorial to clarify this).

Cheers,
Dimitris
Re: [Eugenia] Defining icon as link decoration [message #989510 is a reply to message #989478] Thu, 06 December 2012 14:41 Go to previous messageGo to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Thanks Dimitris for your fast response!

So, I've tested the "Nodes with images instead of shapes" in my editor and this works really great.
I've got my figure project including the images, activator and a figure class like in the example.

Is it the right way to define within the figures package a new class, e.g. called AlternativeDecoration.java, which implements then the RotatableDecoration interface?
It looks like this so far: pastebin.com/9fBKDp6N

Is it necessary to implement all this method? Can I use images or have I to define the image via x and y coordinates? And what about the Plugin Activator?

Sry for all this question, but I`m not really sure how to handle this yet.
Maybe there is a tutorial which explain more detailed?

Cheer,
Phil

Btw. your framework is pretty awesome!
Re: [Eugenia] Defining icon as link decoration [message #989600 is a reply to message #989510] Thu, 06 December 2012 22:28 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Phil,

Thanks! There appear to be 2 implementations of the RotabableDecoration interface in Draw2D (PolygonDecoration and PolylineDecoration) which you may be able to reuse. If these are no good, I'm guessing you will indeed have to implement all these methods. Sorry for not being of more help; I don't have much experience with implementing custom decorators.

Cheers,
Dimitris
Previous Topic:Cancel EVL validation that is in progress
Next Topic:[EGL] How to access to enums of a model
Goto Forum:
  


Current Time: Thu Apr 25 01:51:26 GMT 2024

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

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

Back to the top