|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
SimpleTableSortingState.java | - | 0% | 0% | 0% |
|
1 |
// Copyright 2004, 2005 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.tapestry.contrib.table.model.simple;
|
|
16 |
|
|
17 |
import java.io.Serializable;
|
|
18 |
|
|
19 |
import org.apache.tapestry.contrib.table.model.ITableSortingState;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* A minimal implementation of
|
|
23 |
* {@link org.apache.tapestry.contrib.table.model.ITableSortingState}
|
|
24 |
*
|
|
25 |
* @author mindbridge
|
|
26 |
*/
|
|
27 |
public class SimpleTableSortingState |
|
28 |
implements ITableSortingState, Serializable
|
|
29 |
{ |
|
30 |
private String m_strSortColumn;
|
|
31 |
private boolean m_bSortOrder; |
|
32 |
|
|
33 | 0 |
public SimpleTableSortingState()
|
34 |
{ |
|
35 | 0 |
m_strSortColumn = null; // no sorting |
36 | 0 |
m_bSortOrder = ITableSortingState.SORT_ASCENDING; |
37 |
// irrelevant, but anyway
|
|
38 |
} |
|
39 |
|
|
40 |
/**
|
|
41 |
* Returns the SortOrder.
|
|
42 |
* @return boolean
|
|
43 |
*/
|
|
44 | 0 |
public boolean getSortOrder() |
45 |
{ |
|
46 | 0 |
return m_bSortOrder;
|
47 |
} |
|
48 |
|
|
49 |
/**
|
|
50 |
* Returns the SortColumn.
|
|
51 |
* @return int
|
|
52 |
*/
|
|
53 | 0 |
public String getSortColumn()
|
54 |
{ |
|
55 | 0 |
return m_strSortColumn;
|
56 |
} |
|
57 |
|
|
58 |
/**
|
|
59 |
* Sets the SortColumn.
|
|
60 |
* @param strSortColumn The SortColumn to set
|
|
61 |
*/
|
|
62 | 0 |
public void setSortColumn(String strSortColumn, boolean bSortOrder) |
63 |
{ |
|
64 | 0 |
m_strSortColumn = strSortColumn; |
65 | 0 |
m_bSortOrder = bSortOrder; |
66 |
} |
|
67 |
|
|
68 |
} |
|
69 |
|
|