|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
weka.gui.AttributeSelectionPanel.AttributeTableModel
A table model that looks at the names of attributes and maintains a list of attributes that have been "selected".
Field Summary | |
protected Instances |
m_Instances
The instances who's attribute structure we are reporting |
protected boolean[] |
m_Selected
The flag for whether the instance will be included |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
AttributeSelectionPanel.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: 3 |
java.lang.String |
getColumnName(int column)
Gets the name for a column. |
int |
getRowCount()
Gets the number of attributes. |
int[] |
getSelectedAttributes()
Gets an array containing the indices of all selected attributes. |
java.lang.Object |
getValueAt(int row,
int column)
Gets a table cell |
void |
includeAll()
Sets the state of all attributes to selected. |
void |
invert()
Inverts the selected status of each attribute. |
boolean |
isCellEditable(int row,
int col)
Returns true if the column is the "selected" column. |
void |
removeAll()
Deselects all attributes. |
void |
setInstances(Instances instances)
Sets the tablemodel to look at a new set of instances. |
void |
setValueAt(java.lang.Object value,
int row,
int col)
Sets the value at a cell. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Instances m_Instances
protected boolean[] m_Selected
Constructor Detail |
public AttributeSelectionPanel.AttributeTableModel(Instances instances)
instances
- the initial set of InstancesMethod Detail |
public void setInstances(Instances instances)
instances
- the new set of Instances.public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int row, int column)
row
- the row indexcolumn
- the column index
public java.lang.String getColumnName(int column)
column
- the column index.
public void setValueAt(java.lang.Object value, int row, int col)
value
- the new value.row
- the row index.col
- the column index.public java.lang.Class getColumnClass(int col)
col
- the column index.
public boolean isCellEditable(int row, int col)
row
- ignoredcol
- the column index.
public int[] getSelectedAttributes()
public void includeAll()
public void removeAll()
public void invert()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |