litesoft
Diff Revisions
282
vs
475
for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/property/SortableProperty.java
|
@@ -19,39 +19,45 @@ |
19 |
19 |
|
* A {@link ColumnProperty} that describes whether or not the contents of the |
20 |
20 |
|
* column can be sorted. |
21 |
21 |
|
*/ |
22 |
|
- |
public class SortableProperty extends ColumnProperty { |
23 |
|
- |
/** |
24 |
|
- |
* Property type. |
25 |
|
- |
*/ |
26 |
|
- |
public static final Type<SortableProperty> TYPE = new Type<SortableProperty>() { |
27 |
|
- |
private SortableProperty instance; |
|
22 |
+ |
public class SortableProperty extends ColumnProperty |
|
23 |
+ |
{ |
|
24 |
+ |
/** |
|
25 |
+ |
* Property type. |
|
26 |
+ |
*/ |
|
27 |
+ |
public static final Type<SortableProperty> TYPE = new Type<SortableProperty>() |
|
28 |
+ |
{ |
|
29 |
+ |
private SortableProperty instance; |
28 |
30 |
|
|
29 |
|
- |
@Override |
30 |
|
- |
public SortableProperty getDefault() { |
31 |
|
- |
if (instance == null) { |
32 |
|
- |
instance = new SortableProperty(true); |
33 |
|
- |
} |
34 |
|
- |
return instance; |
35 |
|
- |
} |
36 |
|
- |
}; |
|
31 |
+ |
@Override |
|
32 |
+ |
public SortableProperty getDefault() |
|
33 |
+ |
{ |
|
34 |
+ |
if ( instance == null ) |
|
35 |
+ |
{ |
|
36 |
+ |
instance = new SortableProperty( true ); |
|
37 |
+ |
} |
|
38 |
+ |
return instance; |
|
39 |
+ |
} |
|
40 |
+ |
}; |
37 |
41 |
|
|
38 |
|
- |
private boolean isSortable; |
|
42 |
+ |
private boolean isSortable; |
39 |
43 |
|
|
40 |
|
- |
/** |
41 |
|
- |
* Construct a new {@link SortableProperty}. |
42 |
|
- |
* |
43 |
|
- |
* @param isSortable true if the column is sortable, false if not |
44 |
|
- |
*/ |
45 |
|
- |
public SortableProperty(boolean isSortable) { |
46 |
|
- |
this.isSortable = isSortable; |
47 |
|
- |
} |
|
44 |
+ |
/** |
|
45 |
+ |
* Construct a new {@link SortableProperty}. |
|
46 |
+ |
* |
|
47 |
+ |
* @param isSortable true if the column is sortable, false if not |
|
48 |
+ |
*/ |
|
49 |
+ |
public SortableProperty( boolean isSortable ) |
|
50 |
+ |
{ |
|
51 |
+ |
this.isSortable = isSortable; |
|
52 |
+ |
} |
48 |
53 |
|
|
49 |
|
- |
/** |
50 |
|
- |
* Returns true if the column is sortable, false if it is not. |
51 |
|
- |
* |
52 |
|
- |
* @return true if the column is sortable, false if it is not sortable |
53 |
|
- |
*/ |
54 |
|
- |
public boolean isColumnSortable() { |
55 |
|
- |
return isSortable; |
56 |
|
- |
} |
|
54 |
+ |
/** |
|
55 |
+ |
* Returns true if the column is sortable, false if it is not. |
|
56 |
+ |
* |
|
57 |
+ |
* @return true if the column is sortable, false if it is not sortable |
|
58 |
+ |
*/ |
|
59 |
+ |
public boolean isColumnSortable() |
|
60 |
+ |
{ |
|
61 |
+ |
return isSortable; |
|
62 |
+ |
} |
57 |
63 |
|
} |