layout [message #236364] |
Tue, 26 June 2007 19:14 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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/
|
|
|
Powered by
FUDForum. Page generated in 0.02893 seconds