KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > riotfamily > riot > list > ColumnConfig


1 /* ***** BEGIN LICENSE BLOCK *****
2  * Version: MPL 1.1
3  * The contents of this file are subject to the Mozilla Public License Version
4  * 1.1 (the "License"); you may not use this file except in compliance with
5  * the License. You may obtain a copy of the License at
6  * http://www.mozilla.org/MPL/
7  *
8  * Software distributed under the License is distributed on an "AS IS" basis,
9  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
10  * for the specific language governing rights and limitations under the
11  * License.
12  *
13  * The Original Code is Riot.
14  *
15  * The Initial Developer of the Original Code is
16  * Neteye GmbH.
17  * Portions created by the Initial Developer are Copyright (C) 2006
18  * the Initial Developer. All Rights Reserved.
19  *
20  * Contributor(s):
21  * Felix Gnass [fgnass at neteye dot de]
22  *
23  * ***** END LICENSE BLOCK ***** */

24 package org.riotfamily.riot.list;
25
26 import org.riotfamily.riot.list.ui.render.CellRenderer;
27
28 /**
29  *
30  */

31 public class ColumnConfig {
32     
33     private String JavaDoc property;
34
35     private int lookupLevel;
36
37     private boolean sortable = true;
38
39     private boolean ascending = true;
40     
41     private boolean caseSensitive = true;
42
43     private CellRenderer renderer;
44
45     private String JavaDoc cssClass;
46
47     public ColumnConfig() {
48     }
49     
50     public ColumnConfig(CellRenderer renderer) {
51         this.renderer = renderer;
52     }
53
54     public int getLookupLevel() {
55         return lookupLevel;
56     }
57
58     public void setLookupLevel(int lookupLevel) {
59         this.lookupLevel = lookupLevel;
60     }
61
62     public String JavaDoc getProperty() {
63         return property;
64     }
65
66     public void setProperty(String JavaDoc property) {
67         this.property = property;
68     }
69
70     public boolean isSortable() {
71         return sortable && property != null;
72     }
73
74     public boolean isAscending() {
75         return ascending;
76     }
77
78     public void setAscending(boolean ascending) {
79         this.ascending = ascending;
80     }
81
82     public boolean isCaseSensitive() {
83         return caseSensitive;
84     }
85
86     public void setCaseSensitive(boolean caseSensitive) {
87         this.caseSensitive = caseSensitive;
88     }
89
90     public void setSortable(boolean sortable) {
91         this.sortable = sortable;
92     }
93
94     public CellRenderer getRenderer() {
95         return renderer;
96     }
97
98     public void setRenderer(CellRenderer renderer) {
99         this.renderer = renderer;
100     }
101
102     public String JavaDoc getCssClass() {
103         return cssClass;
104     }
105
106     public void setCssClass(String JavaDoc cssClass) {
107         this.cssClass = cssClass;
108     }
109 }
110
Popular Tags