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

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.RootPanelInfo.refresh()


            "    rootPanel.add(panel);",
            "    panel.setWidget(0, 0, new Button());",
            "    panel.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);",
            "  }",
            "}");
    frame.refresh();
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    Property property = PropertyUtils.getByPath(button, "Cell/horizontalAlignment");
    // initial value
    assertTrue(property.isModified());
View Full Code Here


            "    rootPanel.add(panel);",
            "    panel.setWidget(0, 0, new Button());",
            "    panel.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_BOTTOM);",
            "  }",
            "}");
    frame.refresh();
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    //
    Property property = PropertyUtils.getByPath(button, "Cell/verticalAlignment");
    // current value
View Full Code Here

            "      CaptionPanel captionPanel = new CaptionPanel('Some caption');",
            "      rootPanel.add(captionPanel);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    CaptionPanelInfo panel = getJavaInfoByName("captionPanel");
    // reset "captionText" to default
    panel.getPropertyByTitle("captionText").setValue(Property.UNKNOWN_VALUE);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

            "    RootPanel rootPanel = RootPanel.get();",
            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    //
    PanelInfo panel = (PanelInfo) frame.getChildrenWidgets().get(0);
    assertTrue(panel.shouldDrawDotsBorder());
  }
View Full Code Here

            "    HorizontalPanel panel = new HorizontalPanel();",
            "    rootPanel.add(panel);",
            "    panel.setStyleName('my-Panel');",
            "  }",
            "}");
    frame.refresh();
    //
    PanelInfo panel = (PanelInfo) frame.getChildrenWidgets().get(0);
    assertFalse(panel.shouldDrawDotsBorder());
  }
View Full Code Here

            "      rootPanel.add(panel);",
            "      panel.setText(0, 0, 'Some very very long text');",
            "    }",
            "  }",
            "}");
    frame.refresh();
    FlexTableInfo panel = getJavaInfoByName("panel");
    // if not replaced with "filler", then "panel" has big width
    {
      Rectangle bounds = panel.getBounds();
      assertThat(bounds.width).isGreaterThan(150);
View Full Code Here

            "      rootPanel.add(panel);",
            "      panel.setHTML(0, 0, 'Some very very long text');",
            "    }",
            "  }",
            "}");
    frame.refresh();
    FlexTableInfo panel = getJavaInfoByName("panel");
    // if not replaced with "filler", then "panel" has big width
    {
      Rectangle bounds = panel.getBounds();
      assertThat(bounds.width).isGreaterThan(150);
View Full Code Here

            "    panel.setWidget(0, 0, new Button('A'));",
            "    panel.setWidget(1, 1, new Button('B'));",
            "    panel.getFlexCellFormatter().setRowSpan(0, 0, 2);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    // no fix, so each row has 2 cells, however for row "0" this means 3 (!) visual cells
    assertEquals(2, ReflectionUtils.invokeMethod(panel.getObject(), "getCellCount(int)", 0));
    assertEquals(2, ReflectionUtils.invokeMethod(panel.getObject(), "getCellCount(int)", 1));
View Full Code Here

              "    panel.setWidget(0, 0, new Button('A'));",
              "    panel.setWidget(1, 1, new Button('B'));",
              "    panel.getFlexCellFormatter().setRowSpan(0, 0, 2);",
              "  }",
              "}");
      frame.refresh();
      assertNoErrors(frame);
      FlexTableInfo panel = (FlexTableInfo) frame.getChildrenWidgets().get(0);
      // no FlexTableHelper initially
      assertNull(m_testProject.getJavaProject().findType("test.client.FlexTableHelper"));
      // ensure FlexTableHelper
View Full Code Here

      String source = m_lastEditor.getSource();
      tearDown();
      setUp();
      dontUseSharedGWTState();
      frame = (RootPanelInfo) parseSource("test.client", "Test.java", source);
      frame.refresh();
      assertNoErrors(frame);
    }
    FlexTableInfo panel = (FlexTableInfo) frame.getChildrenWidgets().get(0);
    // with fix each row should have 2 visual cells, but row "1" has only 1 TD element
    assertEquals(2, ReflectionUtils.invokeMethod(panel.getObject(), "getCellCount(int)", 0));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.