OLD | NEW |
| (Empty) |
1 package autotest.afe; | |
2 | |
3 import autotest.afe.ICheckBox.CheckBoxImpl; | |
4 | |
5 import com.google.gwt.user.client.ui.Composite; | |
6 import com.google.gwt.user.client.ui.FlexTable; | |
7 | |
8 public class CheckBoxPanelDisplay extends Composite implements CheckBoxPanel.Dis
play { | |
9 private int numColumns; | |
10 private FlexTable table = new FlexTable(); | |
11 | |
12 public CheckBoxPanelDisplay(int numColumns) { | |
13 this.numColumns = numColumns; | |
14 initWidget(table); | |
15 } | |
16 | |
17 public ICheckBox generateCheckBox(int index) { | |
18 CheckBoxImpl checkbox = new CheckBoxImpl(); | |
19 | |
20 int row = index / numColumns; | |
21 int col = index % numColumns; | |
22 table.setWidget(row, col, checkbox); | |
23 | |
24 return checkbox; | |
25 } | |
26 } | |
OLD | NEW |