Resize connection decorator not executed [message #1221878] |
Wed, 18 December 2013 10:54  |
Eclipse User |
|
|
|
Hello,
I am currently struggeling with creating resizable connection labels.
I create a FreeFormConnection with two ConnectionDecorators. One of the ConnectionDecorators holds a MultiText GraphicsAlgorithm that is directly editable, which works fine.
Now I need that ConnectionDecorator to be resizable in case the user enters a long text that does not fit into the current bounding box of the decorator. I want the user to be able to resize the decorator manually instead of doing that automatically when the text is changed.
To achieve this, I created a ResizeConnectionLabelFeature that extends DefaultResizeShapeFeature. It overrides the canResize() method to return true if the context holds a PictogramElement that is an instance of ConnectionDecorator and the GraphicsAlgorithm of that PictogramElement is an instance of AbstractText. The canResize() method is properly called and returns true, but the resizeShape() method is never called when I actually drag&drop the border of the MultiText (which also shows the resize handles) to resize it.
So my question is: is there a special behavior associated with resizing ConnectionDecorators? Why is ResizeConnectionLabelFeature#resizeShape() never called? How do I resize a GraphicsAlgorithm contained in a ConnectionDecorator?
Best regards,
Martin
|
|
|
|
|
Re: Resize connection decorator not executed [message #1222072 is a reply to message #1222055] |
Thu, 19 December 2013 10:49  |
Eclipse User |
|
|
|
Martin,
thanks, I was able to debug this now.
The framework currently does not offer the option to resize decorators, it
seems this is simply not yet implemented. Only moving is supported
(DefaultMoveDecoratorFeature). The canResize is only called for deciding if
the handles are drawn aound a shape or not.
Maybe we need a ResizeDecoratorFeature...
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.05179 seconds