Creating a container editpart [message #175311] |
Mon, 04 April 2005 13:48 |
Eclipse User |
|
|
|
Originally posted by: Angel.Roman.prismtech.com
Hi Everyone,
Would someone please elaborate the steps required to create a container
editpart? I understand that my container editpart should register an
xylayout policy where I create a command to create the children that are
to be placed in it. Once the children model is created the frame work
will create an adequate editpart for the model. So far I have an
editpart who's createfigure method creates a RectangleFigure and
whenever I select a creation tool for a child object and click within
the RectangleFigure (which is my container figure) the model gets
created an the frame work creates an editpart. However, I see no visual
of the child edit part. I stepped through the code and verified that the
child editpart gets created and as well as the figure. Is there anything
I should be doing that I'm not?
Regards,
Angel Roman
|
|
|
Re: Creating a container editpart [message #175355 is a reply to message #175311] |
Mon, 04 April 2005 14:44 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Probably this child's bounds are x, y, 0, 0, so it has no width and height.
The default size of a figure is zero. The default preferred size of a
figure is its current size.
"Angel Roman" <Angel.Roman@prismtech.com> wrote in message
news:d2rgpt$gg9$1@news.eclipse.org...
> Hi Everyone,
>
> Would someone please elaborate the steps required to create a container
> editpart? I understand that my container editpart should register an
> xylayout policy where I create a command to create the children that are
> to be placed in it. Once the children model is created the frame work will
> create an adequate editpart for the model. So far I have an editpart who's
> createfigure method creates a RectangleFigure and whenever I select a
> creation tool for a child object and click within the RectangleFigure
> (which is my container figure) the model gets created an the frame work
> creates an editpart. However, I see no visual of the child edit part. I
> stepped through the code and verified that the child editpart gets created
> and as well as the figure. Is there anything I should be doing that I'm
> not?
>
> Regards,
> Angel Roman
|
|
|
Re: Creating a container editpart [message #175371 is a reply to message #175355] |
Mon, 04 April 2005 15:06 |
Eclipse User |
|
|
|
Originally posted by: Angel.Roman.prismtech.com
Randy Hudson wrote:
> Probably this child's bounds are x, y, 0, 0, so it has no width and height.
>
> The default size of a figure is zero. The default preferred size of a
> figure is its current size.
>
> "Angel Roman" <Angel.Roman@prismtech.com> wrote in message
> news:d2rgpt$gg9$1@news.eclipse.org...
>
>>Hi Everyone,
>>
>>Would someone please elaborate the steps required to create a container
>>editpart? I understand that my container editpart should register an
>>xylayout policy where I create a command to create the children that are
>>to be placed in it. Once the children model is created the frame work will
>>create an adequate editpart for the model. So far I have an editpart who's
>>createfigure method creates a RectangleFigure and whenever I select a
>>creation tool for a child object and click within the RectangleFigure
>>(which is my container figure) the model gets created an the frame work
>>creates an editpart. However, I see no visual of the child edit part. I
>>stepped through the code and verified that the child editpart gets created
>>and as well as the figure. Is there anything I should be doing that I'm
>>not?
>>
>>Regards,
>>Angel Roman
>
>
>
Checked the size... it's not zero unfortunately.
|
|
|
|
Re: Creating a container editpart [message #175468 is a reply to message #175444] |
Mon, 04 April 2005 21:37 |
Eclipse User |
|
|
|
Originally posted by: Angel.Roman.prismtech.com
Pratik Shah wrote:
> Use just a Figure instead of RectangleFigure. This figure has XYLayout,
> right? What is the size of the child figure that is being created? Is the
> child figure's EditPart setting the layout constraint in its
> refreshVisuals() method?
>
> "Angel Roman" <Angel.Roman@prismtech.com> wrote in message
> news:d2rlb6$o9m$1@news.eclipse.org...
>
>>Randy Hudson wrote:
>>
>>>Probably this child's bounds are x, y, 0, 0, so it has no width and
>
> height.
>
>>>The default size of a figure is zero. The default preferred size of a
>>>figure is its current size.
>>>
>>>"Angel Roman" <Angel.Roman@prismtech.com> wrote in message
>>>news:d2rgpt$gg9$1@news.eclipse.org...
>>>
>>>
>>>>Hi Everyone,
>>>>
>>>>Would someone please elaborate the steps required to create a container
>>>>editpart? I understand that my container editpart should register an
>>>>xylayout policy where I create a command to create the children that are
>>>>to be placed in it. Once the children model is created the frame work
>
> will
>
>>>>create an adequate editpart for the model. So far I have an editpart
>
> who's
>
>>>>createfigure method creates a RectangleFigure and whenever I select a
>>>>creation tool for a child object and click within the RectangleFigure
>>>>(which is my container figure) the model gets created an the frame work
>>>>creates an editpart. However, I see no visual of the child edit part. I
>>>>stepped through the code and verified that the child editpart gets
>
> created
>
>>>>and as well as the figure. Is there anything I should be doing that I'm
>>>>not?
>>>>
>>>>Regards,
>>>>Angel Roman
>>>
>>>
>>>
>>Checked the size... it's not zero unfortunately.
>
>
>
Thanks everyone for your support. I was setting the wrong model for the
child editpart. The editpart was not obtaining notifications when the
model was being altered.
Thanks,
Angel
|
|
|
Powered by
FUDForum. Page generated in 0.03654 seconds