Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Rectangle.resize()


      IFigure target) {
      Rectangle bounds = getAdjustedColumnBoundingRectangle(editPart);
        target.translateToRelative(bounds);
        Insets insets = target.getInsets();
    bounds.translate(-insets.left, -insets.top);
    bounds.resize(insets.getWidth() + 1, insets.getHeight() + 1);
    return bounds;
  }
}
View Full Code Here


    List children = container.getChildren();
    Rectangle result = new Rectangle().setLocation(container
        .getClientArea().getLocation());
    for (int i = 0; i < children.size(); i++)
      result.union(((IFigure) children.get(i)).getBounds());
    result.resize(container.getInsets().getWidth(), container.getInsets()
        .getHeight());
    return result.getSize();
  }

  /*
 
View Full Code Here

    IFigure reference = getReferenceFigure();
    Rectangle targetBounds = new PrecisionRectangle(getReferenceBox()
        .getResized(-1, -1));
    reference.translateToAbsolute(targetBounds);
    target.translateToRelative(targetBounds);
    targetBounds.resize(1, 1);

    Dimension targetSize = target.getPreferredSize();

    switch (fLocation & PositionConstants.EAST_WEST) {
      case PositionConstants.WEST:
View Full Code Here

    bounds = new PrecisionRectangle(bounds.getCopy());
    reference.translateToAbsolute(bounds);
    target.translateToRelative(bounds);
    bounds.translate(-insets.left, -insets.top);
    bounds.resize(insets.getWidth(), insets.getHeight());

    target.setBounds(bounds);
  }

}
View Full Code Here

    List children = container.getChildren();
    Rectangle result = new Rectangle().setLocation(container.getClientArea().getLocation());
    for (int i = 0; i < children.size(); i++) {
      result.union(((IFigure) children.get(i)).getBounds());
    }
    result.resize(container.getInsets().getWidth(), container.getInsets().getHeight());
    return result.getSize();
  }

  public void layout(IFigure container) {
    GraphAnimation.recordInitialState(container);
View Full Code Here

  protected void paintFigure(Graphics g) {
    super.paintFigure(g);
    Rectangle r = getTextBounds();

    if (direction == PositionConstants.EAST) {
      r.resize(-1, 0);
      r.x += 2;
    }
    else {
      r.resize(0, 0).expand(1, 1);
    }
View Full Code Here

    if (direction == PositionConstants.EAST) {
      r.resize(-1, 0);
      r.x += 2;
    }
    else {
      r.resize(0, 0).expand(1, 1);
    }
    g.drawLine(r.x, r.y, r.right(), r.y); // Top line
    g.drawLine(r.x, r.bottom(), r.right(), r.bottom()); // Bottom line
    g.drawLine(r.right(), r.bottom(), r.right(), r.y); // Right line
View Full Code Here

  @Override
  protected void paintFigure(Graphics g) {
    super.paintFigure(g);
    Rectangle r = getTextBounds();

    r.resize(-2, 0).expand(1, 1);
    r.x -= 2;
    g.drawLine(r.x, r.y, r.right(), r.y); // Top line
    g.drawLine(r.x, r.bottom(), r.right(), r.bottom()); // Bottom line
    g.drawLine(r.x, r.bottom(), r.x, r.y); // left line
View Full Code Here

        List children = container.getChildren();
        Rectangle result = new Rectangle().setLocation(container
                .getClientArea().getLocation());
        for (int i = 0; i < children.size(); i++)
            result.union(((IFigure) children.get(i)).getBounds());
        result.resize(container.getInsets().getWidth(), container.getInsets()
                .getHeight());
        return result.getSize();
    }

    /* (non-Javadoc)
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.