Home » Modeling » GMF (Graphical Modeling Framework) » Cannot resize down editparts
|
Re: Cannot resize down editparts [message #482820 is a reply to message #482592] |
Fri, 28 August 2009 08:55 |
Maxence VANBÉSIEN Messages: 40 Registered: July 2009 Location: Lille, France |
Member |
|
|
Hello,
Here are some additional information about this issue.
In fact, the issue seems to come from the draw2D Figures management...
In my generated code, I have an EditPart that relies on an EditPartFigure
(which is a Rounded Rectangle extension in fact).
When I change the size of my EditPart, the validate() method of the
DiagramEditPart.BorderItemsAwareFreeFormLayer class is called, which
implies this object and all its children to be validated recursively. Now,
this validation process leads to the resizing of the Figure, only when the
Figure that is being validated is not valid before entering this validate
method.
Moreover, I remarked that my EditPartFigure is set as a child of a
DefaultSizeNodeFigure, and when I try to enlarge the RoundedRectangle,
this DefaultSizeNodeFigure is not valid before being validated. This
causes the Figure.layout() method to be called and my RoundedRectangle to
be resized. Otherwise, when I try to shrink the RoundedRectangle, the
DefalutSizeNodeFigure is said to be already valid before being validated,
and this causes the RoundedRectangle not to be shrunk. (This can also
explain the fact that the Rectangle can be shrunk only when the Rectangle
has been enlarged previously)...
Unfortunately, I don't know why the DefaultSizeNodeFigure is invalidated
when it is asked to be enlarged, and already valid when asked to be
shrunk, but this is the only difference I could report in the two
behaviours.
Now, I don't know how I could investigate more, and how I could set a
workaround for this issue, since the problem seems to come from draw2d,
and since the trouble-maker object it not directly the generated
EditPartFigure.
So, I really look forward to having news and information about this issue,
so I can fix the behaviour of my Diagram.
Of course I can provide more details if needed.
Thanks a lot in advance,
Best regards,
Maxence
|
|
| |
Re: Cannot resize down editparts [message #485782 is a reply to message #482820] |
Mon, 14 September 2009 22:27 |
Ugo Sangiorgi Messages: 44 Registered: July 2009 |
Member |
|
|
I'm also facing the same problem, and for a long time.
So +1
Thanks
Maxence Vanbesien escreveu:
> Hello,
> Here are some additional information about this issue.
>
> In fact, the issue seems to come from the draw2D Figures management...
>
> In my generated code, I have an EditPart that relies on an
> EditPartFigure (which is a Rounded Rectangle extension in fact).
>
> When I change the size of my EditPart, the validate() method of the
> DiagramEditPart.BorderItemsAwareFreeFormLayer class is called, which
> implies this object and all its children to be validated recursively.
> Now, this validation process leads to the resizing of the Figure, only
> when the Figure that is being validated is not valid before entering
> this validate method.
>
> Moreover, I remarked that my EditPartFigure is set as a child of a
> DefaultSizeNodeFigure, and when I try to enlarge the RoundedRectangle,
> this DefaultSizeNodeFigure is not valid before being validated. This
> causes the Figure.layout() method to be called and my RoundedRectangle
> to be resized. Otherwise, when I try to shrink the RoundedRectangle, the
> DefalutSizeNodeFigure is said to be already valid before being
> validated, and this causes the RoundedRectangle not to be shrunk. (This
> can also explain the fact that the Rectangle can be shrunk only when the
> Rectangle has been enlarged previously)...
>
> Unfortunately, I don't know why the DefaultSizeNodeFigure is invalidated
> when it is asked to be enlarged, and already valid when asked to be
> shrunk, but this is the only difference I could report in the two
> behaviours.
>
> Now, I don't know how I could investigate more, and how I could set a
> workaround for this issue, since the problem seems to come from draw2d,
> and since the trouble-maker object it not directly the generated
> EditPartFigure.
>
> So, I really look forward to having news and information about this
> issue, so I can fix the behaviour of my Diagram.
> Of course I can provide more details if needed.
>
> Thanks a lot in advance,
> Best regards,
> Maxence
>
|
|
| | | | |
Goto Forum:
Current Time: Fri Apr 26 13:49:01 GMT 2024
Powered by FUDForum. Page generated in 0.03584 seconds
|