mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2025-05-11 17:17:22 +00:00
Add export option to Calibrations table
This commit is contained in:
parent
78da90e23e
commit
6a8c9affbc
@ -135,7 +135,6 @@ public class Pamguard {
|
|||||||
String InputPsf = "NULL";
|
String InputPsf = "NULL";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// set up the system to output to both a log file and the console window. Also
|
// 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
|
// set up a monitor to check for the size of the folder every hour - if it gets
|
||||||
// too big, just stop logging the messages
|
// too big, just stop logging the messages
|
||||||
|
@ -118,8 +118,17 @@ public class CalibrationsTable extends TethysGUIPanel {
|
|||||||
showCalibration(doc);
|
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.add(menuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
popMenu.addSeparator();
|
popMenu.addSeparator();
|
||||||
if (n > 1) {
|
if (n > 1) {
|
||||||
menuItem = new JMenuItem("Delete selected documents");
|
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) {
|
protected void deleteCalibrations(int[] rows) {
|
||||||
String msg = String.format("Are you sure you want to delete %d calibrations documents ?", rows.length);
|
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);
|
int ans = WarnOnce.showNamedWarning("Deletemanycalibrations", PamController.getMainFrame(), "Delete multiple documents", msg, WarnOnce.OK_CANCEL_OPTION);
|
||||||
|
@ -258,6 +258,7 @@ public class TethysConnectionPanel extends TethysGUIPanel {
|
|||||||
TethysExportParams newParams = SelectServerdDialog.showDialog(getTethysControl(), getTethysControl().getGuiFrame(), getTethysControl().getTethysExportParams());
|
TethysExportParams newParams = SelectServerdDialog.showDialog(getTethysControl(), getTethysControl().getGuiFrame(), getTethysControl().getTethysExportParams());
|
||||||
if (newParams != null) {
|
if (newParams != null) {
|
||||||
getTethysControl().checkServer();// sendStateUpdate(new TethysState(TethysState.StateType.UPDATESERVER));
|
getTethysControl().checkServer();// sendStateUpdate(new TethysState(TethysState.StateType.UPDATESERVER));
|
||||||
|
fillServerControl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user