Package com.google.gdt.eclipse.designer.gwtext.model.layout

Examples of com.google.gdt.eclipse.designer.gwtext.model.layout.RowLayoutDataInfo


            "      add(label);",
            "    }",
            "  }",
            "}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    // set "int"
    rowData.setHeight(50);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
        "      Label label = new Label();",
        "      add(label, new RowLayoutData(50));",
        "    }",
        "  }",
        "}");
    // set "string"
    rowData.setHeight("20%");
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
        "      Label label = new Label();",
        "      add(label, new RowLayoutData('20%'));",
        "    }",
        "  }",
        "}");
    // set "int"
    rowData.setHeight(100);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
View Full Code Here


            "      add(label);",
            "    }",
            "  }",
            "}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    // set "int"
    rowData.getPropertyByTitle("height(int)").setValue(50);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
        "      Label label = new Label();",
        "      add(label, new RowLayoutData(50));",
        "    }",
        "  }",
        "}");
    // set "string"
    rowData.getPropertyByTitle("height(java.lang.String)").setValue("20%");
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
        "      Label label = new Label();",
        "      add(label, new RowLayoutData('20%'));",
        "    }",
        "  }",
        "}");
    // set "int"
    rowData.getPropertyByTitle("height(int)").setValue(100);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
View Full Code Here

            "      add(label);",
            "    }",
            "  }",
            "}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    // set "string"
    rowData.getPropertyByTitle("height(java.lang.String)").setValue("20%");
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
View Full Code Here

        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label, new RowLayoutData(50))/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label, new RowLayoutData(50))/}",
        "    {new: com.gwtext.client.widgets.layout.RowLayoutData} {empty} {/add(label, new RowLayoutData(50))/}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    assertVisible(rowData, false);
  }
View Full Code Here

        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label)/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}",
        "    {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    //
    VirtualLayoutDataVariableSupport variable =
        (VirtualLayoutDataVariableSupport) rowData.getVariableSupport();
    assertTrue(variable.isDefault());
    assertEquals("(virtual layout data)", variable.getTitle());
    // no target (not sure why)
    try {
      variable.getStatementTarget();
View Full Code Here

        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label)/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}",
        "    {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    VirtualLayoutDataCreationSupport creationSupport =
        (VirtualLayoutDataCreationSupport) rowData.getCreationSupport();
    // access
    assertNull(creationSupport.getNode());
    assertEquals(
        "virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData",
        creationSupport.toString());
    // validation
    assertFalse(creationSupport.canReorder());
    assertFalse(creationSupport.canReparent());
    // no implicit clipboard
    assertNull(creationSupport.getImplicitClipboard());
    // delete, nothing changed
    {
      String expectedSource = m_lastEditor.getSource();
      String expectedHierarchy = printHierarchy(panel);
      assertTrue(creationSupport.canDelete());
      rowData.delete();
      assertEditor(expectedSource, m_lastEditor);
      assertEquals(expectedHierarchy, printHierarchy(panel));
      assertSame(rowData, RowLayoutInfo.getRowData(label));
    }
  }
View Full Code Here

        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label)/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label)/}",
        "    {virtual-layout_data: com.gwtext.client.widgets.layout.RowLayoutData} {virtual-layout-data} {}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    RowLayoutDataInfo rowData = RowLayoutInfo.getRowData(label);
    // set "height"
    rowData.getPropertyByTitle("height(int)").setValue(100);
    assertHierarchy(
        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/ /add(label, new RowLayoutData(100))/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label, new RowLayoutData(100))/}",
        "    {new: com.gwtext.client.widgets.layout.RowLayoutData} {empty} {/add(label, new RowLayoutData(100))/}");
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
        "      Label label = new Label();",
        "      add(label, new RowLayoutData(100));",
        "    }",
        "  }",
        "}");
    // remove LayoutData
    {
      rowData.delete();
      assertEditor(
          "public class Test extends Panel {",
          "  public Test() {",
          "    setLayout(new RowLayout());",
          "    {",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gwtext.model.layout.RowLayoutDataInfo

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.