Commit 29e7f92a authored by Marian Dovgialo's avatar Marian Dovgialo

#45567 Removed tag filename selection - unneeded

parent 559c118b
......@@ -15,7 +15,6 @@
private boolean recordingEnabled = false;
private String signalRecordingFilePath;
private String tagsRecordingFilePath;
private boolean tagsRecordingEnabled = true;
private boolean saveImpedance = false;
private boolean appendTimestamps = false;
......@@ -43,7 +42,6 @@ public MonitorRecordingDescriptor(String signalRecordingFilePath,
String tagsRecordingFilePath, boolean isTagsRecordingEnabled,
String videoRecordingFilePath, VideoStreamSpecification videoStreamSpecification) {
this.signalRecordingFilePath = signalRecordingFilePath;
this.tagsRecordingFilePath = tagsRecordingFilePath;
this.tagsRecordingEnabled = isTagsRecordingEnabled;
this.videoRecordingFilePath = videoRecordingFilePath;
this.videoStreamSpecification = videoStreamSpecification;
......@@ -66,23 +64,6 @@ public void setSignalRecordingFilePath(String signalRecordingFilePath) {
this.signalRecordingFilePath = signalRecordingFilePath;
}
/**
* Returns the file path to which the tags will be recorded.
* @return the file path to record tags to.
*/
public String getTagsRecordingFilePath() {
return tagsRecordingFilePath;
}
/**
* Sets the file path to which the tags will be recorded.
* @param tagsRecordingFilePath the new file path to which the tags
* will be recorded.
*/
public void setTagsRecordingFilePath(String tagsRecordingFilePath) {
this.tagsRecordingFilePath = tagsRecordingFilePath;
}
/**
* Returns if the tags should be recorded.
* @return true if the tags should be recorded, false otherwise
......
......@@ -102,13 +102,6 @@ private void initialize() {
c.gridy=0;
signalRecordPanel.add(getSelectSignalRecordingFilePanel(), c);
c.gridx=0;
c.gridy=1;
signalRecordPanel.add(getEnableTagRecordingPanel(), c);
c.gridx=1;
c.gridy=1;
signalRecordPanel.add(getSelectTagsRecordingFilePanel(), c);
if (ObciServerCapabilities.getSharedInstance().hasVideoSaving()) {
c.gridx=0;
c.gridy=2;
......@@ -133,20 +126,6 @@ protected FileSelectPanel getSelectSignalRecordingFilePanel() {
return selectSignalRecordingFilePanel;
}
/**
* Returns a {@link FileSelectPanel} allowing to select a tags recording
* target file.
* @return a {@link FileSelectPanel} for selecting tags recording target
* file using this panel
*/
protected FileSelectPanel getSelectTagsRecordingFilePanel() {
if (selectTagsRecordingFilePanel == null) {
selectTagsRecordingFilePanel = new FileSelectPanel(_("Tags filename:"));
selectTagsRecordingFilePanel.setEnabled(false);
}
return selectTagsRecordingFilePanel;
}
/**
* Returns a {@link FileSelectPanel} allowing to select a video recording
* target file.
......@@ -169,7 +148,7 @@ protected FileSelectPanel getSelectVideoRecordingFilePanel() {
*/
protected EnableRecordingPanel getEnableTagRecordingPanel() {
if (enableTagRecordingPanel == null) {
enableTagRecordingPanel = new EnableRecordingPanel(getSelectTagsRecordingFilePanel());
enableTagRecordingPanel = new EnableRecordingPanel(null);
enableTagRecordingPanel.setText(_("Record Tags"));
}
return enableTagRecordingPanel;
......@@ -195,7 +174,6 @@ protected EnableRecordingPanel getEnableVideoRecordingPanel() {
public void fillModelFromPanel(Object model) {
MonitorRecordingDescriptor monitorRecordingDescriptor = ((ExperimentDescriptor) model).getMonitorRecordingDescriptor();
monitorRecordingDescriptor.setSignalRecordingFilePath(getSelectSignalRecordingFilePanel().getFileName());
monitorRecordingDescriptor.setTagsRecordingFilePath(getSelectTagsRecordingFilePanel().getFileName());
monitorRecordingDescriptor.setTagsRecordingEnabled(getEnableTagRecordingPanel().isRecordingEnabled());
monitorRecordingDescriptor.setVideoRecordingFilePath(getSelectVideoRecordingFilePanel().getFileName());
}
......@@ -208,7 +186,6 @@ public void fillPanelFromModel(Object model) {
getEnableVideoRecordingPanel().setRecordingEnabled(monitorRecordingDescriptor.isVideoRecordingEnabled());
getEnableVideoRecordingPanel().setEnabled(experimentDescriptor.getHasVideoSaver());
getSelectSignalRecordingFilePanel().setFileName(monitorRecordingDescriptor.getSignalRecordingFilePath());
getSelectTagsRecordingFilePanel().setFileName(monitorRecordingDescriptor.getTagsRecordingFilePath());
getSelectVideoRecordingFilePanel().setFileName(monitorRecordingDescriptor.getVideoRecordingFilePath());
}
......@@ -223,17 +200,16 @@ public void setEnabled(boolean enabled) {
getSelectSignalRecordingFilePanel().setEnabled(enabled);
getEnableTagRecordingPanel().setEnabled(enabled);
getSelectTagsRecordingFilePanel().setEnabled(enabled && getEnableTagRecordingPanel().isRecordingEnabled());
getEnableVideoRecordingPanel().setEnabled(enabled);
getSelectVideoRecordingFilePanel().setEnabled(enabled && getEnableVideoRecordingPanel().isRecordingEnabled());
}
/**
* Resets the signal and tag recording filenames to empty strings.
* Resets the signal and tag recording filenames to default.
*/
public void resetFileNames() {
// TODO: GET HOME DIR
getSelectSignalRecordingFilePanel().setFileName("");
getSelectTagsRecordingFilePanel().setFileName("");
}
/**
......@@ -246,10 +222,6 @@ public void validatePanel(Object model, ValidationErrors errors) {
String recordingFileName = getSelectSignalRecordingFilePanel().getFileName();
validateRecordingFileName("Signal", recordingFileName, errors);
if (getEnableTagRecordingPanel().isRecordingEnabled()) {
String tagRecordingFileName = getSelectTagsRecordingFilePanel().getFileName();
validateRecordingFileName("Tag", tagRecordingFileName, errors);
}
if (getEnableVideoRecordingPanel().isRecordingEnabled()) {
String videoRecordingFileName = getSelectVideoRecordingFilePanel().getFileName();
validateRecordingFileName("Video", videoRecordingFileName, errors);
......@@ -284,7 +256,10 @@ else if ((new File(recordingFileName)).exists()) {
public EnableRecordingPanel(FileSelectPanel fileSelectPanel) {
enableRecordingCheckBox = new JCheckBox();
attachComponentToToggle(fileSelectPanel);
if (fileSelectPanel!=null)
{
attachComponentToToggle(fileSelectPanel);
}
add(enableRecordingCheckBox);
}
......@@ -362,7 +337,6 @@ public void changedUpdate(DocumentEvent e) {
public void updateNamesToFitSignalName() {
String fileName = getSelectSignalRecordingFilePanel().getFileName();
getSelectTagsRecordingFilePanel().setFileName(fileName);
getSelectVideoRecordingFilePanel().setFileName(fileName);
}
......
......@@ -64,7 +64,11 @@ protected JComponent createInterface() {
}
// commented out until opening signal files with impedance works
// panel.add(getSaveImpedanceCheckBox());
panel.add(getAppendTimestampsCheckBox());
JPanel subpanel = new JPanel();
subpanel.setLayout(new BoxLayout(subpanel, BoxLayout.X_AXIS));
panel.add(subpanel);
subpanel.add(getAppendTimestampsCheckBox());
subpanel.add(chooseFilesForMonitorRecordingPanel.getEnableTagRecordingPanel());
return panel;
}
......
......@@ -16,7 +16,7 @@
@JsonProperty("signal_filename")
public String signalFileName;
@JsonProperty("save_tags")
public boolean saveTags = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment