enableDisableFields();
}
};
private void enableDisableFields() {
DataExportProcessor processor = DataExportProcessor.getExportProcessor(getExportInstructions().getFormat());
boolean canCreateHeader = processor != null && processor.canCreateHeader();
boolean canQuoteValues = processor != null && processor.canQuoteValues();
boolean canExportToClipboard = processor != null && processor.canExportToClipboard();
destinationClipboardRadioButton.setEnabled(canExportToClipboard);
quoteValuesCheckBox.setEnabled(canQuoteValues);
quoteAllValuesCheckBox.setEnabled(canQuoteValues);
createHeaderCheckBox.setEnabled(canCreateHeader);
if (!destinationClipboardRadioButton.isEnabled() && destinationClipboardRadioButton.isSelected()) {
destinationFileRadioButton.setSelected(true);
}
valueSeparatorTextField.setEnabled(formatCustomRadioButton.isSelected());
fileNameTextField.setEnabled(destinationFileRadioButton.isSelected());
fileLocationTextField.setEnabled(destinationFileRadioButton.isSelected());
String fileNameBase = sourceObject == null ? instructions.getBaseName() : sourceObject.getName();
if (fileNameBase != null && processor != null) {
String fileName = fileNameBase + "." + processor.getFileExtension();
fileNameTextField.setText(fileName);
}
}