com.dynalivery.saffron.client
Interface SaffronInputSource

All Known Implementing Classes:
SaffronLanguageInputSource, SaffronPrintableInputSource, SplittableSaffronInputSource

public interface SaffronInputSource

This classes defines the input source for a Saffron export operation


Method Summary
 java.awt.print.PageFormat getPageFormat(int pageIndex)
          Get a PageFormat representing the dimensions of a given page
 boolean isPageFormatAvailable(int pageIndex)
          Indicates whether the PageFormat for the specified page is known.
 

Method Detail

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
Get a PageFormat representing the dimensions of a given page

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.

Parameters:
pageIndex - int
Returns:
boolean