Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FlowLayout Shapes Example
FlowLayout Shapes Example [message #219546] Tue, 18 July 2006 08:51 Go to next message
Eclipse UserFriend
Originally posted by: reinalt.gmail.com

I hv changed the code for createFigure in Shapes example ShapeEditPart as
follows:
protected IFigure createFigure() {
Figure f = new Figure();
f.setLayoutManager(new FlowLayout());
f.setOpaque(true);
return f;
}

protected void createEditPolicies() {
installEditPolicy(EditPolicy.COMPONENT_ROLE, new ComponentEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE,new MyFlowEditPolicy());
}

I hv extended FlowLayoutEditPolicy. The children gets added to the figure
but the problem is that they are not visible.Even if i try to click on tht
region the Border around them is not activated......

Can smone tell me where can be the problem....
thomas
Re: FlowLayout Shapes Example [message #219554 is a reply to message #219546] Tue, 18 July 2006 14:18 Go to previous message
Eclipse UserFriend
Originally posted by: not.achance.com

I had a similar problem where figures created by child EditParts were
never visible. The actual cause of the problem was that I wasn't setting
the size of my child figure. Hope this help.


thomas wrote:
> I hv changed the code for createFigure in Shapes example ShapeEditPart
> as follows:
> protected IFigure createFigure() {
> Figure f = new Figure();
> f.setLayoutManager(new FlowLayout());
> f.setOpaque(true);
> return f;
> }
>
> protected void createEditPolicies() {
> installEditPolicy(EditPolicy.COMPONENT_ROLE, new
> ComponentEditPolicy());
> installEditPolicy(EditPolicy.LAYOUT_ROLE,new MyFlowEditPolicy());
> }
>
> I hv extended FlowLayoutEditPolicy. The children gets added to the
> figure but the problem is that they are not visible.Even if i try to
> click on tht region the Border around them is not activated......
>
> Can smone tell me where can be the problem....
> thomas
>
Previous Topic:feature request
Next Topic:Correct Layout Procedure?
Goto Forum:
  


Current Time: Thu Apr 25 23:53:24 GMT 2024

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

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

Back to the top