//
// Handle
//
////////////////////////////////////////////////////////////////////////////
public void test_canvas_doubleClickHandle() throws Exception {
TabPanelInfo panel =
openJavaInfo(
"public class Test extends TabPanel {",
" public Test() {",
" {",
" Button button_1 = new Button();",
" add(button_1, 'A', false);",
" }",
" {",
" Button button_2 = new Button();",
" add(button_2, 'A', false);",
" }",
" }",
"}");
WidgetInfo button_1 = getJavaInfoByName("button_1");
WidgetInfo button_2 = getJavaInfoByName("button_2");
// initially "button_1" is visible
assertTrue(isVisible(button_1));
assertFalse(isVisible(button_2));
// double click handle of "button_1"
{
Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
Point handleCenter = bounds.getCenter();
canvas.moveTo(panel, handleCenter.x, handleCenter.y).doubleClick();
}
// now "button_2" is visible
assertFalse(isVisible(button_1));