Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Best way to automatically change look of editpart
Best way to automatically change look of editpart [message #677408] Wed, 08 June 2011 08:37 Go to next message
Eclipse UserFriend
Hi all,

what is the best way to automatically change the look of an editoart. I have a node which I want to change the look according to properties in the semantic model. Do I need to change the figure of the editpart or shall/can I change the notational model. Is there a third solution that I don't know yet? If I use the notational model is there any documentation available?

Thanks!!!

Ralph
Re: Best way to automatically change look of editpart [message #677410 is a reply to message #677408] Wed, 08 June 2011 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

see here: http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Making_figures_sensitive_to_attributes_of_semantic_elements

regards,
Re: Best way to automatically change look of editpart [message #677415 is a reply to message #677410] Wed, 08 June 2011 09:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi Aurelien,

this is what I currently do. It uses the shapes figure. I am quite sucessful by removing and adding elements to the figure. My Problem is that the resizing fails after creating the elment. Neither Setboundscommand nor figure.setSize() work. Do you have any idea what could cause that?

Ralph

[Updated on: Wed, 08 June 2011 09:05] by Moderator

Re: Best way to automatically change look of editpart [message #677463 is a reply to message #677408] Wed, 08 June 2011 11:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

If your figure is simple and does not have some texts in it that interacts with the model, I think you should have a figure that changes dynamically rather than trying to change anything on the model.

My 2c.
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Eclipse Community Award 2011: Best Modeling Tool
Re: Best way to automatically change look of editpart [message #677686 is a reply to message #677463] Thu, 09 June 2011 03:01 Go to previous message
Eclipse UserFriend
Hi,

there is no text that interacts with the model. Only the sizing causes trouble. If I want to have it less than 20 pixels on very first element creation (addNotify) it is not resized that small. I can only size it bigger. After the element was created (also the following addNotify calls) the resizing to a smaller size than approx. 20 px. works.

Do you know what is wrong with that?

Ralph
Previous Topic:Cannot create link model for arbitrary nodes
Next Topic:Class diagram meta-model
Goto Forum:
  


Current Time: Sat May 17 00:02:51 EDT 2025

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

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

Back to the top