Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Forcing IFigure to recreate itself
Forcing IFigure to recreate itself [message #230763] Fri, 16 February 2007 22:29 Go to next message
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 #230786 is a reply to message #230763] Sat, 17 February 2007 09:50 Go to previous messageGo to next message
Eclipse User
Originally posted by: unidad.gmx.net

I've found a good explanation and solved the problem...
Re: Forcing IFigure to recreate itself [message #230838 is a reply to message #230786] Mon, 19 February 2007 22:47 Go to previous messageGo to next message
Eclipse User
Originally posted by: lamont_gilbert.rigidsoftware.com

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?
Re: Forcing IFigure to recreate itself [message #230845 is a reply to message #230838] Tue, 20 February 2007 07:59 Go to previous message
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
Previous Topic:How can I integrate a PolylineEntry in the Palette?
Next Topic:Difference between ScalableFreeformRootEditPart and ScalableRootEditPart?
Goto Forum:
  


Current Time: Thu Sep 18 21:44:58 GMT 2014

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

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