public abstract class FormDrawer extends MustDrawer
Modifier and Type | Field and Description |
---|---|
protected java.awt.Graphics |
currentGraphics |
currentFontSpec, originalFont
Constructor and Description |
---|
FormDrawer(Forms.Form form)
Constructs a FormDrawer with form as specified.
|
FormDrawer(int width,
int height)
Constructs a FormDrawer using width and height.
|
Modifier and Type | Method and Description |
---|---|
void |
drawBarcode(java.lang.String text,
int barcodeType,
int posX,
int posY)
Draws a bar code on the id card
|
void |
drawBarcode(java.lang.String text,
int barcodeType,
int posX,
int posY,
java.awt.Font font) |
boolean |
drawImage(java.awt.Image image,
int posX,
int posY) |
void |
drawString(java.lang.String text,
int posX,
int posY)
Draws a string on the id card
|
void |
drawString(java.lang.String text,
int posX,
int posY,
int specialFontSize) |
void |
drawString(java.lang.String text,
int posX,
int posY,
int specialFontSize,
boolean bold) |
protected int |
getCurrentOffsetX() |
protected int |
getCurrentOffsetY() |
protected int |
getItemHeight() |
protected int |
getItemWidth() |
void |
printElement(Identifier id,
java.awt.Graphics graphics,
java.awt.image.ImageObserver imageObserver)
Renders current element.
|
void |
setDefaultFontName(java.lang.String defaultFontName)
Sets the default font name.
|
void |
setFrame(boolean frame)
Sets the flag to print a frame surrounding each item.
|
void |
setGridPosition(int row,
int col) |
changeFontIfNew, getCompletelyLoadedImage, getCompletelyLoadedImage, getPx, getPxD, getRightAllignOffset, getRightAllignStartPoint, limit, limit, resetFont, setOnBold, wrap
public FormDrawer(Forms.Form form)
form
- the form to be used to print the items upon the formpublic FormDrawer(int width, int height)
width
- the width of form used for one item onlyheight
- the height of form used for one item onlypublic void setFrame(boolean frame)
frame
- whether or not a frame is to be renderedpublic void setDefaultFontName(java.lang.String defaultFontName)
defaultFontName
- the default font name to use.public void printElement(Identifier id, java.awt.Graphics graphics, java.awt.image.ImageObserver imageObserver)
id
- the identifier of the element to rendergraphics
- the canvas to render itimageObserver
- the image observer - only needed to render imagespublic void drawString(java.lang.String text, int posX, int posY)
text
- the text to drawposX
- the relative X position in single ID card perspective (mm)posY
- the relative y position in single ID card perspective (mm)public void drawString(java.lang.String text, int posX, int posY, int specialFontSize)
public void drawString(java.lang.String text, int posX, int posY, int specialFontSize, boolean bold)
public void drawBarcode(java.lang.String text, int barcodeType, int posX, int posY)
text
- the text of the bar code to drawposX
- the relative X position in single ID card perspective (mm)posY
- the relative y position in single ID card perspective (mm)public void drawBarcode(java.lang.String text, int barcodeType, int posX, int posY, java.awt.Font font)
public boolean drawImage(java.awt.Image image, int posX, int posY)
protected int getItemWidth()
protected int getItemHeight()
public void setGridPosition(int row, int col)
protected int getCurrentOffsetX()
protected int getCurrentOffsetY()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de