Package org.eclipse.draw2d.geometry

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


        getOwner().translateToAbsolute(bounds);

        Point center = getReferencePoint();
        Point ref = center.getCopy().negate().translate(reference);
        if (ref.x == 0)
            return new Point(reference.x, (ref.y > 0) ? bounds.bottom() : bounds.bottom() - 2 * GRID_SIZE);
        if (ref.y == 0)
            return new Point((ref.x > 0) ? bounds.x + 2 * GRID_SIZE : bounds.x, reference.y);

        float dx = (ref.x > 0) ? 0.5f : -0.5f;
        float dy = (ref.y > 0) ? 0.5f : -0.5f;
View Full Code Here


        getOwner().translateToAbsolute(bounds);

        Point center = getReferencePoint();
        Point ref = center.getCopy().negate().translate(reference);
        if (ref.x == 0)
            return new Point(reference.x, (ref.y > 0) ? bounds.bottom() : bounds.bottom() - 2 * GRID_SIZE);
        if (ref.y == 0)
            return new Point((ref.x > 0) ? bounds.x + 2 * GRID_SIZE : bounds.x, reference.y);

        float dx = (ref.x > 0) ? 0.5f : -0.5f;
        float dy = (ref.y > 0) ? 0.5f : -0.5f;
View Full Code Here

        Rectangle r = getOwner().getBounds();
        int x, y;
        if (topDown) {
            y = r.y + offsetV;
        } else {
            y = r.bottom() - 1 - offsetV;
        }
        if (leftToRight) {
            x = r.x + offsetH;
        } else {
            x = r.right() - 1 - offsetH;
View Full Code Here

          break;
        } else
          candidate = -1; // Mouse's Y is outside the row, so reset
                  // the candidate
      }
      rowBottom = Math.max(rowBottom, rect.bottom());
      if (candidate == -1) {
        /*
         * See if we have a possible candidate. It is a candidate if the
         * cursor is left of the center of this candidate.
         */
 
View Full Code Here

  r.width--;
  r.height--;
  g.drawArc(r, 180, 180);
  g.drawPoint(r.x, r.y + 4);
  g.popState();
  g.drawLine(r.x + r.width / 2, r.bottom(), r.x + r.width / 2, r.bottom() + 2);
  g.drawPoint(r.x + r.width / 2, r.bottom());
 
  //Draw the gate outline and top curve
  g.translate(getLocation());
  g.drawPolyline(GATE_TOP);
View Full Code Here

  r.width--;
  r.height--;
  g.drawArc(r, 180, 180);
  g.drawPoint(r.x, r.y + 4);
  g.popState();
  g.drawLine(r.x + r.width / 2, r.bottom(), r.x + r.width / 2, r.bottom() + 2);
  g.drawPoint(r.x + r.width / 2, r.bottom());
 
  //Draw the gate outline and top curve
  g.translate(getLocation());
  g.drawPolyline(GATE_TOP);
View Full Code Here

  r.height--;
  g.drawArc(r, 180, 180);
  g.drawPoint(r.x, r.y + 4);
  g.popState();
  g.drawLine(r.x + r.width / 2, r.bottom(), r.x + r.width / 2, r.bottom() + 2);
  g.drawPoint(r.x + r.width / 2, r.bottom());
 
  //Draw the gate outline and top curve
  g.translate(getLocation());
  g.drawPolyline(GATE_TOP);
  g.fillPolygon(GATE_OUTLINE);
View Full Code Here

  g.drawPoint(r.x + 2, r.y);
  g.drawPoint(r.right() - 3, r.y);
 
  //outline main area
  g.drawLine(r.x, r.y, r.right() - 1, r.y);
  g.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom() - 1);
  g.drawLine(r.x, r.y, r.x, r.bottom() - 1);

  g.drawPoint(r.x, r.y);
  g.drawPoint(r.right() - 1, r.y);
 
View Full Code Here

  g.drawPoint(r.right() - 3, r.y);
 
  //outline main area
  g.drawLine(r.x, r.y, r.right() - 1, r.y);
  g.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom() - 1);
  g.drawLine(r.x, r.y, r.x, r.bottom() - 1);

  g.drawPoint(r.x, r.y);
  g.drawPoint(r.right() - 1, r.y);
 
  g.fillRectangle(r);
View Full Code Here

  r.width--;
  r.height--;
 
  g.drawArc(r, 180, 180);
  g.drawLine(r.x + r.width / 2, r.bottom(), r.x + r.width / 2, r.bottom() + 2);

  g.drawPoint(r.x + r.width / 2, r.bottom());
}

}
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.