com.dynalivery.saffron.client
Class SaffronPrintableInputSource
java.lang.Object
com.dynalivery.saffron.client.SaffronPrintableInputSource
- All Implemented Interfaces:
- SaffronInputSource
- public class SaffronPrintableInputSource
- extends java.lang.Object
- implements SaffronInputSource
This class defines a printable Saffron input source for an export operation
|
Constructor Summary |
SaffronPrintableInputSource(java.awt.print.PageFormat pageFormat,
boolean isPageFormatAvailable,
java.awt.print.Printable printable)
|
|
Method Summary |
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Get a PageFormat representing the dimensions of a given page |
java.awt.print.Printable |
getPrintable()
|
boolean |
isPageFormatAvailable(int pageIndex)
Indicates whether the PageFormat for the specified page is known. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pageFormat
protected java.awt.print.PageFormat pageFormat
isPageFormatAvailable
protected boolean isPageFormatAvailable
printable
protected java.awt.print.Printable printable
SaffronPrintableInputSource
public SaffronPrintableInputSource(java.awt.print.PageFormat pageFormat,
boolean isPageFormatAvailable,
java.awt.print.Printable printable)
getPageFormat
public java.awt.print.PageFormat getPageFormat(int pageIndex)
- Get a PageFormat representing the dimensions of a given page
- Specified by:
getPageFormat in interface SaffronInputSource
- Parameters:
pageIndex - int
Page for which a PageFormat is requested
- Returns:
- If a call to isPageFormatAvailable(pageIndex) would return false
(indicating that the PageFormat for the given page is not available),
then this method returns null. If isPageFormatAvailable(pageIndex)
would return true, then this method either returns a PageFormat
that specifies the dimensions of the specified page or returns null,
indicating that a default page size should be used.
Note that if this method returns null, then the caller may need to
call isPageFormatAvailable(pageIndex) to determine whether this
means that the PageFormat isn't known or that a default should be
used.
isPageFormatAvailable
public boolean isPageFormatAvailable(int pageIndex)
- Indicates whether the PageFormat for the specified page is known.
If this method returns true, then a call to getPageFormat(pageIndex)
must either return a valid PageFormat, or it must return null
indicating that a default PageFormat should be used for the page
refered to by pageIndex; if this method returns false, then a call
to getPageFormat(pageIndex) must return null.
If it is currently legal for the caller to request that the page
indicated by pageIndex be printed, then this method must return true.
For InputSources using the Printable interface, this means that
PageFormat information must be available for the most recently
printed page and the next page to be printed. For InputSources
using the Pageable interface, PageFormat information must always be
available for every page.
- Specified by:
isPageFormatAvailable in interface SaffronInputSource
- Parameters:
pageIndex - int
- Returns:
- boolean
getPrintable
public java.awt.print.Printable getPrintable()