erkka
Class JComponentVista
java.lang.Object
|
+--erkka.Vista
|
+--erkka.JComponentVista
- All Implemented Interfaces:
- java.awt.print.Pageable, java.awt.print.Printable
- public class JComponentVista
- extends Vista
- implements java.awt.print.Printable
Title: Erkka-Projekti
Create a Pageable that can print a
Swing JComponent over multiple pages.
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Fields inherited from interface java.awt.print.Pageable |
UNKNOWN_NUMBER_OF_PAGES |
Constructor Summary |
JComponentVista(javax.swing.JComponent c,
java.awt.print.PageFormat format)
Create a Pageable that can print a
Swing JComponent over multiple pages. |
Method Summary |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
|
void |
scaleToFit(boolean useSymmetricScaling)
|
void |
scaleToFitX()
|
void |
scaleToFitY()
|
protected void |
setComponent(javax.swing.JComponent c)
|
protected void |
setScale(double scaleX,
double scaleY)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JComponentVista
public JComponentVista(javax.swing.JComponent c,
java.awt.print.PageFormat format)
- Create a Pageable that can print a
Swing JComponent over multiple pages.
- Parameters:
c
- The swing JComponent to be printed.format
- The size of the pages over which
the componenent will be printed.
setComponent
protected void setComponent(javax.swing.JComponent c)
setScale
protected void setScale(double scaleX,
double scaleY)
scaleToFitX
public void scaleToFitX()
scaleToFitY
public void scaleToFitY()
scaleToFit
public void scaleToFit(boolean useSymmetricScaling)
print
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
- Specified by:
print
in interface java.awt.print.Printable
java.awt.print.PrinterException