private void save() {
   File file = SwingTools.chooseFile(null, null, true, "wgt", "attribute weight file");
   try {
     attributeTableModel
         .getAttributeWeights()
         .writeAttributeWeights(file, Tools.getDefaultEncoding());
   } catch (IOException e) {
     SwingTools.showSimpleErrorMessage("cannot_write_attr_weights_to_file", e, file.getName());
   }
 }
 private void load() {
   File file = SwingTools.chooseFile(null, null, true, "wgt", "attribute weight file");
   try {
     AttributeWeights fileWeights = AttributeWeights.load(file);
     attributeTableModel.mergeWeights(fileWeights);
   } catch (IOException e) {
     SwingTools.showSimpleErrorMessage("cannot_load_attr_weights_from_file", e, file.getName());
   }
   update();
 }
Ejemplo n.º 3
0
 @Override
 public void actionPerformed(ActionEvent e) {
   File file =
       SwingTools.chooseFile(
           RapidMinerGUI.getMainFrame(),
           "import_process",
           null,
           true,
           false,
           new String[] {RapidMiner.PROCESS_FILE_EXTENSION, "xml"},
           new String[] {"Process File", "Process File"});
   if (file == null) {
     return;
   }
   open(file);
 }
 @Override
 public void actionPerformed(ActionEvent e) {
   File file =
       SwingTools.chooseFile(
           RapidMinerGUI.getMainFrame(),
           "export_process",
           null,
           false,
           false,
           new String[] {RapidMiner.PROCESS_FILE_EXTENSION, "xml"},
           new String[] {"Process File", "Process File"});
   if (file == null) {
     return;
   }
   try {
     new FileProcessLocation(file).store(RapidMinerGUI.getMainFrame().getProcess(), null);
   } catch (IOException e1) {
     SwingTools.showSimpleErrorMessage(
         "cannot_save_process",
         e1,
         RapidMinerGUI.getMainFrame().getProcess().getProcessLocation(),
         e1.getMessage());
   }
 }