3 messages in org.netbeans.graph.usersRe: Edit in place
FromSent OnAttachments
Chris PalmerMay 23, 2007 8:59 am 
David KasparMay 23, 2007 2:01 pm 
Chris PalmerMay 23, 2007 5:14 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Edit in placeActions...
From:Chris Palmer (cpal@kcctech.com.au)
Date:May 23, 2007 5:14:53 pm
List:org.netbeans.graph.users

Hi David!

Ok I think I understand correctly. I was performing an edit action. Specifically edit in place on a "ComponentWidget" I created a TextInPlaceEditor and passed this into the action factory. When I step through the code the TextInPlaceEditor fires correctly and updates the "component" in the component widget. So it appears to be working.

Chris

David Kaspar wrote:

Hi Chris,

I am not sure if I understand it correctly but I think that you have forgotten to call Scene.validate method after all changes of widgets in scene.

Scene.validate method notifies the library that a scene has to be calculated/repainted. Usually this method is called automatically when the library can track the end of scene modifications e.g. at the end of WidgetAction method calls. On the other hand, if you are changing a scene in a ActionListener.actionPerformed method, then the library cannot track the end of scene modifications. Therefore you have to call Scene.validate manually.

Widget.revalidate is meant to be used internally by Widget-based classes. If you are using built-in widget implementations, then you do not need to call Widget.revalidate or Widget.repaint anytime.

If I misunderstand you, please, send me a test-case to reproduce your problem.

Thanks, David

Hello!

I implemented an edit in place component. It derived from ComponentWidget and my swing component is in side. However when the edit is done the orginal text is still displayed any reason for this? Or did I do something wrong....? I tried revalidate on the widget but it didn't work.....