com.developmentontheedge.print
Class JPrintableComponent

java.lang.Object
  extended bycom.developmentontheedge.print.LargePageable
      extended bycom.developmentontheedge.print.JPrintableComponent
All Implemented Interfaces:
java.awt.print.Pageable, java.awt.print.Printable

public class JPrintableComponent
extends LargePageable
implements java.awt.print.Printable


Nested Class Summary
 
Nested classes inherited from class com.developmentontheedge.print.LargePageable
LargePageable.TranslatedPrintable
 
Field Summary
 
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
JPrintableComponent(javax.swing.JComponent c, java.awt.print.PageFormat format)
          Create a Pageable that can print a Swing JComponent over multiple pages.
 
Method Summary
 void preview(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)
           
 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 com.developmentontheedge.print.LargePageable
getNumberOfPages, getPageFormat, getPageFormat, getPrintable, setPageFormat, setPrintable, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPrintableComponent

public JPrintableComponent(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.
Method Detail

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
Throws:
java.awt.print.PrinterException

preview

public void preview(java.awt.Graphics graphics,
                    java.awt.print.PageFormat pageFormat,
                    int pageIndex)
             throws java.awt.print.PrinterException
Throws:
java.awt.print.PrinterException


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.