Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » updating state-dependent figure
updating state-dependent figure [message #187751] Fri, 15 July 2005 08:30 Go to next message
benedict heal is currently offline benedict healFriend
Messages: 28
Registered: July 2009
Junior Member
I have a MyEditPart.createFigure() which returns a figure which depends
on the state of the model.

When the underlying state is changed (by a dialog) I want createFigure()
to be called again, and the new figure displayed.

I can force createFigure to be recalled by MyEditPart.setFigure(null).
createFigure() is indeed recalled, but the display is not updated.

What is the proper technique for forcing an update in such circumstances.

Many thanks,
Benedict
Re: updating state-dependent figure [message #187759 is a reply to message #187751] Fri, 15 July 2005 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marlu942.student.liu.se

Is it a completly new figure, or can you handle the changes in a
refreshVisuals in MyEditPart?

If you would like to completly change figure I would use
AbstractGraphicalEditPart.setFigure(..). You probably should configure
the figure in an refreshVisuals though.

Your dialog that changes the model should fire a property change event
that calls refreshVisuals.

/Marcus


benedict heal wrote:
> I have a MyEditPart.createFigure() which returns a figure which depends
> on the state of the model.
>
> When the underlying state is changed (by a dialog) I want createFigure()
> to be called again, and the new figure displayed.
>
> I can force createFigure to be recalled by MyEditPart.setFigure(null).
> createFigure() is indeed recalled, but the display is not updated.
>
> What is the proper technique for forcing an update in such circumstances.
>
> Many thanks,
> Benedict
Re: updating state-dependent figure [message #187807 is a reply to message #187751] Fri, 15 July 2005 15:31 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

In your createFigure() method, put the figure that you create in a figure
with a StackLayout and return that outer figure from that method. You can
then replace that inner figure.

This has been discussed several times on this newsgroup. So, if you want
details or examples, just search for it.

"benedict heal" <bh@benedictheal.com> wrote in message
news:db7s6i$k6j$1@news.eclipse.org...
> I have a MyEditPart.createFigure() which returns a figure which depends
> on the state of the model.
>
> When the underlying state is changed (by a dialog) I want createFigure()
> to be called again, and the new figure displayed.
>
> I can force createFigure to be recalled by MyEditPart.setFigure(null).
> createFigure() is indeed recalled, but the display is not updated.
>
> What is the proper technique for forcing an update in such circumstances.
>
> Many thanks,
> Benedict
Previous Topic:Thumbnails viewed vertically in ViewPart
Next Topic:ConnectionDragCreationTool and eraseSourceFeedback()
Goto Forum:
  


Current Time: Fri Apr 26 04:01:36 GMT 2024

Powered by FUDForum. Page generated in 0.03724 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top