+ static class AltosHexfileFilter extends javax.swing.filechooser.FileFilter {
+ int product;
+ String head;
+ String description;
+
+ public AltosHexfileFilter(int product, String head, String description) {
+ this.product = product;
+ this.head = head;
+ this.description = description;
+ }
+
+ public boolean accept(File file) {
+ return file.getName().startsWith(head) && file.getName().endsWith(".ihx");
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ }
+
+ static AltosHexfileFilter[] filters = {
+ new AltosHexfileFilter(AltosLib.product_telemetrum, "telemetrum", "TeleMetrum Image"),
+ new AltosHexfileFilter(AltosLib.product_teledongle, "teledongle", "TeleDongle Image"),
+ new AltosHexfileFilter(AltosLib.product_telemega, "telemega", "TeleMega Image"),
+ new AltosHexfileFilter(AltosLib.product_easymini, "easymini", "EasyMini Image"),
+ };
+