JalviewFileFilter alljvf = new JalviewFileFilter(
allExtensions.toArray(new String[] {}),
MessageManager.getString("label.all_known_alignment_files"));
+ alljvf.setMultiFormat(true);
alljvf.setExtensionListInDescription(false);
addChoosableFileFilter(alljvf);
{
JalviewFileFilter jvf = (JalviewFileFilter) getFileFilter();
- if (!jvf.accept(selectedFile))
+ if (!jvf.accept(selectedFile) && !jvf.isMultiFormat())
{
String withExtension = getSelectedFile().getName() + "."
+ jvf.getAcceptableExtension();
private boolean useExtensionsInDescription = true;
+ private boolean multiFormat = false;
+
private JalviewFileChooser parentJFC = null;
public JalviewFileFilter(String extension, String description)
this.parentJFC = p;
}
+ protected boolean isMultiFormat()
+ {
+ return multiFormat;
+ }
+
+ protected void setMultiFormat(boolean b)
+ {
+ multiFormat = b;
+ }
}