final class MyTableModel
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String[] |
columnNames |
(package private) java.lang.Object[][] |
data
Store original data here for convenience
for the Evio event tree display in EvenTreePanel.
|
(package private) java.lang.String[] |
names
Column names.
|
Constructor and Description |
---|
MyTableModel()
Constructor used for viewing event in tree form in EventTreePanel.
|
MyTableModel(int version)
Constructor used for viewing event in tree form in EventTreePanel.
|
MyTableModel(SimpleMappedMemoryHandler mappedMemoryHandler,
java.util.HashMap<java.lang.String,java.lang.String> comments,
int version)
Constructor used for viewing memory mapped file in FileFrame.
|
Modifier and Type | Method and Description |
---|---|
void |
clearHighLightEventHeader(int row,
int col)
Remove the highlight of given table entry along with the next one.
|
void |
clearHighLights()
Clear all highlights and refresh view.
|
void |
dataChanged()
Refresh view of table.
|
int |
get(long byteIndex)
Get the byte value at the given file byte index.
|
int[] |
getBlockHeader(int row,
int col)
Given the row and col for a magic # word of an evio version 4 block header,
return an array of ints containing the main 8-word header.
|
int[] |
getClosestDataRowCol(int row,
int col)
Get the closest, data-containing, row and col for the given row and column.
|
long |
getClosestWordIndexOf(int row,
int col)
Get the closest file word index of the entry at the given row and column.
|
java.lang.Class |
getColumnClass(int c) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int col) |
int |
getEvioVersion()
Get the evio version of the file being viewed.
|
long |
getFileSize()
Get the size of the file in bytes.
|
int |
getInt(long byteIndex)
Get the int value at the given file byte index.
|
long |
getLongValueAt(int row,
int col)
Get the word value of the given row and column.
|
long |
getLongValueAt(long wordIndex)
Get the long value at the given file word index.
|
int |
getMapCount()
Get the # of memory maps.
|
int |
getMapIndex()
Get the index of the currently used memory map.
|
int[] |
getMapRowCol(long wordIndex)
Get the map index, row, and column of the given word
and refresh the view.
|
int |
getMaxRowsPerMap()
Get the max # of rows per map.
|
SimpleMappedMemoryHandler |
getMemoryHandler()
Get the mapped memory handler object.
|
int[] |
getRecordHeader(int row,
int col)
Given the row and col for a magic # word of an evio version 6 record header,
return an array of ints containing the main 14-word header.
|
int |
getRowCount() |
int |
getRowProgress(int currentRow)
Get the percentage (or progress) of the way through the file that the given row is.
|
int |
getShort(long byteIndex)
Get the short value at the given file byte index.
|
long |
getTotalRows()
Get the total # of rows in file.
|
java.lang.Object |
getValueAt(int row,
int col) |
long |
getWordIndexOf(int row,
int col)
Get the file word index of the entry at the given row and column.
|
int[] |
highLightBlockHeader(java.awt.Color color1,
java.awt.Color color2,
java.awt.Color color3,
int row,
int col,
boolean isError)
Highlight a block header.
|
int[] |
highLightBlockHeader(java.awt.Color color,
int row,
int col,
boolean isError)
Highlight a block header.
|
void |
highLightBlockHeader(java.awt.Color color,
long pos,
boolean isError)
Enter block header position into highlight hashmap for future highlighting.
|
void |
highLightCell(java.awt.Color color,
int row,
int col,
boolean isError)
Highlight the given row and col entry, then refresh view.
|
void |
highLightEventHeader(java.awt.Color color,
int row,
int col,
boolean isError)
Highlight an event header.
|
void |
highLightEventHeader(java.awt.Color color,
long pos,
boolean isError)
Enter event header position into highlight hashmap for future highlighting.
|
void |
highLightFileHeader(java.awt.Color color1,
java.awt.Color color2,
java.awt.Color color3,
int headerWords,
int indexWords,
int userHdrWords)
Highlight a file header.
|
boolean |
isCellEditable(int row,
int col) |
boolean |
isDataColumn(int col)
Is the given column one which contains data or not?
|
boolean |
nextMap()
Set data to next map if there is one, but
do not refresh table view.
|
java.nio.ByteOrder |
order()
Get the size of the file in bytes.
|
boolean |
previousMap()
Set data to previous map if there is one, but
do not refresh table view.
|
void |
setEvioVersion(int version)
Set the evio version of the file being viewed.
|
void |
setFirstColLabel(java.lang.String label)
Set the label of the first column of data table.
|
void |
setMapIndex(int mi)
Set the index of the desired memory map and
refresh table view.
|
void |
setTableData(java.lang.String[] dataArg) |
void |
setTableRenderer(MyRenderer dataTableRenderer) |
void |
setValueAt(java.lang.Object value,
int row,
int col)
.
|
void |
setWindowData(long wordIndex)
Set the table's data to the map containing the given word
and refresh view.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
java.lang.String[] names
java.lang.String[] columnNames
java.lang.Object[][] data
public MyTableModel()
public MyTableModel(int version)
version
- evio version.public MyTableModel(SimpleMappedMemoryHandler mappedMemoryHandler, java.util.HashMap<java.lang.String,java.lang.String> comments, int version)
mappedMemoryHandler
- object to handle mapped memory.comments
- map of comments placed into 7th column of table.version
- evio version.public void setTableRenderer(MyRenderer dataTableRenderer)
public void setFirstColLabel(java.lang.String label)
label
- label of the first column of data table.public int getEvioVersion()
public void setEvioVersion(int version)
version
- evio version of the file being viewed.public long getFileSize()
public SimpleMappedMemoryHandler getMemoryHandler()
public java.nio.ByteOrder order()
public int getMaxRowsPerMap()
public int getMapCount()
public long getTotalRows()
public int getRowProgress(int currentRow)
currentRow
- the current row in current map (starting at 0)public boolean nextMap()
true
if next map loaded,
else false
if already using last map.public boolean previousMap()
true
if previous map loaded,
else false
if already using first map.public int getMapIndex()
public void setMapIndex(int mi)
mi
- index of the desired memory map.public void dataChanged()
public boolean isDataColumn(int col)
col
- column indexpublic void setWindowData(long wordIndex)
wordIndex
- index to the word to view.public int[] getMapRowCol(long wordIndex)
wordIndex
- index to the word.public void highLightCell(java.awt.Color color, int row, int col, boolean isError)
color
- color of highlightrow
- rowcol
- columnisError
- true if highlighting an errorpublic void highLightEventHeader(java.awt.Color color, int row, int col, boolean isError)
color
- color of highlightrow
- rowcol
- columnisError
- true if highlighting an errorpublic void clearHighLightEventHeader(int row, int col)
row
- rowcol
- columnpublic void highLightFileHeader(java.awt.Color color1, java.awt.Color color2, java.awt.Color color3, int headerWords, int indexWords, int userHdrWords)
color1
- color of highlight for 14 word headercolor2
- color of highlight for header's indexcolor3
- color of highlight for user headerheaderWords
- number of 32bit words the the file header proper.indexWords
- number of 32bit words the the file header's index array.userHdrWords
- number of 32bit words the the file header's user header (including padding).public int[] getBlockHeader(int row, int col)
row
- rowcol
- columnpublic int[] highLightBlockHeader(java.awt.Color color, int row, int col, boolean isError)
color
- color of highlightrow
- rowcol
- columnisError
- true if highlighting an errorpublic int[] getRecordHeader(int row, int col)
row
- rowcol
- columnpublic int[] highLightBlockHeader(java.awt.Color color1, java.awt.Color color2, java.awt.Color color3, int row, int col, boolean isError)
color1
- color of highlightcolor2
- color of highlightcolor3
- color of highlightrow
- rowcol
- columnisError
- true if highlighting an errorpublic void highLightBlockHeader(java.awt.Color color, long pos, boolean isError)
color
- color of highlightpos
- byte index of beginning of block headerisError
- true if highlighting an errorpublic void highLightEventHeader(java.awt.Color color, long pos, boolean isError)
color
- color of highlightpos
- byte index of beginning of event headerisError
- true if highlighting an errorpublic void clearHighLights()
public void setTableData(java.lang.String[] dataArg)
public int getColumnCount()
public int getRowCount()
public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public java.lang.Object getValueAt(int row, int col)
public long getLongValueAt(int row, int col)
row
- rowcol
- columnpublic long getLongValueAt(long wordIndex)
wordIndex
- file word index.public int getInt(long byteIndex)
byteIndex
- file byte index.public int getShort(long byteIndex)
byteIndex
- file byte index.public int get(long byteIndex)
byteIndex
- file byte index.public long getWordIndexOf(int row, int col)
row
- rowcol
- columnpublic long getClosestWordIndexOf(int row, int col)
row
- rowcol
- columnpublic int[] getClosestDataRowCol(int row, int col)
row
- rowcol
- columnpublic java.lang.Class getColumnClass(int c)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public void setValueAt(java.lang.Object value, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel