Setting the Layout for the Compartment Figure [message #216075] |
Thu, 22 January 2009 06:55 |
|
hi ,
I m trying to set a grid layout for my compartment figure, but it is not
reflecting in it. Kindly suggest a way by which i can set the Layout.
i have tried to set the layout in the gmfgraph model ,still the result is
same.
The only thing that i am able to change is the listlayout from the gmfgen
model.
Thanks,
Abhishek Chakraborty
Regards,
Abhishek Chakraborty
|
|
|
|
Re: Setting the Layout for the Compartment Figure [message #216170 is a reply to message #216098] |
Thu, 22 January 2009 17:54 |
|
Hi lavanya,
first of all thanks for your reply , i tried your solution but it didn't
work too.
i searched thru the web and came to this in GMF archived newsgroup, i
think the problem is still there.
* Q: I need to align the elements in compartment in single row (using
the
mindmap example - the 'Threads' shoul be in a single row) but when I use
layout for the figure that represent the compartment - the element inside
doesn't respect that layout...
the List Layout trye/false in gmfgen doesn't work for me.. if it is true
the elements are aligned in a columns and only the labels were used, if it
is false - the XY Layout is used.
Can somebody give me any hints how to solve it?
after some debug I noticed that the compartment is another figure and
that's why the compartment doesn't respect the parent figure's layout
manager.
It seems that there is a lack of Layout managers for compartment - there
are only 2 layout managers for Compartment - in gmfgen - List Layout -
true (FlowLayout vertical) and false(XYLayout).
How can I use other layout? I need flowlayout but horizontal...
* A: As I may understand it is hard to set custom layout for
ResizableCompartmentFigure, due to the internal dependencies. Say,
ResizableCompartmentEditPart assumes that the figure has a layoutManager
that accepts Float's (ratios) as constraints. Probably someone from
runtime team could clarify this more deeper.
But if you just need horizontal flow layout, please try to modify
CompartmentEditPart class to call
ResizableCompartmentFigure#setHorizontal(true) inside the createFigure()
method.
I had exactly same problem as you. It's still unresolved, but fortunately
new versions of GMF at least render figures in List Layout (obviously as
columns) and you can terminate edges at them. Probably almost all people
who use GMF generator try to build UML editors which do not need such
functionality :)
.........................
Regards,
Abhishek Chakraborty
|
|
|
Powered by
FUDForum. Page generated in 0.03118 seconds