Class PrinterTask

  • All Implemented Interfaces:
    Runnable

    public class PrinterTask
    extends Object
    implements Runnable

    The PrinterTask class is responsible for starting a PrinterJob's print function in a new thread. This class assumes that the PrinterJob is pre-configured and ready for its print() method to be called.

    Since:
    2.0
    • Constructor Detail

      • PrinterTask

        public PrinterTask​(PrintHelper printHelper,
                           SwingController controller)
        Create a new instance of a PrinterTask.
        Parameters:
        printHelper - print helper
    • Method Detail

      • run

        public void run()
        Threads Runnable method.
        Specified by:
        run in interface Runnable
      • cancel

        public void cancel()
        Cancel the PrinterTask by calling the PrinterJob's cancel() method.