Re: Re: Editor for Nodes

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Re: Editor for Nodes

Michel Graciano
2005/7/25, Tim Boudreau <[hidden email]>:
David Strupl wrote:

> Hi,
> try to use customizer component for your node:
> http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/nodes/Node.html#getCustomizer()
> Although the method getCustomizer returns a java.awt.Component I
> strongly recommend using JComponent subclass to work properly in Swing.
> Hope that it answers your question,

FYI, There is no way through the standard UI to bring up a customizer
(there was long ago) - you'll need to provide actions on the popup menu
of the node to invoke your customizer.

If you're doing that anyway, there's little need to use getCustomizer(),
though you can if it suits you.  Just create whatever kind of GUI you
want using the form editor, and embed that in a TopComponent (or make
the panel you create subclass TopComponent).  Have your action open it
and by default it will show up in the editor area.

If you're looking to do some kind of master-detail view (I have no idea
if you are) where what is shown changes with the selected node (as the
property sheet does), you'll want to create a TopComponent you can open
somehow which, when open, listens for changes in the activated node
(just steal the selection delaying code from PropertySheet).


Hi, that's it!
In really, I don't know as well what I will need yet. For now, I know that, I will need a GUI (panel) with some fields, like DatePickers, TextFileds and so on for editing my nodes. My other doubt is if I just share my node Object with panel. What is the easy way for I edit "DTO" values and a treeview see the changes? Just firing properties change events? I using PropertiesSheet for now, and all works fine.


Michel Graciano