ui.table
Class RowCountListener

java.lang.Object
  extended by ui.table.RowCountListener
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.TableModelListener

public class RowCountListener
extends java.lang.Object
implements javax.swing.event.TableModelListener

This class provides a simple listener to a JTable. The listener will monitor for changes to the total number of rows in a given JTable and then update the given RowCountLabel object.


Constructor Summary
RowCountListener(javax.swing.JTable table, RowCountLabel label)
          Creates a new RowCountListener object with the given JTable and JLabel objects.
 
Method Summary
 void tableChanged(javax.swing.event.TableModelEvent e)
          Called when changes to the total number of rows are encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowCountListener

public RowCountListener(javax.swing.JTable table,
                        RowCountLabel label)
Creates a new RowCountListener object with the given JTable and JLabel objects. As the JTable's DefaultTableModel object changes the RowCountLabel object will be updated to reflect the total number of rows in the JTable.

Parameters:
table - The JTable to monitor for changes to the total number of rows.
label - The RowCountLabel object to report table changes to.
Method Detail

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Called when changes to the total number of rows are encountered.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Parameters:
e - The event that triggers this method.