Package com.google.gdt.eclipse.designer.model.widgets.panels

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.TabPanelInfo


        "    TabPanel panel = new TabPanel();",
        "    add(panel);",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    assertThat(panel.getBounds().width).isGreaterThan(120);
    assertThat(panel.getBounds().height).isGreaterThan(20);
  }
View Full Code Here


        "      rootPanel.add(panel);",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    assertTrue(panel.isPlaceholder());
  }
View Full Code Here

        "    TabPanel panel = new TabPanel();",
        "    add(panel);",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    assertTrue(panel.getWidgetHandles().isEmpty());
  }
View Full Code Here

        "      panel.add(button_2, 'Second widget');",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    //
    List<WidgetHandle> handles = panel.getWidgetHandles();
    assertThat(handles).hasSize(2);
    {
      WidgetHandle handle = handles.get(0);
      assertSame(button_1, handle.getWidget());
      Rectangle bounds = handle.getBounds();
View Full Code Here

        "      panel.add(button_2, 'B');",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    //
    panel.getWidgetHandles().get(1).show();
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
  }
View Full Code Here

        "      panel.add(button_2, 'B');",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // by default "button_1" is displayed
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // show "button_2" (no source should be changed)
    {
      String expectedSource = m_lastEditor.getSource();
      panel.showWidget(button_2);
      assertEditor(expectedSource, m_lastEditor);
    }
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
  }
View Full Code Here

        "      panel.add(button_3, 'B');",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    WidgetInfo button_3 = getJavaInfoByName("button_3");
    // show "button_3"
    panel.showWidget(button_3);
    assertFalse(isVisible(button_1));
    assertFalse(isVisible(button_2));
    assertTrue(isVisible(button_3));
    // delete "button_3", so "button_1" should be displayed
    button_3.delete();
View Full Code Here

        "      panel.add(button_3, 'C');",
        "    }",
        "  }",
        "}");
    refresh();
    TabPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    WidgetInfo button_3 = getJavaInfoByName("button_3");
    // initial state
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    assertFalse(isVisible(button_3));
    // move "button_3"
    panel.command_MOVE2(button_3, button_2);
    assertEditor(
        "public class Test extends FlowPanel {",
        "  public Test() {",
        "    TabPanel panel = new TabPanel();",
        "    add(panel);",
View Full Code Here

            "    }",
            "    panel.showWidget(0);",
            "  }",
            "}");
    frame.refresh();
    TabPanelInfo panel = (TabPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // send "selecting" broadcast
    String expectedSource = m_lastEditor.getSource();
    {
View Full Code Here

            "      }",
            "    }",
            "  }",
            "}");
    frame.refresh();
    TabPanelInfo panel = (TabPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    ComplexPanelInfo flowPanel = (ComplexPanelInfo) panel.getChildrenWidgets().get(1);
    WidgetInfo button_2 = flowPanel.getChildrenWidgets().get(0);
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(flowPanel));
    // send "selecting" broadcast
    String expectedSource = m_lastEditor.getSource();
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.TabPanelInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.