mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-10-05 14:57:48 +00:00
tidying
This commit is contained in:
parent
47a07f5cfe
commit
59b22be2bd
@ -23,7 +23,6 @@ public class SHRPictureFile1 extends HiResImage
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
super (name, buffer, fileType, auxType, eof);
|
||||
System.out.println ("here");
|
||||
|
||||
int ptr = 0;
|
||||
while (ptr < buffer.length)
|
||||
@ -142,7 +141,7 @@ public class SHRPictureFile1 extends HiResImage
|
||||
int lo = dirEntry.mode & 0x00FF; // mode bit if hi == 0
|
||||
|
||||
boolean fillMode = (dirEntry.mode & 0x20) != 0;
|
||||
// assert fillMode == false;
|
||||
// assert fillMode == false;
|
||||
|
||||
if (hi != 0)
|
||||
System.out.println ("hi not zero");
|
||||
@ -243,7 +242,8 @@ public class SHRPictureFile1 extends HiResImage
|
||||
if (ptr < data.length - 32)
|
||||
colorTables[i] = new ColorTable (i, data, ptr);
|
||||
else
|
||||
colorTables[i] = new ColorTable (i, 0x00); // default empty table !! not finished
|
||||
colorTables[i] = new ColorTable (i, 0x00); // default empty table !! not
|
||||
// finished
|
||||
ptr += 32;
|
||||
}
|
||||
}
|
||||
@ -333,11 +333,11 @@ public class SHRPictureFile1 extends HiResImage
|
||||
ptr = 0;
|
||||
for (int line = 0; line < numScanLines; line++)
|
||||
{
|
||||
// if (isOddAndEmpty (packedScanLines[line]))
|
||||
// {
|
||||
// System.out.println ("Odd number of bytes in empty buffer in " + name);
|
||||
// break;
|
||||
// }
|
||||
// if (isOddAndEmpty (packedScanLines[line]))
|
||||
// {
|
||||
// System.out.println ("Odd number of bytes in empty buffer in " + name);
|
||||
// break;
|
||||
// }
|
||||
|
||||
int bytesUnpacked = unpack (packedScanLines[line], 0,
|
||||
packedScanLines[line].length, unpackedBuffer, ptr);
|
||||
@ -353,16 +353,17 @@ public class SHRPictureFile1 extends HiResImage
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------//
|
||||
// private boolean isOddAndEmpty (byte[] buffer)
|
||||
// // -------------------------------------------------------------------------------//
|
||||
// {
|
||||
// if (buffer.length % 2 == 0)
|
||||
// return false;
|
||||
// for (byte b : buffer)
|
||||
// if (b != 0)
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
// private boolean isOddAndEmpty (byte[] buffer)
|
||||
// //
|
||||
// -------------------------------------------------------------------------------//
|
||||
// {
|
||||
// if (buffer.length % 2 == 0)
|
||||
// return false;
|
||||
// for (byte b : buffer)
|
||||
// if (b != 0)
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// -------------------------------------------------------------------------------//
|
||||
@Override
|
||||
|
@ -52,7 +52,7 @@ public class DiskBrowser extends JFrame
|
||||
{
|
||||
super (windowTitle);
|
||||
|
||||
UIManager.put ("TabbedPane.foreground", Color.BLACK); // java bug fix
|
||||
// UIManager.put ("TabbedPane.foreground", Color.BLACK); // java bug fix
|
||||
|
||||
if (args.length > 0 && "-reset".equals (args[0]))
|
||||
new WindowState (prefs).clear ();
|
||||
@ -85,14 +85,14 @@ public class DiskBrowser extends JFrame
|
||||
RootDirectoryAction rootDirectoryAction = new RootDirectoryAction ();
|
||||
|
||||
RefreshTreeAction refreshTreeAction = new RefreshTreeAction (catalogPanel);
|
||||
// PreferencesAction preferencesAction = new PreferencesAction (this, prefs);
|
||||
// PreferencesAction preferencesAction = new PreferencesAction (this, prefs);
|
||||
AbstractAction print = new PrintAction (dataPanel);
|
||||
// AboutAction aboutAction = new AboutAction ();
|
||||
// HideLayoutAction hideLayoutAction = new HideLayoutAction (this, layoutBorderPanel);
|
||||
// AboutAction aboutAction = new AboutAction ();
|
||||
// HideLayoutAction hideLayoutAction = new HideLayoutAction (this, layoutBorderPanel);
|
||||
ShowFreeSectorsAction showFreeAction = new ShowFreeSectorsAction ();
|
||||
|
||||
CloseTabAction closeTabAction = new CloseTabAction (catalogPanel);
|
||||
// closeTabAction.addPropertyChangeListener (catalogPanel);
|
||||
// closeTabAction.addPropertyChangeListener (catalogPanel);
|
||||
|
||||
hideCatalogAction.addPropertyChangeListener (this);
|
||||
hideLayoutAction.addPropertyChangeListener (this);
|
||||
@ -100,10 +100,10 @@ public class DiskBrowser extends JFrame
|
||||
// add action buttons to toolbar
|
||||
toolBar.add (rootDirectoryAction);
|
||||
toolBar.add (refreshTreeAction);
|
||||
// toolBar.add (preferencesAction);
|
||||
// toolBar.add (preferencesAction);
|
||||
toolBar.add (duplicateAction);
|
||||
toolBar.add (print);
|
||||
// toolBar.add (aboutAction);
|
||||
// toolBar.add (aboutAction);
|
||||
|
||||
// set the listeners
|
||||
rootDirectoryAction.addPropertyChangeListener (rootFolderData);
|
||||
@ -132,7 +132,7 @@ public class DiskBrowser extends JFrame
|
||||
|
||||
menuHandler.fontAction.addFontChangeListener (dataPanel);
|
||||
menuHandler.fontAction.addFontChangeListener (catalogPanel);
|
||||
// menuHandler.fontAction.addFontChangeListener (diskLayoutPanel);
|
||||
// menuHandler.fontAction.addFontChangeListener (diskLayoutPanel);
|
||||
|
||||
// set the MenuItem Actions
|
||||
menuHandler.printItem.setAction (print);
|
||||
@ -166,7 +166,7 @@ public class DiskBrowser extends JFrame
|
||||
|
||||
if (desktop.isSupported (Desktop.Action.APP_QUIT_HANDLER))
|
||||
desktop.setQuitHandler ( (e, r) -> fireQuitEvent ()); // needed for cmd-Q
|
||||
// else
|
||||
// else
|
||||
setQuitHandler (); // needed for the close button
|
||||
}
|
||||
else
|
||||
@ -290,11 +290,11 @@ public class DiskBrowser extends JFrame
|
||||
private static void setLookAndFeel ()
|
||||
// ---------------------------------------------------------------------------------//
|
||||
{
|
||||
// FlatLightLaf.install ();
|
||||
// FlatLightLaf.install ();
|
||||
try
|
||||
{
|
||||
UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ());
|
||||
// UIManager.setLookAndFeel (new FlatLightLaf ());
|
||||
// UIManager.setLookAndFeel (new FlatLightLaf ());
|
||||
if (MAC)
|
||||
System.setProperty ("apple.laf.useScreenMenuBar", "true");
|
||||
}
|
||||
|
@ -38,9 +38,15 @@ public class EnvironmentAction extends AbstractAction
|
||||
textFormatter.addLine ("Java version", System.getProperty ("java.runtime.version"));
|
||||
textFormatter.addLine ();
|
||||
|
||||
String userHome = System.getProperty ("user.home");
|
||||
|
||||
String path = System.getProperty ("java.class.path");
|
||||
for (String s : path.split (File.pathSeparator))
|
||||
{
|
||||
if (s.startsWith (userHome))
|
||||
s = "~" + s.substring (userHome.length ());
|
||||
textFormatter.addLine ("Classpath", s);
|
||||
}
|
||||
|
||||
JOptionPane.showMessageDialog (null, textFormatter.toLabel (), "Java Environment",
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
|
Loading…
Reference in New Issue
Block a user