org.geotools.swing.table
Class FeatureCollectionTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.geotools.swing.table.FeatureCollectionTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class FeatureCollectionTableModel
extends javax.swing.table.AbstractTableModel

A Swing TableModel to retrieve attribute values from each feature in a feature collection and cache them for a JTable

See Also:
Serialized Form

Field Summary
 java.io.IOException exception
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FeatureCollectionTableModel(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features)
          Constructor
 
Method Summary
 void dispose()
          Cancel the running job, if any
 int getColumnCount()
          Get the number of columns in the table
 java.lang.String getColumnName(int column)
          Retrieve the specified column name
 int getRowCount()
          Get the number of rows in the table
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Get the value of a specified table entry
 
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
 

Field Detail

exception

public java.io.IOException exception
Constructor Detail

FeatureCollectionTableModel

public FeatureCollectionTableModel(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features)
Constructor

Parameters:
features - the feature collection to load into the table
Method Detail

dispose

public void dispose()
Cancel the running job, if any


getColumnName

public java.lang.String getColumnName(int column)
Retrieve the specified column name

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - column index
Returns:
the column name

getColumnCount

public int getColumnCount()
Get the number of columns in the table

Returns:
the number of columns

getRowCount

public int getRowCount()
Get the number of rows in the table

Returns:
the number of rows

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Get the value of a specified table entry

Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
the table entry


Copyright © 1996-2010 Geotools. All Rights Reserved.