mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-03-01 00:30:17 +00:00
Changed disk creation to use a create method, as this is better
suited to disks that support mutiple logical disks. As part of this change, the setDiskName method was added to set the ProDOS VOLUME name.
This commit is contained in:
parent
10d7b000d1
commit
49938c5325
@ -76,11 +76,13 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for ProdosFormatDisk.
|
||||
* Create a ProdosFormatDisk.
|
||||
*/
|
||||
public ProdosFormatDisk(String filename, String diskName, int imageSize) {
|
||||
this(filename, new byte[imageSize]);
|
||||
volumeHeader.setVolumeName(diskName);
|
||||
public static ProdosFormatDisk[] create(String filename, String diskName, int imageSize) {
|
||||
ProdosFormatDisk disk = new ProdosFormatDisk(filename, new byte[imageSize]);
|
||||
disk.setDiskName(diskName);
|
||||
disk.format();
|
||||
return new ProdosFormatDisk[] { disk };
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,6 +187,13 @@ public class ProdosFormatDisk extends FormattedDisk {
|
||||
public String getDiskName() {
|
||||
return "/" + volumeHeader.getVolumeName() + "/";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the name of the disk (volume name).
|
||||
*/
|
||||
public void setDiskName(String volumeName) {
|
||||
volumeHeader.setVolumeName(volumeName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get suggested dimensions for display of bitmap. There is no suggestion
|
||||
|
Loading…
x
Reference in New Issue
Block a user