mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-06-08 04:29:35 +00:00
keep suffixes private
This commit is contained in:
parent
3c2816baf0
commit
b7106787d1
|
@ -395,14 +395,7 @@ public class DiskFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
AppleDisk appleDisk256 = new AppleDisk (file, 35, 16);
|
AppleDisk appleDisk256 = new AppleDisk (file, 35, 16);
|
||||||
AppleDisk appleDisk512;
|
AppleDisk appleDisk512 = new AppleDisk (file, 35, 8);
|
||||||
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
if (true)
|
if (true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
int total = rootFolderData.getTotalType (i);
|
||||||
JCheckBox btn =
|
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);
|
topPanel.add (btn);
|
||||||
boxes.add (btn);
|
boxes.add (btn);
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class RootFolderData implements RootDirectoryChangeListener
|
||||||
private void clear ()
|
private void clear ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
typeTotals = new int[4][Utility.suffixes.size ()];
|
typeTotals = new int[4][Utility.getTotalSuffixes ()];
|
||||||
totalDisks = 0;
|
totalDisks = 0;
|
||||||
totalFolders = 0;
|
totalFolders = 0;
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ public class RootFolderData implements RootDirectoryChangeListener
|
||||||
System.out.println (line);
|
System.out.println (line);
|
||||||
for (int i = 0; i < typeTotals[0].length; i++)
|
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++)
|
for (int j = 0; j < typeTotals.length; j++)
|
||||||
{
|
{
|
||||||
System.out.printf ("%,7d ", typeTotals[j][i]);
|
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++)
|
for (int i = 0; i < typeTotals[0].length; i++)
|
||||||
{
|
{
|
||||||
line = String.format ("%14.14s %,7d %,7d %,7d %,7d",
|
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]);
|
typeTotals[2][i], typeTotals[3][i]);
|
||||||
g.drawString (line, x, y);
|
g.drawString (line, x, y);
|
||||||
for (int j = 0; j < typeTotals.length; j++)
|
for (int j = 0; j < typeTotals.length; j++)
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.zip.CRC32;
|
||||||
import java.util.zip.Checksum;
|
import java.util.zip.Checksum;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------//
|
// -----------------------------------------------------------------------------------//
|
||||||
public class Utility
|
public final class Utility
|
||||||
// -----------------------------------------------------------------------------------//
|
// -----------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
public static final byte ASCII_BACKSPACE = 0x08;
|
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_EQUALS = 0x3D;
|
||||||
public static final byte ASCII_CARET = 0x5E;
|
public static final byte ASCII_CARET = 0x5E;
|
||||||
|
|
||||||
public static final List<String> suffixes = Arrays.asList ("po", "dsk", "do", "hdv",
|
private static final List<String> suffixes = Arrays.asList ("po", "dsk", "do", "hdv",
|
||||||
"2mg", "v2d", "d13", "sdk", "shk", "bxy", "bny", "woz", "img", "dimg");
|
"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)
|
public static boolean test (Graphics2D g)
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user