001    package com.sptci.rwt.webui;
002    
003    import com.sptci.echo2.table.SortableHeaderCellRenderer;
004    import com.sptci.echo2.table.SortableTable;
005    
006    /**
007     * A sortable table used to display {@link com.sptci.rwt.Row} objects.
008     *
009     * <p>&copy; Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
010     * @author Rakesh Vidyadharan 2007-11-13
011     * @version $Id: SortableRowTable.java 4123 2008-05-25 21:49:01Z rakesh $
012     * @since Version 1.3
013     */
014    public class SortableRowTable extends RowTable implements SortableTable
015    {
016      /**
017       * Create a new table instance using the specified model.
018       *
019       * @param model The data model backing this table.
020       */
021      public SortableRowTable( final RowTableModel model )
022      {
023        super( model );
024        setDefaultHeaderRenderer( new SortableHeaderCellRenderer() );
025      }
026      
027      /**
028       * Return the data model backing this table.  Over-ridden to avoid
029       * casting of the returned type.
030       *
031       * @return The table model for this table.
032       */
033      @Override
034      public SortableRowTableModel getModel()
035      {
036        return (SortableRowTableModel) super.getModel();
037      }
038    }