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

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


  ////////////////////////////////////////////////////////////////////////////
  /**
   * While <code>TabPanel</code> is subclass of <code>Composite</code>, it is not simple container.
   */
  public void test_notSimpleContainer() throws Exception {
    TabPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends TabPanel {",
            "  public Test() {",
            "  }",
View Full Code Here


            "      }",
            "    }",
            "  }",
            "}");
    frame.refresh();
    TabPanelInfo panel = (TabPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    assertTrue(isVisible(button_1));
    // do CREATE
    WidgetInfo newButton = createButton();
    panel.command_CREATE2(newButton, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

            "      rootPanel.add(button_2);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    TabPanelInfo panel = (TabPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = frame.getChildrenWidgets().get(1);
    assertTrue(isVisible(button_1));
    assertTrue(isVisible(button_2));
    // do ADD
    panel.command_MOVE2(button_2, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

            "      }",
            "    }",
            "  }",
            "}");
    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));
    // do MOVE
    panel.command_MOVE2(button_2, button_1);
    frame.refresh();
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Copy/paste of {@link WidgetInfo} on {@link TabPanelInfo}.
   */
  public void test_clipboard_Widget() throws Exception {
    final TabPanelInfo panel =
        parseJavaInfo(
            "public class Test extends TabPanel {",
            "  public Test() {",
            "    {",
            "      Button myButton = new Button();",
            "      add(myButton, 'tab', false);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    //
    {
      WidgetInfo myButton = getJavaInfoByName("myButton");
      doCopyPaste(myButton, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          panel.command_CREATE2(copy, null);
        }
      });
    }
    assertEditor(
        "public class Test extends TabPanel {",
View Full Code Here

            "  }",
            "}");
    refresh();
    //
    {
      TabPanelInfo panel = getJavaInfoByName("panel");
      doCopyPaste(panel, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          frame.command_CREATE2(copy, null);
        }
      });
View Full Code Here

  //
  // 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);
  }
View Full Code Here

  //
  // CREATE
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE_canvas_empty() throws Exception {
    TabPanelInfo panel =
        openJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends TabPanel {",
            "  public Test() {",
            "  }",
View Full Code Here

        "  }",
        "}");
  }

  public void test_CREATE_canvas_before() throws Exception {
    TabPanelInfo panel =
        openJavaInfo(
            "public class Test extends TabPanel {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('Existing');",
View Full Code Here

        "  }",
        "}");
  }

  public void test_CREATE_canvas_after() throws Exception {
    TabPanelInfo panel =
        openJavaInfo(
            "public class Test extends TabPanel {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('Existing');",
View Full Code Here

TOP

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

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.