X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FJalviewFileChooser.java;fp=src%2Fjalview%2Fio%2FJalviewFileChooser.java;h=9ac6a357134be8a2f6d653f48d24b36ed6b3f89f;hb=ee198b3ca3687f18a2ee186f4e7c7330f4ea30f0;hp=1ea67954727dfc8390fe9879155bd43d567ec7af;hpb=0bec4854366c4bc4608ed0d7dc1506fc6afe2285;p=jalview.git diff --git a/src/jalview/io/JalviewFileChooser.java b/src/jalview/io/JalviewFileChooser.java index 1ea6795..9ac6a35 100755 --- a/src/jalview/io/JalviewFileChooser.java +++ b/src/jalview/io/JalviewFileChooser.java @@ -153,7 +153,7 @@ public class JalviewFileChooser extends JFileChooser } } - public String getSelectedFormat() + public FileFormat getSelectedFormat() { if (getFileFilter() == null) { @@ -161,41 +161,7 @@ public class JalviewFileChooser extends JFileChooser } String format = getFileFilter().getDescription(); - - if (format.toUpperCase().startsWith("JALVIEW")) - { - format = "Jalview"; - } - else if (format.toUpperCase().startsWith("FASTA")) - { - format = "FASTA"; - } - else if (format.toUpperCase().startsWith("MSF")) - { - format = "MSF"; - } - else if (format.toUpperCase().startsWith("CLUSTAL")) - { - format = "CLUSTAL"; - } - else if (format.toUpperCase().startsWith("BLC")) - { - format = "BLC"; - } - else if (format.toUpperCase().startsWith("PIR")) - { - format = "PIR"; - } - else if (format.toUpperCase().startsWith("PFAM")) - { - format = "PFAM"; - } - else if (format.toUpperCase().startsWith(PhylipFile.FILE_DESC)) - { - format = PhylipFile.FILE_DESC; - } - - return format; + return FileFormat.valueOf(format); } @Override