Package org.eclipse.draw2d.geometry

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


    if (figure.getFragmentsBounds().length != 1) {
      return false;
    }
    Rectangle bounds = figure.getBounds().getCopy();
    Insets insets = figure.getInsets();
    bounds.crop(insets);
    if (insets.top > THRESHHOLD && insets.left > THRESHHOLD
        && insets.right > THRESHHOLD && insets.bottom > THRESHHOLD) {
      return !bounds.contains(location);
    }
View Full Code Here


    // since the figure insets could be 0, so we expand it a little, thus
    // even the point is
    // a little inside the content area, we still think it is selection the
    // object.
    if (bounds.height < 3 * THRESHHOLD || bounds.width < 3 * THRESHHOLD) {
      bounds.crop(INSETS_1);
    } else {
      bounds.crop(INSETS_CONST);
    }
    return !bounds.contains(location);
  }
View Full Code Here

    // a little inside the content area, we still think it is selection the
    // object.
    if (bounds.height < 3 * THRESHHOLD || bounds.width < 3 * THRESHHOLD) {
      bounds.crop(INSETS_1);
    } else {
      bounds.crop(INSETS_CONST);
    }
    return !bounds.contains(location);
  }

  /*
 
View Full Code Here

          g.translate(-_blockBox.getBorderPaddingInsets().left,
              -_blockBox.getBorderPaddingInsets().top);

          Rectangle rect = new Rectangle(0, 0, _blockBox.getWidth(),
              _blockBox.getHeight());
          rect.crop(_blockBox.getBorderInsets());

          if (this._needHScroll && this._needVScroll) {
            BorderUtil.drawScrollBar(g, BorderUtil.SCROLL_WIDTH,
                rect, BorderUtil.BOTH);
          } else if (this._needHScroll) {
View Full Code Here

  g.drawLine(r.x, r.y + 2, r.right() - 1, r.y + 2);
  g.drawLine(r.x, r.bottom() - 3, r.right() - 1, r.bottom() - 3);
  g.drawLine(r.x, r.y + 2, r.x, r.bottom() - 3);
  g.drawLine(r.right() - 1, r.bottom() - 3, r.right() - 1, r.y + 2);
 
  r.crop(new Insets(1, 1, 0, 0));
  r.expand(1, 1);
  r.crop(getInsets(figure));
  drawConnectors(g, figure.getBounds().getCropped(in));
}
View Full Code Here

  g.drawLine(r.x, r.y + 2, r.x, r.bottom() - 3);
  g.drawLine(r.right() - 1, r.bottom() - 3, r.right() - 1, r.y + 2);
 
  r.crop(new Insets(1, 1, 0, 0));
  r.expand(1, 1);
  r.crop(getInsets(figure));
  drawConnectors(g, figure.getBounds().getCropped(in));
}

}
View Full Code Here

  g.drawLine(r.x, r.y + 2, r.right() - 1, r.y + 2);
  g.drawLine(r.x, r.bottom() - 3, r.right() - 1, r.bottom() - 3);
  g.drawLine(r.x, r.y + 2, r.x, r.bottom() - 3);
  g.drawLine(r.right() - 1, r.bottom() - 3, r.right() - 1, r.y + 2);
 
  r.crop(new Insets(1, 1, 0, 0));
  r.expand(1, 1);
  r.crop(getInsets(figure));
  drawConnectors(g, figure.getBounds().getCropped(in));
}
View Full Code Here

  g.drawLine(r.x, r.y + 2, r.x, r.bottom() - 3);
  g.drawLine(r.right() - 1, r.bottom() - 3, r.right() - 1, r.y + 2);
 
  r.crop(new Insets(1, 1, 0, 0));
  r.expand(1, 1);
  r.crop(getInsets(figure));
  drawConnectors(g, figure.getBounds().getCropped(in));
}

}
View Full Code Here

/**
* @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
*/
protected void paintFigure(Graphics graphics) {
  Rectangle rect = getBounds().getCopy();
  rect.crop(new Insets(2,0,2,0));
  graphics.fillRectangle(rect);
}

public void setInputConnectionAnchor(int i, ConnectionAnchor c) {
  connectionAnchors.put(Circuit.TERMINALS_IN[i],c);
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.