Bug 259921 - Nasty results when nesting LayoutManagers in a DelegatingLayout
Summary: Nasty results when nesting LayoutManagers in a DelegatingLayout
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Draw2d (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-04 17:18 EST by Michael CLA
Modified: 2011-01-07 11:26 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.