FlowLayout Shapes Example [message #219546] |
Tue, 18 July 2006 08:51 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03450 seconds