Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.virtuosotechnologies.asaph.standardgui
Class PrintHandler  view PrintHandler download PrintHandler.java

java.lang.Object
  extended bycom.virtuosotechnologies.asaph.standardgui.PrintHandler
All Implemented Interfaces:
java.awt.print.Pageable, java.awt.print.Printable

class PrintHandler
extends java.lang.Object
implements java.awt.print.Printable, java.awt.print.Pageable

An object that manages printing.


Field Summary
private  javax.print.attribute.PrintRequestAttributeSet attrs_
           
private  javax.swing.JComponent dialogParent_
           
private  boolean fitOnOnePage_
           
private  PrintRenderHelper flowingRender_
           
private  RenderHelper helper_
           
private  float imageableBottom_
           
private  float imageableHCenter_
           
private  float imageableHeight_
           
private  float imageableLeft_
           
private  float imageableRight_
           
private  float imageableTop_
           
private  float imageableVCenter_
           
private  float imageableWidth_
           
private  com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner_
           
private  boolean okayed_
           
private  java.awt.print.PageFormat pageFormat_
           
private  float pageHeight_
           
private  float pageWidth_
           
private  java.awt.print.PrinterJob printJob_
           
private  float scaleRequired_
           
private static java.awt.Font SMALL_FONT
           
private static java.lang.String STR_PrintHandler_FormatDialog_0InchLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_1InchLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_CancelButton
           
private static java.lang.String STR_PrintHandler_FormatDialog_ColumnsLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_FlowRadio
           
private static java.lang.String STR_PrintHandler_FormatDialog_GutterLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_HalfInchLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_PrintButton
           
private static java.lang.String STR_PrintHandler_FormatDialog_PrintJobName
           
private static java.lang.String STR_PrintHandler_FormatDialog_PromptLabel
           
private static java.lang.String STR_PrintHandler_FormatDialog_ScaleRadio
           
private static java.lang.String STR_PrintHandler_FormatDialog_Title
           
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
private PrintHandler(java.awt.print.PrinterJob job, javax.print.attribute.PrintRequestAttributeSet attrs, RenderHelper renderHelper, javax.swing.JComponent dialogParent, com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner)
          Constructor
 
Method Summary
(package private) static PrintHandler create(java.awt.print.PrinterJob job, javax.print.attribute.PrintRequestAttributeSet attrs, RenderHelper renderHelper, javax.swing.JComponent dialogParent, com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner)
          Pseudo-Constructor
private  boolean displayPrintDialogs()
          Display print dialogs
(package private)  void doPrint()
          Do the actual printing
 int getNumberOfPages()
          Implementation of Pageable
 java.awt.print.PageFormat getPageFormat(int pageIndex)
          Implementation of Pageable
 java.awt.print.Printable getPrintable(int pageIndex)
          Implementation of Pageable
 int print(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageIndex)
          Implementation of Printable
private  void recalcPrintHelper(int columns, int gutterWidth, javax.swing.JLabel gutterWidthLabel, javax.swing.JLabel flowReqLabel)
           
private  void setPageFormat(java.awt.print.PageFormat pageFormat)
           
private  boolean validateFormat()
          Check formatting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_PrintHandler_FormatDialog_Title

private static final java.lang.String STR_PrintHandler_FormatDialog_Title

STR_PrintHandler_FormatDialog_PromptLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_PromptLabel

STR_PrintHandler_FormatDialog_ScaleRadio

private static final java.lang.String STR_PrintHandler_FormatDialog_ScaleRadio

STR_PrintHandler_FormatDialog_FlowRadio

private static final java.lang.String STR_PrintHandler_FormatDialog_FlowRadio

STR_PrintHandler_FormatDialog_ColumnsLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_ColumnsLabel

STR_PrintHandler_FormatDialog_GutterLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_GutterLabel

STR_PrintHandler_FormatDialog_0InchLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_0InchLabel

STR_PrintHandler_FormatDialog_HalfInchLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_HalfInchLabel

STR_PrintHandler_FormatDialog_1InchLabel

private static final java.lang.String STR_PrintHandler_FormatDialog_1InchLabel

STR_PrintHandler_FormatDialog_PrintButton

private static final java.lang.String STR_PrintHandler_FormatDialog_PrintButton

STR_PrintHandler_FormatDialog_CancelButton

private static final java.lang.String STR_PrintHandler_FormatDialog_CancelButton

STR_PrintHandler_FormatDialog_PrintJobName

private static final java.lang.String STR_PrintHandler_FormatDialog_PrintJobName

SMALL_FONT

private static final java.awt.Font SMALL_FONT

helper_

private RenderHelper helper_

dialogParent_

private javax.swing.JComponent dialogParent_

jobRunner_

private com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner_

printJob_

private java.awt.print.PrinterJob printJob_

pageFormat_

private java.awt.print.PageFormat pageFormat_

attrs_

private javax.print.attribute.PrintRequestAttributeSet attrs_

fitOnOnePage_

private boolean fitOnOnePage_

okayed_

private boolean okayed_

flowingRender_

private PrintRenderHelper flowingRender_

scaleRequired_

private float scaleRequired_

pageWidth_

private float pageWidth_

pageHeight_

private float pageHeight_

imageableLeft_

private float imageableLeft_

imageableTop_

private float imageableTop_

imageableRight_

private float imageableRight_

imageableBottom_

private float imageableBottom_

imageableWidth_

private float imageableWidth_

imageableHeight_

private float imageableHeight_

imageableHCenter_

private float imageableHCenter_

imageableVCenter_

private float imageableVCenter_
Constructor Detail

PrintHandler

private PrintHandler(java.awt.print.PrinterJob job,
                     javax.print.attribute.PrintRequestAttributeSet attrs,
                     RenderHelper renderHelper,
                     javax.swing.JComponent dialogParent,
                     com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner)
Constructor

Method Detail

create

static PrintHandler create(java.awt.print.PrinterJob job,
                           javax.print.attribute.PrintRequestAttributeSet attrs,
                           RenderHelper renderHelper,
                           javax.swing.JComponent dialogParent,
                           com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner jobRunner)
Pseudo-Constructor


displayPrintDialogs

private boolean displayPrintDialogs()
Display print dialogs


validateFormat

private boolean validateFormat()
Check formatting


recalcPrintHelper

private void recalcPrintHelper(int columns,
                               int gutterWidth,
                               javax.swing.JLabel gutterWidthLabel,
                               javax.swing.JLabel flowReqLabel)

doPrint

void doPrint()
Do the actual printing


getNumberOfPages

public int getNumberOfPages()
Implementation of Pageable

Specified by:
getNumberOfPages in interface java.awt.print.Pageable

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
Implementation of Pageable

Specified by:
getPageFormat in interface java.awt.print.Pageable

getPrintable

public java.awt.print.Printable getPrintable(int pageIndex)
Implementation of Pageable

Specified by:
getPrintable in interface java.awt.print.Pageable

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pageFormat,
                 int pageIndex)
Implementation of Printable

Specified by:
print in interface java.awt.print.Printable

setPageFormat

private void setPageFormat(java.awt.print.PageFormat pageFormat)