public abstract class SimplePrinting extends MustDrawer implements java.awt.print.Printable
Modifier and Type | Field and Description |
---|---|
protected double |
curY
The current vertical position of text baseline.
|
protected boolean |
extraordinaryFormat |
protected boolean |
firstPrintCalled |
protected boolean |
groupStart |
protected int |
lineFeed |
static int |
PRINT_DIALOG_ALWAYS |
static int |
PRINT_DIALOG_EACH_GROUP |
static int |
PRINT_DIALOG_NEVER |
static int |
PRINT_DIALOG_ONCE |
protected int |
printDialogChoice |
protected java.awt.print.PrinterJob |
printerJob |
protected javax.print.PrintService |
printService |
currentFontSpec, originalFont
Constructor and Description |
---|
SimplePrinting() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterPrinting()
Called after printing is completed - override this method e.g. to inform about result.
|
protected void |
beforePrinting()
Called before printing is started - override this method to load data.
|
protected int |
getBottomPrintEnding() |
protected int |
getLeftPrintStart() |
protected MotivePageFormat |
getPageFormat(java.awt.print.PrinterJob printerJob) |
protected int |
getRightPrintEnding() |
protected int |
getTopPrintStart() |
protected boolean |
isToManipulate(java.awt.print.PageFormat pageFormat) |
void |
print()
Prints.
|
void |
print(java.lang.String jobName)
Prints.
|
void |
print(java.lang.String jobName,
int copies)
Prints.
|
protected void |
replaceSize(java.awt.print.PageFormat pageFormat) |
protected void |
replaceSize(java.awt.print.PageFormat pageFormat,
int marginLeftRight,
int marginTopBottom)
Replaces size in page format by plausible values - necessary while printing on Ubuntu
|
protected void |
setBottomPrintEnding(int bottomPrintEnding) |
protected void |
setLeftPrintStart(int leftPrintStart) |
protected void |
setMargins(java.awt.print.PageFormat format) |
void |
setPrinter(java.lang.String printerName)
Sets the print service by the name as specified.
|
void |
setPrinterDialog(int printerDialogWished)
Sets the type of wished printer dialog.
|
protected void |
setRightPrintEnding(int rightPrintEnding) |
protected void |
setTopPrintStart(int topPrintStart) |
void |
startGroup() |
changeFontIfNew, getCompletelyLoadedImage, getCompletelyLoadedImage, getPx, getPxD, getRightAllignOffset, getRightAllignStartPoint, limit, limit, resetFont, setOnBold, wrap
public static final int PRINT_DIALOG_NEVER
public static final int PRINT_DIALOG_ONCE
public static final int PRINT_DIALOG_EACH_GROUP
public static final int PRINT_DIALOG_ALWAYS
protected boolean extraordinaryFormat
protected javax.print.PrintService printService
protected java.awt.print.PrinterJob printerJob
protected int printDialogChoice
protected boolean groupStart
protected boolean firstPrintCalled
protected int lineFeed
protected double curY
public void setPrinterDialog(int printerDialogWished)
printerDialogWished
- the the type of wished printer dialogPRINT_DIALOG_NEVER
,
PRINT_DIALOG_ONCE
,
PRINT_DIALOG_EACH_GROUP
,
PRINT_DIALOG_ALWAYS
public void startGroup()
public void setPrinter(java.lang.String printerName)
printerName
- protected MotivePageFormat getPageFormat(java.awt.print.PrinterJob printerJob)
public void print()
public void print(java.lang.String jobName)
jobName
- the name of the jobpublic void print(java.lang.String jobName, int copies)
jobName
- the name of the jobcopies
- the number of copies to be printedprotected boolean isToManipulate(java.awt.print.PageFormat pageFormat)
protected void replaceSize(java.awt.print.PageFormat pageFormat)
protected void replaceSize(java.awt.print.PageFormat pageFormat, int marginLeftRight, int marginTopBottom)
pageFormat
- the page format to be made plausiblemarginLeftRight
- the left and right margin (mm) to be usedmarginTopBottom
- the top and bottom margin (mm) to be usedprotected void beforePrinting()
protected void afterPrinting()
protected void setMargins(java.awt.print.PageFormat format)
protected int getLeftPrintStart()
protected void setLeftPrintStart(int leftPrintStart)
protected int getRightPrintEnding()
protected void setRightPrintEnding(int rightPrintEnding)
protected int getTopPrintStart()
protected void setTopPrintStart(int topPrintStart)
protected int getBottomPrintEnding()
protected void setBottomPrintEnding(int bottomPrintEnding)
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de