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

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


            "      panel.add(button_2, DockPanel.NORTH);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    DockPanelInfo panel = (DockPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // check title decorations
    {
      String title = ObjectsLabelProvider.INSTANCE.getText(button_1);
      assertThat(title).startsWith("WEST - ");
    }
View Full Code Here


            "      panel.add(button, DockPanel.WEST);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    DockPanelInfo panel = (DockPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    // check that "Direction" property exists
    Property directionProperty;
    {
      directionProperty = button.getPropertyByTitle("Direction");
      assertNotNull(directionProperty);
      // same instance each time
      assertSame(directionProperty, button.getPropertyByTitle("Direction"));
      // presentation
      assertEquals("Direction", directionProperty.getTitle());
      assertTrue(directionProperty.getCategory().isSystem());
      assertTrue(directionProperty.isModified());
    }
    // current value
    assertEquals("WEST", getPropertyText(directionProperty));
    // set new value
    {
      Object northObject = ReflectionUtils.getFieldObject(panel.getObject(), "NORTH");
      directionProperty.setValue(northObject);
    }
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

            "      panel.add(button, DockPanel.WEST);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    DockPanelInfo panel = (DockPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    // check that "Cell" property exists
    Property cellProperty;
    {
      cellProperty = button.getPropertyByTitle("Cell");
      assertNotNull(cellProperty);
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Test for {@link DockPanelInfo#command_CREATE2(WidgetInfo, WidgetInfo)}.
   */
  public void test_CREATE() throws Exception {
    DockPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends DockPanel {",
            "  public Test() {",
            "  }",
            "}");
    refresh();
    //
    WidgetInfo newButton = createButton();
    panel.command_CREATE2(newButton, null);
    panel.setDirection(newButton, "WEST");
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends DockPanel {",
        "  public Test() {",
        "    {",
View Full Code Here

  /**
   * Test for {@link DockPanelInfo#command_MOVE2(WidgetInfo, WidgetInfo)}.
   */
  public void test_MOVE() throws Exception {
    DockPanelInfo panel =
        parseJavaInfo(
            "public class Test extends DockPanel {",
            "  public Test() {",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1, DockPanel.WEST);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2, DockPanel.NORTH);",
            "    }",
            "  }",
            "}");
    refresh();
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    //
    panel.command_MOVE2(button_2, button_1);
    assertEditor(
        "public class Test extends DockPanel {",
        "  public Test() {",
        "    {",
        "      Button button_2 = new Button();",
View Full Code Here

  /**
   * Test for copy/paste child of {@link DockPanelInfo}.
   */
  public void test_clipboard_onIt() throws Exception {
    final DockPanelInfo panel =
        parseJavaInfo(
            "public class Test extends DockPanel {",
            "  public Test() {",
            "    {",
            "      Button existing = new Button();",
            "      add(existing, DockPanel.WEST);",
            "    }",
            "  }",
            "}");
    refresh();
    //
    {
      WidgetInfo existingButton = getJavaInfoByName("existing");
      doCopyPaste(existingButton, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          panel.command_CREATE2(copy, null);
          panel.setDirection(copy, "EAST");
        }
      });
    }
    assertEditor(
        "public class Test extends DockPanel {",
View Full Code Here

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

TOP

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

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.