|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.page.JCPrinter | +--com.klg.jclass.page.html.JCHTMLPrinter
Implements the PrinterDriver
interface.
Field Summary | |
protected String |
directoryName
The name of a directory to which image files can be written. |
Fields inherited from class com.klg.jclass.page.JCPrinter |
bookmarkTree, bookmarkTreeVisible, collate, compressed, endPage, graphics, imageNumber, isDocOpen, numCopies, orientation, os, pageCount, printListeners, reverseOrder, startPage |
Constructor Summary | |
JCHTMLPrinter(OutputStream os)
Creates an HTML printer given an OutputStream . |
|
JCHTMLPrinter(OutputStream os,
com.klg.jclass.page.FontParser parser,
String jarLocation,
String fileExtension,
String fontMapFileName)
Constructor. |
|
JCHTMLPrinter(OutputStream os,
String dir)
Creates an HTML printer given an OutputStream and an image directory. |
Method Summary | |
void |
beginPage(Rectangle2D pageSize,
int pageNumber)
Outputs the code necessary to start a page (NO-OP in HTML). |
void |
closeDocument(Rectangle2D pageSize)
Completes the document. |
void |
endPage(Rectangle2D pageSize)
Ends the page (NO-OP in HTML). |
Graphics |
getGraphics()
Gets a Graphics that draws to this printer. |
String |
getImageDirectory()
Gets the image directory name. |
boolean |
isImageScalable()
Returns false since images sent to HTML printer are pre-scaled. |
void |
openDocument(Rectangle2D pageSize)
Initializes the document (standard document headers, etc.). |
void |
setImageDirectory(String dir)
Sets the image directory name. |
void |
setup()
Creates default styles, any other one-time initialization. |
Methods inherited from class com.klg.jclass.page.JCPrinter |
addPrintListener, getCollate, getFontFamilies, getNumCopies, getOrientation, getOutputPageEnd, getOutputPageStart, getOutputStream, getReverseOrder, isBookmarkTreeVisible, isCompressed, isDocumentOpen, isLandscape, output, output, output, output, removePrintListener, setCollate, setCompressed, setNumCopies, setOrientation, setOutputPageEnd, setOutputPageStart, setOutputStream, setReverseOrder, supportsHyperlinks |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String directoryName
Constructor Detail |
public JCHTMLPrinter(OutputStream os)
OutputStream
.
os
- an OutputStream
to write the HTML code topublic JCHTMLPrinter(OutputStream os, String dir)
OutputStream
and an image directory.
os
- an OutputStream
to write the HTML code todir
- the name of a directory to use for imagespublic JCHTMLPrinter(OutputStream os, com.klg.jclass.page.FontParser parser, String jarLocation, String fileExtension, String fontMapFileName)
JCPrinter p = new JCHTMLPrinter( someOutputStream, // the output stream new com.klg.jclass.page.adobe.postscript.AFMParser(), // the parser "/com/klg/jclass/page/adobe/fonts.jar", // jar location ".afm", // file extension "com.klg.jclass.page.adobe.JCAdobeFontMap");
os
- the OutputStream
to which formatted output should be sentparser
- the FontParser
which creates fonts from afm filesjarLocation
- the location of the jar containing afm files relative
to the class loader including the name of the jar filefileExtension
- the parser will turn files contained in "jarLocation"
ending with this extension into fontsfontMapFileName
- the user fontmap file; a file containing mappings
between font names and their aliasesMethod Detail |
public void setup()
setup
in class JCPrinter
public boolean isImageScalable()
false
since images sent to HTML printer are pre-scaled.
isImageScalable
in class JCPrinter
false
since images sent to HTML printer are pre-scaledpublic void openDocument(Rectangle2D pageSize)
openDocument
in class JCPrinter
pageSize
- the notional size of a page of the documentpublic void closeDocument(Rectangle2D pageSize)
closeDocument
in class JCPrinter
pageSize
- the notional size of a page of the documentpublic void beginPage(Rectangle2D pageSize, int pageNumber)
beginPage
in class JCPrinter
pageSize
- the notional size of a page of the documentpageNumber
- public void endPage(Rectangle2D pageSize)
endPage
in class JCPrinter
pageSize
- the notional size of a page of the documentpublic Graphics getGraphics()
getGraphics
in class JCPrinter
public String getImageDirectory()
public void setImageDirectory(String dir)
dir
- the name of the image directory
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |