eduramiba wrote:Hi,
Sorry for late response.
You are only seeing preProcess called message and not clicked message because Netbeans Platform applications ignore System.out for some reason.
So you should use System.err for debugging, or other kinds of output like a dialog.
I attach an updated, tested, template.zip file that shows a message when a node is clicked. It also marks the clicked node in the graph canvas until other node, or no node is clicked.
While doing these example, I noticed and remembered that Y axis coordinates are inverted in relation to node coordinates. Pay attention to this.
Eduardo
Hi,
I have used the listener and render in the template-updated.zip above,and then I add the class RenderTemplate to the preview model like this:
Code: Select all
ManagedRenderer [] mr = previewModel.getManagedRenderers();
ManagedRenderer [] mr2 = Arrays.copyOf(mr, mr.length+1);
mr2[mr.length] = new ManagedRenderer(new RendererTemplate(), true);
previewModel.setManagedRenderers(mr2);
previewController.refreshPreview();
but when I click the preview nothing happens.maybe the method to add the render to the preview model above is wrong , can anyone give me some advice?