Add export option to Calibrations table

This commit is contained in:
Douglas Gillespie 2025-03-14 14:21:51 +00:00
parent 78da90e23e
commit 6a8c9affbc
3 changed files with 15 additions and 1 deletions

View File

@ -135,7 +135,6 @@ public class Pamguard {
String InputPsf = "NULL";
// set up the system to output to both a log file and the console window. Also
// set up a monitor to check for the size of the folder every hour - if it gets
// too big, just stop logging the messages

View File

@ -118,8 +118,17 @@ public class CalibrationsTable extends TethysGUIPanel {
showCalibration(doc);
}
});
popMenu.add(menuItem);
menuItem = new JMenuItem("Export document " + doc.getDocumentName());
menuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
exportCalibration(doc);
}
});
popMenu.add(menuItem);
}
popMenu.addSeparator();
if (n > 1) {
menuItem = new JMenuItem("Delete selected documents");
@ -168,6 +177,11 @@ public class CalibrationsTable extends TethysGUIPanel {
}
protected void exportCalibration(DocumentNilusObject<Calibration> doc) {
tethysControl.exportDocument(Collection.Calibrations.toString(), doc.getDocumentName());
}
protected void deleteCalibrations(int[] rows) {
String msg = String.format("Are you sure you want to delete %d calibrations documents ?", rows.length);
int ans = WarnOnce.showNamedWarning("Deletemanycalibrations", PamController.getMainFrame(), "Delete multiple documents", msg, WarnOnce.OK_CANCEL_OPTION);

View File

@ -258,6 +258,7 @@ public class TethysConnectionPanel extends TethysGUIPanel {
TethysExportParams newParams = SelectServerdDialog.showDialog(getTethysControl(), getTethysControl().getGuiFrame(), getTethysControl().getTethysExportParams());
if (newParams != null) {
getTethysControl().checkServer();// sendStateUpdate(new TethysState(TethysState.StateType.UPDATESERVER));
fillServerControl();
}
}