Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » layout
layout [message #236364] Tue, 26 June 2007 19:14 Go to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Hi,

I would like to know why the layout manager doesn^t work correctly
when I use the setLayoutManager method.

I've the following code :

public HorizontalBox() {
setBorder(new LineBorder(1));
contentPane = new Panel();
contentPane.setLayoutManager(new FlowLayout(true));
setLayoutManager(new FlowLayout(true));

add(contentPane);

setBackgroundColor(ColorConstants.listBackground);
setOpaque(true);
}

the content pane doesn't apply the FlowLayout.

Any idea ?

Thx
Re: layout [message #236384 is a reply to message #236364] Wed, 27 June 2007 07:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

It's seem to be an editpolicy problem, wich edit policy I've to set ?
I'v try
installEditPolicy(EditPolicy.LAYOUT_ROLE, new
ConstrainedLayoutEditPolicy());

but we cannot instanciate this class

Any idea ?

Thanks


Alexandre
Re: layout [message #236391 is a reply to message #236384] Wed, 27 June 2007 12:43 Go to previous message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Alexandre Jaquet wrote:
> It's seem to be an editpolicy problem, wich edit policy I've to set ?
> I'v try
> installEditPolicy(EditPolicy.LAYOUT_ROLE, new
> ConstrainedLayoutEditPolicy());
>
> but we cannot instanciate this class

But you can extend it, and implement the required methods.

--
Jakub Jurkiewicz
http://eclipser-blog.blogspot.com/
Previous Topic:Complex Figures
Next Topic:How can it be done.
Goto Forum:
  


Current Time: Thu Apr 25 04:43:15 GMT 2024

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

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

Back to the top