- 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 isCANCELED
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 java.lang.Enum
Enum.EnumDesc<E extends Enum<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 type with the specified name.static PrinterJob.JobStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NOT_STARTED
The new job status. May display print dialogs and configure the job and initiate printing. -
PRINTING
The job has requested to print at least one page, and has not terminated printing. May no longer display print dialogs. -
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
The job encountered an error. Job should be discarded. There is no need to call endJob(). -
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
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-