|
|
|
|
|
Re: Change label icon when a change a property [message #154341 is a reply to message #154326] |
Tue, 09 October 2007 08:13  |
Eclipse User |
|
|
|
Originally posted by: ijerez2001.gmail.com
In the EditPart than you want to do this, you have to override the method
handleNotificationEvent
/**
* @generated NOT
* @param notification : the notification event
*/
protected final void handleNotificationEvent(final Notification
notification) {
Object notifier = notification.getNotifier();
if (notification.getEventType() == Notification.SET
&& notifier instanceof <<YOURNODE>>
&& <<another logic to capture this event, for example the
attribute type with the feature of the notification>>) {
if (<<sentences depend of the value of attribute>>){
IAdaptable variableViewAdapter =
(IAdaptable) <<the element type that contain the icon>> ;// for example
MindMapElementType.Topic_2003;
Image image = <<class element type>>.getImage(variableViewAdapter); //for
example, MindMapElementType.getImage(variableViewAdapter);
getPrimaryShape().fFigureVariableNombreFigure.setIcon(imagen ); // access
to the figure label for this shape and change his icon.
}else if(<<another>>){
.......... // the same that the above if, but
change the variableViewAdapte to obtain another icon.
}
}
super.handleNotificationEvent(notification);
}
Regards
"Jens Krause" <snej_NO-SPAM_@esuark.de> escribió en el mensaje de
noticias:fefmj2$gom$1@build.eclipse.org...
> Iván Jerez schrieb:
>> I solve this problem.
>> If someone want to know how it work ask in this post.
>
> How did you solve it?
>
> regards
> jens
|
|
|
Powered by
FUDForum. Page generated in 0.04747 seconds