public abstract class AbstractCanvasProvider extends Object implements CanvasProvider
| Modifier and Type | Field and Description |
|---|---|
protected BarcodeDimension |
bardim
the cached barcode dimensions
|
| Constructor and Description |
|---|
AbstractCanvasProvider(int orientation)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deviceCenteredText(String text,
double x1,
double x2,
double y1,
String fontName,
double fontSize)
Draws centered text.
|
void |
deviceJustifiedText(String text,
double x1,
double x2,
double y1,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeviceFillRect, deviceTextprotected BarcodeDimension bardim
public AbstractCanvasProvider(int orientation)
orientation - the orientation of the barcodepublic void establishDimensions(BarcodeDimension dim)
establishDimensions in interface CanvasProviderdim - the dimensions of the barcodepublic BarcodeDimension getDimensions()
getDimensions in interface CanvasProviderpublic int getOrientation()
getOrientation in interface CanvasProviderpublic void deviceJustifiedText(String text, double x1, double x2, double y1, String fontName, double fontSize)
deviceJustifiedText in interface CanvasProvidertext - 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(String text, double x1, double x2, double y1, String fontName, double fontSize)
deviceCenteredText in interface CanvasProvidertext - the text to drawx1 - the left boundaryx2 - the right boundaryy1 - the y coordinatefontName - the name of the fontfontSize - the size of the fontCopyright © 2003–2023. All rights reserved.