Package com.google.gdt.eclipse.designer.smart.model

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


    stack.refresh();
    assertThat(stack.getWidgets()).isEmpty();
    // check Sections
    List<SectionStackSectionInfo> sections = stack.getSections();
    assertThat(sections.size()).isEqualTo(2);
    SectionStackSectionInfo section_1 = sections.get(0);
    assertThat(section_1.getCanvases().size()).isEqualTo(1);
    SectionStackSectionInfo section_2 = sections.get(1);
    assertThat(section_2.getCanvases().size()).isEqualTo(3);
    //
    assert_sections_bounds(stack);
  }
View Full Code Here


    SectionStackInfo stack = (SectionStackInfo) canvas.getWidgets().get(0);
    assertThat(stack.getWidgets()).isEmpty();
    // check Sections
    List<SectionStackSectionInfo> sections = stack.getSections();
    assertThat(sections.size()).isEqualTo(2);
    SectionStackSectionInfo section_1 = sections.get(0);
    assertThat(section_1.getCanvases().size()).isEqualTo(1);
    SectionStackSectionInfo section_2 = sections.get(1);
    assertThat(section_2.getCanvases().size()).isEqualTo(3);
    //
    assert_sections_bounds(stack);
  }
View Full Code Here

    SectionStackInfo stack = (SectionStackInfo) rootPanel.getChildrenWidgets().get(0);
    assertThat(stack.getWidgets()).isEmpty();
    // check Sections
    List<SectionStackSectionInfo> sections = stack.getSections();
    assertThat(sections.size()).isEqualTo(2);
    SectionStackSectionInfo section_1 = sections.get(0);
    assertThat(section_1.getCanvases().size()).isEqualTo(1);
    SectionStackSectionInfo section_2 = sections.get(1);
    assertThat(section_2.getCanvases().size()).isEqualTo(3);
    //
    assert_sections_bounds(stack);
  }
View Full Code Here

    stack.getPropertyByTitle("reverseOrder").setValue(true);
    // check Sections
    int width = stack.getModelBounds().width;
    List<SectionStackSectionInfo> sections = stack.getSections();
    assertThat(sections.size()).isEqualTo(2);
    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(
          new Rectangle(85, 121, CanvasTest.BUTTON_WIDTH, CanvasTest.BUTTON_HEIGHT));
      assertThat(canvases.get(1).getModelBounds()).isEqualTo(new Rectangle(1, 21, width - 2, 100));
      assertThat(canvases.get(2).getModelBounds()).isEqualTo(
View Full Code Here

  private void assert_sections_bounds(SectionStackInfo stackInfo) {
    int width = stackInfo.getModelBounds().width;
    List<SectionStackSectionInfo> sections = stackInfo.getSections();
    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(
          new Rectangle(85, 26, CanvasTest.BUTTON_WIDTH, CanvasTest.BUTTON_HEIGHT));
      assertThat(canvases.get(1).getModelBounds()).isEqualTo(new Rectangle(1, 48, width - 2, 100));
      assertThat(canvases.get(2).getModelBounds()).isEqualTo(
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.smart.model.SectionStackSectionInfo

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.