ptolemy.plot
Class PlotBoxPrintable

java.lang.Object
  |
  +--ptolemy.plot.PlotBoxPrintable
All Implemented Interfaces:
java.awt.print.Printable

public class PlotBoxPrintable
extends java.lang.Object
implements java.awt.print.Printable


Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PlotBoxPrintable(PlotBox pb)
           
 
Method Summary
 int print(java.awt.Graphics graphics, java.awt.print.PageFormat format, int index)
          Print the plot to a printer, represented by the specified graphics object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotBoxPrintable

public PlotBoxPrintable(PlotBox pb)
Method Detail

print

public int print(java.awt.Graphics graphics,
                 java.awt.print.PageFormat format,
                 int index)
          throws java.awt.print.PrinterException
Print the plot to a printer, represented by the specified graphics object.
Specified by:
print in interface java.awt.print.Printable
Parameters:
graphics - The context into which the page is drawn.
format - The size and orientation of the page being drawn.
index - The zero based index of the page to be drawn.
Returns:
PAGE_EXISTS if the page is rendered successfully, or NO_SUCH_PAGE if pageIndex specifies a non-existent page.
Throws:
java.awt.print.PrinterException - If the print job is terminated.