Hi Mathias,
> Here's an urgent request to the VisAD-developers-crew. Is there a good
> reason why classes like DataReferenceImpl, ConstantMap, ScalarMap etc.
> should not be Serializable? I ask because I want to implement a
> Drag'n'Drop-GUI where I can Drag'n'Drop my datasets along the GUI. But
> my datasets contain these VisAD classes which are not serializable. And
> to do Drag'n'Drop with the Transferable-Interface the Classes and all of
> it's subclasses have to be Serializable. So it would be really great if
> you could add this feature to your classes. Please tell me if there is
> an easy way for you to do this.
ScalarMap and ConstantMap are Serializable. DataReferenceImpl
is not Serializable since it's design only works on the JVM
where it was constructed. When you need to send a
"DataReferenceImpl dr", construct "new RemoteDataReferenceImpl(dr)"
and send it - on the receiving JVM it must be delcared as the
RemoteDataReference interface.
DataImpl and all its metadata (MathTypes, Units,
CoordinateSystems, ErrorEstimates, etc) are Serializable
specifically so they can be moved around. We haven't done
anything about it yet, but we always intended for VisAD
DataImpl to be accessible via drag-and-drop. So we want
you effort to succeed, and we would be very interested in
including and example of drag-and-drop in our examples
(perhaps a link to your URL describing your work, or just
a source code example).
DisplayImpl, CellImpl and their hekper classes are tougher,
since they include Thread objects and other stuff that
doesn't move well between JVMs. For those we use Remote
rather than Serializable.
Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html