moveRadioButton.setEnabled(true);
renameToTextBox.setEnabled(true);
renameCheckBox.setEnabled(true);
}
ChangeListener cl = new ChangeListener() {
public void stateChanged(ChangeEvent arg0) {
renameCheckBox.setEnabled(!linkInPlace.isSelected()
&& (!multipleEntries));
renameToTextBox.setEnabled(!linkInPlace.isSelected()
&& (!multipleEntries));
if (multipleEntries) { renameToTextBox.setText("Multiple entries"); }
}
};
if (multipleEntries) {
linkInPlace.setText(Globals
.lang("Leave files in their current directory."));
copyRadioButton.setText(Globals.lang("Copy files to file directory."));
moveRadioButton.setText(Globals.lang("Move files to file directory."));
} else {
linkInPlace.setText(Globals
.lang("Leave file in its current directory."));
copyRadioButton.setText(Globals.lang("Copy file to file directory."));
moveRadioButton.setText(Globals.lang("Move file to file directory."));
}
renameCheckBox.setText(Globals.lang("Rename file to") + ": ");
renameToTextBox.setText(citeKey == null ? "default" : citeKey + "." + fileType.extension);
linkInPlace.addChangeListener(cl);
cl.stateChanged(new ChangeEvent(linkInPlace));
try {
Object[] messages = {"How would you like to link to " + linkFileName + "?", optionsPanel};
return JOptionPane.showConfirmDialog(frame, messages, dialogTitle,
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);