cynosurex.io
Class TextPrinter
java.lang.Object
cynosurex.io.TextPrinter
- All Implemented Interfaces:
- cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon
public class TextPrinter
- extends java.lang.Object
- implements cynosurex.internal.CommonInterface
This class emulates a text printer and allows any software module
to send text to a printer.
- Version:
- 1.0
- Author:
- Chieh Cheng
Fields inherited from interface cynosurex.internal.CommonInterface |
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
company, email, website |
Method Summary |
static void |
classicPrint(java.awt.Frame parent,
PrinterSetupData setupData,
java.lang.String text)
This method prints the text string to the printer using
the classic typewriter method, allowing tighter control
of line format. |
static void |
universalPrint(java.awt.Frame parent,
PrinterSetupData setupData,
java.lang.String text)
This method prints the text string to the printer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextPrinter
public TextPrinter()
classicPrint
public static void classicPrint(java.awt.Frame parent,
PrinterSetupData setupData,
java.lang.String text)
- This method prints the text string to the printer using
the classic typewriter method, allowing tighter control
of line format.
Carriage-return (\r) literally moves the cursor to the
beginning of the line.
Line-feed (\n) literally moves the cursor down a line.
universalPrint
public static void universalPrint(java.awt.Frame parent,
PrinterSetupData setupData,
java.lang.String text)
- This method prints the text string to the printer.
Whenever carriage-return (\r), line-feed (\n), or carriage-return
line-feed sequence (\r\n) is encountered, it moves the
cursor to the beginning of the line and moves it down a line.