|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
weka.gui.TableMap
weka.gui.TableSorter
weka.gui.arffviewer.ArffTableSorter
public class ArffTableSorter
A sorter for the ARFF-Viewer - necessary because of the custom CellRenderer.
Constructor Summary | |
---|---|
ArffTableSorter(Instances data)
initializes the sorter w/o a model, but uses the given data to create a model from that |
|
ArffTableSorter(java.lang.String filename)
initializes the sorter w/o a model, but loads the given file and creates from that a model |
|
ArffTableSorter(javax.swing.table.TableModel model)
initializes the sorter with the given model |
Method Summary | |
---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
adds a listener to the list that is notified each time a change to data model occurs |
void |
addUndoPoint()
adds an undo point to the undo history |
boolean |
canUndo()
returns whether an undo is possible, i.e. |
void |
clearUndo()
removes the undo history |
void |
deleteAttributeAt(int columnIndex)
deletes the attribute at the given col index |
void |
deleteAttributes(int[] columnIndices)
deletes the attributes at the given indices |
void |
deleteInstanceAt(int rowIndex)
deletes the instance at the given index |
void |
deleteInstances(int[] rowIndices)
deletes the instances at the given positions |
Attribute |
getAttributeAt(int columnIndex)
returns the attribute at the given index, can be NULL if not an attribute column |
int |
getAttributeColumn(java.lang.String name)
returns the column of the given attribute name, -1 if not found |
Instances |
getInstances()
returns the data |
java.lang.Object |
getModelValueAt(int rowIndex,
int columnIndex)
returns the value at the given position |
int |
getType(int columnIndex)
returns the TYPE of the attribute at the given position |
int |
getType(int rowIndex,
int columnIndex)
returns the TYPE of the attribute at the given position |
boolean |
isMissingAt(int rowIndex,
int columnIndex)
checks whether the value at the given position is missing |
boolean |
isNotificationEnabled()
returns whether the notification of changes is enabled |
boolean |
isUndoEnabled()
returns whether undo support is enabled |
void |
notifyListener(javax.swing.event.TableModelEvent e)
notfies all listener of the change of the model |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
removes a listener from the list that is notified each time a change to the data model occurs |
void |
renameAttributeAt(int columnIndex,
java.lang.String newName)
renames the attribute at the given col index |
void |
setInstances(Instances data)
sets the data |
void |
setNotificationEnabled(boolean enabled)
sets whether the notification of changes is enabled |
void |
setUndoEnabled(boolean enabled)
sets whether undo support is enabled |
void |
sortInstances(int columnIndex)
sorts the instances via the given attribute |
void |
undo()
undoes the last action |
Methods inherited from class weka.gui.TableSorter |
---|
addMouseListenerToHeaderInTable, checkModel, compare, compareRowsByColumn, getValueAt, n2sort, reallocateIndexes, setModel, setValueAt, shuttlesort, sort, sortByColumn, sortByColumn, swap, tableChanged |
Methods inherited from class weka.gui.TableMap |
---|
getColumnClass, getColumnCount, getColumnName, getModel, getRowCount, isCellEditable |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArffTableSorter(java.lang.String filename)
public ArffTableSorter(Instances data)
public ArffTableSorter(javax.swing.table.TableModel model)
Method Detail |
---|
public boolean isNotificationEnabled()
public void setNotificationEnabled(boolean enabled)
public boolean isUndoEnabled()
isUndoEnabled
in interface Undoable
public void setUndoEnabled(boolean enabled)
setUndoEnabled
in interface Undoable
public java.lang.Object getModelValueAt(int rowIndex, int columnIndex)
getModelValueAt
in class TableSorter
public int getType(int columnIndex)
public int getType(int rowIndex, int columnIndex)
public void deleteAttributeAt(int columnIndex)
public void deleteAttributes(int[] columnIndices)
public void renameAttributeAt(int columnIndex, java.lang.String newName)
public void deleteInstanceAt(int rowIndex)
public void deleteInstances(int[] rowIndices)
public void sortInstances(int columnIndex)
public int getAttributeColumn(java.lang.String name)
public boolean isMissingAt(int rowIndex, int columnIndex)
public void setInstances(Instances data)
public Instances getInstances()
public Attribute getAttributeAt(int columnIndex)
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
addTableModelListener
in class javax.swing.table.AbstractTableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
removeTableModelListener
in class javax.swing.table.AbstractTableModel
public void notifyListener(javax.swing.event.TableModelEvent e)
public void clearUndo()
clearUndo
in interface Undoable
public boolean canUndo()
canUndo
in interface Undoable
public void undo()
undo
in interface Undoable
public void addUndoPoint()
addUndoPoint
in interface Undoable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |