public class ChatPrinter
extends java.lang.Object
implements java.awt.print.Printable
Constructor and Description |
---|
ChatPrinter()
The constructor initializes the pFormat and PJob variables.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.text.Document |
getDocument()
Method to get the current Document.
|
boolean |
getScaleWidthToFit()
Method to get the current choice the width scaling option.
|
void |
pageDialog()
pageDialog() displays a page setup dialog.
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
may be called to render a page more than once, each page is painted in
order.
|
void |
print(javax.swing.text.html.HTMLDocument htmlDocument)
print(HTMLDocument) is called to set an HTMLDocument for printing.
|
void |
print(javax.swing.JEditorPane jedPane)
print(JEditorPane) prints a Document contained within a JEditorPane.
|
void |
print(javax.swing.text.PlainDocument plainDocument)
print(PlainDocument) is called to set a PlainDocument for printing.
|
void |
setDocument(javax.swing.text.html.HTMLDocument htmlDocument)
Method to set an HTMLDocument as the Document to print.
|
void |
setDocument(javax.swing.JEditorPane jedPane)
Method to set the Document to print as the one contained in a JEditorPane.
|
void |
setDocument(javax.swing.text.PlainDocument plainDocument)
Method to set a PlainDocument as the Document to print.
|
void |
setScaleWidthToFit(boolean scaleWidth)
Method to set the current choice of the width scaling option.
|
public ChatPrinter()
public javax.swing.text.Document getDocument()
public boolean getScaleWidthToFit()
public void pageDialog()
public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)
print
in interface java.awt.print.Printable
graphics
- the Graphic Object used to print.pageFormat
- the page formatter.pageIndex
- the page to print.public void print(javax.swing.text.html.HTMLDocument htmlDocument)
htmlDocument
- the HtmlDocument to print.public void print(javax.swing.JEditorPane jedPane)
jedPane
- the JEditorPane to print.public void print(javax.swing.text.PlainDocument plainDocument)
plainDocument
- the PlainDocument to print.public void setDocument(javax.swing.text.html.HTMLDocument htmlDocument)
htmlDocument
- sets the html document.public void setDocument(javax.swing.JEditorPane jedPane)
jedPane
- the JEditorPane document container.public void setDocument(javax.swing.text.PlainDocument plainDocument)
plainDocument
- the PlainDocument to use.public void setScaleWidthToFit(boolean scaleWidth)
scaleWidth
- the width to scale to.