org.geotools.gui.swing.tables
Class FeatureTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.geotools.gui.swing.tables.FeatureTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

Deprecated. Moved to FeatureTableModel (i.e. package instead of , since package naming convention is to use the singular form).

public class FeatureTableModel
extends javax.swing.table.AbstractTableModel
implements javax.swing.table.TableModel

An implementation of Swing's TableModel which allows FeatureTables to be displayed.

Version:
$Id: FeatureTableModel.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
James Macgill, CCG
See Also:
Serialized Form
Task:
TODO: It would be excellent if there were custom cell renderers available for Geometry types.

Field Summary
protected  FeatureCollection featureTable
          Deprecated. Holds the FeatureTable that will be represented by this model.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FeatureTableModel()
          Deprecated. Creates a new instance of FeatureTableModel
FeatureTableModel(FeatureCollection featureCollection)
          Deprecated. Creates a new instance of FeatureTableModel based on the feature collection provided
 
Method Summary
 int getColumnCount()
          Deprecated. The number of columns in the featureTable.
 java.lang.String getColumnName(int col)
          Deprecated. Gets the name of a specified column.
 int getRowCount()
          Deprecated. Gets the row count for the featureTable.
 java.lang.Object getValueAt(int row, int col)
          Deprecated. Gets the value stored in a specified cell.
 void setFeatureCollection(FeatureCollection featureCollection)
          Deprecated. Sets which featureTable to represent
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, isCellEditable, removeTableModelListener, setValueAt
 

Field Detail

featureTable

protected FeatureCollection featureTable
Deprecated. 
Holds the FeatureTable that will be represented by this model.

Constructor Detail

FeatureTableModel

public FeatureTableModel()
Deprecated. 
Creates a new instance of FeatureTableModel


FeatureTableModel

public FeatureTableModel(FeatureCollection featureCollection)
Deprecated. 
Creates a new instance of FeatureTableModel based on the feature collection provided

Parameters:
featureCollection -
Method Detail

setFeatureCollection

public void setFeatureCollection(FeatureCollection featureCollection)
Deprecated. 
Sets which featureTable to represent

Parameters:
featureCollection - The featureTable to represent. This could fire a Table Structure Changed event.

getColumnCount

public int getColumnCount()
Deprecated. 
The number of columns in the featureTable. Note: for the moment, this is determined by the first feature.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
the number of columns in this featureTable.
Task:
HACK: Just gets first feature type - should use typed feature collection. Revisit when we have FeatureDocument.

getRowCount

public int getRowCount()
Deprecated. 
Gets the row count for the featureTable.

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
the number of features in featuretable.

getColumnName

public java.lang.String getColumnName(int col)
Deprecated. 
Gets the name of a specified column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Parameters:
col - the index of the column to get the name of.
Returns:
the name of 'col'.
Task:
HACK: Just gets first feature type - should use typed feature collection. Revisit when we have FeatureDocument.

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Deprecated. 
Gets the value stored in a specified cell. In this case, row=Feature and col=Attribute.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
row - the row number.
col - the column number.
Returns:
the value in the specified cell.


Copyright © GeoTools. All Rights Reserved.