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

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo.refresh()


            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new FitLayout());",
            "  }",
            "}");
    container.refresh();
    FitLayoutInfo layout = (FitLayoutInfo) container.getLayout();
    SimpleContainer simpleContainer = new SimpleContainerFactory(layout, true).get().get(0);
    // empty initially
    assertTrue(simpleContainer.isEmpty());
    // add new Button
View Full Code Here


            "      Button button = new Button();",
            "      add(button, new FitData(1, 2, 3, 4));",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    FitDataInfo fitData = FitLayoutInfo.getFitData(button);
    // check margins
    assertSame(Property.UNKNOWN_VALUE, fitData.getMarginAll());
    assertEquals(1, fitData.getMarginTop());
View Full Code Here

            "      Button button = new Button();",
            "      add(button);",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    FitDataInfo fitData = FitLayoutInfo.getFitData(button);
    // check margins
    assertEquals(0, fitData.getMarginAll());
    assertEquals(0, fitData.getMarginTop());
View Full Code Here

            "      Button button = new Button();",
            "      add(button, new FitData(1, 2, 3, 4));",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    FitDataInfo fitData = FitLayoutInfo.getFitData(button);
    // check margins
    assertSame(Property.UNKNOWN_VALUE, fitData.getPropertyByTitle("margin-all").getValue());
    assertEquals(1, fitData.getPropertyByTitle("margin-top").getValue());
View Full Code Here

            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new AccordionLayout());",
            "  }",
            "}");
    container.refresh();
    AccordionLayoutInfo layout = (AccordionLayoutInfo) container.getLayout();
    FlowContainer flowContainer = new FlowContainerFactory(layout, false).get().get(0);
    // add new ContentPanel
    ContentPanelInfo newPanel = createJavaInfo("com.extjs.gxt.ui.client.widget.ContentPanel");
    assertTrue(flowContainer.validateComponent(newPanel));
View Full Code Here

            "      ContentPanel panel_3 = new ContentPanel();",
            "      add(panel_3);",
            "    }",
            "  }",
            "}");
    container.refresh();
    List<WidgetInfo> widgets = container.getWidgets();
    // initially "panel_1" is expanded
    assertActiveIndex(container, 0);
    // notify about "panel_2"
    {
View Full Code Here

    assertActiveIndex(container, 0);
    // notify about "panel_2"
    {
      boolean shouldRefresh = notifySelecting(widgets.get(1));
      assertTrue(shouldRefresh);
      container.refresh();
      // now "panel_2" is expanded
      assertActiveIndex(container, 1);
    }
    // second notification about "panel_2" does not cause refresh()
    {
View Full Code Here

            "      ContentPanel panel_2 = new ContentPanel();",
            "      add(panel_2);",
            "    }",
            "  }",
            "}");
    container.refresh();
    // initially "panel_1" is expanded
    assertActiveIndex(container, 1);
  }

  private static void assertActiveIndex(LayoutContainerInfo container, int expectedIndex)
View Full Code Here

    assertHierarchy(
        "{this: com.extjs.gxt.ui.client.widget.LayoutContainer} {this} {/setLayout(new AccordionLayout())/ /add(panel)/}",
        "  {new: com.extjs.gxt.ui.client.widget.layout.AccordionLayout} {empty} {/setLayout(new AccordionLayout())/}",
        "  {new: test.client.BadPanel} {local-unique: panel} {/new BadPanel()/ /add(panel)/}",
        "    {virtual-layout_data: com.extjs.gxt.ui.client.widget.layout.FitData} {virtual-layout-data} {}");
    container.refresh();
    //
    ContentPanelInfo panel = getJavaInfoByName("panel");
    assertTrue(panel.isPlaceholder());
  }
}
View Full Code Here

            "      Button button = new Button();",
            "      add(button);",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    FlowDataInfo flowData = FlowLayoutInfo.getFlowData(button);
    // check margins
    assertEquals(0, flowData.getMarginAll());
    assertEquals(0, flowData.getMarginTop());
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.