Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » images and gmf
images and gmf [message #805923] Fri, 24 February 2012 09:57 Go to next message
Sascha Schubert is currently offline Sascha SchubertFriend
Messages: 6
Registered: February 2012
Junior Member
Hello everyone

I have a little issue to get a image in the background of a node.

I tried some workaround like this <--- oh cant show because i have less then 5 messeges^^<--- let me say in this forum

but i can't show the image in my figure.

I want to build up an editor with a image file that shows a trainmap and i want to set some circles on the stations and save their x and y attribute in dependency to the picture.

I hope someone can help me with this problem

Sascha
Re: images and gmf [message #808162 is a reply to message #805923] Mon, 27 February 2012 13:25 Go to previous messageGo to next message
Andreas Muelder is currently offline Andreas MuelderFriend
Messages: 73
Registered: July 2011
Member
Hi Sascha,

what exactly is your Problem with the the image? Can you show some code or a Stacktrace if an exception is thrown?

To display an image you can use an ImageFigure and return it in the createFigure method of your EditPart.

Regards,
Andreas
Re: images and gmf [message #810773 is a reply to message #808162] Thu, 01 March 2012 14:42 Go to previous messageGo to next message
Filipe Pinto is currently offline Filipe PintoFriend
Messages: 2
Registered: March 2012
Junior Member
Hi, Someone know anyway to change the figure when we take a double click on the figure?
Re: images and gmf [message #810828 is a reply to message #810773] Thu, 01 March 2012 15:50 Go to previous message
Svyatoslav Kovalsky is currently offline Svyatoslav KovalskyFriend
Messages: 12
Registered: October 2011
Junior Member
Hello!

The shortest way should be to introduce dedicated property of the semantic element,
and make figure dependent on the property (this was discussed on the forum and on the GMF wiki).
Than, a custom EditPolicy capable of handling GroupRequest of the REQ_OPEN type should be registered,
the EditPolicy should return ICommandProxy(SetValueCommand), which will change the semantic property.

You may check:
www eclipse org/forums/index.php/mv/tree/62604/
wiki eclipse org/GMF_Newsgroup_Q_and_A#How_can_I_synchronize_my_custom_figures_with_the_model.3F

Regards,
Svyatoslav Kovalsky
at Montages Think Tank, Prague, Czech Republic
Montages AG, Zürich, Switzerland
Previous Topic:can't find IDgroup.new
Next Topic:Fixed a size of an Ellipse
Goto Forum:
  


Current Time: Fri Apr 26 03:27:24 GMT 2024

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

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

Back to the top