Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Creating a container editpart
Creating a container editpart [message #175311] Mon, 04 April 2005 13:48 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #175444 is a reply to message #175371] Mon, 04 April 2005 20:51 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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.
Re: Creating a container editpart [message #175468 is a reply to message #175444] Mon, 04 April 2005 21:37 Go to previous message
Eclipse UserFriend
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
Previous Topic:Workbench events
Next Topic:Frame on editor problem
Goto Forum:
  


Current Time: Sun Feb 05 15:31:24 GMT 2023

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

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

Back to the top