Forcing IFigure to recreate itself [message #230763] |
Fri, 16 February 2007 22:29 |
Eclipse User |
|
|
|
Originally posted by: unidad.gmx.net
Hi!
I'm quit new to GEF and playing around with the
shapes-example-editor a bit.
I've added a text-label to a shape, that shows its name.
Now I change the text in the properties-view and I would
like to have, that the figure displays the correct updated
text-label.
My first idea was a
setFigure(createFigure()); in the method propertyChange()
in the ShapeEditPart. But this creates NullPointerException.
Is there any other way I've to link in a newly created figure,
or do I have to remember the IFigure-object and exchange
the label by myself?
Would appreciate any idea,
Hermann
|
|
|
|
|
Re: Forcing IFigure to recreate itself [message #230845 is a reply to message #230838] |
Tue, 20 February 2007 07:59 |
Eclipse User |
|
|
|
Originally posted by: unidad.gmx.net
Hi!
CL 'dnoyeB' Gilbert schrieb:
> On Sat, 17 Feb 2007 10:50:16 +0100, Hermann Maier wrote:
>
>> I've found a good explanation and solved the problem...
>
> care to enlighten us?
Sure! If anyone is interested in...
I made a new class extending IFigure, that has a variable label
and added a public method, that changes the text of the label.
In the Controllers propertyChange()-method, I get my IFigure and set
the label-text to the property-value of the model.
Greetings, Hermann
|
|
|
Powered by
FUDForum. Page generated in 0.05417 seconds