Skip to main content



      Home
Home » Eclipse Projects » GEF » updating state-dependent figure
updating state-dependent figure [message #187751] Fri, 15 July 2005 04:30 Go to next message
Eclipse UserFriend
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 05: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 11: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: Mon May 12 00:22:59 EDT 2025

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

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

Back to the top