de.jaret.util.ui.table
Class JaretTablePrinter

java.lang.Object
  extended by de.jaret.util.ui.table.JaretTablePrinter

public class JaretTablePrinter
extends java.lang.Object

Print utility for the jaret table. The table printer depends on implemented print functionality in the configured renderers. It "connects" directly to the jaret table thus no headless printing is possible.

The Table printer should be disposed after using!

TODO this is a first hack.

Version:
$Id: JaretTablePrinter.java 179 2007-01-07 17:37:50Z olk $
Author:
Peter Kliem

Field Summary
protected  double _borderBottom
           
protected  double _borderLeft
           
protected  double _borderRight
           
protected  double _borderTop
          borders in cm.
protected  int _footerHeight
           
protected  ITableHeaderRenderer _headerRenderer
           
protected  int _pageHeight
           
protected  int _pageWidth
           
protected  org.eclipse.swt.printing.Printer _printer
           
protected  org.eclipse.swt.graphics.Rectangle _printingRect
           
protected  double _scale
           
protected  double _scaleX
           
protected  double _scaleY
           
protected  JaretTable _table
           
 
Constructor Summary
JaretTablePrinter(org.eclipse.swt.printing.Printer printer, JaretTable table)
           
 
Method Summary
 org.eclipse.swt.graphics.Point calculatePageCount(JaretTablePrintConfiguration configuration)
          Calculate the number of pages generated when printing.
 void dispose()
           
 org.eclipse.swt.printing.Printer getPrinter()
           
 double getScaleX()
           
protected  int pixelForCmX(double cm)
           
protected  int pixelForCmY(double cm)
           
 void print(JaretTablePrintConfiguration configuration)
           
 int scaleX(int in)
           
 int scaleY(int in)
           
 void setPrinter(org.eclipse.swt.printing.Printer printer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_borderTop

protected double _borderTop
borders in cm.


_borderBottom

protected double _borderBottom

_borderLeft

protected double _borderLeft

_borderRight

protected double _borderRight

_printingRect

protected org.eclipse.swt.graphics.Rectangle _printingRect

_printer

protected org.eclipse.swt.printing.Printer _printer

_scaleX

protected double _scaleX

_scaleY

protected double _scaleY

_headerRenderer

protected ITableHeaderRenderer _headerRenderer

_table

protected JaretTable _table

_pageHeight

protected int _pageHeight

_pageWidth

protected int _pageWidth

_footerHeight

protected int _footerHeight

_scale

protected double _scale
Constructor Detail

JaretTablePrinter

public JaretTablePrinter(org.eclipse.swt.printing.Printer printer,
                         JaretTable table)
Method Detail

setPrinter

public void setPrinter(org.eclipse.swt.printing.Printer printer)

scaleX

public int scaleX(int in)

getScaleX

public double getScaleX()

scaleY

public int scaleY(int in)

getPrinter

public org.eclipse.swt.printing.Printer getPrinter()

pixelForCmX

protected int pixelForCmX(double cm)

pixelForCmY

protected int pixelForCmY(double cm)

calculatePageCount

public org.eclipse.swt.graphics.Point calculatePageCount(JaretTablePrintConfiguration configuration)
Calculate the number of pages generated when printing.

Parameters:
configuration -
Returns:

print

public void print(JaretTablePrintConfiguration configuration)

dispose

public void dispose()


Copyright © 2012. All Rights Reserved.