org.geotools.gui.swing.table
Class ImageTableModel.RowHeaders

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.geotools.gui.swing.table.ImageTableModel.RowHeaders
All Implemented Interfaces:
java.util.EventListener, java.io.Serializable, javax.swing.table.TableModel, javax.swing.event.TableModelListener
Enclosing class:
ImageTableModel

public class ImageTableModel.RowHeaders
extends javax.swing.table.AbstractTableModel
implements javax.swing.event.TableModelListener

A table model for row headers. This model has only one column, and each cell values is the row name defined in the enclosing class. A table using this model can be set as the scroll pane's row header for an image table.

Since:
2.2
Version:
$Id: ImageTableModel.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
JScrollPane.setRowHeader(javax.swing.JViewport), Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ImageTableModel.RowHeaders()
          Creates a new instance of row headers.
 
Method Summary
 java.lang.Class getColumnClass(int column)
          Returns the type of row headers, which is .
 int getColumnCount()
          Returns the number of columns in the model, which is 1.
 int getRowCount()
          Returns the number of rows in the model.
 java.lang.Object getValueAt(int row, int column)
          Returns the row name for the given index, regardless of the column.
 void tableChanged(javax.swing.event.TableModelEvent event)
          Invoked when the enclosing ImageTableModel data changed.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageTableModel.RowHeaders

public ImageTableModel.RowHeaders()
Creates a new instance of row headers. This constructor immediately register the new instance as a listener of the enclosing ImageTableModel.

Method Detail

getRowCount

public int getRowCount()
Returns the number of rows in the model. This is identical to the number of rows in the enclosing ImageTableModel.

Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnCount

public int getColumnCount()
Returns the number of columns in the model, which is 1.

Specified by:
getColumnCount in interface javax.swing.table.TableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
Returns the type of row headers, which is .

Specified by:
getColumnClass in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Returns the row name for the given index, regardless of the column.

Specified by:
getValueAt in interface javax.swing.table.TableModel

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent event)
Invoked when the enclosing ImageTableModel data changed. This method fires an event for this model as well except if the change was not a change in the table structure.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener


Copyright © GeoTools. All Rights Reserved.