1 /** 2 * 3 */ 4 package jspecview.common; 5 6 public enum ExportType { 7 UNK, SOURCE, DIF, FIX, SQZ, PAC, XY, DIFDUP, PNG, JPG, SVG, SVGI, CML, AML, PDF; 8 getType(String type)9 public static ExportType getType(String type) { 10 type = type.toUpperCase(); 11 if (type.equalsIgnoreCase(JSViewer.sourceLabel)) 12 return SOURCE; 13 if (type.startsWith("XML")) 14 return AML; 15 for (ExportType mode : values()) 16 if (mode.name().equals(type)) 17 return mode; 18 return UNK; 19 } 20 isExportMode(String ext)21 public static boolean isExportMode(String ext) { 22 return (getType(ext) != UNK); 23 } 24 }