Fix but in filedata

Stops errors (and returns 0) if an invalid user data format is used.
This commit is contained in:
Douglas Gillespie 2023-02-17 11:12:08 +00:00
parent e4c4c95340
commit f64deecbd5
2 changed files with 13 additions and 10 deletions

View File

@ -287,6 +287,9 @@ public class StandardFileDate implements FileDate, PamSettings {
System.out.println(e.getMessage());
} //throws ParseException if no match
setLastFormat(forcedDateFormat);
if (d == null) {
return 0;
}
return d.getTime();
}

View File

@ -938,13 +938,13 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
pamGridPane.setVgap(5);
Label freqLabel=new Label("Frequency (Hz)");
gridPaneHolder.add(freqLabel, 0, 0);
gridPaneHolder.add(new Label("Threshold (dB)"), 2, 0);
PamGridPane.setHalignment(freqLabel, HPos.CENTER);
PamGridPane.setColumnSpan(gridPaneHolder, 2);
//test band
gridPaneHolder.add(new Label("Test Band"), 0, 1);
//// gridPaneHolder.add(freqLabel, 0, 0);
//// gridPaneHolder.add(new Label("Threshold (dB)"), 2, 0);
// PamGridPane.setHalignment(freqLabel, HPos.CENTER);
// PamGridPane.setColumnSpan(gridPaneHolder, 2);
//
// //test band
// gridPaneHolder.add(new Label("Test Band"), 0, 1);
testBandFreqPane=new FreqBandPane(Orientation.HORIZONTAL);
testBandFreqPane.setBandText("");
@ -1235,8 +1235,8 @@ public class SweepClassifierSetPaneFX extends SettingsPane<ClickTypeProperty> {
}
@Override
protected void disbleControls(boolean disable) {
this.gridPaneHolder.setDisable(disable);
// protected void disbleControls(boolean disable) {
// this.gridPaneHolder.setDisable(disable);
// peakFreqCheckBox.setDisable(enable);
// peakWidthCheckBox.setDisable(enable);