diff --git a/src/com/bytezone/diskbrowser/disk/DiskFactory.java b/src/com/bytezone/diskbrowser/disk/DiskFactory.java index 365d6e3..519fe87 100755 --- a/src/com/bytezone/diskbrowser/disk/DiskFactory.java +++ b/src/com/bytezone/diskbrowser/disk/DiskFactory.java @@ -395,14 +395,7 @@ public class DiskFactory } AppleDisk appleDisk256 = new AppleDisk (file, 35, 16); - AppleDisk appleDisk512; - - // if (nuFX != null) - // appleDisk512 = new AppleDisk (file, 35, 8, nuFX); - // else if (binary2 != null) - // appleDisk512 = new AppleDisk (file, 35, 8, binary2); - // else - appleDisk512 = new AppleDisk (file, 35, 8); + AppleDisk appleDisk512 = new AppleDisk (file, 35, 8); if (true) { diff --git a/src/com/bytezone/diskbrowser/duplicates/DisksWindow.java b/src/com/bytezone/diskbrowser/duplicates/DisksWindow.java index aa94a27..a857dd1 100644 --- a/src/com/bytezone/diskbrowser/duplicates/DisksWindow.java +++ b/src/com/bytezone/diskbrowser/duplicates/DisksWindow.java @@ -188,11 +188,11 @@ public class DisksWindow extends JFrame } }); - for (int i = 0; i < Utility.suffixes.size (); i++) + for (int i = 0; i < Utility.getTotalSuffixes (); i++) { int total = rootFolderData.getTotalType (i); JCheckBox btn = - new JCheckBox (String.format ("%s (%,d)", Utility.suffixes.get (i), total)); + new JCheckBox (String.format ("%s (%,d)", Utility.getSuffix (i), total)); topPanel.add (btn); boxes.add (btn); diff --git a/src/com/bytezone/diskbrowser/duplicates/RootFolderData.java b/src/com/bytezone/diskbrowser/duplicates/RootFolderData.java index d9a8943..3bdb5f2 100644 --- a/src/com/bytezone/diskbrowser/duplicates/RootFolderData.java +++ b/src/com/bytezone/diskbrowser/duplicates/RootFolderData.java @@ -154,7 +154,7 @@ public class RootFolderData implements RootDirectoryChangeListener private void clear () // ---------------------------------------------------------------------------------// { - typeTotals = new int[4][Utility.suffixes.size ()]; + typeTotals = new int[4][Utility.getTotalSuffixes ()]; totalDisks = 0; totalFolders = 0; @@ -256,7 +256,7 @@ public class RootFolderData implements RootDirectoryChangeListener System.out.println (line); for (int i = 0; i < typeTotals[0].length; i++) { - System.out.printf ("%14.14s ", Utility.suffixes.get (i) + " ..........."); + System.out.printf ("%14.14s ", Utility.getSuffix (i) + " ..........."); for (int j = 0; j < typeTotals.length; j++) { System.out.printf ("%,7d ", typeTotals[j][i]); @@ -328,7 +328,7 @@ public class RootFolderData implements RootDirectoryChangeListener for (int i = 0; i < typeTotals[0].length; i++) { line = String.format ("%14.14s %,7d %,7d %,7d %,7d", - Utility.suffixes.get (i) + " ...........", typeTotals[0][i], typeTotals[1][i], + Utility.getSuffix (i) + " ...........", typeTotals[0][i], typeTotals[1][i], typeTotals[2][i], typeTotals[3][i]); g.drawString (line, x, y); for (int j = 0; j < typeTotals.length; j++) diff --git a/src/com/bytezone/diskbrowser/utilities/Utility.java b/src/com/bytezone/diskbrowser/utilities/Utility.java index 7367ecd..4e5596a 100644 --- a/src/com/bytezone/diskbrowser/utilities/Utility.java +++ b/src/com/bytezone/diskbrowser/utilities/Utility.java @@ -14,7 +14,7 @@ import java.util.zip.CRC32; import java.util.zip.Checksum; // -----------------------------------------------------------------------------------// -public class Utility +public final class Utility // -----------------------------------------------------------------------------------// { public static final byte ASCII_BACKSPACE = 0x08; @@ -33,9 +33,30 @@ public class Utility public static final byte ASCII_EQUALS = 0x3D; public static final byte ASCII_CARET = 0x5E; - public static final List suffixes = Arrays.asList ("po", "dsk", "do", "hdv", + private static final List suffixes = Arrays.asList ("po", "dsk", "do", "hdv", "2mg", "v2d", "d13", "sdk", "shk", "bxy", "bny", "woz", "img", "dimg"); + // ---------------------------------------------------------------------------------// + private Utility () + // ---------------------------------------------------------------------------------// + { + + } + + // ---------------------------------------------------------------------------------// + public static int getTotalSuffixes () + // ---------------------------------------------------------------------------------// + { + return suffixes.size (); + } + + // ---------------------------------------------------------------------------------// + public static String getSuffix (int index) + // ---------------------------------------------------------------------------------// + { + return suffixes.get (index); + } + // ---------------------------------------------------------------------------------// public static boolean test (Graphics2D g) // ---------------------------------------------------------------------------------//