PrinterJob.JobStatus (JavaFX 28)
Description: declaration: module: javafx.graphics, package: javafx.print, class: PrinterJob, enum: JobStatus

# Enum Class PrinterJob.JobStatus

java.lang.Object
java.lang.Enum<PrinterJob.JobStatus>
javafx.print.PrinterJob.JobStatus

All Implemented Interfaces:
  `Serializable, Comparable<PrinterJob.JobStatus>, Constable`

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

- ## Nested Class Summary

  ### Nested classes/interfaces declared in class Enum

  `Enum.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CANCELED`
  The job has been cancelled by the application.
  `DONE`
  The job initiated printing and later called endJob() which reported success.
  `ERROR`
  The job encountered an error.
  `NOT_STARTED`
  The new job status.
  `PRINTING`
  The job has requested to print at least one page, and has not terminated printing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static PrinterJob.JobStatus`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static PrinterJob.JobStatus[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods declared in class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods declared in class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### 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 Details

  - ### values

    public static PrinterJob.JobStatus[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static PrinterJob.JobStatus valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      `NullPointerException` - if the argument is null