Package net.sf.jasperreports.engine
Class JRPrintImageArea
java.lang.Object
net.sf.jasperreports.engine.JRPrintImageArea
- All Implemented Interfaces:
Serializable
An area on an image.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPoint
(int x, int y) Decides whether a specific point is inside this area.protected Shape
protected Shape
protected void
int[]
Returns the shape coordinates.static String
getHtmlShape
(byte shape) Returns the HTML shape type corresponding to a shape type.byte
getShape()
Returns the shape type.static byte
Returns the shape constant corresponding the HTML are shape type.protected boolean
void
setCoordinates
(int[] coordinates) Sets the shape coordinates.void
setShape
(byte shape) Sets the area shape type.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_CIRCLE_COORDINATES_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_POLYGON_COORDINATES_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_RECTANGLE_COORDINATES_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_UNKNOWN_HTML_SHAPE
- See Also:
-
EXCEPTION_MESSAGE_KEY_UNKNOWN_SHAPE
- See Also:
-
SHAPE_DEFAULT
public static final byte SHAPE_DEFAULT- See Also:
-
SHAPE_RECTANGLE
public static final byte SHAPE_RECTANGLE- See Also:
-
SHAPE_CIRCLE
public static final byte SHAPE_CIRCLE- See Also:
-
SHAPE_POLYGON
public static final byte SHAPE_POLYGON- See Also:
-
SHAPE_HTML_DEFAULT
- See Also:
-
SHAPE_HTML_RECTANGLE
- See Also:
-
SHAPE_HTML_CIRCLE
- See Also:
-
SHAPE_HTML_POLYGON
- See Also:
-
-
Constructor Details
-
JRPrintImageArea
public JRPrintImageArea()Creates a blank image area.
-
-
Method Details
-
getShape
Returns the shape constant corresponding the HTML are shape type.- Parameters:
htmlShape
- the HTML are shape type- Returns:
- the corresponding shape constant
-
getHtmlShape
Returns the HTML shape type corresponding to a shape type.- Parameters:
shape
- the shape type- Returns:
- the HTML shape type
-
getShape
public byte getShape()Returns the shape type.- Returns:
- the shape type
-
setShape
public void setShape(byte shape) Sets the area shape type.- Parameters:
shape
- the shape type, one of
-
getCoordinates
public int[] getCoordinates()Returns the shape coordinates.- Returns:
- the shape coordinates
-
setCoordinates
public void setCoordinates(int[] coordinates) Sets the shape coordinates.- Parameters:
coordinates
- the shape coordinates
-
containsPoint
public boolean containsPoint(int x, int y) Decides whether a specific point is inside this area.- Parameters:
x
- the X coordinate of the pointy
- the Y coordinate of the point- Returns:
- whether the point is inside this area
-
ensureAWTShape
protected void ensureAWTShape() -
hasAWTShape
protected boolean hasAWTShape() -
createAWTShape
-
createAWTRectangle
-