experimentNameEditor.setAlwaysUpdateTextField(true);
experimentNameEditor.setTextButton("Apply");
experimentNameEditor.setTextFieldColumns(30);
experimentNameEditor.addTextFieldListener(new ITextFieldListener() {
@Override
public void textChanged(EventObject event) {
String experimentName = currentDialogModel.getExperimentName();
if (!experimentNameEditor.getText().equalsIgnoreCase(experimentName)) {
updateExperimentEditor(true);
}
}
@Override
public void actionPerformed(EventObject event) {
// nothing to do
}
});
experimentNameEditor.addButtonListener(new IButtonListener() {
@Override
public void actionPerformed(EventObject event) {
updateExperimentEditor(false);
}
});
experimentNameRevertButton = new JButton("Revert");
experimentNameRevertButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String experimentName = currentDialogModel.getExperimentName();
if (!experimentName.trim().isEmpty()) {
experimentNameEditor.setText(experimentName);
}
}
});
stringBox.setColorEnabled(experimentNameEditor, false);
acquisitionNameTitle = new JLabel("Acquisition Name:");
acquisitionNameEditor = new TextFieldButton();
acquisitionNameEditor.setAlwaysUpdateTextField(true);
acquisitionNameEditor.setTextButton("Apply");
acquisitionNameEditor.setTextFieldColumns(30);
acquisitionNameEditor.addTextFieldListener(new ITextFieldListener() {
@Override
public void textChanged(EventObject event) {
String acquisitionName = currentDialogModel.getAcquisitionName();
if (!acquisitionNameEditor.getText().equalsIgnoreCase(acquisitionName)) {
updateAcquisitionEditor(true);