|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.allcolor.yahp.cl.converter.swing.CTextPanePrinter
public class CTextPanePrinter
This class permits to paint a JTextPane in a Graphics2D object.
Field Summary | |
---|---|
private java.util.List |
alreadyPainted
DOCUMENT ME! |
(package private) boolean |
hasPaint
|
private double |
offsetY
current page Y offset |
private javax.swing.JTextPane |
panel
The panel to print |
Constructor Summary | |
---|---|
CTextPanePrinter(javax.swing.JTextPane pane)
Creates a new CTextPanePrinter object. |
Method Summary | |
---|---|
int |
countPages(IHtmlToPdfTransformer.PageSize pageFormat)
DOCUMENT ME! |
private void |
fakePaintView(java.awt.Graphics2D graphics2D,
java.awt.Shape allocation,
javax.swing.text.View view,
java.awt.Rectangle clipRectangle,
double scale,
double miny)
|
private void |
paint(javax.swing.text.View view,
java.awt.Graphics2D graphics2D,
java.awt.Shape allocation)
Call the paint or realPaint depending on the element type |
private void |
paintView(java.awt.Graphics2D graphics2D,
java.awt.Shape allocation,
javax.swing.text.View view,
java.awt.Rectangle clipRectangle,
double scale,
double miny)
Paint the views recursively |
void |
print(java.awt.Graphics2D graphics2D,
IHtmlToPdfTransformer.PageSize pageFormat,
int pageIndex)
Print the content of the JTextPane in a page |
void |
printAll(java.awt.Graphics2D graphics2D,
IHtmlToPdfTransformer.PageSize pageFormat)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.JTextPane panel
private final java.util.List alreadyPainted
private double offsetY
boolean hasPaint
Constructor Detail |
---|
public CTextPanePrinter(javax.swing.JTextPane pane)
pane
- The JTextPane to printMethod Detail |
---|
public int countPages(IHtmlToPdfTransformer.PageSize pageFormat)
pageFormat
- DOCUMENT ME!
public void print(java.awt.Graphics2D graphics2D, IHtmlToPdfTransformer.PageSize pageFormat, int pageIndex)
graphics2D
- The Graphics2D objectpageFormat
- The page sizepageIndex
- The page to print.public void printAll(java.awt.Graphics2D graphics2D, IHtmlToPdfTransformer.PageSize pageFormat)
private void paint(javax.swing.text.View view, java.awt.Graphics2D graphics2D, java.awt.Shape allocation)
view
- the view object to paintgraphics2D
- the graphics2D objectallocation
- the shape to paint inprivate void fakePaintView(java.awt.Graphics2D graphics2D, java.awt.Shape allocation, javax.swing.text.View view, java.awt.Rectangle clipRectangle, double scale, double miny)
private void paintView(java.awt.Graphics2D graphics2D, java.awt.Shape allocation, javax.swing.text.View view, java.awt.Rectangle clipRectangle, double scale, double miny)
graphics2D
- The graphics2D objectallocation
- shape to paint inview
- view to paintclipRectangle
- DOCUMENT ME!scale
- DOCUMENT ME!miny
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |