Package cbsw
Class RegisterIoTable
- java.lang.Object
-
- cbsw.RegisterIoTable
-
public class RegisterIoTable extends java.lang.Object
A GUI display that tabulates data read through a RegisterIo interface
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
baseAddress
(package private) int
csrAddress
(package private) byte[]
csrCache
(package private) int
csrSize
(package private) javax.swing.JButton
decodeButton
(package private) RegisterIo
io
(package private) javax.swing.JTable
table
(package private) java.lang.String[]
tableColumnNames
(package private) java.lang.Object[][]
tableData
(package private) int
tableDataDisplayWidth
(package private) javax.swing.JScrollPane
tableSP
(package private) java.lang.String
title
-
Constructor Summary
Constructors Constructor Description RegisterIoTable()
No-argument constructor used by unmarshaller
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addDecodeAction(java.awt.event.ActionListener al)
Add a decode ActionListenervoid
cache()
Reads the register array from hardware into local cache.byte[]
getCache()
Returns the cache.javax.swing.JTable
getStatusTable()
Deprecated.javax.swing.JTable
getTable()
Returns the tablejava.lang.String
getTitle()
Returns the table titlevoid
init(RegisterIo io)
Called after unmarshalling to complete initialisationjavax.swing.JPanel
makePanel()
Creates a panel containing the tablestatic javax.swing.JPanel
makePanel(java.util.ArrayList<RegisterIoTable> tableList)
Creates a panel containing all the unmarshalled tablesvoid
updateStatusTable()
Deprecated.void
updateTable()
Update table from previously cached datavoid
writeArray(byte[] regs)
Writes cached values to hardware
-
-
-
Field Detail
-
io
RegisterIo io
-
title
java.lang.String title
-
baseAddress
int baseAddress
-
csrAddress
int csrAddress
-
csrSize
int csrSize
-
tableDataDisplayWidth
int tableDataDisplayWidth
-
tableColumnNames
java.lang.String[] tableColumnNames
-
tableData
java.lang.Object[][] tableData
-
tableSP
javax.swing.JScrollPane tableSP
-
table
javax.swing.JTable table
-
csrCache
byte[] csrCache
-
decodeButton
javax.swing.JButton decodeButton
-
-
Method Detail
-
getTitle
public java.lang.String getTitle()
Returns the table title
- Returns:
- The title
-
init
public void init(RegisterIo io)
Called after unmarshalling to complete initialisation
- Parameters:
io
- The hardware I/O interface
-
getStatusTable
@Deprecated public javax.swing.JTable getStatusTable()
Deprecated.Replaced by
getTable()
- Returns:
- The table
-
getTable
public javax.swing.JTable getTable()
Returns the table
- Returns:
- The table
-
makePanel
public javax.swing.JPanel makePanel()
Creates a panel containing the table
- Returns:
- The panel
-
addDecodeAction
public void addDecodeAction(java.awt.event.ActionListener al)
Add a decode ActionListener
The ActionListener is called when the decode button is pressed.
- Parameters:
al
- The ActionListener
-
writeArray
public void writeArray(byte[] regs)
Writes cached values to hardware
- Parameters:
regs
- Data to write
-
cache
public void cache()
Reads the register array from hardware into local cache.
-
getCache
public byte[] getCache()
Returns the cache.
- Returns:
- The data cache
-
updateStatusTable
@Deprecated public void updateStatusTable()
Deprecated.Replaced by
updateTable()
-
updateTable
public void updateTable()
Update table from previously cached data
-
makePanel
public static javax.swing.JPanel makePanel(java.util.ArrayList<RegisterIoTable> tableList)
Creates a panel containing all the unmarshalled tables
- Parameters:
tableList
- The list of tables- Returns:
- The panel
-
-