java.lang.Object | |
↳ | sun.swing.text.TextComponentPrintable |
An implementation of Printable
to print JTextComponent
with
the header and footer.
The implementation creates a new JTextComponent
(printShell
)
to print the content using the Document
, EditorKit
and
rendering-affecting properties from the original JTextComponent
.
printShell
is laid out on the first print
invocation.
This class can be used on any thread. Part of the implementation is executed on the EDT though.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the number of pages in this printable.
| |||||||||||
Returns
TextComponentPrintable to print textComponent . | |||||||||||
See Printable.print for the API description.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Returns the number of pages in this printable.
This number is defined only after print
returns NO_SUCH_PAGE.
Returns TextComponentPrintable
to print textComponent
.
textComponent | JTextComponent to print |
---|---|
headerFormat | the page header, or null for none |
footerFormat | the page footer, or null for none |
TextComponentPrintable
to print textComponent
See Printable.print for the API description. There are two parts in the implementation. First part (print) is to be called on the printing thread. Second part (printOnEDT) is to be called on the EDT only. print triggers printOnEDT
graphics | the context into which the page is drawn |
---|---|
pf | the size and orientation of the page being drawn |
pageIndex | the zero based index of the page to be drawn |
pageIndex
specifies a
non-existent page.PrinterException |
---|