Package java.awt

Examples of java.awt.Shape.intersects()


        }
       
        // FIXME: draw outliers
       
        // add an entity for the item...
        if (entities != null && box.intersects(dataArea)) {
            addEntity(entities, box, dataset, series, item, yyAverage, xx);
        }

    }
View Full Code Here


        if (outlierListCollection.isLowFarOut()) {
            drawLowFarOut(aRadius, g2, xx, minAxisValue);
        }
       
        // add an entity for the item...
        if (entities != null && box.intersects(dataArea)) {
            addEntity(entities, box, dataset, series, item, xx, yyAverage);
        }

    }
View Full Code Here

     * Draw the cluster specified by the rectangle.
     */
    protected void drawCluster (Graphics2D gfx, Rectangle clip, Cluster cluster)
    {
        Shape shape = _clusters.get(cluster);
        if ((shape != null) && shape.intersects(clip)) {
            if (_hobject == cluster) {
                gfx.setComposite(HIGHLIGHT_ALPHA);
            } else {
                gfx.setComposite(SHOWN_ALPHA);
            }
View Full Code Here

   

    @Override
    public boolean hitsBin(Glyph<? extends Line2D, ?> glyph, AffineTransform view, int x, int y) {
      Shape s = view.createTransformedShape(glyph.shape());
      return s.intersects(x, y, 1, 1);
    }
   
    //based on 'optimized' version at http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
    private static <I,A> void bressenham(Aggregates<A> canvas, Aggregator<I,A> aggregator, Point2D start, Point2D end, I val) {
      int x0 = (int) start.getX();
View Full Code Here

    }
   
    @Override
    public boolean hitsBin(Glyph<? extends Rectangle2D, ?> glyph, AffineTransform view, int x, int y) {
      Shape s = view.createTransformedShape(glyph.shape());
      return s.intersects(x, y, 1, 1);
    }
  }

  public static final class Shapes implements Selector<Shape> {
    /**Iterates the bounds, with a hit-test to only set values inside of the shape.
View Full Code Here

    }
   
    @Override
    public boolean hitsBin(Glyph<? extends Shape, ?> glyph, AffineTransform view, int x, int y) {
      Shape s = view.createTransformedShape(glyph.shape());
      return s.intersects(x, y, 1, 1);
    }
  }
 

  @SuppressWarnings("unchecked")
View Full Code Here

            realShape = ((mxBasicShape) shape).createShape(this,
                state);
          }
        }

        if (realShape != null && realShape.intersects(rect))
        {
          return true;
        }
        else
        {
View Full Code Here

                        obj.getY() + bounds.y * myMap.getTileHeight(),
                        obj.getWidth() > 0 ? obj.getWidth() : zoom,
                        obj.getHeight() > 0 ? obj.getHeight() : zoom);
            }

            if (shape.intersects(mouse)) {
                return obj;
            }
        }

        return null;
View Full Code Here

         Shape shape = getItemShape(series, item);
         if (orientation == PlotOrientation.HORIZONTAL)
            shape = ShapeUtilities.createTranslatedShape(shape, transY0, transX0);
         else if (orientation == PlotOrientation.VERTICAL)
            shape = ShapeUtilities.createTranslatedShape(shape, transX0, transY0);
         if (shape.intersects(dataArea)) {
            if (getItemShapeFilled(series, item)) {
               if (useFillPaint)
                  g2.setPaint(getItemFillPaint(series, item));
               else
                  g2.setPaint(getItemPaint(series, item));
View Full Code Here

            overall.height += 1;
           
            Rectangle bounds = new Rectangle(overall);
            bounds.width += 1;
            bounds.height += 1;
            if (working.intersects(bounds)) {
                page.paintBackground(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintMarginAreas(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintBorder(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
               
                Color old = g.getColor();
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.