Package org.eclipse.wb.tests.designer.Expectations

Examples of org.eclipse.wb.tests.designer.Expectations.IntValue


    // check bounds
    {
      // label
      AbstractComponentInfo label = children.get(0);
      assertThat(label).isInstanceOf(CanvasInfo.class);
      Integer x = Expectations.get(13, new IntValue[]{new IntValue("flanker-desktop", 12)});
      Integer y = Expectations.get(0, new IntValue[]{new IntValue("flanker-desktop", 1)});
      assertThat(label.getModelBounds()).isEqualTo(new Rectangle(x, y, 198, 100));
    }
    {
      // resizer
      AbstractComponentInfo resizer = children.get(1);
      assertThat(resizer).isInstanceOf(ToolStripResizerInfo.class);
      Integer y = Expectations.get(100, new IntValue[]{new IntValue("flanker-desktop", 101)});
      assertThat(resizer.getModelBounds()).isEqualTo(
          new Rectangle(0, y, toolStrip.getModelBounds().width, ToolStripResizerInfo.DEFAULT_SIZE));
    }
    {
      // text item
      AbstractComponentInfo text = children.get(2);
      assertThat(text).isInstanceOf(FormItemInfo.class);
      Integer width = Expectations.get(225, new IntValue[]{new IntValue("flanker-desktop", 221)});
      assertThat(text.getModelBounds()).isEqualTo(new Rectangle(-3, 111, width, 22));
    }
    {
      // button
      AbstractComponentInfo button = children.get(3);
      assertThat(button).isInstanceOf(CanvasInfo.class);
      Integer x = Expectations.get(77, new IntValue[]{new IntValue("flanker-desktop", 76)});
      Integer y = Expectations.get(136, new IntValue[]{new IntValue("flanker-desktop", 137)});
      Integer width = Expectations.get(71, new IntValue[]{new IntValue("flanker-desktop", 70)});
      assertThat(button.getModelBounds()).isEqualTo(
          new Rectangle(x, y, width, CanvasTest.BUTTON_HEIGHT));
    }
    {
      // fill
      AbstractComponentInfo fill = children.get(4);
      assertThat(fill).isInstanceOf(ToolStripCanvasInfo.class);
      Integer x = Expectations.get(14, new IntValue[]{new IntValue("flanker-desktop", 12)});
      assertThat(fill.getModelBounds()).isEqualTo(new Rectangle(x, 159, 198, 40));
    }
  }
View Full Code Here


    // check bounds
    {
      // label
      AbstractComponentInfo label = children.get(0);
      assertThat(label).isInstanceOf(CanvasInfo.class);
      Integer expected = Expectations.get(0, new IntValue[]{new IntValue("flanker-desktop", 1)});
      assertThat(label.getModelBounds()).isEqualTo(new Rectangle(expected, expected, 100, 198));
    }
    {
      // resizer
      AbstractComponentInfo resizer = children.get(1);
      assertThat(resizer).isInstanceOf(ToolStripResizerInfo.class);
      Integer expected = Expectations.get(100, new IntValue[]{new IntValue("flanker-desktop", 101)});
      assertThat(resizer.getModelBounds()).isEqualTo(
          new Rectangle(expected,
              0,
              ToolStripResizerInfo.DEFAULT_SIZE,
              toolStrip.getModelBounds().height));
    }
    {
      // button
      AbstractComponentInfo button = children.get(2);
      assertThat(button).isInstanceOf(CanvasInfo.class);
      Integer x = Expectations.get(114, new IntValue[]{new IntValue("flanker-desktop", 115)});
      Integer y = Expectations.get(88, new IntValue[]{new IntValue("flanker-desktop", 89)});
      Integer width = Expectations.get(71, new IntValue[]{new IntValue("flanker-desktop", 70)});
      assertThat(button.getModelBounds()).isEqualTo(
          new Rectangle(x, y, width, CanvasTest.BUTTON_HEIGHT));
    }
    {
      // fill
      AbstractComponentInfo fill = children.get(3);
      assertThat(fill).isInstanceOf(ToolStripCanvasInfo.class);
      Integer x = Expectations.get(186, new IntValue[]{new IntValue("flanker-desktop", 185)});
      Integer width = Expectations.get(13, new IntValue[]{new IntValue("flanker-desktop", 14)});
      assertThat(fill.getModelBounds()).isEqualTo(new Rectangle(x, 1, width, 198));
    }
  }
View Full Code Here

    assertEquals(new Rectangle(0, 0, 450, 300), panel.getBounds());
    {
      WidgetInfo button = getJavaInfoByName("button");
      Rectangle bounds = button.getBounds();
      int widthGreatThat =
          Expectations.get(75, new IntValue[]{new IntValue("flanker-windows", 70)});
      assertThat(bounds.width).isGreaterThan(widthGreatThat);
      assertThat(bounds.height).isEqualTo(300);
    }
    // Unit property
    {
View Full Code Here

    assertThat(buttonBarBounds.width).isGreaterThan(400);
    assertThat(buttonBarBounds.height).isGreaterThan(25);
    assertThat(buttonBarBounds.x).isEqualTo(5);
    Integer expected =
        Expectations.get(300 - 5 - buttonBarBounds.height, new IntValue[]{
            new IntValue("Flanker-Windows", new Integer(300 - 5 - buttonBarBounds.height)),
            new IntValue("SABLIN-AA", new Integer(300 - 6 - buttonBarBounds.height))});
    assertThat(buttonBarBounds.y).isEqualTo(expected);
  }
