Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Container layout problem
Container layout problem [message #185513] Mon, 05 May 2008 19:57 Go to next message
Eclipse UserFriend
Originally posted by: abhijit.aparadh.morganstanley.com

I am trying to solve a layout problem.I have a model with 2 different
types of nodes. say Node A and Node B. Node A can contain 0 or more nodes
(of type A or B). And this hierarchy can grow recursively.
I want to design something which will lay out the nodes one below the
other without any connection between the nodes with indentation when ever
a node of type A is encountered.
e.g.
|--------------|
|Node A |
|--------------|
| Node B |
| ------------ |
| |Node A | |
| |----------| |
| | Node B | |
| | Node B | |
| | ... | |
| ------------ |
| Node B |
| ... |
|--------------|

Node of type A has compartment which contain all its children.

The "Top Node" and "Child node" etc are NOT labels, but actual figures.

Is there any way to acheive this?
Also when I load a model from file, is there any way to show the
compartments of Node A collapsed by default?
Re: Container layout problem [message #185576 is a reply to message #185513] Tue, 06 May 2008 09:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

Have you tried ListLayout yet? You can set a Compartment to use
ListLayout in the gmfgen-file. Concerning the Indentation, you could
simply add a fixed-size margin to the left side of both Node A's and B's
figure.

Tobias


Abhijit Aparadh schrieb:
> I am trying to solve a layout problem.I have a model with 2 different
> types of nodes. say Node A and Node B. Node A can contain 0 or more
> nodes (of type A or B). And this hierarchy can grow recursively.
> I want to design something which will lay out the nodes one below the
> other without any connection between the nodes with indentation when
> ever a node of type A is encountered.
> e.g.
> |--------------|
> |Node A |
> |--------------|
> | Node B |
> | ------------ |
> | |Node A | |
> | |----------| |
> | | Node B | |
> | | Node B | |
> | | ... | |
> | ------------ |
> | Node B |
> | ... |
> |--------------|
>
> Node of type A has compartment which contain all its children.
>
> The "Top Node" and "Child node" etc are NOT labels, but actual figures.
>
> Is there any way to acheive this?
> Also when I load a model from file, is there any way to show the
> compartments of Node A collapsed by default?
>
Re: Container layout problem [message #185652 is a reply to message #185576] Tue, 06 May 2008 17:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: abhijit.aparadh.morganstanley.com

Thanks Tobias,
That helps quite a lot.
I still cant figure out how to set margins in Figure?

I am newbie in GMF/GEF and trying to learn stuff slowly.

Thanks again.
Re: Container layout problem [message #185690 is a reply to message #185652] Wed, 07 May 2008 10:07 Go to previous message
Eclipse UserFriend
Originally posted by: tobk42.gmx.de

Hello Abhijit,

in the GmfGraph-model you can add a margin border with insets as a child
to the given figure. Alternatively, you can simply add a MarginBorder to
the generated class (in this case you should mark the respective methods
as @generated NOT).

Tobias


Abhijit Aparadh schrieb:
> Thanks Tobias, That helps quite a lot.
> I still cant figure out how to set margins in Figure?
> I am newbie in GMF/GEF and trying to learn stuff slowly.
>
> Thanks again.
>
>
>
Previous Topic:Yet another OCL problem: Who to get User OCL
Next Topic:Progres monitor in doExecuteWithResult
Goto Forum:
  


Current Time: Sat Apr 27 03:54:23 GMT 2024

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

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

Back to the top