|  | 
|  | 
| 
| Re: How can I refresh the diagram when properties change, that aer shown   as labels in the diagram [message #75828 is a reply to message #75776] | Wed, 08 November 2006 10:11  |  | 
| Eclipse User  |  |  |  |  | Hi Cherie, 
 thanks for your answer.
 My label already exists in the diagram, but I think I don't have a
 special Label EditPart. The Label I am talking about is just an
 org.eclipse.draw2d.Label Label which is added to the figure of the
 connectionEditPart (outgoing edge) in the constructor.
 
 I will try to use the handleNotificationEvent()-method of the
 connectionEditPart, maybe I can modify the Label in this way.
 
 I will keep you informed when I'm stuck again.
 
 Thanks Alex Haag
 
 
 
 Cherie Revells wrote:
 > Alex,
 >
 > Are you trying to update what is displayed on labels that already exist
 > on the diagram or are you trying to create new labels on the diagram
 > when the properties change?
 >
 > If the labels already exist, then you just need to override the method
 > handleNotificationEvent(Notification evt) in your label editpart to
 > refresh the text in the label when the relevant property changes.  Take
 > a look at the code in LEDEditPart.handleNotificationEvent(Notification
 > evt) for an example.  Whenever the LED value changes it updates the
 > number displayed inside the LED.
 >
 > Regards,
 > Cherie
 >
 > Alex Haag wrote:
 >> Hi,
 >>
 >> I've got a GMF-generated graphical Editor that shows Properties of a
 >> node (which define branch-conditions) as labels on its outgoing edges
 >> (connections to other nodes).
 >> Displaying them is not the problem, but when I change the Properties
 >> in the Properties-view I want to update the diagram, so that the new
 >> condition-values are shown as labels.
 >>
 >> Does anyone know how I can obtain such behaviour?
 >> I read some former posts
 >> (news://news.eclipse.org:119/ecrrat$5h6$1@utils.eclipse.org), but i
 >> didn't get to their point.
 >>
 >> Thanks for any help in this manner
 >>
 >> Greets Alex Haag
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.02050 seconds