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

Examples of com.google.gdt.eclipse.designer.model.widgets.WidgetInfo


        "      button.setWidth('10px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize("10cm", "20mm");
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here


        "      button.setWidth('10px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize("10cm", null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "      button.setWidth('10px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize(null, "20mm");
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "      button.setHeight('20px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize("10cm", "20mm");
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "      button.setHeight('20px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize("10cm", null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "      button.setHeight('20px');",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new size
    button.getSizeSupport().setSize(null, "20mm");
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "      rootPanel.add(button);",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    assertTrue(button.getPropertyByTitle("width").getCategory().isHidden());
    assertTrue(button.getPropertyByTitle("height").getCategory().isHidden());
  }
View Full Code Here

        "      rootPanel.add(widget);",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
    int clientHeight = 50 - (2 + 3 + 4) * 2;
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

        "      rootPanel.add(widget);",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
    int clientHeight = 50 - (2 + 3 + 4) * 2;
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

        "      rootPanel.add(widget);",
        "    }",
        "  }",
        "}");
    refresh();
    WidgetInfo widget = getJavaInfoByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 0 + 0) * 2;
    int clientHeight = 50 - (2 + 0 + 0) * 2;
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.WidgetInfo

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.