/** * Adds a rectangular-shaped area. * * @param link * the link * @param x1 * top left x * @param y1 * top left y * @param x2 * bottom right x * @param y2 * bottom right y * @return this */ public ClientSideImageMap addRectangleArea(AbstractLink link, int x1, int y1, int x2, int y2) { areas.add(link); link.add(new Area(rectangleCoordinates(x1, y1, x2, y2), RECTANGLE)); return this; }
/** * Adds a rectangular-shaped area. * * @param link * the link * @param x1 * top left x * @param y1 * top left y * @param x2 * bottom right x * @param y2 * bottom right y * @return this */ public ClientSideImageMap addRectangleArea(AbstractLink link, int x1, int y1, int x2, int y2) { areas.add(link); link.add(new Area(rectangleCoordinates(x1, y1, x2, y2), RECTANGLE)); return this; }
/** * Adds a circle-shaped area centered at (x,y) with radius r. * * @param link * the link * @param x * x coordinate of the center of the circle * @param y * y coordinate of center * @param radius * the radius * @return this */ public ClientSideImageMap addCircleArea(AbstractLink link, int x, int y, int radius) { areas.add(link); link.add(new Area(circleCoordinates(x, y, radius), CIRCLE)); return this; }
/** * Adds a circle-shaped area centered at (x,y) with radius r. * * @param link * the link * @param x * x coordinate of the center of the circle * @param y * y coordinate of center * @param radius * the radius * @return this */ public ClientSideImageMap addCircleArea(AbstractLink link, int x, int y, int radius) { areas.add(link); link.add(new Area(circleCoordinates(x, y, radius), CIRCLE)); return this; }
/** * Adds a rectangular-shaped area. * * @param link * the link * @param x1 * top left x * @param y1 * top left y * @param x2 * bottom right x * @param y2 * bottom right y * @return this */ public ClientSideImageMap addRectangleArea(AbstractLink link, int x1, int y1, int x2, int y2) { areas.add(link); link.add(new Area(rectangleCoordinates(x1, y1, x2, y2), RECTANGLE)); return this; }
/** * Adds a circle-shaped area centered at (x,y) with radius r. * * @param link * the link * @param x * x coordinate of the center of the circle * @param y * y coordinate of center * @param radius * the radius * @return this */ public ClientSideImageMap addCircleArea(AbstractLink link, int x, int y, int radius) { areas.add(link); link.add(new Area(circleCoordinates(x, y, radius), CIRCLE)); return this; }
/** * Adds an area defined by a shape object. * * @param link * the link * @param shape * the shape * @return this */ public ClientSideImageMap addShapeArea(AbstractLink link, Shape shape) { areas.add(link); link.add(new Area(shapeCoordinates(shape), POLYGON)); return this; }
/** * Adds a polygon-shaped area defined by coordinates. * * @param link * the link * @param coordinates * the coordinates for the polygon * @return This */ public ClientSideImageMap addPolygonArea(AbstractLink link, int... coordinates) { areas.add(link); link.add(new Area(polygonCoordinates(coordinates), POLYGON)); return this; }
/** * Adds an area defined by a shape object. * * @param link * the link * @param shape * the shape * @return this */ public ClientSideImageMap addShapeArea(AbstractLink link, Shape shape) { areas.add(link); link.add(new Area(shapeCoordinates(shape), POLYGON)); return this; }
/** * Adds a polygon-shaped area defined by coordinates. * * @param link * the link * @param coordinates * the coordinates for the polygon * @return This */ public ClientSideImageMap addPolygonArea(AbstractLink link, int... coordinates) { areas.add(link); link.add(new Area(polygonCoordinates(coordinates), POLYGON)); return this; }
/** * Adds a polygon-shaped area defined by coordinates. * * @param link * the link * @param coordinates * the coordinates for the polygon * @return This */ public ClientSideImageMap addPolygonArea(AbstractLink link, int... coordinates) { areas.add(link); link.add(new Area(polygonCoordinates(coordinates), POLYGON)); return this; }
/** * Adds an area defined by a shape object. * * @param link * the link * @param shape * the shape * @return this */ public ClientSideImageMap addShapeArea(AbstractLink link, Shape shape) { areas.add(link); link.add(new Area(shapeCoordinates(shape), POLYGON)); return this; }