View Full Code Here

    // "button" bounds
    {
      WidgetInfo button = getObjectByName("button");
      Rectangle bounds = button.getBounds();
      int widthGreatThat =
          Expectations.get(75, new IntValue[]{new IntValue("flanker-windows", 70)});
      assertThat(bounds.width).isGreaterThan(widthGreatThat);
      assertThat(bounds.height).isEqualTo(300);
    }
  }
View Full Code Here

            "  }",
            "}");
    form.refresh();
    //
    FormItemInfo formItem = form.getItems().get(0);
    Integer width = Expectations.get(150, new IntValue[]{new IntValue("flanker-desktop", 146)});
    assertThat(formItem.getModelBounds()).isEqualTo(new Rectangle(28, 0, width, 22));
  }
View Full Code Here

            "  }",
            "}");
    form.refresh();
    //
    FormItemInfo formItem = form.getItems().get(0);
    Integer left = Expectations.get(28, new IntValue[]{new IntValue("flanker-desktop", 100)});
    Integer width = Expectations.get(150, new IntValue[]{new IntValue("flanker-desktop", 146)});
    assertThat(formItem.getModelBounds()).isEqualTo(new Rectangle(left, 0, width, 22));
  }
View Full Code Here

    SectionStackSectionInfo section_1 = sections.get(0);
    SectionStackSectionInfo section_2 = sections.get(1);
    // check section 1
    {
      Integer sectionTop =
          Expectations.get(200, new IntValue[]{new IntValue("flanker-desktop", 201)});
      Integer sectionHeight =
          Expectations.get(40, new IntValue[]{new IntValue("flanker-desktop", 39)});
      assertThat(section_1.getModelBounds()).isEqualTo(
          new Rectangle(0, sectionTop, width, sectionHeight));
      List<CanvasInfo> canvases = section_1.getCanvases();
      assertThat(canvases.size()).isEqualTo(1);
      Integer canvasHeight =
          Expectations.get(14, new IntValue[]{new IntValue("flanker-desktop", 13)});
      assertThat(canvases.get(0).getModelBounds()).isEqualTo(
          new Rectangle(1, -1, width - 2, canvasHeight));
    }
    // check section 2
    {
      Integer sectionTop =
          Expectations.get(30, new IntValue[]{new IntValue("flanker-desktop", 31)});
      assertThat(section_2.getCanvases().size()).isEqualTo(3);
      assertThat(section_2.getModelBounds()).isEqualTo(new Rectangle(0, sectionTop, width, 170));
      List<CanvasInfo> canvases = section_2.getCanvases();
      assertThat(canvases.size()).isEqualTo(3);
      assertThat(canvases.get(0).getModelBounds()).isEqualTo(
View Full Code Here

    assertThat(sections.size()).isEqualTo(2);
    // check section 1
    SectionStackSectionInfo sectionInfo_1 = sections.get(0);
    {
      Integer sectionHeight =
          Expectations.get(40, new IntValue[]{new IntValue("flanker-desktop", 39)});
      assertThat(sectionInfo_1.getModelBounds()).isEqualTo(
          new Rectangle(0, 0, width, sectionHeight));
      List<CanvasInfo> canvases = sectionInfo_1.getCanvases();
      assertThat(canvases.size()).isEqualTo(1);
      Integer canvasHeight =
          Expectations.get(14, new IntValue[]{new IntValue("flanker-desktop", 13)});
      assertThat(canvases.get(0).getModelBounds()).isEqualTo(
          new Rectangle(1, 26, width - 2, canvasHeight));
    }
    // check section 2
    SectionStackSectionInfo sectionInfo_2 = sections.get(1);
    {
      Integer sectionHeight =
          Expectations.get(40, new IntValue[]{new IntValue("flanker-desktop", 39)});
      assertThat(sectionInfo_2.getModelBounds()).isEqualTo(
          new Rectangle(0, sectionHeight, width, 170));
      List<CanvasInfo> canvases = sectionInfo_2.getCanvases();
      assertThat(canvases.size()).isEqualTo(3);
      assertThat(canvases.get(0).getModelBounds()).isEqualTo(
View Full Code Here

      ColumnInfo column_2 = columns.get(1);
      assertThat(column_2.getModelBounds()).isEqualTo(new Rectangle(MCW, 0, MCW, height));
    }
    {
      ColumnInfo column_3 = columns.get(2);
      int width = Expectations.get(210, new IntValue[]{new IntValue("flanker-desktop", 210)});
      assertThat(column_3.getModelBounds()).isEqualTo(new Rectangle(2 * MCW, 0, width, height));
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.tests.designer.Expectations.IntValue

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.