|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.viewer.CMBPage
CMBPage contains data for a particular page of a document. Methods on CMBPage provide renderable images of the document page at specified zoom, rotation. Methods are also provided to access the annotations on the page.
There is no public constructor on CMBPage. Use CMBDocument.getPage() to get an instance of CMBPage for a particular page of a document.
Fields inherited from interface com.ibm.mm.viewer.CMBViewerConstants |
DEFAULT_PAGE_NUMBER, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90 |
Method Summary | |
void |
dispose()
Releases document engine resources for the page. |
boolean |
getCanGetImage()
Returns true if a java image of the page can be obtained using getImage(). |
boolean |
getCanWrite()
Returns true if the page can be written. |
CMBDocument |
getDocument()
Returns the document that this page belongs to. |
double |
getHeight()
Returns the height of the page, in inches. |
java.awt.Image |
getImage()
Returns a Java image of the page. |
java.awt.Image |
getImage(double scale)
Returns a scaled Java image of the page. |
double |
getMaxScale()
Returns the maximum scale that pages of the document can be displayed. |
double |
getMinScale()
Returns the minimum scale that this page can be displayed. |
int |
getPageNumber()
Returns the number of this page in the document. |
java.lang.String |
getResourceMimeType(java.lang.String resourceId)
Returns the MIME content type for a resource. |
int |
getRotation()
Returns the rotation for this page. |
double |
getScale()
Returns the actual scale that this page will be displayed. |
double |
getWidth()
Returns the width of the page, in inches. |
java.lang.String |
getWriteMimeType()
Returns the mime type for the format that the page will be written when using CMBPage.write. |
void |
setRotation(int rotation)
Sets the rotation for this page. |
void |
write(java.io.OutputStream outStream)
Writes the page to the output stream. |
void |
write(java.io.OutputStream outStream,
java.lang.String resourcePrefix)
Writes the page to the output stream. |
void |
writeResource(java.io.OutputStream outStream,
java.lang.String resourceId)
Writes the page resource to the output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public CMBDocument getDocument()
public int getRotation()
public void setRotation(int rotation)
rotation
- The rotationpublic int getPageNumber()
public double getWidth()
public double getHeight()
public double getMinScale()
public double getMaxScale()
public double getScale()
public boolean getCanGetImage()
public java.awt.Image getImage() throws CMBDocumentEngineException, java.io.IOException
public java.awt.Image getImage(double scale) throws CMBDocumentEngineException, java.io.IOException
scale
- scale to which the page image is scaledpublic boolean getCanWrite()
public java.lang.String getWriteMimeType()
public void write(java.io.OutputStream outStream) throws CMBDocumentEngineException, java.io.IOException
outStream
- the output stream where the page is written.public void write(java.io.OutputStream outStream, java.lang.String resourcePrefix) throws CMBDocumentEngineException, java.io.IOException
This version of write
has a parameter for identifying
external resources in the generated page. External resources are
other files needed to compose the page. The common case is HTML documents,
where the resources are usually images referenced with relative links in the document.
outStream
- the output stream where the page is written.resourcePrefix
- for HTML generated pages, this is a prefix to be
added to hrefs for embedded images. The application should choose
the prefix in order to gain control for resource requests.public java.lang.String getResourceMimeType(java.lang.String resourceId) throws java.io.IOException
resourceId
- an identifier for the resource. For HTML, this is the suffix following
the resource prefix specified on CMBPage.write
.public void writeResource(java.io.OutputStream outStream, java.lang.String resourceId) throws CMBDocumentEngineException, java.io.IOException
outStream
- the output stream where the page resource is written.resourceId
- an identifier for the resource. For HTML, this is the suffix following
the resource prefix specified on CMBPage.write
.public void dispose()
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |