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 09:33 Go to next message
Andreas Graf is currently offline Andreas Graf
Messages: 151
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 09: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 10:54 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias Gorning
Messages: 80
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 03:10 Go to previous message
Andreas Graf is currently offline Andreas Graf
Messages: 151
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: Sat Jul 26 03:20:59 EDT 2014

Powered by FUDForum. Page generated in 0.01564 seconds