|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
wjhk.jupload2.gui.FilePanelDataModel2
class FilePanelDataModel2
This class replaces FilePanelDataModel. The data for each row is now
contained in an instance of FileData (or one of its subclasses, like
PictureFileData). This allow easy add of new
functionalites, during upload, by adding attributes or methods to these
classes, or create new ones.
Some ides of improvements :
PictureFileData)
| Field Summary | |
|---|---|
static int |
COLINDEX_DIRECTORY
The default colum indices of the columns, as displayed by the applet. |
static int |
COLINDEX_MODIFIED
The default colum indices of the columns, as displayed by the applet. |
static int |
COLINDEX_NAME
The default colum indices of the columns, as displayed by the applet. |
static int |
COLINDEX_READABLE
The default colum indices of the columns, as displayed by the applet. |
static int |
COLINDEX_SIZE
The default colum indices of the columns, as displayed by the applet. |
protected Class<?>[] |
columnClasses
|
protected String[] |
columnNames
|
protected int[] |
columnSize
|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
FilePanelDataModel2(UploadPolicy uploadPolicy)
|
|
| Method Summary | |
|---|---|
void |
addFile(File file,
File root)
Add a file to the panel (at the end of the list) |
boolean |
contains(File file)
Does this table contain this file ? |
Class |
getColumnClass(int arg0)
|
int |
getColumnCount()
|
String |
getColumnName(int arg0)
|
int |
getColumnSize(int col)
Retrieves the default colum size of a column. |
File |
getFileAt(int row)
Ask for the file contained at specified row number. |
FileData |
getFileDataAt(int row)
Ask for the file contained at specified row number. |
int |
getRowCount()
|
Object |
getValueAt(int row,
int col)
|
boolean |
isCellEditable(int arg0,
int arg1)
Always return false here : no editable cell. |
boolean |
isSortable(int col)
Return true if this column can be sorted. |
void |
removeRow(FileData fileData)
Removes fileData from the current list. |
void |
removeRow(int row)
Remove a specified row. |
void |
setValueAt(Object arg0,
int arg1,
int arg2)
This method doesn't do anything : no changeable values. |
void |
sortColumn(int col,
boolean ascending)
Sort the rows, according to one column. |
| 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 COLINDEX_NAME
public static final int COLINDEX_SIZE
public static final int COLINDEX_DIRECTORY
public static final int COLINDEX_MODIFIED
public static final int COLINDEX_READABLE
protected String[] columnNames
protected int[] columnSize
protected Class<?>[] columnClasses
| Constructor Detail |
|---|
public FilePanelDataModel2(UploadPolicy uploadPolicy)
uploadPolicy - | Method Detail |
|---|
public boolean contains(File file)
file - : the file that could be contained...
public void addFile(File file,
File root)
throws JUploadExceptionStopAddingFiles
file - root -
JUploadExceptionStopAddingFilespublic File getFileAt(int row)
row - The row number
public FileData getFileDataAt(int row)
row - The row number
public void removeRow(int row)
row - The row to remove.public void removeRow(FileData fileData)
fileData - public int getColumnCount()
TableModel.getColumnCount()public int getRowCount()
TableModel.getRowCount()
public boolean isCellEditable(int arg0,
int arg1)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelTableModel.isCellEditable(int, int)
public void sortColumn(int col,
boolean ascending)
col - The index of the column to sortascending - true if ascending, false if descending.public boolean isSortable(int col)
col - The index of the column which can sortable or not.
public Class getColumnClass(int arg0)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelTableModel.getColumnClass(int)
public Object getValueAt(int row,
int col)
TableModel.getValueAt(int, int)
public void setValueAt(Object arg0,
int arg1,
int arg2)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelTableModel.setValueAt(java.lang.Object, int, int)public String getColumnName(int arg0)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelTableModel.getColumnName(int)public int getColumnSize(int col)
col - The index of the column to query.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||