mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-02-20 04:29:02 +00:00
tidying
This commit is contained in:
parent
ad8af22186
commit
5c95dfe168
@ -201,20 +201,6 @@ public class DiskFactory
|
|||||||
return disk;
|
return disk;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file.length () == 819200) // 800K 3.5"
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
System.out.println ("UniDos ?");
|
|
||||||
// 2 x 400k disk images
|
|
||||||
AppleDisk appleDisk1 = new AppleDisk (file, 50, 32);
|
|
||||||
AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, 409600);
|
|
||||||
disk = checkUnidos (appleDisk1, 1);
|
|
||||||
disk2 = checkUnidos (appleDisk2, 2);
|
|
||||||
assert disk != disk2;
|
|
||||||
if (disk != null && disk2 != null)
|
|
||||||
return new DualDosDisk (disk, disk2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
System.out.println (" Checking po or dsk hard drive: " + file.length ());
|
System.out.println (" Checking po or dsk hard drive: " + file.length ());
|
||||||
|
|
||||||
@ -226,6 +212,19 @@ public class DiskFactory
|
|||||||
return disk;
|
return disk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file.length () == 819200) // 800K 3.5"
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
|
System.out.println ("UniDos ?");
|
||||||
|
// 2 x 400k disk images
|
||||||
|
AppleDisk appleDisk1 = new AppleDisk (file, 50, 32);
|
||||||
|
AppleDisk appleDisk2 = new AppleDisk (file, 50, 32, (int) (file.length () / 2));
|
||||||
|
disk = checkUnidos (appleDisk1, 1);
|
||||||
|
disk2 = checkUnidos (appleDisk2, 2);
|
||||||
|
if (disk != null && disk2 != null)
|
||||||
|
return new DualDosDisk (disk, disk2);
|
||||||
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
System.out.println (" Creating a data disk from bad length");
|
System.out.println (" Creating a data disk from bad length");
|
||||||
|
|
||||||
|
@ -136,6 +136,8 @@ public class DualDosDisk implements FormattedDisk
|
|||||||
currentDisk = 0;
|
currentDisk = 0;
|
||||||
else if (disks[1] == fd)
|
else if (disks[1] == fd)
|
||||||
currentDisk = 1;
|
currentDisk = 1;
|
||||||
|
else
|
||||||
|
System.out.println ("Disk not found: " + fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
|
@ -128,7 +128,7 @@ class AppleDiskTab extends AbstractTab
|
|||||||
{
|
{
|
||||||
DefaultMutableTreeNode rootNode = getRootNode ();
|
DefaultMutableTreeNode rootNode = getRootNode ();
|
||||||
|
|
||||||
// check for multi-volume disk
|
// check for multi-volume disk (only search the current branch)
|
||||||
FormattedDisk fd = ((AppleFileSource) rootNode.getUserObject ()).getFormattedDisk ();
|
FormattedDisk fd = ((AppleFileSource) rootNode.getUserObject ()).getFormattedDisk ();
|
||||||
if (fd instanceof DualDosDisk)
|
if (fd instanceof DualDosDisk)
|
||||||
{
|
{
|
||||||
|
@ -250,7 +250,7 @@ class DataPanel extends JTabbedPane
|
|||||||
|
|
||||||
switch (getSelectedIndex ())
|
switch (getSelectedIndex ())
|
||||||
{
|
{
|
||||||
case 0: // Formated/Image
|
case 0: // Formatted/Image
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
setText (formattedText, dataSource.getText ());
|
setText (formattedText, dataSource.getText ());
|
||||||
|
@ -208,6 +208,8 @@ public class TreeBuilder
|
|||||||
|
|
||||||
File[] files = file.listFiles ();
|
File[] files = file.listFiles ();
|
||||||
if (files != null)
|
if (files != null)
|
||||||
|
{
|
||||||
|
Arrays.sort (files, fileComparator);
|
||||||
for (File f : files)
|
for (File f : files)
|
||||||
{
|
{
|
||||||
if (f.isHidden ())
|
if (f.isHidden ())
|
||||||
@ -222,6 +224,7 @@ public class TreeBuilder
|
|||||||
f.isDirectory () ? "D" : " ", name, sdf.format (d).replace (".", ""), size,
|
f.isDirectory () ? "D" : " ", name, sdf.format (d).replace (".", ""), size,
|
||||||
type));
|
type));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (text.length () > 0)
|
if (text.length () > 0)
|
||||||
text.deleteCharAt (text.length () - 1);
|
text.deleteCharAt (text.length () - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user