(cherry-picked to fixAppleCommander/AppleCommander#13 since I've
discovered that I was wrong and it does fix the problem after all!)
cwa.storage.Disk.FileFilter was written for SWT, returning multiple
extensions as a single string with ; separators. For JavaFX, we
actually want individual strings separately or in a list.
The only place these are initialized in cwa.storage.Disk anyway, so what
I've done is change the class to instatiate with separate strings and
join them on demand for SWT. A new getExtensionList() method will
return them as-is for JavaFX.
My fix for the unchecked warning in AppleImage.java was completely dumb
and I had no idea what I was doing. My understanding of how this works
is now greatly improved and the bug I introduced in 292afd2 is fixed.
If you don't request a specific GUI, we try SWT and then Swing. Okay.
But if you do, we don't even try to see if it works—we just assume SWT
works. If the user requested Swing, we just unconditionally spit out an
error message and try to start the GUI anyway. Let's make the errors
conditional on the GUIs being unavailable.
Note, a Swing GUI is available. It is just incomplete and doesn't work
very well. :)
Fixed all instances of warnings OpenJDK finds with -Xlint:unchecked.
Merging this will at least result in a dependency on JDK 1.5 or later
that I'm pretty sure of. But since the only JDKs that are really safe
to use these days are versions 1.8 and 9, that's probably okay.
No promises that this will make modern SWT work or anything, but it's
probably at least a beginnig toward that as well.
When one creates a subdirectory on a ProDOS volume, the master entry in the subdirectory's key block needs to point back to its parent directory block and entry number. However, the code for setting those things is missing.
Side effect: opened up the previously private 'Name' class in ui; this simplifies directory handling elsewhere, as it automatically creates a directory structure to a pathed file.