//
// Children
//
////////////////////////////////////////////////////////////////////////////
public void test_activeWidget() throws Exception {
TabPanelInfo panel =
openJavaInfo(
"// filler filler filler filler filler",
"public class Test extends TabPanel {",
" public Test() {",
" {",
" Button button_1 = new Button();",
" add(button_1, 'AAAAAA', false);",
" }",
" {",
" Button button_2 = new Button();",
" add(button_2, 'BBBBBB', false);",
" }",
" }",
"}");
WidgetInfo button_1 = getJavaInfoByName("button_1");
WidgetInfo button_2 = getJavaInfoByName("button_2");
// "button_1" is active, so it should be selected on click
assertSame(button_1, panel.getActiveWidget());
canvas.moveTo(button_1, 0.5, 0.5).click();
canvas.assertPrimarySelected(button_1);
// select "button_2"
panel.getWidgetHandles().get(1).show();
canvas.deselectAll();
canvas.moveTo(button_2, 0.5, 0.5).click();
canvas.assertPrimarySelected(button_2);
}