@Override
protected void initAndAddOtherComponentsInMainPanel() {
nameModelEditDialog = new NxEntryNameModelEditDialog(this, "Edit nxEntryName Model", true);
// Experiment Name
hiddenExperimentNameViewer = new Label();
experimentNameTitle = new JLabel("Experiment Name:");
experimentNameEditor = new TextFieldButton();
experimentNameEditor.setStateEnabled(false);
experimentNameEditor.setTextButton("Apply");
experimentNameEditor.setTextFieldColumns(30);
experimentNameRevertButton = new JButton("Revert");
experimentNameRevertButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String text = hiddenExperimentNameViewer.getText();
if ((!hiddenExperimentNameViewer.getErrorText().equals(text))
&& (!text.trim().isEmpty())) {
experimentNameEditor.setText(text);
}
}
});
// Acquisition Name
hiddenAcquisitionNameViewer = new Label();
acquisitionNameTitle = new JLabel("Acquisition Name:");
acquisitionNameEditor = new TextFieldButton();
acquisitionNameEditor.setStateEnabled(false);
acquisitionNameEditor.setTextButton("Apply");
acquisitionNameEditor.setTextFieldColumns(30);
acquisitionNameRevertButton = new JButton("Revert");
acquisitionNameRevertButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String text = hiddenAcquisitionNameViewer.getText();
if ((!hiddenAcquisitionNameViewer.getErrorText().equals(text))
&& (!text.trim().isEmpty())) {
acquisitionNameEditor.setText(text);
}
}
});
// Experiment Index
experimentIndexPanel = new JPanel(new GridBagLayout());
resetExperimentIndexButton = new StringButton();
resetExperimentIndexButton.getComponent().setButtonLook(true);
resetExperimentIndexButton.setDisplayDataInButton(false);
resetExperimentIndexButton.setAllowOutputPopup(false);
resetExperimentIndexButton.setText("Reset Experiment Index");
resetExperimentIndexButton.setCometeFont(AwtFontTool.getCometeFont(closeButton.getFont()));
incrementExperimentIndexButton = new StringButton();
incrementExperimentIndexButton.getComponent().setButtonLook(true);
incrementExperimentIndexButton.setDisplayDataInButton(false);
incrementExperimentIndexButton.setAllowOutputPopup(false);
incrementExperimentIndexButton.setText("Increment Experiment Index");
incrementExperimentIndexButton.setCometeFont(AwtFontTool.getCometeFont(closeButton
.getFont()));
GridBagConstraints resetConstraints = new GridBagConstraints();
resetConstraints.fill = GridBagConstraints.VERTICAL;
resetConstraints.gridx = 0;
resetConstraints.gridy = 0;
resetConstraints.weightx = 0;
resetConstraints.weighty = 1;
resetConstraints.insets = new Insets(0, 0, 0, 5);
experimentIndexPanel.add((JComponent) resetExperimentIndexButton.getComponent(),
resetConstraints);
GridBagConstraints incrementConstraints = new GridBagConstraints();
incrementConstraints.fill = GridBagConstraints.VERTICAL;
incrementConstraints.gridx = 1;
incrementConstraints.gridy = 0;
incrementConstraints.weightx = 0;
incrementConstraints.weighty = 1;
incrementConstraints.insets = new Insets(0, 0, 0, 5);
experimentIndexPanel.add((JComponent) incrementExperimentIndexButton.getComponent(),
incrementConstraints);
GridBagConstraints glueConstraints = new GridBagConstraints();
glueConstraints.fill = GridBagConstraints.BOTH;
glueConstraints.gridx = 2;
glueConstraints.gridy = 0;
glueConstraints.weightx = 1;
glueConstraints.weighty = 1;
experimentIndexPanel.add(Box.createGlue(), glueConstraints);
// NxEntry Name
nxEntryNameEditButtonPanel = new JPanel(new BorderLayout());
nxEntryNameTitle = new JLabel("NxEntry Name:");
nxEntryNameViewer = new Label();
nxEntryNameViewer.setStateEnabled(false);
nxEntryNameViewer.setCometeFont(CometeFont.DefaultFont);
nxEntryNameEditButton = new JButton("Edit NxEntryName Model");
nxEntryNameEditButton.addActionListener(new ActionListener() {
@Override