Package org.fife.ui.hex.swing
Class HexTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.fife.ui.hex.swing.HexTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class HexTableModel extends javax.swing.table.AbstractTableModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
HexTableModel.ByteChangedUndoableEdit
private class
HexTableModel.BytesReplacedUndoableEdit
-
Field Summary
Fields Modifier and Type Field Description private byte[]
bitBuf
private static java.lang.String[]
BYTE_STRING_VALUES
private int
bytesPerRow
private java.lang.String[]
columnNames
private ByteBuffer
doc
private char[]
dumpColBuf
private HexEditor
editor
private static long
serialVersionUID
private javax.swing.undo.UndoManager
undoManager
-
Constructor Summary
Constructors Constructor Description HexTableModel(HexEditor editor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static char
byteToAsci(byte b)
static java.lang.String
byteToHexString(byte b)
byte
getByte(int offset)
int
getByteCount()
int
getBytesPerRow()
int
getColumnCount()
java.lang.String
getColumnName(int col)
byte[]
getDoc()
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
boolean
redo()
void
removeBytes(int offset, int len)
void
replaceBytes(int offset, int len, byte[] bytes)
void
setBytes(java.io.InputStream in, boolean reset)
void
setBytes(java.lang.String fileName, boolean reset)
void
setValueAt(java.lang.Object value, int row, int col)
boolean
undo()
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener
-
-
-
-
Field Detail
-
BYTE_STRING_VALUES
private static final java.lang.String[] BYTE_STRING_VALUES
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
editor
private HexEditor editor
-
doc
private ByteBuffer doc
-
bytesPerRow
private int bytesPerRow
-
undoManager
private javax.swing.undo.UndoManager undoManager
-
columnNames
private java.lang.String[] columnNames
-
bitBuf
private byte[] bitBuf
-
dumpColBuf
private char[] dumpColBuf
-
-
Constructor Detail
-
HexTableModel
public HexTableModel(HexEditor editor)
-
-
Method Detail
-
getByte
public byte getByte(int offset)
-
getByteCount
public int getByteCount()
-
getBytesPerRow
public int getBytesPerRow()
-
getColumnCount
public int getColumnCount()
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getRowCount
public int getRowCount()
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
-
byteToHexString
public static java.lang.String byteToHexString(byte b)
-
byteToAsci
public static char byteToAsci(byte b)
-
redo
public boolean redo()
-
removeBytes
public void removeBytes(int offset, int len)
-
replaceBytes
public void replaceBytes(int offset, int len, byte[] bytes)
-
setBytes
public void setBytes(java.lang.String fileName, boolean reset) throws java.io.IOException
- Throws:
java.io.IOException
-
setBytes
public void setBytes(java.io.InputStream in, boolean reset) throws java.io.IOException
- Throws:
java.io.IOException
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
undo
public boolean undo()
-
getDoc
public byte[] getDoc()
-
-