Package net.sf.jasperreports.engine
Class JRPrintImageArea
- java.lang.Object
-
- net.sf.jasperreports.engine.JRPrintImageArea
-
- All Implemented Interfaces:
java.io.Serializable
public class JRPrintImageArea extends java.lang.Object implements java.io.SerializableAn area on an image.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JRPrintImageAreaHyperlink, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_CIRCLE_COORDINATES_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_POLYGON_COORDINATES_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_RECTANGLE_COORDINATES_ERRORstatic java.lang.StringEXCEPTION_MESSAGE_KEY_UNKNOWN_HTML_SHAPEstatic java.lang.StringEXCEPTION_MESSAGE_KEY_UNKNOWN_SHAPEstatic byteSHAPE_CIRCLEstatic byteSHAPE_DEFAULTstatic java.lang.StringSHAPE_HTML_CIRCLEstatic java.lang.StringSHAPE_HTML_DEFAULTstatic java.lang.StringSHAPE_HTML_POLYGONstatic java.lang.StringSHAPE_HTML_RECTANGLEstatic byteSHAPE_POLYGONstatic byteSHAPE_RECTANGLE
-
Constructor Summary
Constructors Constructor Description JRPrintImageArea()Creates a blank image area.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsPoint(int x, int y)Decides whether a specific point is inside this area.protected java.awt.ShapecreateAWTRectangle()protected java.awt.ShapecreateAWTShape()protected voidensureAWTShape()int[]getCoordinates()Returns the shape coordinates.static java.lang.StringgetHtmlShape(byte shape)Returns the HTML shape type corresponding to a shape type.bytegetShape()Returns the shape type.static bytegetShape(java.lang.String htmlShape)Returns the shape constant corresponding the HTML are shape type.protected booleanhasAWTShape()voidsetCoordinates(int[] coordinates)Sets the shape coordinates.voidsetShape(byte shape)Sets the area shape type.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_CIRCLE_COORDINATES_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_CIRCLE_COORDINATES_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_POLYGON_COORDINATES_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_POLYGON_COORDINATES_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_RECTANGLE_COORDINATES_ERROR
public static final java.lang.String EXCEPTION_MESSAGE_KEY_RECTANGLE_COORDINATES_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNKNOWN_HTML_SHAPE
public static final java.lang.String EXCEPTION_MESSAGE_KEY_UNKNOWN_HTML_SHAPE
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_UNKNOWN_SHAPE
public static final java.lang.String EXCEPTION_MESSAGE_KEY_UNKNOWN_SHAPE
- See Also:
- Constant Field Values
-
SHAPE_DEFAULT
public static final byte SHAPE_DEFAULT
- See Also:
- Constant Field Values
-
SHAPE_RECTANGLE
public static final byte SHAPE_RECTANGLE
- See Also:
- Constant Field Values
-
SHAPE_CIRCLE
public static final byte SHAPE_CIRCLE
- See Also:
- Constant Field Values
-
SHAPE_POLYGON
public static final byte SHAPE_POLYGON
- See Also:
- Constant Field Values
-
SHAPE_HTML_DEFAULT
public static final java.lang.String SHAPE_HTML_DEFAULT
- See Also:
- Constant Field Values
-
SHAPE_HTML_RECTANGLE
public static final java.lang.String SHAPE_HTML_RECTANGLE
- See Also:
- Constant Field Values
-
SHAPE_HTML_CIRCLE
public static final java.lang.String SHAPE_HTML_CIRCLE
- See Also:
- Constant Field Values
-
SHAPE_HTML_POLYGON
public static final java.lang.String SHAPE_HTML_POLYGON
- See Also:
- Constant Field Values
-
-
Method Detail
-
getShape
public static byte getShape(java.lang.String htmlShape)
Returns the shape constant corresponding the HTML are shape type.- Parameters:
htmlShape- the HTML are shape type- Returns:
- the corresponding shape constant
-
getHtmlShape
public static java.lang.String getHtmlShape(byte shape)
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
protected java.awt.Shape createAWTShape()
-
createAWTRectangle
protected java.awt.Shape createAWTRectangle()
-
-