public abstract class ProportionalListReportDirectly extends InterruptibleBatchThread implements ProportionalListReport, java.awt.print.Printable
PrintDirectlySample
Modifier and Type | Field and Description |
---|---|
protected java.awt.Font |
defaultFont |
protected static double |
SQUARE_ROOT_OF_TWO |
sessionResources
threadController
threadDoneListeners
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT
GROUP_TERMINATION_ALLOWED_WITHOUT_CONFIRMATION, GROUP_TERMINATION_NOT_ALLOWED, GROUP_TERMINATION_REQUIRES_CONFIRMATION
Constructor and Description |
---|
ProportionalListReportDirectly(SessionResources sessionResources) |
Modifier and Type | Method and Description |
---|---|
protected PrintablePage.PrintPosition |
add(java.lang.String paragraph)
Adds a paragraph.
|
PrintablePage.PrintPosition |
add(java.lang.String[] columnValues)
Adds a table row to the current page.
|
protected PrintablePage.PrintPosition |
add(java.lang.String[] columnValues,
int numberOfFollowingLinesToKeepTogether)
Adds a table row to the current page.
|
PrintablePage.PrintPosition |
add(java.util.Vector<java.lang.String> columnValues)
Adds a table row to the current page.
|
protected PrintablePage.PrintPosition |
addEmptyLine()
Adds an empty line to the page.
|
PrintablePage.PrintPosition |
addEmptyLine(double factor)
Adds an empty line to the page.
|
protected void |
addHLine()
Adds a horizontal line.
|
protected PrintablePage.PrintPosition |
addTableHeader(java.lang.String[] headerValues)
Adds a row of values with meaning table header.
|
PrintablePage.PrintPosition |
addTableHeader(java.util.Vector<java.lang.String> headerValues)
Adds a row of values with meaning table header.
|
void |
addTitle(java.lang.String title)
Adds a title (with special font.
|
protected void |
changeFontIfNew(PrintablePage.PrintableItem printableItem,
java.awt.Graphics graphics) |
protected abstract void |
fillList()
Called when print is called the first time, therefore Graphics is known.
|
protected void |
fillPageHeader()
Fills the header of each page.
|
java.lang.String |
format(double doubleValue) |
protected PrintablePage.PrintPosition |
getCurrentPrintPosition() |
protected java.awt.Font |
getDefaultFont() |
protected java.awt.print.PageFormat |
getPageFormat(java.awt.print.PrinterJob printerJob)
Returns the page format to use.
|
abstract java.lang.String |
getPrinterJobName() |
protected void |
pageFeed() |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex) |
protected void |
printFixStuff(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints fix stuff for each page.
|
protected void |
resetFont()
Resets the current font and its current font specification to default
|
void |
runCore(DataObjectConstructionDetails docd)
Runs the core of the runnable With opportunity to use e.g. a different DB connection.
|
void |
setAlignment(int columnIndex,
int alignType)
Sets the alignment of a specific column.
|
void |
setConstantItems(boolean constantItems)
Determines whether or not the following items should be printed on each page.
|
protected void |
setCopies(int copies) |
void |
setDefaultProportion(int[] columnProportion)
Sets the column default proportion to influence column width.
|
void |
setDefaultProportion(java.util.Vector<java.lang.Integer> columnProportion)
Sets the column default proportion to influence column width.
|
protected void |
setFont(java.awt.Font newFont)
Sets the current font and its associated current font specification
|
protected void |
setMainTray() |
void |
setOnPageInfo()
Activates automatic printing of page information at the standard place.
|
protected void |
setOrientationLandscape() |
void |
setPageInfoPosition(java.awt.Point pageInfoPosition)
Sets the position where page number information is to be placed.
|
void |
setPreviewer(Previewer previewer)
Sets a previewer.
|
void |
setPrinter(java.lang.String printerName)
Sets the print service by the name as specified.
|
void |
setPrinter(java.lang.String printerName,
java.lang.String trayName)
Sets the print service by the name as specified.
|
void |
setPrinterJob(java.awt.print.PrinterJob printerJob) |
protected void |
setTray(javax.print.attribute.standard.MediaTray mediaTray) |
void |
setYStartPosition(int yStartPosition)
Sets the vertical position from where on the page print sequence starts.
|
getSessionResources, isTerminationRequested, isToRun, requiresUserConfirmationToTerminate, runCore, setTerminationRequiresUserConfirmation, start, terminate
free, register, register, run, runPartAfterCore, setStatusInformation, setThreadController
addThreadDoneListener, fireThreadDone, fireThreadDone, getEventMessage, getFinalState, idle, logDebug, logError, logError, logInfo, setEventErrorMessage, setEventMessage, setFinalState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addThreadDoneListener, runCore, setThreadController, start
getName
protected static final double SQUARE_ROOT_OF_TWO
protected java.awt.Font defaultFont
public ProportionalListReportDirectly(SessionResources sessionResources)
public java.lang.String format(double doubleValue)
protected void setOrientationLandscape()
protected void setCopies(int copies)
protected void setMainTray()
protected void setTray(javax.print.attribute.standard.MediaTray mediaTray)
public void setYStartPosition(int yStartPosition)
yStartPosition
- public void setPrinterJob(java.awt.print.PrinterJob printerJob)
public abstract java.lang.String getPrinterJobName()
public void setPreviewer(Previewer previewer)
previewer
- the previewer to be used to preview printout.public void setConstantItems(boolean constantItems)
constantItems
- whether or not the following items should be printed on each pagepublic void setOnPageInfo()
public void setPageInfoPosition(java.awt.Point pageInfoPosition)
pageInfoPosition
- the ending position of the page informationpublic void setDefaultProportion(java.util.Vector<java.lang.Integer> columnProportion)
columnProportion
- the proportion usually to be usedpublic void setDefaultProportion(int[] columnProportion)
setDefaultProportion
in interface ProportionalListReport
columnProportion
- the proportion usually to be usedpublic void setAlignment(int columnIndex, int alignType)
columnIndex
- the index of the regarded columnalignType
- the align type of the specified columnProportionalListReport.ALIGN_LEFT
,
ProportionalListReport.ALIGN_CENTER
,
ProportionalListReport.ALIGN_RIGHT
protected void setFont(java.awt.Font newFont)
newFont
- the new font to become current fontprotected void resetFont()
protected java.awt.Font getDefaultFont()
protected PrintablePage.PrintPosition add(java.lang.String paragraph)
paragraph
- the paragraph to be printedpublic void addTitle(java.lang.String title)
title
- the title to be addedpublic PrintablePage.PrintPosition addTableHeader(java.util.Vector<java.lang.String> headerValues)
headerValues
- the table header valuesprotected PrintablePage.PrintPosition addTableHeader(java.lang.String[] headerValues)
headerValues
- the table header valuesprotected void addHLine()
public PrintablePage.PrintPosition add(java.util.Vector<java.lang.String> columnValues)
columnValues
- values of the current row.public PrintablePage.PrintPosition add(java.lang.String[] columnValues)
columnValues
- values of the current row.protected PrintablePage.PrintPosition add(java.lang.String[] columnValues, int numberOfFollowingLinesToKeepTogether)
columnValues
- values of the current row.numberOfFollowingLinesToKeepTogether
- the number of following lines to keep togetherprotected PrintablePage.PrintPosition addEmptyLine()
public PrintablePage.PrintPosition addEmptyLine(double factor)
factor
- may be 2 lines or 1/2 line ...protected PrintablePage.PrintPosition getCurrentPrintPosition()
protected void pageFeed()
protected void fillPageHeader()
public void setPrinter(java.lang.String printerName)
printerName
- public void setPrinter(java.lang.String printerName, java.lang.String trayName)
printerName
- public void runCore(DataObjectConstructionDetails docd) throws java.lang.Exception
CoreRunnable
runCore
in interface CoreRunnable
docd
- the DataObjectConstructionDetails to use - that may differ from session data details.java.lang.Exception
protected java.awt.print.PageFormat getPageFormat(java.awt.print.PrinterJob printerJob)
printerJob
- the given PrinterJobpublic int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
java.awt.print.PrinterException
protected void printFixStuff(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)
graphics
- the context into which the page is drawnpageFormat
- the size and orientation of the page being drawnpageIndex
- the zero based index of the page to be drawnprotected abstract void fillList()
protected void changeFontIfNew(PrintablePage.PrintableItem printableItem, java.awt.Graphics graphics)
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de