|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.textprinter.TextPrinter
Field Summary | |
char |
blCornerChar
bottom left corner character (for line printing). |
char |
brCornerChar
bottom right corner character (for line printing). |
boolean |
calculateLineSpacing
calculate line spacing based on the number of lines in the page |
boolean |
calculatePitchAndHMI
calculate character size based on the desired number of columns? |
char |
crossLineChar
crossing lines characters |
boolean |
debug
enable debug output |
java.lang.String |
defaultCharSet
printer's default charset |
char |
hbLineChar
horizontal line connected to a vertical line on the bottom |
char |
hLineChar
horizontal line character (for line printing). |
char |
htLineChar
horizontal line connected to a vertical line on the top |
java.lang.String |
linesCharSet
character set used to draw lines. |
boolean |
performCharSetConversion
convert unicode to the printers char set |
char |
tlCornerChar
top left corner character (for line printing). |
char |
trCornerChar
top right corner character (for line printing). |
char |
vLineChar
vertical line character (for line printing). |
char |
vlLineChar
vertical line connected to a horizontal line on the left size |
char |
vrLineChar
vertical line connected to a horizontal line on the right size |
Constructor Summary | |
TextPrinter()
|
Method Summary | |
void |
endJob()
finishes printing job |
int |
getBufferSize()
size of buffer, bytes will be sent to the port only when the buffer is full |
JobProperties |
getDefaultJobProperties()
create default printer job |
TextProperties |
getDefaultTextProperties()
create default text properties |
java.lang.String[] |
getFirstElements(java.lang.String[][] t)
get list of first element in array |
java.util.Enumeration |
getSupportedCharPitch()
get list of supported fonts sizes |
java.lang.String[] |
getSupportedCharSets()
get list of supported char sets |
java.util.Enumeration |
getSupportedFonts()
get list of supported fonts |
java.util.Enumeration |
getSupportedInterspaing()
get list of supported interspacing |
void |
newLine()
new line |
void |
newPage()
new page |
void |
printArray(java.lang.String[] t)
print array in standard output |
void |
printHorizontalLine(int row,
int col1,
int col2)
print a horizontal line |
void |
printRectangle(int x1,
int y1,
int x2,
int y2)
print a rectangle. |
void |
printString(java.lang.String s)
print at the current position using the default text properties object |
void |
printString(java.lang.String s,
java.awt.Font font)
print at the current position using a java.awt.Font as TextProperties substitute |
void |
printString(java.lang.String s,
int row,
int col,
java.awt.Font font)
print at the given position using a java.awt.Font as TextProperties substitute |
void |
printString(java.lang.String s,
int row,
int col,
TextProperties t)
print at the given position using the text properties object |
void |
printString(java.lang.String s,
TextProperties t)
print at the current position using the text properties object |
void |
printVerticalLine(int col,
int row1,
int row2)
print a vertical line |
void |
setBufferSize(int s)
size of buffer, bytes will be sent to the port only when the buffer is full |
void |
setLFafterCR(boolean b)
Some printers need a line feed after every carriage return, other don't |
void |
startJob(PrinterPort p,
JobProperties prop)
start printing job |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public char hLineChar
public char vLineChar
public char vrLineChar
public char vlLineChar
public char htLineChar
public char hbLineChar
public char crossLineChar
public char tlCornerChar
public char trCornerChar
public char blCornerChar
public char brCornerChar
public java.lang.String linesCharSet
public boolean performCharSetConversion
public java.lang.String defaultCharSet
public boolean debug
public boolean calculatePitchAndHMI
public boolean calculateLineSpacing
Constructor Detail |
public TextPrinter()
Method Detail |
public void setBufferSize(int s)
public int getBufferSize()
public void setLFafterCR(boolean b)
public void printString(java.lang.String s, int row, int col, TextProperties t)
public void printString(java.lang.String s, int row, int col, java.awt.Font font)
public void newLine() throws TextPrinterException
TextPrinterException
public void newPage() throws TextPrinterException
TextPrinterException
public void printHorizontalLine(int row, int col1, int col2)
public void printVerticalLine(int col, int row1, int row2)
public void printRectangle(int x1, int y1, int x2, int y2)
public void printString(java.lang.String s) throws TextPrinterException
TextPrinterException
public void printString(java.lang.String s, TextProperties t) throws TextPrinterException
TextPrinterException
public void printString(java.lang.String s, java.awt.Font font) throws TextPrinterException
TextPrinterException
public void startJob(PrinterPort p, JobProperties prop) throws TextPrinterException
TextPrinterException
public void endJob() throws TextPrinterException
TextPrinterException
public java.lang.String[] getSupportedCharSets()
public java.lang.String[] getFirstElements(java.lang.String[][] t)
public java.util.Enumeration getSupportedFonts()
public java.util.Enumeration getSupportedCharPitch()
public java.util.Enumeration getSupportedInterspaing()
public void printArray(java.lang.String[] t)
public JobProperties getDefaultJobProperties()
public TextProperties getDefaultTextProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |