litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/JoinedTableTop.java
|
@@ -1,12 +1,10 @@ |
1 |
1 |
|
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
2 |
|
package org.litesoft.GWT.client.widgets.datatables; |
3 |
3 |
|
|
4 |
|
- |
public class JoinedTableTop<T> extends RegularTable<T> |
5 |
|
- |
{ |
|
4 |
+ |
public class JoinedTableTop<T> extends RegularTable<T> { |
6 |
5 |
|
private final ListTableModel<T> mModel; |
7 |
6 |
|
|
8 |
|
- |
public JoinedTableTop( TableDefinitionPlus<T> pTableDefinition ) |
9 |
|
- |
{ |
|
7 |
+ |
public JoinedTableTop( TableDefinitionPlus<T> pTableDefinition ) { |
10 |
8 |
|
super( new ListTableModel<T>(), pTableDefinition ); |
11 |
9 |
|
mModel = (ListTableModel<T>) super.getModel(); |
12 |
10 |
|
setSelectionPolicy( RowSelectionPolicy.NONE ); |
|
@@ -14,24 +12,20 @@ |
14 |
12 |
|
loadData(); |
15 |
13 |
|
} |
16 |
14 |
|
|
17 |
|
- |
public T getValue() |
18 |
|
- |
{ |
|
15 |
+ |
public T getValue() { |
19 |
16 |
|
return (mModel.size() > 0) ? mModel.get( 0 ) : null; |
20 |
17 |
|
} |
21 |
18 |
|
|
22 |
|
- |
public void setValue( T pValue ) |
23 |
|
- |
{ |
|
19 |
+ |
public void setValue( T pValue ) { |
24 |
20 |
|
mModel.clear(); |
25 |
|
- |
if ( pValue != null ) |
26 |
|
- |
{ |
|
21 |
+ |
if ( pValue != null ) { |
27 |
22 |
|
mModel.add( pValue ); |
28 |
23 |
|
} |
29 |
24 |
|
loadData(); |
30 |
25 |
|
} |
31 |
26 |
|
|
32 |
27 |
|
@Override |
33 |
|
- |
protected void onLoad() |
34 |
|
- |
{ |
|
28 |
+ |
protected void onLoad() { |
35 |
29 |
|
relayout(); |
36 |
30 |
|
} |
37 |
31 |
|
} |