arules
Class TrActTable

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by arules.TrActTable
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class TrActTable
extends javax.swing.table.AbstractTableModel

Class for a tabular representation of a set of transactions.

Since:
2007.06.06
See Also:
Serialized Form

Field Summary
protected  TrActSet taset
          the set of transactions
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TrActTable(TrActSet taset)
          Create a transaction table.
 
Method Summary
 int getColumnCount()
          Get the number of columns of the table.
 java.lang.String getColumnName(int i)
          Get the name of a column.
 int getRowCount()
          Get the number of rows of the table.
 TrActSet getTrActs()
          Get the transactions.
 java.lang.Object getValueAt(int row, int col)
          Get the value in a table cell.
static void main(java.lang.String[] args)
          Main function for testing some basic functionality.
 void setTrActs(TrActSet taset)
          Set the transactions.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taset

protected TrActSet taset
the set of transactions

Constructor Detail

TrActTable

public TrActTable(TrActSet taset)
Create a transaction table.

Parameters:
taset - the set of transactions
Since:
2007.06.06 (Christian Borgelt)
Method Detail

getTrActs

public TrActSet getTrActs()
Get the transactions.

Returns:
the transaction set
Since:
2007.06.06 (Christian Borgelt)

setTrActs

public void setTrActs(TrActSet taset)
Set the transactions.

Parameters:
taset - the new transaction set
Since:
2007.06.06 (Christian Borgelt)

getRowCount

public int getRowCount()
Get the number of rows of the table.

Returns:
the number of rows of the table
Since:
2007.06.06 (Christian Borgelt)

getColumnCount

public int getColumnCount()
Get the number of columns of the table.

Returns:
the number of columns of the table
Since:
2007.06.06 (Christian Borgelt)

getColumnName

public java.lang.String getColumnName(int i)
Get the name of a column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
i - the index of the column
Returns:
the name of the column with index i
Since:
2005.07.06 (Christian Borgelt)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Get the value in a table cell.

Parameters:
row - the row index of the table cell
col - the column index of the table cell
Returns:
an object representing the contents of the table cell
Since:
2007.06.06 (Christian Borgelt)

main

public static void main(java.lang.String[] args)
Main function for testing some basic functionality.

It is tried to parse the file that is given as the first command line argument as a set of transactions.

Parameters:
args - the command line arguments
Since:
2005.07.06 (Christian Borgelt)