Examples of LayoutInfo


Examples of com.google.gdt.eclipse.designer.gxt.model.layout.LayoutInfo

    putArbitraryValue(KEY_DONT_SET_IMPLICIT_LAYOUT, Boolean.TRUE);
    startEdit();
    try {
      // remove old layout
      {
        LayoutInfo oldLayout = getLayout();
        oldLayout.delete();
      }
      // prepare StatementGenerator
      StatementGenerator statementGenerator;
      if (JavaInfoUtils.hasTrueParameter(newLayout, "layout.setInBlock")) {
        statementGenerator = BlockStatementGenerator.INSTANCE;
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.layout.LayoutInfo

  /**
   * Adds commands for coping this {@link LayoutContainerInfo}.
   */
  protected void clipboardCopy_addCommands(List<ClipboardCommand> commands) throws Exception {
    if (hasLayout()) {
      LayoutInfo layout = getLayout();
      if (layout.getCreationSupport() instanceof IImplicitCreationSupport) {
        // no need to set implicit layout
      } else {
        final JavaInfoMemento layoutMemento = JavaInfoMemento.createMemento(layout);
        commands.add(new ClipboardCommand() {
          private static final long serialVersionUID = 0L;

          @Override
          public void execute(JavaInfo javaInfo) throws Exception {
            LayoutContainerInfo composite = (LayoutContainerInfo) javaInfo;
            LayoutInfo newLayout = (LayoutInfo) layoutMemento.create(javaInfo);
            composite.setLayout(newLayout);
            layoutMemento.apply();
          }
        });
      }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.layout.LayoutInfo

  @Override
  protected void refreshEditPolicies() {
    super.refreshEditPolicies();
    // support for dropping components
    if (m_container.hasLayout()) {
      LayoutInfo layout = m_container.getLayout();
      if (m_currentLayout != layout) {
        LayoutEditPolicy policy = LayoutPolicyUtils.createLayoutEditPolicy(this, layout);
        if (policy != null) {
          m_currentLayout = layout;
          installEditPolicy(EditPolicy.LAYOUT_ROLE, policy);
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.layout.LayoutInfo

  // Command
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected Command getCreateCommand(Object newObject, Object referenceObject) {
    final LayoutInfo newLayout = (LayoutInfo) newObject;
    return new EditCommand(m_container) {
      @Override
      protected void executeEdit() throws Exception {
        m_container.setLayout(newLayout);
      }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.layout.LayoutInfo

    //
    // Implementation
    //
    ////////////////////////////////////////////////////////////////////////////
    private void update() {
      LayoutInfo layout = m_container.getLayout();
      // check for new LayoutInfo, remove old SelectionEditPolicy's
      {
        if (m_layout != null && layout != m_layout) {
          undecorateChildren();
        }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.LayoutInfo

            "  }",
            "}");
    canvas.refresh();
    assertThat(canvas.getWidgets()).isEmpty();
    //
    LayoutInfo newLayout = createJavaInfo("com.smartgwt.client.widgets.layout.HLayout");
    canvas.command_absolute_CREATE(newLayout, null);
    assertEditor(
        "// filler filler filler",
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.LayoutInfo

  //
  // Flow container
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_flowContainer_CREATE() throws Exception {
    LayoutInfo layout =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends HLayout {",
            "  public Test() {",
            "  }",
            "}");
    layout.refresh();
    // prepare FlowContainer
    FlowContainer flowContainer;
    {
      List<FlowContainer> flowContainers = new FlowContainerFactory(layout, true).get();
      assertThat(flowContainers).hasSize(1);
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.LayoutInfo

        "  }",
        "}");
  }

  public void test_flowContainer_MOVE() throws Exception {
    LayoutInfo layout =
        parseJavaInfo(
            "public class Test extends HLayout {",
            "  public Test() {",
            "    {",
            "      Button button_1 = new Button();",
            "      addMember(button_1);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      addMember(button_2);",
            "    }",
            "  }",
            "}");
    CanvasInfo button_1 = getJavaInfoByName("button_1");
    CanvasInfo button_2 = getJavaInfoByName("button_2");
    layout.refresh();
    //
    FlowContainer flowContainer = new FlowContainerFactory(layout, true).get().get(0);
    assertTrue(flowContainer.validateComponent(button_2));
    assertTrue(flowContainer.validateReference(button_1));
    flowContainer.command_MOVE(button_2, button_1);
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.LayoutInfo

            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    LayoutInfo layout = getJavaInfoByName("vLayout");
    //
    FlowContainer flowContainer = new FlowContainerFactory(layout, true).get().get(0);
    flowContainer.command_MOVE(button, null);
    assertEditor(
        "public class Test extends Canvas {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.LayoutInfo

            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    LayoutInfo layout = getJavaInfoByName("vLayout");
    //
    FlowContainer flowContainer = new FlowContainerFactory(layout, true).get().get(0);
    flowContainer.command_MOVE(button, null);
    assertEditor(
        "public class Test extends Canvas {",
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.