Package java.awt.geom

Examples of java.awt.geom.Ellipse2D.intersects()


      // add an entity if this info is being collected
      EntityCollection entities = null;
      if (info != null) {
        entities = info.getOwner().getEntityCollection();
        if (entities != null && circle.intersects(dataArea)) {
          addEntity(entities, circle, dataset, series, item,
              circle.getCenterX(), circle.getCenterY());
        }
      }
View Full Code Here


  public boolean containsPoint(float x, float y, float margin) {
    Ellipse2D shape = new Ellipse2D.Float(getX() - getDiameter() / 2, getY() - getDiameter() / 2, getDiameter(), getDiameter());
    if (margin == 0) {
      return shape.contains(x, y);
    } else {
      return shape.intersects(x - margin, y - margin, 2 * margin, 2 * margin);
    }
  }

  /**
   * Moves this compass of (<code>dx</code>, <code>dy</code>) units.
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)       
  {
    Ellipse2D e = new Ellipse2D.Double();
    harness.check(!e.intersects(0.0, 0.0, 0.0, 0.0));
    harness.check(!e.intersects(-1.0, -1.0, 2.0, 2.0));

    e = new Ellipse2D.Double(1.0, 2.0, 3.0, 4.0);
    harness.check(e.intersects(1.0, 2.0, 3.0, 4.0));
    harness.check(!e.intersects(0.0, 0.0, 1.0, 1.0));
View Full Code Here

   */
  public void test(TestHarness harness)       
  {
    Ellipse2D e = new Ellipse2D.Double();
    harness.check(!e.intersects(0.0, 0.0, 0.0, 0.0));
    harness.check(!e.intersects(-1.0, -1.0, 2.0, 2.0));

    e = new Ellipse2D.Double(1.0, 2.0, 3.0, 4.0);
    harness.check(e.intersects(1.0, 2.0, 3.0, 4.0));
    harness.check(!e.intersects(0.0, 0.0, 1.0, 1.0));
  }
View Full Code Here

    Ellipse2D e = new Ellipse2D.Double();
    harness.check(!e.intersects(0.0, 0.0, 0.0, 0.0));
    harness.check(!e.intersects(-1.0, -1.0, 2.0, 2.0));

    e = new Ellipse2D.Double(1.0, 2.0, 3.0, 4.0);
    harness.check(e.intersects(1.0, 2.0, 3.0, 4.0));
    harness.check(!e.intersects(0.0, 0.0, 1.0, 1.0));
  }

}
View Full Code Here

    harness.check(!e.intersects(0.0, 0.0, 0.0, 0.0));
    harness.check(!e.intersects(-1.0, -1.0, 2.0, 2.0));

    e = new Ellipse2D.Double(1.0, 2.0, 3.0, 4.0);
    harness.check(e.intersects(1.0, 2.0, 3.0, 4.0));
    harness.check(!e.intersects(0.0, 0.0, 1.0, 1.0));
  }

}
View Full Code Here

            // add an entity if this info is being collected
            EntityCollection entities = null;
            if (info != null) {
                entities = info.getOwner().getEntityCollection();
                if (entities != null && circle.intersects(dataArea)) {
                    addEntity(entities, circle, dataset, series, item,
                            circle.getCenterX(), circle.getCenterY());
                }
            }
View Full Code Here

            // add an entity if this info is being collected
            EntityCollection entities = null;
            if (info != null) {
                entities = info.getOwner().getEntityCollection();
                if (entities != null && circle.intersects(dataArea)) {
                    addEntity(entities, circle, dataset, series, item,
                            circle.getCenterX(), circle.getCenterY());
                }
            }
View Full Code Here

            // add an entity if this info is being collected
            EntityCollection entities = null;
            if (info != null) {
                entities = info.getOwner().getEntityCollection();
                if (entities != null && circle.intersects(dataArea)) {
                    addEntity(entities, circle, dataset, series, item,
                            circle.getCenterX(), circle.getCenterY());
                }
            }
View Full Code Here

           
            // add an entity if this info is being collected
            EntityCollection entities = null;
            if (info != null) {
                entities = info.getOwner().getEntityCollection();
                if (entities != null && circle.intersects(dataArea)) {
                    addEntity(entities, circle, dataset, series, item,
                            circle.getCenterX(), circle.getCenterY());
                }
            }
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.