[vtkusers] How to use the method “AddObserver” that lies in the file “vtkObject.java”?(Java)
肥肥
sqsavage at tom.com
Sat Oct 30 13:14:09 EDT 2004
Hi,all
I am replant the example “annotatePick.tcl” using Java. But I don’t how to use the method “AddObserver” in java.
“AddObserver” method has three parameters. In C++, we can carry a function pointer as the second parameter, but in “vtkObject.java”, the method defined as follow:
public native int AddObserver(String id0, Object id1, String id2);
so what can I do to translate the real parameter to the second formal parameter?
The script of annotatePick.tcl as follow:
………………….
# Create a cell picker.
vtkCellPicker picker
picker AddObserver EndPickEvent annotatePick
………………….
# Create a Tcl procedure to create the text for the text mapper used to
# display the results of picking.
proc annotatePick {} {
if { [picker GetCellId]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041031/e06ac58e/attachment.htm>
More information about the vtkusers
mailing list