public class FilePanelFlatDataModel2 extends AbstractTableModel
PictureFileData
). This allow easy add of new functionalites,
during upload, by adding attributes or methods to these classes, or create new ones. PictureFileData
)
Modifier and Type | Field and Description |
---|---|
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_SIZE
The default colum indices of the columns, as displayed by the applet.
|
protected Class<?>[] |
columnClasses |
protected boolean[] |
columnEditable
Indicates whether each column is editable or not.
|
protected String[] |
columnNames |
protected int[] |
columnSizePercentage
This array indicates, for each column, the percentage of the available width it should use.
|
listenerList
Constructor and Description |
---|
FilePanelFlatDataModel2(UploadPolicy uploadPolicy) |
Modifier and Type | Method and Description |
---|---|
FileData |
addFile(File file)
Add a file to the panel (at the end of the list)
|
FileData |
contains(String absolutePath)
Get the FileData representing a given file.
|
Class<?> |
getColumnClass(int arg0) |
int |
getColumnCount() |
String |
getColumnName(int arg0) |
int |
getColumnSizePercentage(int col)
Retrieves the default colum percentage size of a column, that is: its percentage of the available width.
|
FileData |
getFileDataAt(int row)
Ask for the file contained at specified row number.
|
File |
getFileRoot()
Get the common Root of all files in the current list.
|
List<FileData> |
getFiles() |
int |
getRow(FileData fileData)
Returns the row number, for the given fileData, in the current list.
|
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(int row)
Remove a specified row.
|
void |
setValueAt(Object aValue,
int row,
int col)
This method doesn't do anything : no changeable values.
|
void |
sortColumn(int col,
boolean ascending)
Sort the rows, according to one column.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public static final int COLINDEX_NAME
public static final int COLINDEX_SIZE
public static final int COLINDEX_DIRECTORY
public static final int COLINDEX_MODIFIED
protected String[] columnNames
protected int[] columnSizePercentage
#getColumnSize(int)
protected boolean[] columnEditable
protected Class<?>[] columnClasses
public FilePanelFlatDataModel2(UploadPolicy uploadPolicy)
uploadPolicy
- public FileData contains(String absolutePath)
file
- : the file that could be contained...public FileData addFile(File file) throws JUploadExceptionStopAddingFiles
file
- root
- JUploadExceptionStopAddingFiles
public FileData getFileDataAt(int row)
row
- The row numberpublic void removeRow(int row)
row
- The row to remove.public int getRow(FileData fileData)
fileData
- The FileData
to findpublic int getColumnCount()
TableModel.getColumnCount()
public int getRowCount()
TableModel.getRowCount()
public boolean isCellEditable(int arg0, int arg1)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
TableModel.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 TableModel
getColumnClass
in class AbstractTableModel
TableModel.getColumnClass(int)
public Object getValueAt(int row, int col)
TableModel.getValueAt(int, int)
public void setValueAt(Object aValue, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
TableModel.setValueAt(java.lang.Object, int, int)
public String getColumnName(int arg0)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
TableModel.getColumnName(int)
public int getColumnSizePercentage(int col)
col
- The index of the column to query.public File getFileRoot()
Copyright © 2015. All rights reserved.