OLD | NEW |
(Empty) | |
| 1 package autotest.afe; |
| 2 |
| 3 import autotest.afe.TestSelector.IDataTable; |
| 4 import autotest.afe.TestSelector.IDataTable.DataTableImpl; |
| 5 import autotest.afe.TestSelector.ISelectionManager; |
| 6 import autotest.afe.TestSelector.ISelectionManager.SelectionManagerImpl; |
| 7 import autotest.common.table.DataTable; |
| 8 import autotest.common.ui.ExtendedListBox; |
| 9 import autotest.common.ui.SimplifiedList; |
| 10 |
| 11 import com.google.gwt.user.client.ui.Composite; |
| 12 import com.google.gwt.user.client.ui.HTML; |
| 13 import com.google.gwt.user.client.ui.HasHTML; |
| 14 import com.google.gwt.user.client.ui.HorizontalPanel; |
| 15 import com.google.gwt.user.client.ui.HorizontalSplitPanel; |
| 16 import com.google.gwt.user.client.ui.Label; |
| 17 import com.google.gwt.user.client.ui.Panel; |
| 18 import com.google.gwt.user.client.ui.VerticalPanel; |
| 19 |
| 20 public class TestSelectorDisplay extends Composite implements TestSelector.Displ
ay { |
| 21 private static final String[][] testTableColumns = new String[][] { |
| 22 {DataTable.WIDGET_COLUMN, ""}, |
| 23 {"name", "Test"}, |
| 24 }; |
| 25 |
| 26 private ExtendedListBox testTypeSelect = new ExtendedListBox(); |
| 27 private DataTableImpl testTable = new DataTableImpl(testTableColumns); |
| 28 private SelectionManagerImpl testSelection = new SelectionManagerImpl(testTa
ble, false); |
| 29 private HTML testInfo = new HTML("Click a test to view its description"); |
| 30 private HorizontalSplitPanel mainPanel = new HorizontalSplitPanel(); |
| 31 |
| 32 public TestSelectorDisplay() { |
| 33 testInfo.setStyleName("test-description"); |
| 34 |
| 35 testTable.fillParent(); |
| 36 testTable.setClickable(true); |
| 37 |
| 38 Panel testTypePanel = new HorizontalPanel(); |
| 39 testTypePanel.add(new Label("Test type:")); |
| 40 testTypePanel.add(testTypeSelect); |
| 41 |
| 42 Panel testInfoPanel = new VerticalPanel(); |
| 43 testInfoPanel.add(testInfo); |
| 44 |
| 45 mainPanel.setLeftWidget(testTable); |
| 46 mainPanel.setRightWidget(testInfoPanel); |
| 47 mainPanel.setSize("100%", "30em"); |
| 48 mainPanel.setSplitPosition("20em"); |
| 49 |
| 50 Panel container = new VerticalPanel(); |
| 51 container.add(testTypePanel); |
| 52 container.add(mainPanel); |
| 53 container.setWidth("100%"); |
| 54 |
| 55 initWidget(container); |
| 56 } |
| 57 |
| 58 public SimplifiedList getTestTypeSelect() { |
| 59 return testTypeSelect; |
| 60 } |
| 61 |
| 62 public HasHTML getTestInfo() { |
| 63 return testInfo; |
| 64 } |
| 65 |
| 66 public ISelectionManager getTestSelection() { |
| 67 return testSelection; |
| 68 } |
| 69 |
| 70 public IDataTable getTestTable() { |
| 71 return testTable; |
| 72 } |
| 73 } |
OLD | NEW |