|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.lightdev.app.filemanager.ui.FileTableModel
public class FileTableModel
a FileTableModel is used to display and manipulate an array of FileRef objects in a JTable or FileTable.
| Field Summary | |
|---|---|
static int |
COLUMN_FILE
column index constant |
static int |
COLUMN_ICON
column index constant |
static int |
COLUMN_LAST_MODIFIED
column index constant |
static int |
COLUMN_NAME
column index constant |
static int |
COLUMN_SIZE
column index constant |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
FileTableModel(FileSystem fileSystem,
FileRef[] files)
create a new instance of class FileTableModel |
|
| Method Summary | |
|---|---|
void |
addFile(FileRef file)
add a file to this model |
void |
createFolder(FileRef inFolder)
create a folder using the underlying file system |
void |
deleteFiles(FileRef[] files)
delete a list of files using the underlying file system |
void |
extractArchive(FileRef archive,
FileRef toFolder)
extract a given ZIP archive using the underlying file system |
Class<?> |
getColumnClass(int columnIndex)
get the class of the column with the given index |
int |
getColumnCount()
get the number of columns in this model, hard wired to four columns: 1. |
int |
getRowCount()
get the number of rows in this model |
Object |
getValueAt(int rowIndex,
int columnIndex)
get the value of a cell in this model (columnIndex = columnCount returns files[rowIndex]) |
void |
packFolder(FileRef folder)
build a zip archive with the contents of a given folder using the underlying file system |
void |
removeFile(FileRef file)
remove a file from this model |
void |
removeFiles(FileRef[] filesToRemove)
remove files from this model |
void |
renameFile(FileRef file,
String newName)
rename a file or folder |
void |
setFiles(FileRef[] files)
et the files this model shall represent |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COLUMN_ICON
public static final int COLUMN_NAME
public static final int COLUMN_SIZE
public static final int COLUMN_LAST_MODIFIED
public static final int COLUMN_FILE
| Constructor Detail |
|---|
public FileTableModel(FileSystem fileSystem,
FileRef[] files)
fileSystem - the file system to usefiles - the files to display| Method Detail |
|---|
public int getColumnCount()
public int getRowCount()
public Class<?> getColumnClass(int columnIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelcolumnIndex - index of column to get the class for
public Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - the row that has the cell in questioncolumnIndex - the column that has the cell in question
public void setFiles(FileRef[] files)
files - the filepublic void addFile(FileRef file)
file - the file to addpublic void removeFile(FileRef file)
file - public void removeFiles(FileRef[] filesToRemove)
filesToRemove - the files to removepublic void packFolder(FileRef folder)
folder - the folder whose contents are to be packed
public void deleteFiles(FileRef[] files)
throws Throwable
files - the files to delete
Throwable
public void extractArchive(FileRef archive,
FileRef toFolder)
throws Throwable
archive - the ZIP archive to extracttoFolder - the folder to extract to
Throwable
public void createFolder(FileRef inFolder)
throws Throwable
inFolder - the folder to create a new folder in
Throwable
public void renameFile(FileRef file,
String newName)
throws Throwable
file - the flile or folder to renamenewName - the new name to set
Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||