Package org.eclipse.draw2d.geometry

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


  g.drawPoint(r.x, r.y + 2);
  g.drawPoint(r.x, r.bottom() - 3);
  g.drawPoint(r.right() - 1, r.y + 2);
  g.drawPoint(r.right() - 1, r.bottom() - 3);
  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);
View Full Code Here


  g.drawPoint(r.right() - 1, r.y + 2);
  g.drawPoint(r.right() - 1, r.bottom() - 3);
  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.drawPoint(r.right() - 1, r.y + 2);
  g.drawPoint(r.right() - 1, r.bottom() - 3);
  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

  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);

  //Draw an oval that represents the bottom arc
  r.y += 4;
 
  /*
 
View Full Code Here

  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);

  //Draw an oval that represents the bottom arc
  r.y += 4;
 
  /*
 
View Full Code Here

  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);

  // fix it
  g.drawPoint(r.x + 2, r.y + 2);
  g.drawPoint(r.right() - 3, r.y + 2);
 
View Full Code Here

  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);

  // fix it
  g.drawPoint(r.x + 2, r.y + 2);
  g.drawPoint(r.right() - 3, r.y + 2);
 
View Full Code Here

  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);

  // fix it
  g.drawPoint(r.x + 2, r.y + 2);
  g.drawPoint(r.right() - 3, r.y + 2);
 
  //Draw the bottom arc of the gate
  r.y += 4;

  g.fillArc(r, 180, 180);
View Full Code Here

    y = r.bottom() - 1 - offsetV;

  if (leftToRight)
    x = r.x + offsetH;
  else
    x = r.right() - 1 - offsetH;
 
  Point p = new PrecisionPoint(x,y);
  getOwner().translateToAbsolute(p);
  return p;
}
View Full Code Here

    super.paintFigure(g);
    Rectangle r = super.getBounds();
    g.setAntialias(SWT.ON);
    g.setBackgroundColor(COLOR);
    g.fillRectangle(r.x, r.y, 5, r.height - 5);
    g.fillRectangle(r.right() - 9, r.y, 5, r.height - 5);
    g.fillRectangle(r.x, r.bottom() - 9, r.width - 5, 5);
    g.fillRectangle(r.x, r.y, r.width - 5, getBeanSize());
  }

  public int getBeanSize() {
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.