weka.gui
Class AttributeListPanel.AttributeTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byweka.gui.AttributeListPanel.AttributeTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
AttributeListPanel

class AttributeListPanel.AttributeTableModel
extends javax.swing.table.AbstractTableModel

A table model that looks at the names of attributes.


Field Summary
protected  Instances m_Instances
          The instances who's attribute structure we are reporting
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
AttributeListPanel.AttributeTableModel(Instances instances)
          Creates the tablemodel with the given set of instances.
 
Method Summary
 java.lang.Class getColumnClass(int col)
          Gets the class of elements in a column.
 int getColumnCount()
          Gets the number of columns: 2
 java.lang.String getColumnName(int column)
          Gets the name for a column.
 int getRowCount()
          Gets the number of attributes.
 java.lang.Object getValueAt(int row, int column)
          Gets a table cell
 boolean isCellEditable(int row, int col)
          Returns false
 void setInstances(Instances instances)
          Sets the tablemodel to look at a new set of instances.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Instances

protected Instances m_Instances
The instances who's attribute structure we are reporting

Constructor Detail

AttributeListPanel.AttributeTableModel

public AttributeListPanel.AttributeTableModel(Instances instances)
Creates the tablemodel with the given set of instances.

Parameters:
instances - the initial set of Instances
Method Detail

setInstances

public void setInstances(Instances instances)
Sets the tablemodel to look at a new set of instances.

Parameters:
instances - the new set of Instances.

getRowCount

public int getRowCount()
Gets the number of attributes.

Returns:
the number of attributes.

getColumnCount

public int getColumnCount()
Gets the number of columns: 2

Returns:
2

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Gets a table cell

Parameters:
row - the row index
column - the column index
Returns:
the value at row, column

getColumnName

public java.lang.String getColumnName(int column)
Gets the name for a column.

Parameters:
column - the column index.
Returns:
the name of the column.

getColumnClass

public java.lang.Class getColumnClass(int col)
Gets the class of elements in a column.

Parameters:
col - the column index.
Returns:
the class of elements in the column.

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Returns false

Parameters:
row - ignored
col - ignored
Returns:
false