mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-26 08:49:49 +00:00
tidying
This commit is contained in:
parent
f2ec3caec9
commit
03cfaa711d
@ -7,7 +7,7 @@ import com.bytezone.diskbrowser.utilities.HexFormatter;
|
|||||||
|
|
||||||
class DosTSListSector extends AbstractSector
|
class DosTSListSector extends AbstractSector
|
||||||
{
|
{
|
||||||
String name;
|
private final String name;
|
||||||
|
|
||||||
public DosTSListSector (String name, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
public DosTSListSector (String name, Disk disk, byte[] buffer, DiskAddress diskAddress)
|
||||||
{
|
{
|
||||||
@ -17,8 +17,6 @@ class DosTSListSector extends AbstractSector
|
|||||||
|
|
||||||
public boolean isValid (DosDisk dosDisk)
|
public boolean isValid (DosDisk dosDisk)
|
||||||
{
|
{
|
||||||
System.out.println ("Validating TS List sector");
|
|
||||||
|
|
||||||
// what is the count of blocks? does it match? this sector can't tell, there
|
// what is the count of blocks? does it match? this sector can't tell, there
|
||||||
// might be more than one TS list
|
// might be more than one TS list
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package com.bytezone.diskbrowser.gui;
|
package com.bytezone.diskbrowser.gui;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Font;
|
||||||
|
import java.awt.Graphics;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
|
||||||
import javax.swing.JComponent;
|
import javax.swing.JComponent;
|
||||||
|
|
||||||
@ -17,13 +21,13 @@ class ScrollRuler extends JComponent
|
|||||||
|
|
||||||
public static final int HORIZONTAL = 0;
|
public static final int HORIZONTAL = 0;
|
||||||
public static final int VERTICAL = 1;
|
public static final int VERTICAL = 1;
|
||||||
Font font = Platform.getFont (FontType.SANS_SERIF, FontSize.BASE);
|
|
||||||
|
|
||||||
int orientation;
|
private Font font = Platform.getFont (FontType.SANS_SERIF, FontSize.BASE);
|
||||||
boolean isHex = true;
|
private final int orientation;
|
||||||
boolean isTrackMode = true;
|
private boolean isHex = true;
|
||||||
LayoutDetails layoutDetails;
|
private boolean isTrackMode = true;
|
||||||
JComponent image;
|
private LayoutDetails layoutDetails;
|
||||||
|
private final JComponent image;
|
||||||
|
|
||||||
public ScrollRuler (JComponent image, int orientation)
|
public ScrollRuler (JComponent image, int orientation)
|
||||||
{
|
{
|
||||||
@ -43,11 +47,19 @@ class ScrollRuler extends JComponent
|
|||||||
|
|
||||||
// Must match the preferred size of DiskLayoutImage
|
// Must match the preferred size of DiskLayoutImage
|
||||||
if (orientation == HORIZONTAL)
|
if (orientation == HORIZONTAL)
|
||||||
setPreferredSize (new Dimension (layout.block.width * layout.grid.width + 1, HEIGHT)); // width/height
|
setPreferredSize (new Dimension (layout.block.width * layout.grid.width + 1,
|
||||||
|
HEIGHT)); // width/height
|
||||||
else
|
else
|
||||||
setPreferredSize (new Dimension (WIDTH, layout.block.height * layout.grid.height + 1));
|
setPreferredSize (new Dimension (WIDTH,
|
||||||
|
layout.block.height * layout.grid.height + 1));
|
||||||
|
|
||||||
setTrackMode (layout.grid.width == 16 || layout.grid.width == 13); // will call repaint ()
|
setTrackMode (layout.grid.width == 16 || layout.grid.width == 13);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrackMode (boolean trackMode)
|
||||||
|
{
|
||||||
|
isTrackMode = trackMode;
|
||||||
|
repaint ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeFont (Font font)
|
public void changeFont (Font font)
|
||||||
@ -62,12 +74,6 @@ class ScrollRuler extends JComponent
|
|||||||
repaint ();
|
repaint ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTrackMode (boolean trackMode)
|
|
||||||
{
|
|
||||||
isTrackMode = trackMode;
|
|
||||||
repaint ();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void paintComponent (Graphics g)
|
protected void paintComponent (Graphics g)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user