|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.krysalis.barcode4j.output.AbstractCanvasProvider
public abstract class AbstractCanvasProvider
Abstract base class for most CanvasProvider implementations.
Field Summary | |
---|---|
protected BarcodeDimension |
bardim
the cached barcode dimensions |
Constructor Summary | |
---|---|
AbstractCanvasProvider(int orientation)
Main constructor. |
Method Summary | |
---|---|
void |
deviceCenteredText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
Draws centered text. |
void |
deviceJustifiedText(java.lang.String text,
double x1,
double x2,
double y1,
java.lang.String fontName,
double fontSize)
Draws justified text. |
void |
establishDimensions(BarcodeDimension dim)
Sets the dimensions of the barcode. |
BarcodeDimension |
getDimensions()
Returns the barcode dimensions once established. |
int |
getOrientation()
Returns the orientation of the barcode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.krysalis.barcode4j.output.CanvasProvider |
---|
deviceFillRect, deviceText |
Field Detail |
---|
protected BarcodeDimension bardim
Constructor Detail |
---|
public AbstractCanvasProvider(int orientation)
orientation
- the orientation of the barcodeMethod Detail |
---|
public void establishDimensions(BarcodeDimension dim)
establishDimensions
in interface CanvasProvider
dim
- the dimensions of the barcodepublic BarcodeDimension getDimensions()
getDimensions
in interface CanvasProvider
public int getOrientation()
getOrientation
in interface CanvasProvider
public void deviceJustifiedText(java.lang.String text, double x1, double x2, double y1, java.lang.String fontName, double fontSize)
deviceJustifiedText
in interface CanvasProvider
text
- the text to drawx1
- the left boundaryx2
- the right boundaryy1
- the y coordinatefontName
- the name of the fontfontSize
- the size of the fontpublic void deviceCenteredText(java.lang.String text, double x1, double x2, double y1, java.lang.String fontName, double fontSize)
deviceCenteredText
in interface CanvasProvider
text
- the text to drawx1
- the left boundaryx2
- the right boundaryy1
- the y coordinatefontName
- the name of the fontfontSize
- the size of the font
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |