Package javafx.print

Enum PrinterJob.JobStatus

  • All Implemented Interfaces:
    Serializable, Comparable<PrinterJob.JobStatus>
    Enclosing class:
    PrinterJob


    public static enum PrinterJob.JobStatus
    extends Enum<PrinterJob.JobStatus>
    An enum class used in reporting status of a print job. Applications can listen to the job status via the jobStatus property, or may query it directly using getJobStatus().

    The typical life cycle of a job is as follows :

    • job will be created with status NOT_STARTED and will stay there during configuration via dialogs etc.
    • job will enter state PRINTING when the first page is printed.
    • job will enter state DONE once the job is successfully completed without being cancelled or encountering an error. The job is now completed.
    • A job that encounters an ERROR or is CANCELED is also considered completed.

    A job may not revert to an earlier status in its life cycle and the current job state affects operations that may be performed. For example a job may not begin printing again if it has previously passed that state and entered any of the termination states.

    Since:
    JavaFX 8.0
    • Enum Constant Detail

      • NOT_STARTED

        public static final PrinterJob.JobStatus NOT_STARTED
        The new job status. May display print dialogs and configure the job and initiate printing.
      • PRINTING

        public static final PrinterJob.JobStatus PRINTING
        The job has requested to print at least one page, and has not terminated printing. May no longer display print dialogs.
      • CANCELED

        public static final PrinterJob.JobStatus CANCELED
        The job has been cancelled by the application. May not display dialogs or initiate printing. Job should be discarded. There is no need to call endJob().
      • ERROR

        public static final PrinterJob.JobStatus ERROR
        The job encountered an error. Job should be discarded. There is no need to call endJob().
      • DONE

        public static final PrinterJob.JobStatus DONE
        The job initiated printing and later called endJob() which reported success. The job can be discarded as it cannot be re-used.
    • Method Detail

      • values

        public static PrinterJob.JobStatus[] values​()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PrinterJob.JobStatus c : PrinterJob.JobStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PrinterJob.JobStatus valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null