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

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.ContainerInfo


  /**
   * No "Set Layout" sub-menu if <code>Container</code> has no layout.
   */
  public void test_setLayoutMenu_2() throws Exception {
    ContainerInfo panel =
        parseJavaInfo(
            "import com.gwtext.client.widgets.FocusPanel;",
            "public class Test extends FocusPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // no layout
    assertFalse(panel.hasLayout());
    // ...so, no "Set layout" menu
    {
      IMenuManager menuManager = getContextMenu(panel);
      IMenuManager layoutManager = findChildMenuManager(menuManager, "Set layout");
      assertNull(layoutManager);
View Full Code Here


    //
    assertHierarchy(
        "{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(container)/}",
        "  {new: com.gwtext.client.widgets.Panel} {local-unique: container} {/new Panel()/ /rootPanel.add(container)/}",
        "    {implicit-layout: default} {implicit-layout} {}");
    ContainerInfo container = (ContainerInfo) frame.getChildrenWidgets().get(0);
    assertTrue(container.hasLayout());
    //
    LayoutInfo layout = container.getLayout();
    assertInstanceOf(DefaultLayoutInfo.class, layout);
    // layouts are not displayed in tree
    {
      IObjectPresentation presentation = layout.getPresentation();
      assertFalse(presentation.isVisible());
View Full Code Here

        "      {new: com.gwtext.client.widgets.menu.Menu} {local-unique: menu} {/new Menu()/ /menu.addSeparator()/ /button.setMenu(menu)/}",
        "        {void} {void} {/menu.addSeparator()/}");
    // find addSeparator()
    JavaInfo separator;
    {
      ContainerInfo toolbar = (ContainerInfo) panel.getChildrenWidgets().get(0);
      WidgetInfo button = toolbar.getChildrenWidgets().get(0);
      MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
      separator = menu.getChildrenJava().get(0);
    }
    // check properties
    Property[] properties = separator.getProperties();
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    ContainerInfo panel =
        parseJavaInfo(
            "public class Test extends Portal {",
            "  public Test() {",
            "    PortalColumn firstCol = new PortalColumn();",
            "    firstCol.setPaddings(10, 10, 0, 10);",
            "    {",
            "      Portlet portlet = new Portlet('My portlet', 'Some html');",
            "      firstCol.add(portlet);;",
            "    }",
            "    add(firstCol, new ColumnLayoutData(.33));",
            "  }",
            "}");
    panel.refresh();
    //
    assertHierarchy(
        "{this: com.gwtext.client.widgets.portal.Portal} {this} {/add(firstCol, new ColumnLayoutData(.33))/}",
        "  {implicit-layout: com.gwtext.client.widgets.layout.ColumnLayout} {implicit-layout} {}",
        "  {new: com.gwtext.client.widgets.portal.PortalColumn} {local-unique: firstCol} {/new PortalColumn()/ /firstCol.setPaddings(10, 10, 0, 10)/ /firstCol.add(portlet)/ /add(firstCol, new ColumnLayoutData(.33))/}",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gwtext.model.widgets.ContainerInfo

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.