|
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
Deprecated, not for public usage. Interface methods for document handling.
Field Summary | |
protected TreeModel |
bookmarkTree
The Bookmark Tree used for this output -- usually a DefaultTreeModel class. |
protected boolean |
bookmarkTreeVisible
The visibility of the Bookmark Tree. |
protected boolean |
collate
Are multiple copies interleaved (as opposed to each page copied in turn). |
protected boolean |
compressed
True if output should be compressed. |
protected int |
endPage
The last page which will be printed (-1 indicates last available). |
protected Graphics2D |
graphics
The graphics which represent the output drawable for this printer. |
int |
imageNumber
The number of the next image created on a page. |
protected boolean |
isDocOpen
Flags if the document is open for printing. |
protected int |
numCopies
The number of copies of each page printed. |
protected int |
orientation
The orientation of the current page printing. |
protected OutputStream |
os
Current output stream on which "printed" graphics are written. |
protected int |
pageCount
The number of pages which have been printed. |
protected com.klg.jclass.util.JCListenerList |
printListeners
The listeners for flow events. |
protected boolean |
reverseOrder
Are pages output last-page-first. |
protected int |
startPage
The first page which will be printed (zero-based). |
Constructor Summary | |
JCPrinter()
Constructor |
Method Summary | |
void |
addPrintListener(com.klg.jclass.page.JCPrintListener listener)
Adds a listener for print events. |
void |
beginPage(Rectangle2D pageSize,
int pageNumber)
Starts a page, since there may be printer-specific actions to take (for example, PS Document Structuring Conventions comments, page orientation...). |
void |
closeDocument(Rectangle2D pageSize)
Document completion (for example, PDF cross-ref table and trailer) and event notification. |
void |
endPage(Rectangle2D pageSize)
Ends a page (PDF Page bounding box...) and sends event notification. |
boolean |
getCollate()
Gets the collate flag. |
List |
getFontFamilies()
Gets a list of available font families. |
Graphics |
getGraphics()
Gets the graphics context used by this printer. |
int |
getNumCopies()
Gets number of copies. |
protected int |
getOrientation()
Gets the page orientation. |
int |
getOutputPageEnd()
Gets end page in the range to print. |
int |
getOutputPageStart()
Gets the first page in the range to print. |
OutputStream |
getOutputStream()
Gets output stream. |
boolean |
getReverseOrder()
Gets reverse order |
boolean |
isBookmarkTreeVisible()
Not supported in PageLayout. |
boolean |
isCompressed()
Gets the value of the Compressed property, which determines whether
the content of pages will be compressed. |
boolean |
isDocumentOpen()
Checks if the document is open |
abstract boolean |
isImageScalable()
Returns true if printer does own image scaling (as in PDF, PostScript and
PCL) or false if we need to tell the java Image class to scale itself. |
protected boolean |
isLandscape(double width,
double height)
Is this a landscape page? The method returns true if the width
is greater than the height. |
void |
openDocument(Rectangle2D pageSize)
Any required initialization and event notification. |
protected void |
output(byte oneByte)
Write the specified byte to the output stream. |
protected void |
output(byte[] bytes)
Write the given bytes to the output stream. |
protected void |
output(byte[] bytes,
int off,
int len)
Write the specified bytes to the output stream. |
protected void |
output(String string)
Writes the given String to the output stream, adjusting as necessary. |
void |
removePrintListener(com.klg.jclass.page.JCPrintListener listener)
Removes a listener for print events. |
void |
setCollate(boolean collate)
Sets the collate flag. |
void |
setCompressed(boolean compressed)
Sets the value of the Compressed property, which determines whether
the content of pages will be compressed. |
void |
setNumCopies(int numCopies)
Sets number of copies. |
protected void |
setOrientation(int orient)
Sets the orientation of the page to be printed. |
void |
setOutputPageEnd(int endPage)
Sets end page in the range to print. |
void |
setOutputPageStart(int startPage)
Sets the first page in the range to print. |
void |
setOutputStream(OutputStream os)
Sets output stream for PostScript, PDF and PCL printers. |
void |
setReverseOrder(boolean reverseOrder)
Sets reverse order |
abstract void |
setup()
Creates default styles, any other one-time initialization. |
boolean |
supportsHyperlinks()
Returns True if this printer supports hyperlinks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Graphics2D graphics
protected OutputStream os
protected boolean collate
protected boolean reverseOrder
protected int numCopies
protected int endPage
protected int startPage
protected int pageCount
protected com.klg.jclass.util.JCListenerList printListeners
protected boolean isDocOpen
protected int orientation
protected boolean compressed
True
if output should be compressed.
protected TreeModel bookmarkTree
DefaultTreeModel
class.
protected boolean bookmarkTreeVisible
public int imageNumber
Constructor Detail |
public JCPrinter()
Method Detail |
public abstract void setup()
public abstract boolean isImageScalable()
true
if printer does own image scaling (as in PDF, PostScript and
PCL) or false
if we need to tell the java Image class to scale itself.
public void openDocument(Rectangle2D pageSize)
pageSize
- a rectangle describing the size and location of the pagepublic void closeDocument(Rectangle2D pageSize)
pageSize
- a rectangle describing the size and location of the pagepublic void beginPage(Rectangle2D pageSize, int pageNumber)
pageSize
- a rectangle describing the size and location of the pagepageNumber
- the number of the new pagepublic void endPage(Rectangle2D pageSize)
pageSize
- a rectangle describing the size and location of the pagepublic boolean isDocumentOpen()
True
if the document has been opened for printingpublic void setCompressed(boolean compressed)
Compressed
property, which determines whether
the content of pages will be compressed. true
, the functionality of this property depends upon the existence
of compression in the output format.
compressed
- true
if compression should be performed; false
otherwisepublic boolean isCompressed()
Compressed
property, which determines whether
the content of pages will be compressed. true
, the functionality of this property depends upon the existence
of compression in the output format.
true
if compression will be performed; false
otherwisepublic void setCollate(boolean collate)
collate
- True
means that the complete document is output
for each copypublic boolean getCollate()
True
means that the complete document is output
for each copypublic void setNumCopies(int numCopies)
numCopies
- integer indicating the number of copies to be printedpublic int getNumCopies()
public void setOutputPageEnd(int endPage)
endPage
- an int the last page to printpublic int getOutputPageEnd()
public void setOutputPageStart(int startPage)
startPage
- an int, the first page in the range to printpublic int getOutputPageStart()
public void setOutputStream(OutputStream os)
os
- the stream to which output will be writtenpublic OutputStream getOutputStream()
public void setReverseOrder(boolean reverseOrder)
reverseOrder
- True
if pages are to be printed
in reverse orderpublic boolean getReverseOrder()
True
if pages are to be printed in reverse order,
false
otherwisepublic List getFontFamilies()
public boolean isBookmarkTreeVisible()
true
means that the Bookmark tab will automatically expand when the
document is opened by the viewer. A value of false
(the default)
means that the Bookmark tab will be existent, but not expanded until
the user chooses to expand it.
public boolean supportsHyperlinks()
True
if this printer supports hyperlinks. Should be overridden
by printer subclasses that wish to support hyperlinks.
True
if printer supports hyperlinks; false
otherwisepublic Graphics getGraphics()
protected void setOrientation(int orient)
JCPage.AUTOMATIC
(to be determined by the page size), JCPage.PORTRAIT
,
or JCPage.LANDSCAPE
.
orient
- the orientation of this pageprotected int getOrientation()
JCPage.AUTOMATIC
(to be determined by the page size), JCPage.PORTRAIT
, or
JCPage.LANDSCAPE
.
protected boolean isLandscape(double width, double height)
true
if the width
is greater than the height.
protected void output(String string)
string
- the commands or data to be written to the output streamprotected void output(byte[] bytes)
protected void output(byte[] bytes, int off, int len)
protected void output(byte oneByte)
public void addPrintListener(com.klg.jclass.page.JCPrintListener listener)
JCPrintEvent
,
JCPrintListener
public void removePrintListener(com.klg.jclass.page.JCPrintListener listener)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |