public class LabelPrint extends LabelPrintStd
Modifier and Type | Class and Description |
---|---|
static class |
LabelPrint.Label |
static class |
LabelPrint.Layout |
Modifier and Type | Field and Description |
---|---|
protected int |
adjustmentX |
protected int |
adjustmentY |
form
curY, extraordinaryFormat, firstPrintCalled, groupStart, lineFeed, PRINT_DIALOG_ALWAYS, PRINT_DIALOG_EACH_GROUP, PRINT_DIALOG_NEVER, PRINT_DIALOG_ONCE, printDialogChoice, printerJob, printService
currentFontSpec, originalFont
Constructor and Description |
---|
LabelPrint(int formId,
java.util.Vector<LabelPrint.Label> content)
Constructs a new LabelPrint.
|
LabelPrint(int formId,
java.util.Vector<LabelPrint.Label> content,
int exhausted)
Constructs a new LabelPrint using standard layout.
|
LabelPrint(int formId,
java.util.Vector<LabelPrint.Label> content,
int exhausted,
LabelPrint.Layout layout)
Constructs a new LabelPrint.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Demo main.
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex) |
void |
setAdjustment(int adjustmentX,
int adjustmentY)
Sets adjustment to correct on wrong printer positioning.
|
static java.lang.String |
toString(java.util.Vector<LabelPrint.Label> labels)
Converts a vector of label to a string, e.g. to store it in a simple way.
|
static java.util.Vector<LabelPrint.Label> |
toVector(java.lang.String labelString)
Recovers a vector of labels from a string that represents it.
|
beforePrinting, getLabelAmount, getLabelCapacity, getSupportedForms
afterPrinting, getBottomPrintEnding, getLeftPrintStart, getPageFormat, getRightPrintEnding, getTopPrintStart, isToManipulate, print, print, print, replaceSize, replaceSize, setBottomPrintEnding, setLeftPrintStart, setMargins, setPrinter, setPrinterDialog, setRightPrintEnding, setTopPrintStart, startGroup
changeFontIfNew, getCompletelyLoadedImage, getCompletelyLoadedImage, getPx, getPxD, getRightAllignOffset, getRightAllignStartPoint, limit, limit, resetFont, setOnBold, wrap
public LabelPrint(int formId, java.util.Vector<LabelPrint.Label> content)
formId
- the ID of the used form, e.g. FORM_AVERY_ZWECKFORM_L4732REV25content
- the content to print upon the labels#FORM_AVERY_ZWECKFORM_L4732REV25
public LabelPrint(int formId, java.util.Vector<LabelPrint.Label> content, int exhausted)
formId
- the ID of the used form, e.g. FORM_AVERY_ZWECKFORM_L4732REV25content
- the content to print upon the labelsexhausted
- the number of labels already exhausted#FORM_AVERY_ZWECKFORM_L4732REV25
public LabelPrint(int formId, java.util.Vector<LabelPrint.Label> content, int exhausted, LabelPrint.Layout layout)
formId
- the ID of the used form, e.g. FORM_AVERY_ZWECKFORM_L4732REV25content
- the content to print upon the labelsexhausted
- the number of labels already exhaustedlayout
- the label layout to use#FORM_AVERY_ZWECKFORM_L4732REV25
public static void main(java.lang.String[] args)
args
- public static java.lang.String toString(java.util.Vector<LabelPrint.Label> labels)
labels
- the labels to convert topublic static java.util.Vector<LabelPrint.Label> toVector(java.lang.String labelString)
labelString
- the string that represents the vector of labelstoString(Vector)
public void setAdjustment(int adjustmentX, int adjustmentY)
adjustmentX
- +- mm more right or leftadjustmentY
- +- mm deeper or higherpublic int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
java.awt.print.PrinterException
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de