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 classHexTableModel.ByteChangedUndoableEditprivate classHexTableModel.BytesReplacedUndoableEdit
-
Field Summary
Fields Modifier and Type Field Description private byte[]bitBufprivate static java.lang.String[]BYTE_STRING_VALUESprivate intbytesPerRowprivate java.lang.String[]columnNamesprivate ByteBufferdocprivate char[]dumpColBufprivate HexEditoreditorprivate static longserialVersionUIDprivate javax.swing.undo.UndoManagerundoManager
-
Constructor Summary
Constructors Constructor Description HexTableModel(HexEditor editor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static charbyteToAsci(byte b)static java.lang.StringbyteToHexString(byte b)bytegetByte(int offset)intgetByteCount()intgetBytesPerRow()intgetColumnCount()java.lang.StringgetColumnName(int col)byte[]getDoc()intgetRowCount()java.lang.ObjectgetValueAt(int row, int col)booleanredo()voidremoveBytes(int offset, int len)voidreplaceBytes(int offset, int len, byte[] bytes)voidsetBytes(java.io.InputStream in, boolean reset)voidsetBytes(java.lang.String fileName, boolean reset)voidsetValueAt(java.lang.Object value, int row, int col)booleanundo()-
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:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein 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:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin classjavax.swing.table.AbstractTableModel
-
undo
public boolean undo()
-
getDoc
public byte[] getDoc()
-
-