Closedown

This commit is contained in:
gac-x03da
2019-06-18 14:12:08 +02:00
parent ff9060dc1b
commit a5b0e97a13
2 changed files with 16 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ public class XPSSpectrum extends Panel {
public XPSSpectrum() {
initComponents();
buttonSkip.setVisible(false);
rangeSelectionPanel.setAditionalColumns(new String[]{"Time", "Size", "Iter"}, new Class[]{Double.class, Double.class, Integer.class});
rangeSelectionPanel.setAditionalColumns(new String[]{"Time", "Size", "Iter", "Eph"}, new Class[]{Double.class, Double.class, Integer.class, Double.class});
final DefaultTableModel model = (DefaultTableModel) rangeSelectionPanel.getTable().getModel();
model.addTableModelListener(new TableModelListener() {
@Override
@@ -57,13 +57,14 @@ public class XPSSpectrum extends Panel {
@Override
public void run() {
if (row > 0) {
for (int col = 3; col < 6; col++) {
for (int col = 3; col < 7; col++) {
model.setValueAt(model.getValueAt(row - 1, col), row, col);
}
} else {
model.setValueAt(valueTime.getValue(), row, 3);
model.setValueAt(valueSize.getValue(), row, 4);
model.setValueAt((int) valueIterations.getValue(), row, 5);
model.setValueAt(Double.NaN, row, 6);
}
}
});
@@ -628,7 +629,7 @@ public class XPSSpectrum extends Panel {
RangeSelection initialRange = new RangeSelection(valueLow.getValue(), valueHigh.getValue());
int iterations = (int) valueIterations.getValue();
initialRange.setVars(new Object[]{valueTime.getValue(), valueSize.getValue(), iterations});
initialRange.setVars(new Object[]{valueTime.getValue(), valueSize.getValue(), iterations, Double.NaN});
scanRanges = new RangeSelection[]{initialRange};
start();
@@ -696,7 +697,7 @@ public class XPSSpectrum extends Panel {
@Override
public void run() {
for (int row = 0; row < table.length; row++) {
for (int col = 3; col < 6; col++) {
for (int col = 3; col < 7; col++) {
rangeSelectionPanel.getTable().setValueAt(table[row][col], row, col);
}
}