|
@@ -23,16 +23,14 @@ |
23 |
23 |
|
* |
24 |
24 |
|
* @param <RowType> the data type of the row values |
25 |
25 |
|
*/ |
26 |
|
- |
public class SelectionGridBulkRenderer<RowType> extends GridBulkRenderer<RowType> |
27 |
|
- |
{ |
|
26 |
+ |
public class SelectionGridBulkRenderer<RowType> extends GridBulkRenderer<RowType> { |
28 |
27 |
|
/** |
29 |
28 |
|
* A customized {@link SelectionGridBulkRenderer.BulkCellView} used by the |
30 |
29 |
|
* {@link SelectionGridBulkRenderer}. |
31 |
30 |
|
* |
32 |
31 |
|
* @param <RowType> the data type of the row values |
33 |
32 |
|
*/ |
34 |
|
- |
protected static class SelectionBulkCellView<RowType> extends BulkCellView<RowType> |
35 |
|
- |
{ |
|
33 |
+ |
protected static class SelectionBulkCellView<RowType> extends BulkCellView<RowType> { |
36 |
34 |
|
private TableBulkRenderer<RowType> bulkRenderer = null; |
37 |
35 |
|
|
38 |
36 |
|
/** |
|
@@ -40,21 +38,17 @@ |
40 |
38 |
|
* |
41 |
39 |
|
* @param bulkRenderer the renderer |
42 |
40 |
|
*/ |
43 |
|
- |
public SelectionBulkCellView( TableBulkRenderer<RowType> bulkRenderer ) |
44 |
|
- |
{ |
|
41 |
+ |
public SelectionBulkCellView( TableBulkRenderer<RowType> bulkRenderer ) { |
45 |
42 |
|
super( bulkRenderer ); |
46 |
43 |
|
this.bulkRenderer = bulkRenderer; |
47 |
44 |
|
} |
48 |
45 |
|
|
49 |
46 |
|
@Override |
50 |
|
- |
protected void renderRowValue( RowType rowValue, ColumnDefinition columnDef ) |
51 |
|
- |
{ |
|
47 |
+ |
protected void renderRowValue( RowType rowValue, ColumnDefinition columnDef ) { |
52 |
48 |
|
// Add the input column |
53 |
|
- |
if ( getCellIndex() == 0 ) |
54 |
|
- |
{ |
|
49 |
+ |
if ( getCellIndex() == 0 ) { |
55 |
50 |
|
SelectionPolicy selectionPolicy = ((SelectionGrid) bulkRenderer.getTable()).getSelectionPolicy(); |
56 |
|
- |
if ( selectionPolicy.hasInputColumn() ) |
57 |
|
- |
{ |
|
51 |
+ |
if ( selectionPolicy.hasInputColumn() ) { |
58 |
52 |
|
getStringBuffer().append( "<td align='CENTER'>" ); |
59 |
53 |
|
getStringBuffer().append( ((SelectionGrid) bulkRenderer.getTable()).getInputHtml( selectionPolicy ) ); |
60 |
54 |
|
getStringBuffer().append( "</td>" ); |
|
@@ -72,8 +66,7 @@ |
72 |
66 |
|
* @param grid {@link SelectionGrid} to be be bulk rendered |
73 |
67 |
|
* @param tableDef the table definition that should be used during rendering |
74 |
68 |
|
*/ |
75 |
|
- |
public SelectionGridBulkRenderer( SelectionGrid grid, TableDefinition<RowType> tableDef ) |
76 |
|
- |
{ |
|
69 |
+ |
public SelectionGridBulkRenderer( SelectionGrid grid, TableDefinition<RowType> tableDef ) { |
77 |
70 |
|
super( grid, tableDef ); |
78 |
71 |
|
} |
79 |
72 |
|
|
|
@@ -83,14 +76,12 @@ |
83 |
76 |
|
* @param grid {@link SelectionGrid} to be be bulk rendered |
84 |
77 |
|
* @param sourceTableDef the external source of the table definition |
85 |
78 |
|
*/ |
86 |
|
- |
public SelectionGridBulkRenderer( SelectionGrid grid, HasTableDefinition<RowType> sourceTableDef ) |
87 |
|
- |
{ |
|
79 |
+ |
public SelectionGridBulkRenderer( SelectionGrid grid, HasTableDefinition<RowType> sourceTableDef ) { |
88 |
80 |
|
super( grid, sourceTableDef ); |
89 |
81 |
|
} |
90 |
82 |
|
|
91 |
83 |
|
@Override |
92 |
|
- |
protected AbstractRowView<RowType> createRowView( final RenderingOptions options ) |
93 |
|
- |
{ |
|
84 |
+ |
protected AbstractRowView<RowType> createRowView( final RenderingOptions options ) { |
94 |
85 |
|
BulkCellView<RowType> cellView = new SelectionBulkCellView<RowType>( this ); |
95 |
86 |
|
return new BulkRowView<RowType>( cellView, this, options ); |
96 |
87 |
|
} |