fr.ifremer.isisfish.ui.script
Class FileSelectionTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by fr.ifremer.isisfish.ui.script.FileSelectionTableModel
All Implemented Interfaces:
Serializable, TableModel

public class FileSelectionTableModel
extends AbstractTableModel

File selection table model displayed in import/export script for files selection (first column is checkbox).

Version:
$Revision: 1.0 $ Last update : $Date: 23 juil. 2009 $ By : $Author: chatellier $
Author:
chatellier
See Also:
Serialized Form

Field Summary
protected  List<String> availableFiles
          All files displayed in table.
static String[] COLUMN_NAMES
          Column names.
protected  List<String> selectedFiles
          Only selected files.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FileSelectionTableModel(List<String> availableFiles)
          Constructor.
 
Method Summary
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 int getRowCount()
           
 List<String> getSelectedFiles()
          Get current files selection.
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void setAllChecked(boolean selection)
          Set all files selected.
 void setValueAt(Object value, int rowIndex, int columnIndex)
           
 
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

COLUMN_NAMES

public static final String[] COLUMN_NAMES
Column names.


availableFiles

protected List<String> availableFiles
All files displayed in table.


selectedFiles

protected List<String> selectedFiles
Only selected files.

Constructor Detail

FileSelectionTableModel

public FileSelectionTableModel(List<String> availableFiles)
Constructor.

Parameters:
availableFiles - available file list
Method Detail

getColumnCount

public int getColumnCount()

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

setValueAt

public void setValueAt(Object value,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

setAllChecked

public void setAllChecked(boolean selection)
Set all files selected.

Parameters:
selection - true to select all files, false to unselect all files

getSelectedFiles

public List<String> getSelectedFiles()
Get current files selection.

Returns:
list of selected file path


Copyright © 1999-2012 CodeLutin. All Rights Reserved.