Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Insets


            "    setTitle('My title');",
            "  }",
            "}");
    panel.refresh();
    // check insets
    Insets insets = panel.getClientAreaInsets();
    assertEquals(new Insets(26, 0, 0, 0), insets);
  }
View Full Code Here


      assertSame(panel.getWidgets().get(2), gridInfo.getOccupied(0, 1));
      assertSame(null, gridInfo.getOccupied(1, 1));
    }
    // getInsets()
    {
      Insets insets = gridInfo.getInsets();
      assertEquals(new Insets(), insets);
    }
    // virtual columns
    {
      assertTrue(gridInfo.hasVirtualColumns());
      assertEquals(5, gridInfo.getVirtualColumnGap());
View Full Code Here

  private void check_parse(TabSetInfo tabSet) {
    assertThat(tabSet.getWidgets()).isEmpty();
    assertThat(tabSet.getTabs().size()).isEqualTo(2);
    // check bounds
    Insets insets = tabSet.getTabInsets();
    int barThickness = tabSet.getTabBarThickness();
    TabInfo selectedTab = tabSet.getSelectedTab();
    Rectangle tabSetBounds = tabSet.getModelBounds();
    assertThat(selectedTab.getModelBounds()).isEqualTo(
        new Rectangle(insets.left, barThickness + insets.right, tabSetBounds.width
            - insets.getWidth(), tabSetBounds.height - barThickness - insets.getHeight()));
    //
    AbstractArrayObjectInfo objectTabsInfo =
        tabSet.getChildren(AbstractArrayObjectInfo.class).get(0);
    assertThat(objectTabsInfo.getItems().size()).isEqualTo(1);
    assertThat(objectTabsInfo.getChildren(TabInfo.class).size()).isEqualTo(0);
View Full Code Here

            "}"});
    canvas.refresh();
    //
    TabSetInfo tabSet = canvas.getChildren(TabSetInfo.class).get(0);
    // check bounds
    Insets insets = tabSet.getTabInsets();
    int barThickness = tabSet.getTabBarThickness();
    TabInfo selectedTab = tabSet.getSelectedTab();
    Rectangle tabSetBounds = tabSet.getModelBounds();
    assertThat(selectedTab.getModelBounds()).isEqualTo(
        new Rectangle(insets.left, barThickness + insets.right, tabSetBounds.width
            - insets.getWidth(), tabSetBounds.height - barThickness - insets.getHeight()));
  }
View Full Code Here

            "}"});
    canvas.refresh();
    //
    TabSetInfo tabSet = canvas.getChildren(TabSetInfo.class).get(0);
    // check bounds
    Insets insets = tabSet.getTabInsets();
    int barThickness = tabSet.getTabBarThickness();
    TabInfo selectedTab = tabSet.getSelectedTab();
    Rectangle tabSetBounds = tabSet.getModelBounds();
    assertThat(selectedTab.getModelBounds()).isEqualTo(
        new Rectangle(barThickness + insets.left, insets.right, tabSetBounds.width
            - barThickness
            - insets.getWidth(), tabSetBounds.height - insets.getHeight()));
  }
View Full Code Here

            "}"});
    canvas.refresh();
    //
    TabSetInfo tabSet = canvas.getChildren(TabSetInfo.class).get(0);
    // check bounds
    Insets insets = tabSet.getTabInsets();
    int barThickness = tabSet.getTabBarThickness();
    TabInfo selectedTab = tabSet.getSelectedTab();
    Rectangle tabSetBounds = tabSet.getModelBounds();
    assertThat(selectedTab.getModelBounds()).isEqualTo(
        new Rectangle(insets.left,
            insets.right,
            tabSetBounds.width - insets.getWidth(),
            tabSetBounds.height - barThickness - insets.getHeight()));
  }
View Full Code Here

      public boolean isRTL() {
        return false;
      }

      public Insets getInsets() {
        return new Insets();
      }

      ////////////////////////////////////////////////////////////////////////////
      //
      // Virtual columns
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo widget = getObjectByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
 
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo widget = getObjectByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 3 + 4) * 2;
 
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo widget = getObjectByName("widget");
    // decorations
    assertEquals(new Insets(2), widget.getMargins());
    assertEquals(new Insets(3), widget.getBorders());
    assertEquals(new Insets(4), widget.getPaddings());
    // set new size, tweak to take decorations into account
    widget.getSizeSupport().setSize(100, 50);
    assertEquals(new Dimension(100, 50), widget.getBounds().getSize());
    // source
    int clientWidth = 100 - (2 + 0 + 0) * 2;
 
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.geometry.Insets

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.