Calling the doRefreshVisual Method [message #1800742] |
Mon, 07 January 2019 10:43  |
Eclipse User |
|
|
|
How can I call the doRefreshVisual (Connection visual) method of the MindMapConnectionPart class each time the connection length is changed?
regards,
Servan Killec
[Updated on: Tue, 22 January 2019 09:10] by Moderator
|
|
|
|
|
Re: Calling the doRefreshVisual Method [message #1803199 is a reply to message #1803189] |
Mon, 25 February 2019 04:38   |
Eclipse User |
|
|
|
Hi Servan,
within GEF, only visual changes are performed during interaction (usually). These are complemented by content changes upon completion of interaction. This is when doRefreshVisual() should be executed in order to adapt the visualisation to the contents.
The default mechanisms execute BendVisualOperation while manipulating a Connection. Therefore, setVisualBendPoints() is invoked during those interactions, updating the connection visual.
Basically, you can change the visual in any way during interaction, and then ensure that the next refresh will yield the same result.
Therefore, you are not bound to the Connection or IBendable API. Instead, you can subclass the TranslateOnDragHandler and invoke a custom method, e.g. connectionPart.updateLabels(). However, when completing interaction, you have to change the content so that the next doRefreshVisual() will show the same updated labels.
Best regards,
Matthias
|
|
|
|
|
Re: Calling the doRefreshVisual Method [message #1804192 is a reply to message #1803389] |
Wed, 20 March 2019 04:33  |
Eclipse User |
|
|
|
Hello Matthias
Matthias Wienand wrote on Wed, 27 February 2019 18:45
I do not understand how overriding Connection.refresh() solves your problem unless you are updating the labels within that refresh() method. Most certainly, the part's doRefreshVisual() method is still not called during interaction, right?
Exactly, I update the labels with the refresh() method and yes the part's
doRefreshVisual() method is still not called.
But it works as i wanted :D.
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.11422 seconds