Graph node properties

I'm creating a diagram (Graph API).
How to add click listener for the node or show some dialog on node double click (better way)?
I need "node properties dialog" functionality: user can click on a node and edit the node name and other node properties in the dialog (instead inplace editing).

5 comments
Comment actions Permalink

I found the BasicGraphPresentationModel.editNode() method.
The method is called on double click. Seems, it's that I need.

Can I show a dialog in the method, update the edited properties and then return from the method (return from the method on edit complete / cancel)?
Do I need to notify the model about changes in this case?
Are there any plugin examples that do this?

0
Comment actions Permalink

Hi, Alex

the best way is to override "editNode(N node)" method of your PresentationModel
(getCustomNodeCellEditor() method could return null)

Serega.

I'm creating a diagram (Graph API).

How to add click listener for the node or show some dialog on node
double click (better way)?

I need "node properties dialog" functionality: user can click on a
node and edit the node name and other node properties in the dialog
(instead inplace editing).



0
Comment actions Permalink

Do I need to notify the model about changes in this case?


I have to invoke builder.updateGraph() or builder.queueUpdate() if your data
model doesn't synchronized


0
Comment actions Permalink

>> Do I need to notify the model about changes in this case?
>>

I have to invoke builder.updateGraph() or builder.queueUpdate() if
your data model doesn't synchronized


Apechatka: )) "You have to..." : )))


0
Comment actions Permalink

I suggest you take a look at Spring, Seam and Hibernate plugins for some example code

http://svn.jetbrains.org/idea/Trunk/bundled/

0

Please sign in to leave a comment.