Interface IPrintable


public interface IPrintable
Allows to print an item by calling a simple print() method without arguments. The implementation may use the Printable.print(java.awt.Graphics, java.awt.print.PageFormat, int) way or some other solution like iText, JasperReports, or other. \nThe method may be implemented on a swing application as following, if the class implements also the Printable interface: \n public void print(){ \n  PrinterJob pj = PrinterJob.getPrinterJob(); \n  pj.setPrintable(this); \n  if (pj.printDialog()) { \n    pj.defaultPage(); \n    try { \n      pj.print(); \n    } catch (PrinterException e) { \n      LogFactory.getLog(getClass()).error(e.getMessage(),e); \n    } \n  } \n} Provided by the broldev.core.model project.
Since:
1.0 Nov 8, 2010, broldev.core.model 0.1.17 dependency
Version:
1.0 Nov 8, 2010
Author:
Steph GAUDRY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
  • Method Details

    • print

      void print()