[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: Nested Rectangles and Layout
|
Well, if Box2 is merely a grouping for other nodes, compartments are the
right choice.
XYLayout and ListLayout are most common use cases, hence the support.
Bugzilla is the forum to get some more ;)
Artem
"exquisitus" <me@xxxxxxx> wrote in message
news:98efeb3c7340eeaf057ce48ac68d1294$1@xxxxxxxxxxxxxxxxxx
> hello Artem,
>
> Of course this is just a simple example that highlights my problem, not
> really useful by itself.
>
> What I want to do, is to add next nested elements inside Box2 (but this
> time on user demand - not on creation). And for that Box2 needs to be a
> Node so that I can map a ChildReference in .gmfmap.
>
> Your suggestion to use intermediate compartments is exactly what I'm doing
> now! And that works fine, using just Nodes was an alternative solution
> that I wanted to try. The problem with using Compartments is that by
> default they only support XYLayout and ListLayout with 1 column. I need
> other Layouts (preferably GridLayout).
>
> Here's a picture:
>
> http://img407.imageshack.us/img407/6127/scr65wj.gif
>
> I know, not your typical UML diagram :)
>
> Unfortunately I can't see your attachments (I'm using the Web interface to
> read this newsgroup and all I get is a column of text characters...). I
> appreciate your help though.
>
>
> Artem Tikhomirov wrote:
>
>> Guess, I do not understand your usecase and reason you need explicitly
>> defined child nodes if you merely use them as figures (iow, "All boxes
>> should have assigned nodes" makes me puzzled). As you .gmfmap screenshot
>> suggests, you expect to get Box1 with all nested nodes/figures using
>> Box1Creation tool. If all the nodes/figures are right there at the
>> creation time (moreover, they need GridLayoutData assigned), what's the
>> purpose of Rect2Node?
>
>> If your usecase is about creating Box2 inside Box1 on demand, than you
>> might need to tweak Box2's EditPart class, refreshBounds method.
>> Alternatively, you may use intermediate comparments for each child node
>> (layout constraints should be attached to compartment in this case).
>
>> I've just ran simple GMF sample similar to what you described (two nested
>> boxes, layout), see attached screenshots. The only change I had to made
>> was Rect2NodeEditPart#refreshBounds to enforce proper layout data (not
>> XYLayout's Rectangle which is default for shape-kind children). However,
>> I'm not sure this is what you are trying to achieve.
>
>
>> Artem
>
>
>> "exquisitus" <me@xxxxxxx> wrote in message
>> news:24278037413b9fd3217ceadca93b38bd$1@xxxxxxxxxxxxxxxxxx
>>>I tried to put Rect2 outside Rect1 but that couses an error when running
>>> the generated code:
>>>
>>> http://img250.imageshack.us/img250/1705/scr43qz.gif
>>>
>>> And here's the .gmfmap:
>>>
>>> http://img201.imageshack.us/img201/7378/scr54wy.gif
>>>
>>> What I'm trying to do is to create a box that has more boxes inside
>>> arranged in GridLayout and I wan't to use just one tool to create that
>>> box
>>> with all boxes inside. All boxes should have assigned nodes.
>>>
>>> Maybe I will file a bug later.
>>>
>
>
>> begin 666 untitled2.png
>> MB5!.1PT*&@H````-24A$4@```>8```#'" ,```#[R@#:```#`%!,5$4`````
>> M`%4``*H``/`) ``)%4`)*H`)/`20``254`2:H`2?`;0``;54`;:H`;?`
>> MD@``DE4`DJH`DO`M@``ME4`MJH`MO`VP``VU4`VZH`V_`_P``_U4`_ZH`
>> M__D```D`%4D`*HD`/D) `D)%4D)*HD)/D20`D254D2:HD2?D;0`D;54D
>> M;:HD;?DD@`DDE4DDJHDDODM@`DME4DMJHDMODVP`DVU4DVZHDV_D_P`D
>> M_U4D_ZHD__])``!)`%5)`*I)`/])) !))%5))*I))/])20!)255)2:I)2?])
>> M;0!);55);:I);?])D@!)DE5)DJI)DO])M@!)ME5)MJI)MO])VP!)VU5)VZI)
>> MV_])_P!)_U5)_ZI)__]M``!M`%5M`*IM`/]M) !M)%5M)*IM)/]M20!M255M
>> M2:IM2?]M;0!M;55M;:IM;?]MD@!MDE5MDJIMDO]MM@!MME5MMJIMMO]MVP!M
>> MVU5MVZIMV_]M_P!M_U5M_ZIM__^2``"2`%62`*J2`/^2) "2)%62)*J2)/^2
>> M20"225622:J22?^2;0"2;562;:J2;?^2D@"2DE62DJJ2DO^2M@"2ME62MJJ2
>> MMO^2VP"2VU62VZJ2V_^2_P"2_U62_ZJ2__^V``"V`%6V`*JV`/^V) "V)%6V
>> M)*JV)/^V20"V256V2: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