net.sourceforge.squirrel_sql.plugins.dataimport.gui
Class ColumnMappingTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by net.sourceforge.squirrel_sql.plugins.dataimport.gui.ColumnMappingTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ColumnMappingTableModel
extends AbstractTableModel

This is a table model for the column mapping table at the bottom of the file import dialog.

Author:
Thorsten Mürell
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ColumnMappingTableModel(TableColumnInfo[] columns)
          The default constructor.
 
Method Summary
 int findTableColumn(String columnName)
          Returns the index of the column with the given name.
 int getColumnCount()
           
 String getColumnName(int column)
           
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void resetMappings()
          Resets the column mappings to "Skip"
 void setValueAt(Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnMappingTableModel

public ColumnMappingTableModel(TableColumnInfo[] columns)
The default constructor.

Parameters:
columns - These are the columns of the destination table
Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

isCellEditable

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

setValueAt

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

getColumnName

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

findTableColumn

public int findTableColumn(String columnName)
Returns the index of the column with the given name.

Parameters:
columnName - The column name
Returns:
The row of the given column

resetMappings

public void resetMappings()
Resets the column mappings to "Skip"



Copyright © 2001-2011. All Rights Reserved.