Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Dynamic Figure at runtime
Dynamic Figure at runtime [message #696226] Wed, 13 July 2011 10:26 Go to next message
Eclipse UserFriend
Hi,

I want to set the figure dynamically at runtime. I use the following code to do so:

IFigure customFig = generateCustomFigure();

children.clear();
figure.getChildren().clear();
		
customFig.setParent(figure);
figure.getChildren().add(customFig);

refresh();
refreshVisuals();
performRequest(new Request(RequestConstants.REQ_REFRESH));


This shows my custom figure but does not remove the compartments of the edit part. At least the + and - buttons stay. How can I get rid of them? I want to have the edipart change its complete figure when a user selects an entry from the context menu.

Thanks,

Ralph
Re: Dynamic Figure at runtime [message #696241 is a reply to message #696226] Wed, 13 July 2011 10:55 Go to previous message
Eclipse UserFriend
Hi,

I found out that there is a difference between

children.clear();


//Clear all child editparts
while (children.size() > 0)
removeChild((EditPart)children.get(0));


The later one also removes the compartments.

Ralph
Previous Topic:GMF Tooling in Indigo
Next Topic:Figure Overlapping Problem
Goto Forum:
  


Current Time: Sun Jul 13 01:19:35 EDT 2025

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

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

Back to the top