JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page.awt
Class JCAWTScreenPrinter

java.lang.Object
  |
  +--com.klg.jclass.page.JCPrinter
        |
        +--com.klg.jclass.page.awt.JCAWTScreenPrinter

public class JCAWTScreenPrinter
extends JCPrinter

Implements the PrinterDriver interface. This class creates a component on which pages will be drawn. Before flowing or drawing can be performed on this component, it must be realized so its graphics can be used.


Field Summary
protected  JComponent component
           
 
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
JCAWTScreenPrinter()
          Constructor.
 
Method Summary
 void beginPage(Rectangle2D pageSize, int pageNumber)
          PS Document Structuring Conventions comments, page orientation, etc.
 void closeDocument(Rectangle2D pageSize)
          Document completion (for example, PDF cross-reference table and trailer).
 void dispose()
           
 void endPage(Rectangle2D pageSize)
          Page bounding box.
 JComponent getComponent()
          Returns the component on which the pages should be written.
 Graphics getGraphics()
          Overrides super class's getGraphics.
 boolean isImageScalable()
          Returns false since images sent to AWT Screen Printer are pre-scaled.
 void openDocument(Rectangle2D pageSize)
          Any required initialisation (for example, PostScript document headers, etc.).
protected  void setGraphics(Graphics2D g)
           
 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

component

protected JComponent component
Constructor Detail

JCAWTScreenPrinter

public JCAWTScreenPrinter()
Constructor.
Note: Before flowing to this document you must "realize" this component. That is, it must be displayed so it has a valid graphics context.

Method Detail

getComponent

public JComponent getComponent()
Returns the component on which the pages should be written.

Returns:
component on which the pages should be written

getGraphics

public Graphics getGraphics()
Overrides super class's getGraphics.

Overrides:
getGraphics in class JCPrinter
Returns:

setup

public void setup()
Creates default styles, any other one-time initialization. Builds font families from available fonts.

Specified by:
setup in class JCPrinter

isImageScalable

public boolean isImageScalable()
Returns false since images sent to AWT Screen Printer are pre-scaled.

Specified by:
isImageScalable in class JCPrinter
Returns:
false since images sent to AWT Screen Printer are pre-scaled

openDocument

public void openDocument(Rectangle2D pageSize)
Any required initialisation (for example, PostScript document headers, etc.).

Overrides:
openDocument in class JCPrinter
Parameters:
pageSize -

closeDocument

public void closeDocument(Rectangle2D pageSize)
Document completion (for example, PDF cross-reference table and trailer).

Overrides:
closeDocument in class JCPrinter
Parameters:
pageSize -

beginPage

public void beginPage(Rectangle2D pageSize,
                      int pageNumber)
PS Document Structuring Conventions comments, page orientation, etc.

Overrides:
beginPage in class JCPrinter
Parameters:
pageSize -
pageNumber -

endPage

public void endPage(Rectangle2D pageSize)
Page bounding box.

Overrides:
endPage in class JCPrinter
Parameters:
pageSize -

setGraphics

protected void setGraphics(Graphics2D g)

dispose

public void dispose()

Copyright © 2004 Quest Software Inc..
All rights reserved.