|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
lejos.pc.tools.ExtendedFileModel
public class ExtendedFileModel
Swing Table Model for manipulating NXT files.
Field Summary | |
---|---|
static int |
MAX_FILES
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
ExtendedFileModel(NXTCommand nxtCommand)
Fetch files from the NXT and create the model |
Method Summary | |
---|---|
void |
delete(String fileName,
int row)
Delete a file on the NXT and update the model |
String |
fetchFiles()
Fetch the files from the NXT |
Class<?> |
getColumnClass(int column)
Get the class of a specific column |
int |
getColumnCount()
Get the number of columns in the mode |
String |
getColumnName(int column)
Get the name of a column |
FileInfo |
getFile(int i)
Get the FileInfo object for a specific file |
int |
getRowCount()
Get the number of rows in the model |
Object |
getValueAt(int row,
int column)
Get the object at the specified location |
boolean |
isCellEditable(int row,
int column)
Check if a cell is editable |
int |
numFiles()
Return the number of files |
void |
setValueAt(Object value,
int row,
int column)
Set the value of 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 |
---|
public static final int MAX_FILES
Constructor Detail |
---|
public ExtendedFileModel(NXTCommand nxtCommand)
nxtCommand
- used to send LCP commands to the NXTMethod Detail |
---|
public void delete(String fileName, int row) throws IOException
fileName
- the file to deleterow
- the row in the file model
IOException
public int getRowCount()
public int getColumnCount()
public Object getValueAt(int row, int column)
public void setValueAt(Object value, int row, int column)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class<?> getColumnClass(int column)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public String fetchFiles()
public FileInfo getFile(int i)
i
- the row number of the file
public int numFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |