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