Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 159047

Summary: FreeformLayer doesn't translate its children
Product: [Tools] GEF Reporter: Adam Cabler <acabler>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Adam Cabler CLA 2006-09-27 18:31:25 EDT
ffl overrides primTranslate and only moves itself.  The expected behavior for me was for it to translate its children as figure does.
Comment 1 Randy Hudson CLA 2006-09-28 09:40:43 EDT
This is because a freeform layer moves *after* its children have finished moving. The layer wraps itself around its children, it never moves its children.
Comment 2 Adam Cabler CLA 2006-09-28 12:30:51 EDT
(In reply to comment #1)
> This is because a freeform layer moves *after* its children have finished
> moving. The layer wraps itself around its children, it never moves its
> children.
> 

Is this actually stated anywhere?
Comment 3 Randy Hudson CLA 2006-09-28 13:02:16 EDT
From FreeformFigure's javadoc:

This figure must be placed in a {@link org.eclipse.draw2d.FreeformViewport}.  Also, you shouldn't call {@link IFigure#setBounds(Rectangle)} on this figure.  The bounds will be calculated based on the extent of its children.  A FreeformFigure's bounds will be the smallest rectangle that will contain all of its children.