Skip to main content



      Home
Home » Eclipse Projects » GEF » CHILDREN property change in Logic Editor Example
CHILDREN property change in Logic Editor Example [message #55257] Thu, 16 January 2003 10:53 Go to next message
Eclipse UserFriend
Originally posted by: radienssmgs2.hotmail.com

In the LogicEditPart, it handles CHILDREN property change event by calling
refreshChildren().

Why it does not need to call "refreshVisuals()"? So when will the children
be display in the diagram?



public void propertyChange(PropertyChangeEvent evt){

String prop = evt.getPropertyName();

if (LogicSubpart.CHILDREN.equals(prop))

refreshChildren();

.....

}
Re: CHILDREN property change in Logic Editor Example [message #55284 is a reply to message #55257] Thu, 16 January 2003 11:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: noone.ibm.com

refreshChildren() is responsible for keeping the EditPart children in synch
with model children. refreshVisuals() doesn't display the Figures in the
diagram. It updates the bounds of the EditPart's Figure. Since adding or
removing a child does not adjust the bounds of the Figure, refreshVisuals()
does not need to be called.

The Figures are displayed when their paintClientArea() method is called.
(See Figure#paintClientArea(Graphics)). paintClientArea() paints the Figure
and all of its children.

"Jack R." <radienssmgs2@hotmail.com> wrote in message
news:b06jja$an1$1@rogue.oti.com...
> In the LogicEditPart, it handles CHILDREN property change event by calling
> refreshChildren().
>
> Why it does not need to call "refreshVisuals()"? So when will the children
> be display in the diagram?
>
>
>
> public void propertyChange(PropertyChangeEvent evt){
>
> String prop = evt.getPropertyName();
>
> if (LogicSubpart.CHILDREN.equals(prop))
>
> refreshChildren();
>
> ....
>
> }
>
>
Re: CHILDREN property change in Logic Editor Example [message #58897 is a reply to message #55257] Tue, 28 January 2003 15:45 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

refreshVisuals() is used to sync *non-structural* properties. For example,
if we stored the circuit's color in the model, and the color changed, we
would call refreshVisuals().

"Jack R." <radienssmgs2@hotmail.com> wrote in message
news:b06jja$an1$1@rogue.oti.com...
> In the LogicEditPart, it handles CHILDREN property change event by calling
> refreshChildren().
>
> Why it does not need to call "refreshVisuals()"? So when will the children
> be display in the diagram?
>
>
>
> public void propertyChange(PropertyChangeEvent evt){
>
> String prop = evt.getPropertyName();
>
> if (LogicSubpart.CHILDREN.equals(prop))
>
> refreshChildren();
>
> ....
>
> }
>
>
Previous Topic:Binary Compatibility
Next Topic:Rich Text Editor
Goto Forum:
  


Current Time: Thu May 29 11:46:33 EDT 2025

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

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

Back to the top