NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Bill, et al., I'd like to add a menuitem in the file menu to export data to HDF5 file. I find out that I have to add code in FancySSCell and BasicSSCell. This is something I don't like to do. I really don't want to change any visad code. If you can change the code a little bit, I don't need to touch FancySSCell and BasicSSCell to implement the save function for HDF5 file. For example, you can change FancySSCell.saveDataDialog(boolean netcdf) to FancySSCell.saveDataDialog(String adapter_name). You then can test the adapter name again your_adapter.getclass().getname. Or change FancySSCell.saveDataDialog(boolean netcdf) to FancySSCell.saveDataDialog(Object adapter). Then test adapter with if (adapter instanceof FitsForm) .... else if if (adapter instanceof GIFForm) .... else if if (adapter instanceof HdfeosAdaptedForm) .... else if if (adapter instanceof HdfeosAdaptedForm) .... else if if (adapter instanceof HDF5Form) ..... in BasicSSCell.saveData(File f, Object adapter) In the SpreadSheet, I can just call DisplayCells[CurX][CurY].saveDataDialog(new HDF5Form()) to save data into HDF5 file. I don't need to touch any other visad files. ----------------------------------------------------------- Thanks, Peter Xiangchi Cao Tel. (217) 244-3830 Fax. (217) 244-1987 Scientific Data Technologies Division National Center for Supercomputing Applications
visad
archives: