Home » tapestry-src-5.0.19 » org.apache.tapestry5.grid » [javadoc | source]

    1   // Copyright 2008 The Apache Software Foundation
    2   //
    3   // Licensed under the Apache License, Version 2.0 (the "License");
    4   // you may not use this file except in compliance with the License.
    5   // You may obtain a copy of the License at
    6   //
    7   //     http://www.apache.org/licenses/LICENSE-2.0
    8   //
    9   // Unless required by applicable law or agreed to in writing, software
   10   // distributed under the License is distributed on an "AS IS" BASIS,
   11   // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12   // See the License for the specific language governing permissions and
   13   // limitations under the License.
   14   
   15   package org.apache.tapestry5.grid;
   16   
   17   import java.util.List;
   18   
   19   /**
   20    * Models the sorting applied to the a {@link org.apache.tapestry5.grid.GridDataSource}.
   21    */
   22   public interface GridSortModel
   23   {
   24       /**
   25        * Identifies how (or if) a column is sorted.
   26        *
   27        * @param columnId
   28        * @return the sort for the indicated column or {@link org.apache.tapestry5.grid.ColumnSort#UNSORTED} if the column
   29        *         is not used for sorting
   30        */
   31       ColumnSort getColumnSort(String columnId);
   32   
   33       /**
   34        * Updates the column sort.  The receiver determines how to handle the sort request.
   35        *
   36        * @param columnId property id of column to sort on
   37        */
   38       void updateSort(String columnId);
   39   
   40       /**
   41        * Returns a list of sort constraints, identifying which columns are sorted, and how.  May return an empty list (but
   42        * won't return null).
   43        *
   44        * @see org.apache.tapestry5.grid.GridDataSource#prepare(int, int, java.util.List)
   45        */
   46       List<SortConstraint> getSortConstraints();
   47   
   48       void clear();
   49   }

Home » tapestry-src-5.0.19 » org.apache.tapestry5.grid » [javadoc | source]