SPT Core API

com.sptci.echo2.table
Class SortListener

java.lang.Object
  extended by com.sptci.echo2.table.SortListener
All Implemented Interfaces:
Serializable, EventListener, ActionListener

public class SortListener
extends Object
implements ActionListener

The action listener used to sort the contents of a SortableTable.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: SortListener.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2007-11-12
See Also:
Serialized Form

Constructor Summary
SortListener(Table table, int column)
          Create a new instance of the listener for the specified values.
 
Method Summary
 void actionPerformed(ActionEvent event)
          The action listener implementation.
protected  void updateNavigation()
          Update the TableNavigation component associated with the table, since a sort operation involves resetting the page number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortListener

public SortListener(Table table,
                    int column)
Create a new instance of the listener for the specified values.

Parameters:
table - The table to be sorted.
column - The column by which to sort.
Throws:
IllegalArgumentException - If the table specified is not an instance of SortableTable.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
The action listener implementation. Delegates to the SortableTableModel.sort( int ) method.

Specified by:
actionPerformed in interface ActionListener
Parameters:
event - The action event that was triggered.
See Also:
updateNavigation()

updateNavigation

protected void updateNavigation()
Update the TableNavigation component associated with the table, since a sort operation involves resetting the page number. Sets the selected page to PageableTableModel.getPage().

Since:
2007-11-13

SPT Core API