Example #1
0
 /** Export allthe param infos to the plugin manager */
 public void exportToPlugin() {
   ParamDefaultsTable table = getCurrentTable();
   List list = table.getParamInfoList();
   if (list.size() == 0) {
     LogUtil.userMessage("No rows selected");
     return;
   }
   getIdv().getPluginManager().addObject(list);
 }
Example #2
0
 /**
  * Get the list of resources
  *
  * @return the list of resources
  */
 public List getResources() {
   List infos = new ArrayList();
   for (int i = 0; i < myTables.size(); i++) {
     ParamDefaultsTable paramDefaultsTable = (ParamDefaultsTable) myTables.get(i);
     for (ParamInfo paramInfo : (List<ParamInfo>) paramDefaultsTable.getParamInfoList()) {
       infos.add(
           new ResourceViewer.ResourceWrapper(
               paramInfo,
               paramInfo.toString(),
               paramDefaultsTable.label,
               paramDefaultsTable.isEditable));
     }
   }
   return infos;
 }
Example #3
0
 /** Import an xml param defaults file */
 public void doImport() {
   try {
     String filename = FileManager.getReadFile(FileManager.FILTER_XML);
     if (filename == null) {
       return;
     }
     Element root = XmlUtil.getRoot(IOUtil.readContents(filename));
     if (root == null) {
       return;
     }
     List infos = createParamInfoList(root);
     ParamDefaultsTable table = getCurrentTable();
     table.getParamInfoList().addAll(infos);
     table.tableChanged();
     saveData();
   } catch (Exception exc) {
     LogUtil.printException(log_, "Error importing file", exc);
   }
 }