Bug 259921

Summary: Nasty results when nesting LayoutManagers in a DelegatingLayout
Product: [Tools] GEF Reporter: Michael <michi2k>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael CLA 2009-01-04 17:18:32 EST
Build ID: M20080911-1700

Steps To Reproduce:
1. Install GEF
2. Create some initial code
3. Add the following code to some constructor of a class that inherits from RectangleFigure


More information:
When creating a new Figure that inherits from RectangleFigure (works also with Ellipse, but only for example) and setting its Layout to DelegatingLayout, adding any LayoutManagers to children figures leads them to disappear. Example Code from a constructor:

setLayoutManager(new DelegatingLayout());
Ellipse miniEllipse = new Ellipse();
miniEllipse.setSize(new Dimension(7,7));
add(miniEllipse, new RelativeLocator(this, 0.5, 0.5));
Ellipse miniMiniEllipse = new Ellipse();
miniMiniEllipse.setSize(new Dimension(3,3));
miniEllipse.setLayoutManager(new DelegatingLayout());

If the last line is absent, everything works well. But when it's present, the inner Ellipse disappears (I don't know what happend to it).
Comment 1 Michael CLA 2009-01-04 17:21:46 EST
This might seem artificial, but if you work with Connections, you are automatically using DelegatingLayout and if you want to put some more-complex decoration on your lines, you run into problems.