Package org.eclipse.wb.draw2d.geometry

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


  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void addFeedbacks() throws Exception {
    if (m_panel.getLeftWidget() == null) {
      addFeedback0(0, 0, 0.5, 1, new Insets(0, 0, 0, 5), "left");
    }
    if (m_panel.getRightWidget() == null) {
      addFeedback0(0.5, 0, 1, 1, new Insets(0, 5, 0, 0), "right");
    }
  }
View Full Code Here


  // Feedbacks
  //
  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected void addFeedbacks() throws Exception {
    addFeedback(0, 0, 1, 0.25, new Insets(0, 0, 1, 0), "North", "NORTH");
    addFeedback(0, 0.75, 1, 1, new Insets(1, 0, 0, 0), "South", "SOUTH");
    addFeedback(0, 0.25, 0.25, 0.75, new Insets(1, 0, 1, 1), "West", "WEST");
    addFeedback(0.75, 0.25, 1, 0.75, new Insets(1, 1, 1, 0), "East", "EAST");
    if (!m_panel.hasCenterWidget()) {
      addFeedback(0.25, 0.25, 0.75, 0.75, new Insets(1, 1, 1, 1), "Center", "CENTER");
    }
  }
View Full Code Here

      public boolean isRTL() {
        return false;
      }

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

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

  public static Insets getBorders(Object el) throws Exception {
    int top = getBorderWidth(el, "top");
    int left = getBorderWidth(el, "left");
    int bottom = getBorderWidth(el, "bottom");
    int right = getBorderWidth(el, "right");
    return new Insets(top, left, bottom, right);
  }
View Full Code Here

      widget.getSizeSupport().setSize(size);
    }
    // check creation flow
    if (location != null && useCreationFlow()) {
      // force set new translated bounds
      Insets insets = container.getClientAreaInsets();
      Point location_ = location.getCopy();
      location_.translate(insets);
      AbsoluteLayoutCreationFlowSupport.checkBounds(widget, location_, size);
      // apply creation flow
      AbsoluteLayoutCreationFlowSupport.apply(
View Full Code Here

    return AbsolutePolicyUtils.DEFAULT_CONTAINER_GAP;
  }

  public Dimension getContainerSize() {
    Dimension size = m_canvas.getModelBounds().getSize().getCopy();
    Insets insets = m_canvas.getClientAreaInsets();
    return size.shrink(insets.getWidth(), insets.getHeight());
  }
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // check insets
    Insets insets = panel.getClientAreaInsets();
    assertEquals(new Insets(26, 1, 1, 1), insets);
  }
View Full Code Here

            "  }",
            "}");
    panel.refresh();
    ComponentInfo button = getJavaInfoByName("button");
    //
    Insets insets = panel.getClientAreaInsets();
    Rectangle buttonParentBounds = button.getBounds();
    Rectangle buttonModelBounds = button.getModelBounds();
    assertEquals(new Insets(26, 1, 1, 1), insets);
    assertEquals(buttonParentBounds.x, buttonModelBounds.x + insets.left);
    assertEquals(buttonParentBounds.y, buttonModelBounds.y + insets.top);
  }
View Full Code Here

        "}");
    refresh();
    ContentPanelInfo contentPanel = getJavaInfoByName("contentPanel");
    ComponentInfo button = getJavaInfoByName("button");
    //
    Insets insets = contentPanel.getClientAreaInsets();
    Rectangle buttonParentBounds = button.getBounds();
    Rectangle buttonModelBounds = button.getModelBounds();
    assertEquals(new Insets(36, 11, 11, 11), insets);
    assertEquals(new Point(20, 30), buttonModelBounds.getLocation());
    assertEquals(buttonParentBounds.x, buttonModelBounds.x + insets.left);
    assertEquals(buttonParentBounds.y, buttonModelBounds.y + insets.top);
  }
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    fieldSet.refresh();
    // check insets
    Insets insets = fieldSet.getClientAreaInsets();
    assertEquals(new Insets(10, 11, 12, 11), insets);
  }
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.