com.tensegrity.gui.swing.print
Class SwingPrintContext

java.lang.Object
  extended bycom.tensegrity.gui.swing.print.SwingPrintContext
All Implemented Interfaces:
PrintContext

public class SwingPrintContext
extends java.lang.Object
implements PrintContext

The SwingPrintContext class defines print settings to use inside an AWT/Swing environment. Furthermore it provides createBook methods to create a TableBook instance from a given VisualGraphView object.

Version:
$Id: SwingPrintContext.java,v 1.4 2005/11/08 10:26:42 BurkhardWick Exp $
Author:
Arnd Houben

Constructor Summary
SwingPrintContext()
          Empty default constructor
 
Method Summary
 java.awt.print.Book createBook(BasePageFormat pageFormat, VisualGraphView view)
          Method createBook creates a book according to current screen resolution.
 java.awt.print.Book createBook(BasePageFormat pageFormat, VisualGraphView view, boolean drawScissorBorder)
          Method createBook creates a book according to current screen resolution.
 java.awt.print.Book createBook(BasePageFormat pageFormat, VisualGraphView view, boolean drawScissorBorder, boolean forPrint)
          Method createBook creates a book according to current screen resolution.
 BasePageFormat getPageFormat(BasePageFormat bpf)
          Returns a new BasePageFormat instance based on the given BasePageFormat object.
 BasePageFormat getPageFormat(java.lang.String paperName)
          Returns a BasePageFormat instance specified by the given paper name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingPrintContext

public SwingPrintContext()
Empty default constructor

Method Detail

getPageFormat

public BasePageFormat getPageFormat(java.lang.String paperName)
Description copied from interface: PrintContext
Returns a BasePageFormat instance specified by the given paper name.

Specified by:
getPageFormat in interface PrintContext
Parameters:
paperName - a name which marks a page format
Returns:
an instance of the corresponding BasePageFormat

getPageFormat

public BasePageFormat getPageFormat(BasePageFormat bpf)
Description copied from interface: PrintContext
Returns a new BasePageFormat instance based on the given BasePageFormat object.

Specified by:
getPageFormat in interface PrintContext
Parameters:
bpf - a BasePageFormat
Returns:
a new BasePageFormat instance based on the specified parameter

createBook

public final java.awt.print.Book createBook(BasePageFormat pageFormat,
                                            VisualGraphView view)
Method createBook creates a book according to current screen resolution.

Parameters:
pageFormat - The PageFormat to create the book for,
view - the view which needs to be book'ed.
Returns:
Book the Book for the given view based on the given PageFormat.

createBook

public final java.awt.print.Book createBook(BasePageFormat pageFormat,
                                            VisualGraphView view,
                                            boolean drawScissorBorder)
Method createBook creates a book according to current screen resolution.

Parameters:
pageFormat - The PageFormat to create the book for,
view - the view which needs to be book'ed.
drawScissorBorder - If this is true, the printables will draw the scissor borders
Returns:
Book the Book for the given view based on the given PageFormat.

createBook

public final java.awt.print.Book createBook(BasePageFormat pageFormat,
                                            VisualGraphView view,
                                            boolean drawScissorBorder,
                                            boolean forPrint)
Method createBook creates a book according to current screen resolution.

Parameters:
pageFormat - The PageFormat to create the book for,
view - the view which needs to be book'ed.
drawScissorBorder - If this is true, the printables will draw the scissor borders
forPrint - if true, the book will be used for printing, which means empty pages are removed if the corresponding option is on
Returns:
Book the Book for the given view based on the given PageFormat.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.