Package org.eclipse.wb.internal.core.model.property

Examples of org.eclipse.wb.internal.core.model.property.Property


        "  }",
        "}");
    refresh();
    ColumnInfo column = getJavaInfoByName("column");
    // prepare property
    Property property = column.getPropertyByTitle("comparator");
    assertNotNull(property);
    // ask open
    {
      DesignPageSite.Helper.setSite(column, DesignPageSite.EMPTY);
      property.getEditor().doubleClick(property, null);
    }
    assertEditor(
        "import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;",
        "public class Test extends CellTable<User> {",
        "  public Test() {",
View Full Code Here


        "  }",
        "}");
    refresh();
    ColumnInfo column = getJavaInfoByName("column");
    // prepare property
    Property property = column.getPropertyByTitle("comparator");
    assertNotNull(property);
    // ask open
    {
      DesignPageSite.Helper.setSite(column, DesignPageSite.EMPTY);
      property.getEditor().doubleClick(property, null);
    }
    assertEditor(
        "import com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler;",
        "public class Test extends CellTable<User> {",
        "  private ListHandler<User> sortHandler = new ListHandler<User>(Collections.<User>emptyList());",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    WidgetInfo listBox = frame.getChildrenWidgets().get(0);
    // prepare "items" property
    Property itemsProperty = listBox.getPropertyByTitle("items");
    assertNotNull(itemsProperty);
    // initial state
    {
      assertEquals("[text_0,text_1]", getPropertyText(itemsProperty));
      assertTrue(itemsProperty.isModified());
      assertTrue(ArrayUtils.isEquals(new String[]{"text_0", "text_1"}, itemsProperty.getValue()));
    }
  }
View Full Code Here

    assertThat(button.getPresentation().getChildrenTree()).isEmpty();
    assertThat(button.getPresentation().getChildrenGraphical()).isEmpty();
  }

  private static void hasFace(CustomButtonInfo button, String faceName) throws Exception {
    Property faceProperty = button.getPropertyByTitle(faceName);
    assertNotNull("No property for " + faceName, faceProperty);
    assertTrue(faceProperty.getCategory().isSystem());
  }
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    CustomButtonInfo button = (CustomButtonInfo) frame.getChildrenWidgets().get(0);
    // check for properties for faces
    Property upProperty = button.getPropertyByTitle("UpFace");
    Property[] upProperties = getSubProperties(upProperty);
    // check existing "text" property
    {
      Property textProperty = getPropertyByTitle(upProperties, "text");
      assertTrue(textProperty.isModified());
      assertEquals("the text", textProperty.getValue());
    }
    // set "HTML" property
    {
      Property textProperty = getPropertyByTitle(upProperties, "html");
      assertFalse(textProperty.isModified());
      textProperty.setValue("the html");
      assertEditor(
          "public class Test implements EntryPoint {",
          "  public void onModuleLoad() {",
          "    RootPanel rootPanel = RootPanel.get();",
          "    {",
View Full Code Here

    {
      Property[] canvasProperties = widgetCanvas.getProperties();
      Property[] textProperties = newTextBox.getProperties();
      assertThat(canvasProperties).contains((Object[]) textProperties);
    }
    Property canvasProperty = widgetCanvas.getPropertyByTitle("Canvas");
    assertThat(canvasProperty).isInstanceOf(ComplexProperty.class);
  }
View Full Code Here

            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    Property boundsProperty = button.getPropertyByTitle("Bounds");
    assertNotNull(boundsProperty);
    // x
    {
      Property xProperty = PropertyUtils.getByPath(button, "Bounds/x");
      assertNotNull(xProperty);
      assertEquals(1, xProperty.getValue());
      xProperty.setValue(10);
      assertEditor(
          "public class Test extends Canvas {",
          "  public Test() {",
          "    {",
          "      Button button = new Button();",
          "      addChild(button);",
          "      button.setRect(10, 2, 3, 4);",
          "    }",
          "  }",
          "}");
    }
    // y
    {
      Property yProperty = PropertyUtils.getByPath(button, "Bounds/y");
      assertNotNull(yProperty);
      assertEquals(2, yProperty.getValue());
      yProperty.setValue(20);
      assertEditor(
          "public class Test extends Canvas {",
          "  public Test() {",
          "    {",
          "      Button button = new Button();",
          "      addChild(button);",
          "      button.setRect(10, 20, 3, 4);",
          "    }",
          "  }",
          "}");
    }
    // width
    {
      Property widthProperty = PropertyUtils.getByPath(button, "Bounds/width");
      assertNotNull(widthProperty);
      assertEquals(3, widthProperty.getValue());
      widthProperty.setValue(30);
      assertEditor(
          "public class Test extends Canvas {",
          "  public Test() {",
          "    {",
          "      Button button = new Button();",
          "      addChild(button);",
          "      button.setRect(10, 20, 30, 4);",
          "    }",
          "  }",
          "}");
    }
    // height
    {
      Property heightProperty = PropertyUtils.getByPath(button, "Bounds/height");
      assertNotNull(heightProperty);
      assertEquals(4, heightProperty.getValue());
      heightProperty.setValue(40);
      assertEditor(
          "public class Test extends Canvas {",
          "  public Test() {",
          "    {",
          "      Button button = new Button();",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property leftProperty = PropertyUtils.getByPath(button, "Anchor H/left");
    assertNotNull(leftProperty);
    assertTrue(leftProperty.isModified());
    assertEquals("100.0", getPropertyText(leftProperty));
    leftProperty.setValue(45.0);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property topProperty = PropertyUtils.getByPath(button, "Anchor V/top");
    assertNotNull(topProperty);
    assertTrue(topProperty.isModified());
    assertEquals("100.0", getPropertyText(topProperty));
    topProperty.setValue(45.0);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    WidgetInfo button = getJavaInfoByName("button");
    //
    Property leftProperty = PropertyUtils.getByPath(button, "Anchor H/left unit");
    assertNotNull(leftProperty);
    assertTrue(leftProperty.isModified());
    assertEquals("PX", getPropertyText(leftProperty));
    leftProperty.setValue("MM");
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.property.Property

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.