Package org.eclipse.draw2d.geometry

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


protected void paintFigure(Graphics g) {
  g.setXORMode(true);
  g.setForegroundColor(ColorConstants.white)
  g.setBackgroundColor(LogicColorConstants.ghostFillColor);
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);

  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y + 2, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y + 2, r.right() - 3, r.y - 2);
View Full Code Here


  g.setXORMode(true);
  g.setForegroundColor(ColorConstants.white)
  g.setBackgroundColor(LogicColorConstants.ghostFillColor);
 
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);

  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y, r.right() - 3, r.y - 2);
View Full Code Here

/**
* @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
*/
protected void paintFigure(Graphics g) {
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);
 
  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y + 2, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y + 2, r.right() - 3, r.y - 2);
View Full Code Here

/**
* @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
*/
protected void paintFigure(Graphics g) {
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);

  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y, r.right() - 3, r.y - 2);
View Full Code Here

    childPart.getFigure().translateToAbsolute(r);
    r = request.getTransformedRectangle(r);
    //convert this figure to relative
    getLayoutContainer().translateToRelative(r);
    getLayoutContainer().translateFromParent(r);
    r.translate(getLayoutOrigin().getNegated());
    constraint = getConstraintFor(r);
    command.add(createAddCommand(generic, childPart,
      translateToModelConstraint(constraint)));
  }
  return command.unwrap();
View Full Code Here

public void relocate(CellEditor celleditor) {
  Text text = (Text)celleditor.getControl();
  Rectangle rect = stickyNote.getClientArea();
  stickyNote.translateToAbsolute(rect);
  org.eclipse.swt.graphics.Rectangle trim = text.computeTrim(0, 0, 0, 0);
  rect.translate(trim.x, trim.y);
  rect.width += trim.width;
  rect.height += trim.height;
  text.setBounds(rect.x, rect.y, rect.width, rect.height);
}
View Full Code Here

/**
* @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
*/
protected void paintFigure(Graphics g) {
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);

  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y + 2, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y + 2, r.right() - 3, r.y - 2);
View Full Code Here

  g.setXORMode(true);
  g.setForegroundColor(ColorConstants.white)
  g.setBackgroundColor(LogicColorConstants.ghostFillColor);
 
  Rectangle r = getBounds().getCopy();
  r.translate(2, 2);
  r.setSize(11, 9);
 
  //Draw terminals, 2 at top
  g.drawLine(r.x + 2, r.y + 2, r.x + 2, r.y - 2);
  g.drawLine(r.right() - 3, r.y + 2, r.right() - 3, r.y - 2);
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.