Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Nodes which only shows a compartment
Nodes which only shows a compartment [message #229555] Tue, 12 May 2009 12:31 Go to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
Hello guys,
im still working on a custom GMF Editor.
My aim is to have 2 areas where i can rescrict which subnodes I can add
there.
I realized it with 2 nodes filling the complete editor area.
Here u can take a look:
http://img65.imageshack.us/img65/5015/screenshotk.jpg

Now I want that those two "main" nodes only show the compartment areas
where i can add the subnodes.

It is possible, and what would be the best way to realize it?

Thanks in advance,
Patrick
Re: Nodes which only shows a compartment [message #229723 is a reply to message #229555] Tue, 12 May 2009 15:27 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Patrick,

you have to remove label mappings for these "main" nodes and specify proper
layout manager.layout constraints for node figures in .gmfgraph model to
stretch compartment figure to fill whole available space.

-----------------
Alex Shatalin
Re: Nodes which only shows a compartment [message #229782 is a reply to message #229723] Tue, 12 May 2009 15:51 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
Alex Shatalin wrote:

> Hello Patrick,

> you have to remove label mappings for these "main" nodes
I have done this, looks good, compartment fills now the upper half of the
node.

> and specify proper
> layout manager.layout constraints for node figures in .gmfgraph model to
> stretch compartment figure to fill whole available space.

What do you mean exactly, i dont know how to do it.

> -----------------
> Alex Shatalin
Re: Nodes which only shows a compartment [message #229798 is a reply to message #229782] Tue, 12 May 2009 15:59 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Patrick,

In .gmfgraph you have a Rectangle representing node shape and another one
representing compartment. Actual compartment figure will be places inside
that second rectangle.
You can use StackLayout for the first rectangle then secons one should be
using all the available pspace.

-----------------
Alex Shatalin
Re: Nodes which only shows a compartment [message #229823 is a reply to message #229798] Tue, 12 May 2009 16:23 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
I have only one rectangle for the node shape.
When i use stack layout for it, the compartment is minimized at the top of
the node.

Sounds like i have to add a second rectangle and connect this with the
compartment, and use stack layout then.



Alex Shatalin wrote:

> Hello Patrick,

> In .gmfgraph you have a Rectangle representing node shape and another one
> representing compartment.
> Actual compartment figure will be places inside
> that second rectangle.
> You can use StackLayout for the first rectangle then secons one should be
> using all the available pspace.

> -----------------
> Alex Shatalin
Re: Nodes which only shows a compartment [message #229838 is a reply to message #229823] Tue, 12 May 2009 16:35 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
Thats the way i have gone. Looks good now, thanks for your help!


Patrick Schmitt wrote:

> I have only one rectangle for the node shape.
> When i use stack layout for it, the compartment is minimized at the top of
> the node.

> Sounds like i have to add a second rectangle and connect this with the
> compartment, and use stack layout then.



> Alex Shatalin wrote:

>> Hello Patrick,

>> In .gmfgraph you have a Rectangle representing node shape and another one
>> representing compartment.
>> Actual compartment figure will be places inside
>> that second rectangle.
>> You can use StackLayout for the first rectangle then secons one should be
>> using all the available pspace.

>> -----------------
>> Alex Shatalin
Re: Nodes which only shows a compartment [message #229934 is a reply to message #229838] Wed, 13 May 2009 09:16 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
I have a quite big problem with that solution,
setting background and foreground Colour doesnt affect anymore neither I
set it on the node rectangle nor on the compartment rectangle.

Any ideas ?



Patrick Schmitt wrote:

> Thats the way i have gone. Looks good now, thanks for your help!


> Patrick Schmitt wrote:

>> I have only one rectangle for the node shape.
>> When i use stack layout for it, the compartment is minimized at the top of
>> the node.

>> Sounds like i have to add a second rectangle and connect this with the
>> compartment, and use stack layout then.



>> Alex Shatalin wrote:

>>> Hello Patrick,

>>> In .gmfgraph you have a Rectangle representing node shape and another one
>>> representing compartment.
>>> Actual compartment figure will be places inside
>>> that second rectangle.
>>> You can use StackLayout for the first rectangle then secons one should be
>>> using all the available pspace.

>>> -----------------
>>> Alex Shatalin
Re: Nodes which only shows a compartment [message #229953 is a reply to message #229934] Wed, 13 May 2009 09:40 Go to previous message
Patrick Schmitt is currently offline Patrick SchmittFriend
Messages: 87
Registered: July 2009
Member
Sorry, I did all again from the beginning and now it works.


Patrick Schmitt wrote:

> I have a quite big problem with that solution,
> setting background and foreground Colour doesnt affect anymore neither I
> set it on the node rectangle nor on the compartment rectangle.

> Any ideas ?



> Patrick Schmitt wrote:

>> Thats the way i have gone. Looks good now, thanks for your help!


>> Patrick Schmitt wrote:

>>> I have only one rectangle for the node shape.
>>> When i use stack layout for it, the compartment is minimized at the top of
>>> the node.

>>> Sounds like i have to add a second rectangle and connect this with the
>>> compartment, and use stack layout then.



>>> Alex Shatalin wrote:

>>>> Hello Patrick,

>>>> In .gmfgraph you have a Rectangle representing node shape and another one
>>>> representing compartment.
>>>> Actual compartment figure will be places inside
>>>> that second rectangle.
>>>> You can use StackLayout for the first rectangle then secons one should be
>>>> using all the available pspace.

>>>> -----------------
>>>> Alex Shatalin
Previous Topic:Render partly transparent SVG Document as SWT Image
Next Topic:Layout information of a diagram
Goto Forum:
  


Current Time: Fri Apr 26 07:30:08 GMT 2024

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

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

Back to the top