Package cbsw
Class RegisterIoTable
- java.lang.Object
-
- cbsw.RegisterIoTable
-
public class RegisterIoTable extends java.lang.ObjectA GUI display that tabulates data read through a RegisterIo interface
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intbaseAddress(package private) intcsrAddress(package private) byte[]csrCache(package private) intcsrSize(package private) javax.swing.JButtondecodeButton(package private) RegisterIoio(package private) javax.swing.JTabletable(package private) java.lang.String[]tableColumnNames(package private) java.lang.Object[][]tableData(package private) inttableDataDisplayWidth(package private) javax.swing.JScrollPanetableSP(package private) java.lang.Stringtitle
-
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 voidaddDecodeAction(java.awt.event.ActionListener al)Add a decode ActionListenervoidcache()Reads the register array from hardware into local cache.byte[]getCache()Returns the cache.javax.swing.JTablegetStatusTable()Deprecated.javax.swing.JTablegetTable()Returns the tablejava.lang.StringgetTitle()Returns the table titlevoidinit(RegisterIo io)Called after unmarshalling to complete initialisationjavax.swing.JPanelmakePanel()Creates a panel containing the tablestatic javax.swing.JPanelmakePanel(java.util.ArrayList<RegisterIoTable> tableList)Creates a panel containing all the unmarshalled tablesvoidupdateStatusTable()Deprecated.voidupdateTable()Update table from previously cached datavoidwriteArray(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
-
-