Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Can I change compartment positions
Can I change compartment positions [message #25997] Tue, 22 August 2006 15:32 Go to next message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
Hi,
I have 2 compartments in a figure, normally they should layout vertically,
now I wish to layout them horizontally.
Can I realize this through modeling or I have to modify codes directly?

ZhangHao
Re: Can I change compartment positions [message #26079 is a reply to message #25997] Tue, 22 August 2006 16:08 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hi,

1. In the gmfgraph model define 3 rectangles Root, Comp1 and Comp2.
2. Layout Comp1 and Comp2 inside Root using gmf layouts (e.g, set
BorderLayout for root, BorderLayoutData(beginning, not vertical) for Comp1
and BorderLayoutData(end, not vertical) for Comp2). Feel free to insert any
auxiliary figures between Root and Comp's to adjust layout. Ensure that
Comp1 and Comp2 both are children (probably deep children) of Root.
3. Define Diagram Node to reference Root rectangle, and 2 Diagram
Compartments to reference Comp1 and Comp2.

Regards,
Michael


"Hao Zhang" <bjzhanghao@21cn.com> wrote in message
news:ecf83a$nju$1@utils.eclipse.org...
> Hi,
> I have 2 compartments in a figure, normally they should layout vertically,
> now I wish to layout them horizontally.
> Can I realize this through modeling or I have to modify codes directly?
>
> ZhangHao
>
Re: Can I change compartment positions [message #26668 is a reply to message #26079] Wed, 23 August 2006 09:17 Go to previous messageGo to next message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
Hi, thanks a lot that it works.
But it seems that when I add any layout(for example FlowLayout) to
comp1/comp2, I couldn't add any child into it in generated application. I
need comp1 and comp2 both use flowlayout other than list layout or
xylayout.
I use GMF1.0 release, does it matter?

Michael Golubev wrote:

> Hi,

> 1. In the gmfgraph model define 3 rectangles Root, Comp1 and Comp2.
> 2. Layout Comp1 and Comp2 inside Root using gmf layouts (e.g, set
> BorderLayout for root, BorderLayoutData(beginning, not vertical) for Comp1
> and BorderLayoutData(end, not vertical) for Comp2). Feel free to insert any
> auxiliary figures between Root and Comp's to adjust layout. Ensure that
> Comp1 and Comp2 both are children (probably deep children) of Root.
> 3. Define Diagram Node to reference Root rectangle, and 2 Diagram
> Compartments to reference Comp1 and Comp2.

> Regards,
> Michael


> "Hao Zhang" <bjzhanghao@21cn.com> wrote in message
> news:ecf83a$nju$1@utils.eclipse.org...
>> Hi,
>> I have 2 compartments in a figure, normally they should layout vertically,
>> now I wish to layout them horizontally.
>> Can I realize this through modeling or I have to modify codes directly?
>>
>> ZhangHao
>>
Re: Can I change compartment positions [message #26997 is a reply to message #26668] Wed, 23 August 2006 12:07 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hi,

This part of the implementation definitely needs some improvements. Please
submit bugzilla issue with a bit more details about the problem.

Nevertheless, it is not clear for me why you need to set inner layouts for
compartment figures.
Probably it make sense to remove any inner layouts from them and adjust
listLayout property in the gmfgen model for GenCompartments.

Regards,
Michael

"zhanghao" <bjzhanghao@21cn.com> wrote in message
news:e5cdf6765c32f9e8cc8117e4c6cccaf0$1@www.eclipse.org...
> Hi, thanks a lot that it works.
> But it seems that when I add any layout(for example FlowLayout) to
> comp1/comp2, I couldn't add any child into it in generated application. I
> need comp1 and comp2 both use flowlayout other than list layout or
> xylayout.
> I use GMF1.0 release, does it matter?
>
> Michael Golubev wrote:
>
>> Hi,
>
>> 1. In the gmfgraph model define 3 rectangles Root, Comp1 and Comp2.
>> 2. Layout Comp1 and Comp2 inside Root using gmf layouts (e.g, set
>> BorderLayout for root, BorderLayoutData(beginning, not vertical) for
>> Comp1 and BorderLayoutData(end, not vertical) for Comp2). Feel free to
>> insert any auxiliary figures between Root and Comp's to adjust layout.
>> Ensure that Comp1 and Comp2 both are children (probably deep children) of
>> Root.
>> 3. Define Diagram Node to reference Root rectangle, and 2 Diagram
>> Compartments to reference Comp1 and Comp2.
>
>> Regards,
>> Michael
>
>
>> "Hao Zhang" <bjzhanghao@21cn.com> wrote in message
>> news:ecf83a$nju$1@utils.eclipse.org...
>>> Hi,
>>> I have 2 compartments in a figure, normally they should layout
>>> vertically, now I wish to layout them horizontally.
>>> Can I realize this through modeling or I have to modify codes directly?
>>>
>>> ZhangHao
>>>
>
Re: Can I change compartment positions [message #676707 is a reply to message #26997] Mon, 06 June 2011 09:04 Go to previous message
vincent988923 is currently offline vincent988923Friend
Messages: 29
Registered: June 2011
Junior Member
Hello, I'm totally new to GMF. Today I have nearly the same problem as you have encountered. I design the simulation model for the Petri Net. Concerning the Place and Mark. The two nodes are Ellipse, and Mark is included in the Place. But when I use BorderLayout, I always could not make it. this is a horizontal line over the Place, and I cannot make the Mark node in the center of a place. It appears right next to a place. It's very strange. My definition in the diagram file is:
Ellipse PlaceFigure
Border Layout
Label PlaceNameFigure
Border Layout Data CENTER (Vertical true)
Ellipse PlaceCompartementFigure
Border Layout Data CENTER (Vertical true)

Have anyone can help me? Thank you very much.
Previous Topic:Defining common figures and edit parts
Next Topic:how to create a node programmaticaly?
Goto Forum:
  


Current Time: Thu Nov 07 04:29:02 GMT 2024

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

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

Back to the top