|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.gui.arffviewer.ArffTableModel
The model for the Arff-Viewer.
Constructor Summary | |
ArffTableModel(Instances data)
initializes the model with the given data |
|
ArffTableModel(java.lang.String filename)
initializes the object and loads the given file |
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, if the undo support is enabled |
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 |
deleteAttributeAt(int columnIndex,
boolean notify)
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 |
deleteInstanceAt(int rowIndex,
boolean notify)
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 |
java.lang.Class |
getColumnClass(int columnIndex)
returns the most specific superclass for all the cell values in the column (always String) |
int |
getColumnCount()
returns the number of columns in the model |
java.lang.String |
getColumnName(int columnIndex)
returns the name of the column at columnIndex |
Instances |
getInstances()
returns the data |
int |
getRowCount()
returns the number of rows in the model |
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 |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
returns the value for the cell at columnindex and rowIndex |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
returns true if the cell at rowindex and columnindexis editable |
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 |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
sets the value in the cell at columnIndex and rowIndex to aValue. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex,
boolean notify)
sets the value in the cell at columnIndex and rowIndex to aValue. |
void |
sortInstances(int columnIndex)
sorts the instances via the given attribute |
void |
undo()
undoes the last action |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArffTableModel(java.lang.String filename)
public ArffTableModel(Instances data)
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 void setInstances(Instances data)
public Instances getInstances()
public Attribute getAttributeAt(int columnIndex)
public int getType(int columnIndex)
public int getType(int rowIndex, int columnIndex)
public void deleteAttributeAt(int columnIndex)
columnIndex
- the index of the attribute to deletepublic void deleteAttributeAt(int columnIndex, boolean notify)
columnIndex
- the index of the attribute to deletenotify
- whether to notify the listenerspublic void deleteAttributes(int[] columnIndices)
public void renameAttributeAt(int columnIndex, java.lang.String newName)
public void deleteInstanceAt(int rowIndex)
public void deleteInstanceAt(int rowIndex, boolean notify)
public void deleteInstances(int[] rowIndices)
public void sortInstances(int columnIndex)
public int getAttributeColumn(java.lang.String name)
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public boolean isMissingAt(int rowIndex, int columnIndex)
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex, boolean notify)
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
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
isUndoEnabled()
,
setUndoEnabled(boolean)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |