com.dynalivery.saffron.client
Class SaffronLanguageInputSource
java.lang.Object
com.dynalivery.saffron.client.SaffronLanguageInputSource
- All Implemented Interfaces:
- SaffronInputSource
- public class SaffronLanguageInputSource
- extends java.lang.Object
- implements SaffronInputSource
This class defines a Saffron language input source for an export operation
|
Method Summary |
int |
getLanguageType()
|
java.awt.print.PageFormat |
getPageFormat(int pageIndex)
Get a PageFormat representing the dimensions of a given page |
java.io.InputStream |
getStream()
|
boolean |
isPageFormatAvailable(int pageIndex)
Indicates whether the PageFormat for the specified page is known. |
java.lang.String |
toString()
Creates display string for this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
pageFormat
protected java.awt.print.PageFormat pageFormat
isPageFormatAvailable
protected boolean isPageFormatAvailable
inputStream
protected java.io.InputStream inputStream
languageType
protected int languageType
SaffronLanguageInputSource
public SaffronLanguageInputSource(java.awt.print.PageFormat pageFormat,
boolean isPageFormatAvailable,
java.io.InputStream inputStream,
int languageType)
throws InvalidParameterException
SaffronLanguageInputSource
public SaffronLanguageInputSource(int languageType,
java.io.InputStream inputStream)
throws InvalidParameterException
SaffronLanguageInputSource
public SaffronLanguageInputSource(int languageType,
java.lang.String filename)
throws java.io.FileNotFoundException,
InvalidParameterException
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
getStream
public java.io.InputStream getStream()
getLanguageType
public int getLanguageType()
toString
public java.lang.String toString()
- Creates display string for this object. Must be overridden in subclasses.