edu.ucsb.nceas.morpho.plugins.printer
Class PrintFrame.PrintableComponent
java.lang.Object
edu.ucsb.nceas.morpho.plugins.printer.PrintFrame.PageableComponent
edu.ucsb.nceas.morpho.plugins.printer.PrintFrame.PrintableComponent
- All Implemented Interfaces:
- java.awt.print.Pageable, java.awt.print.Printable
- Enclosing class:
- PrintFrame
- public class PrintFrame.PrintableComponent
- extends PrintFrame.PageableComponent
- implements java.awt.print.Printable
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 |
PrintFrame.PrintableComponent(javax.swing.JComponent c,
java.awt.print.PageFormat format,
java.awt.Rectangle bounds)
Create a Pageable that can print a Swing JComponent. |
Method Summary |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
|
void |
scaleToFit(boolean useSymmetricScaling)
|
void |
scaleToFitX()
|
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 |
PrintFrame.PrintableComponent
public PrintFrame.PrintableComponent(javax.swing.JComponent c,
java.awt.print.PageFormat format,
java.awt.Rectangle bounds)
- Create a Pageable that can print a Swing JComponent.
- 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)
scaleToFit
public void scaleToFit(boolean useSymmetricScaling)
scaleToFitX
public void scaleToFitX()
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
Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.