Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ScalableLayeredPane: ignore size of Shapes
ScalableLayeredPane: ignore size of Shapes [message #512611] Fri, 05 February 2010 15:55 Go to next message
Christian Schwarz is currently offline Christian SchwarzFriend
Messages: 31
Registered: July 2009
Member
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 ?

http://lh3.ggpht.com/_ve-zWJFMYkk/S2w9KtmcF2I/AAAAAAAAACE/3dB0k0mGZ_U/s912/Figures.png

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 16:04]

Report message to a moderator

Re: ScalableLayeredPane: ignore size of Shapes [message #693803 is a reply to message #512611] Thu, 07 July 2011 08:31 Go to previous message
Christian Schwarz is currently offline Christian SchwarzFriend
Messages: 31
Registered: July 2009
Member
Any ideas what is going wrong here?
Previous Topic:Properties are not shown
Next Topic:Right Mouse Button Menu
Goto Forum:
  


Current Time: Fri Mar 29 08:24:33 GMT 2024

Powered by FUDForum. Page generated in 0.04589 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top