|
Re: Calling the doRefreshVisual Method [message #1802533 is a reply to message #1800742] |
Mon, 11 February 2019 15:24 |
|
Hi Servan,
the doRefreshVisual() method is called, for example, in response to content changes.
The method is meant to refresh the part's visual to match the part's contents, i.e. you should only implement logic in that refresh method to change the appearance of the part (i.e. its visual) to match the model data associated with the part (i.e. its content).
Maybe you can get better help if you rephrase your issue. What is the actual feature you want to implement?
Best regards,
Matthias
|
|
|
|
Re: Calling the doRefreshVisual Method [message #1803199 is a reply to message #1803189] |
Mon, 25 February 2019 09:38 |
|
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 #1803389 is a reply to message #1803236] |
Wed, 27 February 2019 18:45 |
|
Hi Servan,
these are two very different things: Connection.refresh() and ConnectionPart.refreshVisual(). The first is just updating a visual. The latter is updating a part so that its visual will reflect its content.
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?
However, good to hear that you solved your issue :-)
Best regards,
Matthias
|
|
|
|
Powered by
FUDForum. Page generated in 0.03723 seconds