Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Layout Feature with RoundedRectangle as a child
Layout Feature with RoundedRectangle as a child [message #717163] Fri, 19 August 2011 13:33 Go to next message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Hi all,

as desrcibed in the tutorial, I created a layout feature that does the actual calculation of the elements after a resize.

My shape has two children: A text and a RoundedRectangle. The size of the text is changed when running through this code (snippet from the tutorial):

} else {

System.out.println(containerWidth); System.out.println(graphicsAlgorithm.toString());
gaService.setWidth(graphicsAlgorithm,

containerWidth);
gaService.setHeight(graphicsAlgorithm, containerGa.getHeight());
graphicsAlgorithm.setWidth(containerWidth);

System.out.println(graphicsAlgorithm.toString());
anythingChanged = true;

}

However, the RoundedRectangle on the diagram does not change a bit, but the dimensions do change according to the System.out.println info. Any ideas on what I am doing wrong?

Thanks,

Andreas

[Updated on: Fri, 19 August 2011 13:34]

Report message to a moderator

Re: Layout Feature with RoundedRectangle as a child [message #717196 is a reply to message #717163] Fri, 19 August 2011 14:54 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Member
Hi Andreas,
a shape only can have other shapes as children and not graphics algorithm.

Can you describe your tree of pictogram elements & graphics algorithm more in detail. Please attach also the complete code of your layout feature.

BR,
Matthias
Re: Layout Feature with RoundedRectangle as a child [message #717707 is a reply to message #717196] Mon, 22 August 2011 07:10 Go to previous message
Andreas Graf is currently offline Andreas GrafFriend
Messages: 211
Registered: July 2009
Senior Member
Hi, thanks for the help.

I am attaching the AddFeature and the LayoutFeature.

Best Regards,

Andreas
Previous Topic:Root domain object linked to Diagram?
Next Topic:IGaService.creatFont() ?
Goto Forum:
  


Current Time: Thu Apr 25 03:50:55 GMT 2024

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

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

Back to the top