I am using ScalableLayeredPane as parent for some figures. I dont know what i am doing wrong, all Shape derived classes (e.g. Ellipse) are drawn with the size of siez parent figure an not with the given size. I figured out that this dont happen if i use a Figure or a ScalableFreeformLayeredPane. Is it a bug in draw2d or is it me ? How to do it right ?

This is the code of my EditPart:
@Override
protected IFigure createFigure() {
IFigure f= new ScalableLayeredPane();
// IFigure f= new Figure();
// IFigure f= new ScalableFreeformLayeredPane();
f.setSize(300, 300);
LineBorder border = new LineBorder();
border.setStyle(Graphics.LINE_DASH);
f.setBorder(border);
Ellipse e= new Ellipse();
e.setMaximumSize(new Dimension(1,1));
e.setSize(50, 50);
f.add(e);
Polyline p = new Polyline();
p.addPoint(new Point(0, 0));
p.addPoint(new Point(50, 50));
f.add(p);
return f;
}
[Updated on: Fri, 05 February 2010 11:04] by Moderator