public class XprObjBarcode extends XprObjGraphics
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
settings
The type depending barcode object options in a form key, value map.
|
private static java.util.Map<java.lang.String,java.lang.String> |
typeMap
Barcode type names mapping XPR -> Jasperreports
|
private int |
xBlank
X space distance to be blanked.
|
private int |
yScale
Y scaling factor for barcode.
|
TYPE_BARCODE, TYPE_BOOKMARK, TYPE_FILLED_RECTANGLE, TYPE_IMAGE, TYPE_LINE, TYPE_RECTANGLE, TYPE_TEXT, TYPE_UNDEFINED
Constructor and Description |
---|
XprObjBarcode(double rowStart,
double colStart,
double rowEnd,
double colEnd,
java.lang.String tagValue)
Create a new barcode XPR object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBarcodeType()
Returns the Jasper report compatible type name.
|
int |
getBarHeight(float dx,
float dy)
Returns the barcode height depending on type and requested dimensions.
|
int |
getBarWidth(float dx,
float dy)
Returns the bar minimal width depending on type and requested dimensions.
|
java.lang.String |
getParameterValue(java.lang.String paramName)
Returns the font name for text object.
|
int |
getXBlank()
Returns reserved blank space on both horizonatal sides in pixels.
|
int |
getYScale()
Returns Y scaling factor to get required bar height.
|
private void |
initialize(java.lang.String tagValue)
Initialize internal barcode features depending on barcode type.
|
boolean |
isChecksum()
Returns if the barcode needs check sum.
|
boolean |
isShow()
Returns if the barcode needs to show the text.
|
getColumnEnd, getRowEnd
getColor, getColumn, getLeftMargin, getRow, getTopMargin, getType, setMargins
private java.util.Map<java.lang.String,java.lang.String> settings
private static java.util.Map<java.lang.String,java.lang.String> typeMap
private int yScale
private int xBlank
public XprObjBarcode(double rowStart, double colStart, double rowEnd, double colEnd, java.lang.String tagValue)
rowStart
- The starting row value for barcode.colStart
- The starting column value for barcode.rowEnd
- The ending row value for barcode.colEnd
- The ending column value for barcode.tagValue
- The cumulative string representing the barcode features value.public java.lang.String getParameterValue(java.lang.String paramName)
paramName
- The name of the parameter to get the current value.public java.lang.String getBarcodeType()
public boolean isChecksum()
TRUE
if checksum is required.public boolean isShow()
TRUE
if SHOW attribute means to draw the text.public int getYScale()
public int getXBlank()
public int getBarWidth(float dx, float dy)
dx
- The width of the barcode area.dy
- The height of the barcode area.public int getBarHeight(float dx, float dy)
dx
- The width of the barcode area.dy
- The height of the barcode area.private void initialize(java.lang.String tagValue)
tagValue
- The cumulative string representing the barcode features option delimited by ','.