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

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.grid.HTMLTableInfo


            "    panel.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        WidgetInfo button = panel.getChildrenWidgets().get(0);
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
        constraints.setHorizontalAlignment(alignment);
      }
    });
    //
View Full Code Here


            "    panel.getCellFormatter().setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        WidgetInfo button = panel.getChildrenWidgets().get(0);
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
        constraints.setHorizontalAlignment(ColumnInfo.Alignment.RIGHT);
      }
    });
    assertEditor(
View Full Code Here

            setAlignmentLine,
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
    assertSame(expectedAlignment, constraints.getVerticalAlignment());
  }
View Full Code Here

            "    panel.getCellFormatter().setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
    assertSame(ColumnInfo.Alignment.LEFT, constraints.getHorizontalAlignment());
    assertSame(RowInfo.Alignment.TOP, constraints.getVerticalAlignment());
  }
View Full Code Here

  /**
   * Test for {@link ColumnInfo.Alignment#FILL}.
   */
  public void test_horizontalAlignment_fill() throws Exception {
    HTMLTableInfo panel =
        parseJavaInfo(
            "public class Test extends FlexTable {",
            "  public Test() {",
            "    Button button = new Button('A');",
            "    setWidget(0, 0, button);",
            "    button.setWidth('100%');",
            "  }",
            "}");
    refresh();
    //
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
    // FILL initially
    {
      ColumnInfo.Alignment alignment = constraints.getHorizontalAlignment();
      assertSame(ColumnInfo.Alignment.FILL, alignment);
View Full Code Here

  /**
   * Test for {@link RowInfo.Alignment#FILL}.
   */
  public void test_verticalAlignment_fill() throws Exception {
    HTMLTableInfo panel =
        parseJavaInfo(
            "public class Test extends FlexTable {",
            "  public Test() {",
            "    Button button = new Button('A');",
            "    setWidget(0, 0, button);",
            "    button.setHeight('100%');",
            "  }",
            "}");
    refresh();
    //
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
    // FILL initially
    {
      RowInfo.Alignment alignment = constraints.getVerticalAlignment();
      assertSame(RowInfo.Alignment.FILL, alignment);
View Full Code Here

            "    panel.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        WidgetInfo button = panel.getChildrenWidgets().get(0);
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
        constraints.setVerticalAlignment(alignment);
      }
    });
    //
View Full Code Here

            "    panel.getCellFormatter().setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_TOP);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        WidgetInfo button = panel.getChildrenWidgets().get(0);
        CellConstraintsSupport constraints = HTMLTableInfo.getConstraints(button);
        constraints.setVerticalAlignment(RowInfo.Alignment.BOTTOM);
      }
    });
    assertEditor(
View Full Code Here

            "    panel.setWidget(0, 0, new Button('A'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    final WidgetInfo button = panel.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        // prepare alignment manager
        final IMenuManager alignmentManager;
        {
          MenuManager contextMenu = getDesignerMenuManager();
          panel.getBroadcastObject().addContextMenu(ImmutableList.of(button), button, contextMenu);
          alignmentManager = findChildMenuManager(contextMenu, managerText);
          assertNotNull(alignmentManager);
        }
        // set alignment
        IAction alignmentAction = findChildAction(alignmentManager, actionText);
View Full Code Here

            "    Grid panel = new Grid();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    assertThat(panel.getBounds().width).isGreaterThan(85);
    assertThat(panel.getBounds().height).isGreaterThan(20);
    // "formatters" are not visible
    assertThat(panel.getPresentation().getChildrenTree()).isEmpty();
    assertThat(panel.getPresentation().getChildrenGraphical()).isEmpty();
  }
View Full Code Here

TOP

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

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.