[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Custom Layout in Compartment

Hello Balthasar,

I've generated simple code for a diagram using latest GMF version, put following


Hi all,

I am working on a diagram with nodes that use compartments to hold
subnodes recursively. A problem is the layout of these subnodes in the
compartments. I want to use a custom layout there. As mentioned in
older Q&A this should be done by overriding the "createFigure" in the
CompartmentEditPart like:

public IFigure createFigure() {
ResizableCompartmentFigure result =
(ResizableCompartmentFigure)super.createFigure();
result.getContentPane().setLayoutManager(new StackLayout());
return result;
}
This does not work for the current GMF version. If I use anything
other than FlowLayout the width of the compartments infinitely grows.

Is there an other way to do use a layout in a compartment?

Any help is very appreciated!

Cheers
Balthasar
-----------------
Alex Shatalin