Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Refreshing from EditPart
Refreshing from EditPart [message #85040] Tue, 24 June 2003 22:31 Go to next message
Eclipse UserFriend
Originally posted by: ar9357.sbc.com

is it possible to refresh view from EditPart.
with respect to logic example, how do i refresh the view.
thanks for any feedback or information on this.
Re: Refreshing from EditPart [message #85057 is a reply to message #85040] Tue, 24 June 2003 23:52 Go to previous messageGo to next message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
In the logic example, edit parts listen to their model with a
PropertyChangeListener. refreshVisuals() is called from the propertyChange()
method and the view is refreshed in refreshVisuals().

Anil wrote:
> is it possible to refresh view from EditPart.
> with respect to logic example, how do i refresh the view.
> thanks for any feedback or information on this.
>
>
>
Re: Refreshing from EditPart [message #85248 is a reply to message #85057] Wed, 25 June 2003 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ar9357.sbc.com

Iam able to change the model and figure as you described.
But the image/label is overlapping with or without overriding
propertyChange method.

Eric Bordeau wrote:

> In the logic example, edit parts listen to their model with a
> PropertyChangeListener. refreshVisuals() is called from the
propertyChange()
> method and the view is refreshed in refreshVisuals().

> Anil wrote:
> > is it possible to refresh view from EditPart.
> > with respect to logic example, how do i refresh the view.
> > thanks for any feedback or information on this.
> >
> >
> >
Re: Refreshing from EditPart [message #85277 is a reply to message #85248] Wed, 25 June 2003 15:19 Go to previous messageGo to next message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
What do you mean by "overlapping"?

Anil wrote:
> Iam able to change the model and figure as you described.
> But the image/label is overlapping with or without overriding
> propertyChange method.
>
> Eric Bordeau wrote:
>
>
>>In the logic example, edit parts listen to their model with a
>>PropertyChangeListener. refreshVisuals() is called from the
>
> propertyChange()
>
>>method and the view is refreshed in refreshVisuals().
>
>
>>Anil wrote:
>>
>>>is it possible to refresh view from EditPart.
>>>with respect to logic example, how do i refresh the view.
>>>thanks for any feedback or information on this.
>>>
>>>
>>>
>
>
>
>
>
Re: Refreshing from EditPart [message #85306 is a reply to message #85277] Wed, 25 June 2003 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ar9357.sbc.com

Initially i have set figure with new Label("initial name").
Iam changing both figure and model dynammically by calling
figure.setImage(new Label("display name"))
model.setName("newname")

when i do this figure is getting set with "new name" but the "initial
name" retaining as it is.

or is it just enough to change the model and fire event programatically to
refresh the visuals.


Eric Bordeau wrote:

> What do you mean by "overlapping"?

> Anil wrote:
> > Iam able to change the model and figure as you described.
> > But the image/label is overlapping with or without overriding
> > propertyChange method.
> >
> > Eric Bordeau wrote:
> >
> >
> >>In the logic example, edit parts listen to their model with a
> >>PropertyChangeListener. refreshVisuals() is called from the
> >
> > propertyChange()
> >
> >>method and the view is refreshed in refreshVisuals().
> >
> >
> >>Anil wrote:
> >>
> >>>is it possible to refresh view from EditPart.
> >>>with respect to logic example, how do i refresh the view.
> >>>thanks for any feedback or information on this.
> >>>
> >>>
> >>>
> >
> >
> >
> >
> >
Re: Refreshing from EditPart [message #85337 is a reply to message #85306] Wed, 25 June 2003 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Anil" <ar9357@sbc.com> wrote in message news:bdcg01$bad$1@rogue.oti.com...
> Initially i have set figure with new Label("initial name").
> Iam changing both figure and model dynammically by calling
> figure.setImage(new Label("display name"))
> model.setName("newname")
>
> when i do this figure is getting set with "new name" but the "initial
> name" retaining as it is.
>
> or is it just enough to change the model and fire event programatically to
> refresh the visuals.

Always change only the model, and the figure will be refreshed to reflect
the model's contents.
This point is stressed in an upcoming article on getting started with GEF.

>
>
> Eric Bordeau wrote:
>
> > What do you mean by "overlapping"?
>
> > Anil wrote:
> > > Iam able to change the model and figure as you described.
> > > But the image/label is overlapping with or without overriding
> > > propertyChange method.
> > >
> > > Eric Bordeau wrote:
> > >
> > >
> > >>In the logic example, edit parts listen to their model with a
> > >>PropertyChangeListener. refreshVisuals() is called from the
> > >
> > > propertyChange()
> > >
> > >>method and the view is refreshed in refreshVisuals().
> > >
> > >
> > >>Anil wrote:
> > >>
> > >>>is it possible to refresh view from EditPart.
> > >>>with respect to logic example, how do i refresh the view.
> > >>>thanks for any feedback or information on this.
> > >>>
> > >>>
> > >>>
> > >
> > >
> > >
> > >
> > >
>
>
>
>
Re: Refreshing from EditPart [message #85347 is a reply to message #85337] Wed, 25 June 2003 15:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ar9357.sbc.com

yes i did get a reference to the model in EditPart and modified the same.
In order to reflect the changes i have overridden method called
propertyChange which calls refreshVisuals, but the view/figure is not
getting updated.

pls let me know whether the step followed are correct or not.


Randy Hudson wrote:


> \"Anil\" <ar9357@sbc.com> wrote in message news:bdcg01$bad$1@rogue.oti.com...
> > Initially i have set figure with new Label(\"initial name\").
> > Iam changing both figure and model dynammically by calling
> > figure.setImage(new Label(\"display name\"))
> > model.setName(\"newname\")
> >
> > when i do this figure is getting set with \"new name\" but the \"initial
> > name\" retaining as it is.
> >
> > or is it just enough to change the model and fire event programatically to
> > refresh the visuals.

> Always change only the model, and the figure will be refreshed to reflect
> the model\'s contents.
> This point is stressed in an upcoming article on getting started with GEF.

> >
> >
> > Eric Bordeau wrote:
> >
> > > What do you mean by \"overlapping\"?
> >
> > > Anil wrote:
> > > > Iam able to change the model and figure as you described.
> > > > But the image/label is overlapping with or without overriding
> > > > propertyChange method.
> > > >
> > > > Eric Bordeau wrote:
> > > >
> > > >
> > > >>In the logic example, edit parts listen to their model with a
> > > >>PropertyChangeListener. refreshVisuals() is called from the
> > > >
> > > > propertyChange()
> > > >
> > > >>method and the view is refreshed in refreshVisuals().
> > > >
> > > >
> > > >>Anil wrote:
> > > >>
> > > >>>is it possible to refresh view from EditPart.
> > > >>>with respect to logic example, how do i refresh the view.
> > > >>>thanks for any feedback or information on this.
> > > >>>
> > > >>>
> > > >>>
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> >
Re: Refreshing from EditPart [message #85362 is a reply to message #85347] Wed, 25 June 2003 16:14 Go to previous message
Eric Bordeau is currently offline Eric BordeauFriend
Messages: 259
Registered: July 2009
Senior Member
You shouldn't edit your model in your edit parts. You should generate commands
via edit policies and execute the commands on the command stack. The commands
will modify the model and then your model should notify listeners of a property
change event. When propertyChange() is called, call refreshVisuals().


Anil wrote:

> yes i did get a reference to the model in EditPart and modified the same.
> In order to reflect the changes i have overridden method called
> propertyChange which calls refreshVisuals, but the view/figure is not
> getting updated.
>
> pls let me know whether the step followed are correct or not.
>
>
> Randy Hudson wrote:
>
>
>
>>\"Anil\" <ar9357@sbc.com> wrote in message news:bdcg01$bad$1@rogue.oti.com...
>>
>>>Initially i have set figure with new Label(\"initial name\").
>>>Iam changing both figure and model dynammically by calling
>>>figure.setImage(new Label(\"display name\"))
>>>model.setName(\"newname\")
>>>
>>>when i do this figure is getting set with \"new name\" but the \"initial
>>>name\" retaining as it is.
>>>
>>>or is it just enough to change the model and fire event programatically to
>>>refresh the visuals.
>
>
>>Always change only the model, and the figure will be refreshed to reflect
>>the model\'s contents.
>>This point is stressed in an upcoming article on getting started with GEF.
>
>
>>>
>>>Eric Bordeau wrote:
>>>
>>>
>>>>What do you mean by \"overlapping\"?
>>>
>>>>Anil wrote:
>>>>
>>>>>Iam able to change the model and figure as you described.
>>>>>But the image/label is overlapping with or without overriding
>>>>>propertyChange method.
>>>>>
>>>>>Eric Bordeau wrote:
>>>>>
>>>>>
>>>>>
>>>>>>In the logic example, edit parts listen to their model with a
>>>>>>PropertyChangeListener. refreshVisuals() is called from the
>>>>>
>>>>>propertyChange()
>>>>>
>>>>>
>>>>>>method and the view is refreshed in refreshVisuals().
>>>>>
>>>>>
>>>>>>Anil wrote:
>>>>>>
>>>>>>
>>>>>>>is it possible to refresh view from EditPart.
>>>>>>>with respect to logic example, how do i refresh the view.
>>>>>>>thanks for any feedback or information on this.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>
>
>
>
Previous Topic:rounded connections
Next Topic:Automatic Tests for Graphical Editors
Goto Forum:
  


Current Time: Tue Jul 16 06:47:56 GMT 2024

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

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

Back to the top