|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
tableModels.TemplateVectorModel
Table model responsible for displaying and allowing the user to select which statistics to actually use when performing the clustering algorithm.
The user can see and select any attribute to use when clustering.
| Field Summary | |
private java.util.ArrayList |
selectedStats
list of boolean values signifying which statistics the user wishes to use |
private java.util.ArrayList |
statList
list of statistics to offer to the user |
private java.lang.String[] |
tableColumnNames
column names for the tables |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
TemplateVectorModel()
|
|
TemplateVectorModel(AttributeVector template)
Creates an instance of the model with the rows initialized to the statistics names present in the template attribute vector and the boolean values set according to the double values present in the template vector. |
|
| Method Summary | |
void |
addStatistic(java.lang.String statName)
Add a new statistic to the table |
void |
addStatistic(java.lang.String statName,
double value)
Adds the statistic name and sets the boolean on the table. |
void |
clearVectorTableModel()
Reinitializes the table model in preperation fo new data being loaded |
java.lang.Class |
getColumnClass(int c)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int col)
|
int |
getRowCount()
|
java.util.ArrayList |
getTemplateVector()
Gets an array of strings where each index in the array is either a "1" or "0". |
java.lang.Object |
getValueAt(int row,
int col)
|
void |
initializeTableWithVector(AttributeVector template)
Allows the table to be initialized with a vector that already has all the statistic names set. |
boolean |
isCellEditable(int row,
int col)
|
void |
setValueAt(java.lang.Object value,
int row,
int col)
Setter for the table, stores a data item stored in the table |
| 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 |
private java.lang.String[] tableColumnNames
private java.util.ArrayList selectedStats
private java.util.ArrayList statList
| Constructor Detail |
public TemplateVectorModel()
public TemplateVectorModel(AttributeVector template)
template - Usually it is the paramVector from ClusterUtils which
has 0's and 1's denoting if that column should be used
in the clustering algorithm| Method Detail |
public java.lang.String getColumnName(int col)
public int getColumnCount()
public int getRowCount()
public java.lang.Object getValueAt(int row,
int col)
public java.lang.Class getColumnClass(int c)
public boolean isCellEditable(int row,
int col)
public void setValueAt(java.lang.Object value,
int row,
int col)
row - row value to store itemcol - column value to store itemvalue - Object to store in the tablepublic void clearVectorTableModel()
public void addStatistic(java.lang.String statName)
statName - the name of the statistic to add
public void addStatistic(java.lang.String statName,
double value)
If value > 0, the boolean is set to TRUE, FALSE otherwise
statName - the statical attribute to add to the tablevalue - the value uesed to determine if the boolean is true or falsepublic java.util.ArrayList getTemplateVector()
This array is a representation of which statistics the user has selected will be used to perform the clustering
public void initializeTableWithVector(AttributeVector template)
This first initializes the table and then loads the table with the contents of the name field of the attribute vector passed to it
template - the vector to use to load the names into the table
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||