diff --git a/config/energy_scan.properties b/config/energy_scan.properties index c637914..f3643eb 100644 --- a/config/energy_scan.properties +++ b/config/energy_scan.properties @@ -1,4 +1,4 @@ -Fe=690 755 2 10 0 2 2 2 -Ti=400 475 2 10 0 2 2 2 -Er=1380 1470 3 10 -11 -5.5 4.0 4.0 -Ta=1700 1820 3 10 -11 -5.5 4.0 4.0 +Fe=690.0 755.0 2.0 10.0 0.0 2.0 2.0 2.0 +Ti=400.0 475.0 2.0 10.0 0.0 2.0 2.0 2.0 +Er=1380.0 1470.0 3.0 10.0 -11.0 -5.5 4.0 4.0 +Ta=1700.0 1820.0 3.0 10.0 -11.0 -5.5 4.0 4.0 diff --git a/plugins/EnergyScan.java b/plugins/EnergyScan.java index 927bd91..482af41 100644 --- a/plugins/EnergyScan.java +++ b/plugins/EnergyScan.java @@ -16,6 +16,8 @@ import ch.psi.pshell.ui.Panel; import ch.psi.utils.Chrono; import ch.psi.utils.State; import ch.psi.utils.swing.SwingUtils; +import ch.psi.wsaf.DsvEditor; +import ch.psi.wsaf.Editor.EditorDialog; import java.awt.Component; import java.awt.Desktop; import java.io.FileInputStream; @@ -824,9 +826,20 @@ public class EnergyScan extends Panel { } }//GEN-LAST:event_comboSetupActionPerformed + EditorDialog dlgConfig; private void buttonConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConfigureActionPerformed try { - Desktop.getDesktop().open(getConfigFile().toFile()); + //Desktop.getDesktop().open(getConfigFile().toFile()); + if ((dlgConfig==null) || (!dlgConfig.isShowing())){ + String[] columns = new String[]{"Element", "E1", "E2", "Time", "Delay", "OffPlus", "OffMinus", "OffLH", "OffLV"}; + Class[] types = new Class[]{String.class, Double.class, Double.class, Double.class, Double.class, Double.class, Double.class, Double.class, Double.class}; + DsvEditor editor = new DsvEditor(columns , types, " "); + dlgConfig = editor.getDialog(false); + editor.load(getConfigFile().toString()); + editor.setTitle("Energy Scan Configuration"); + } + dlgConfig.setSize(680, 320); + showWindow(dlgConfig); } catch (Exception ex) { SwingUtils.showException(this, ex); }