Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/JoinedTablePair.java

Diff revisions: vs.
  @@ -6,8 +6,7 @@
6 6 import com.google.gwt.event.logical.shared.*;
7 7 import com.google.gwt.user.client.*;
8 8
9 - public class JoinedTablePair<T> implements TableDataReloadable
10 - {
9 + public class JoinedTablePair<T> implements TableDataReloadable {
11 10 private final JoinedTableTop<T> mTopTable;
12 11 private final JoinedTableBottom<T> mBottomTable;
13 12
  @@ -15,8 +14,7 @@
15 14 * @param pModel the data source
16 15 * @param pDefinition the column definition
17 16 */
18 - public JoinedTablePair( ListTableModel<T> pModel, TableDefinitionPlus<T> pDefinition, SelectionHandler<T> pSelectionHandler )
19 - {
17 + public JoinedTablePair( ListTableModel<T> pModel, TableDefinitionPlus<T> pDefinition, SelectionHandler<T> pSelectionHandler ) {
20 18 this( pModel, pDefinition, pSelectionHandler, null );
21 19 }
22 20
  @@ -25,42 +23,36 @@
25 23 * @param pDefinition the column definition
26 24 * @param pClickCommand {@link Command} to execute upon clicking a row, or <code>null</code>
27 25 */
28 - public JoinedTablePair( ListTableModel<T> pModel, TableDefinitionPlus<T> pDefinition, SelectionHandler<T> pSelectionHandler, TableClickCommand<T> pClickCommand )
29 - {
26 + public JoinedTablePair( ListTableModel<T> pModel, TableDefinitionPlus<T> pDefinition, SelectionHandler<T> pSelectionHandler,
27 + TableClickCommand<T> pClickCommand ) {
30 28 mTopTable = new JoinedTableTop<T>( pDefinition );
31 - mBottomTable = new JoinedTableBottom<T>( pModel, pDefinition, pClickCommand )
32 - {
33 - @Override protected void onLoad()
34 - {
29 + mBottomTable = new JoinedTableBottom<T>( pModel, pDefinition, pClickCommand ) {
30 + @Override
31 + protected void onLoad() {
35 32 super.onLoad();
36 33 loadData();
37 34 }
38 35 };
39 36 new JoinedTableController<T>( mTopTable, mBottomTable );
40 - if ( pSelectionHandler != null )
41 - {
37 + if ( pSelectionHandler != null ) {
42 38 mBottomTable.addSelectionHandler( pSelectionHandler );
43 39 }
44 40 }
45 41
46 - public JoinedTableTop<T> getTopTable()
47 - {
42 + public JoinedTableTop<T> getTopTable() {
48 43 return mTopTable;
49 44 }
50 45
51 - public JoinedTableBottom<T> getBottomTable()
52 - {
46 + public JoinedTableBottom<T> getBottomTable() {
53 47 return mBottomTable;
54 48 }
55 49
56 50 @Override
57 - public void loadData()
58 - {
51 + public void loadData() {
59 52 mBottomTable.loadData();
60 53 }
61 54
62 - public ImmutableArrayList<T> getAllRows()
63 - {
55 + public ImmutableArrayList<T> getAllRows() {
64 56 return mBottomTable.getAllRows();
65 57 }
66 58 }