|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.JobAttributes
Unsafe:
Field Summary | |
private int |
copies
|
private java.awt.JobAttributes.DefaultSelectionType |
defaultSelection
|
private java.awt.JobAttributes.DestinationType |
destination
|
private java.awt.JobAttributes.DialogType |
dialog
|
private String |
fileName
|
private int |
fromPage
|
private int |
maxPage
|
private int |
minPage
|
private java.awt.JobAttributes.MultipleDocumentHandlingType |
multipleDocumentHandling
|
private int[][] |
pageRanges
|
private int |
prFirst
|
private String |
printer
|
private int |
prLast
|
private java.awt.JobAttributes.SidesType |
sides
|
private int |
toPage
|
Constructor Summary | |
JobAttributes()
Enabled: Constructs a JobAttributes instance with default
values for every attribute. |
|
JobAttributes(int copies,
java.awt.JobAttributes.DefaultSelectionType defaultSelection,
java.awt.JobAttributes.DestinationType destination,
java.awt.JobAttributes.DialogType dialog,
String fileName,
int maxPage,
int minPage,
java.awt.JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling,
int[][] pageRanges,
String printer,
java.awt.JobAttributes.SidesType sides)
Suppressed: Constructs a JobAttributes instance with the
specified values for every attribute. |
|
JobAttributes(JobAttributes obj)
Enabled: Constructs a JobAttributes instance which is a copy
of the supplied JobAttributes . |
Method Summary | |
Object |
clone()
Suppressed: Creates and returns a copy of this JobAttributes . |
boolean |
equals(Object obj)
Suppressed: Determines whether two JobAttributes are equal to each other. |
int |
getCopies()
Enabled: Returns the number of copies the application should render for jobs using these attributes. |
java.awt.JobAttributes.DefaultSelectionType |
getDefaultSelection()
Enabled: Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges , or the current selection. |
java.awt.JobAttributes.DestinationType |
getDestination()
Enabled: Specifies whether output will be to a printer or a file for jobs using these attributes. |
java.awt.JobAttributes.DialogType |
getDialog()
Enabled: Returns whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed. |
String |
getFileName()
Enabled: Specifies the file name for the output file for jobs using these attributes. |
int |
getFromPage()
Enabled: Returns, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed. |
int |
getMaxPage()
Enabled: Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes. |
int |
getMinPage()
Enabled: Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes. |
java.awt.JobAttributes.MultipleDocumentHandlingType |
getMultipleDocumentHandling()
Enabled: Specifies the handling of multiple copies, including collation, for jobs using these attributes. |
int[][] |
getPageRanges()
Enabled: Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed. |
String |
getPrinter()
Enabled: Returns the destination printer for jobs using these attributes. |
java.awt.JobAttributes.SidesType |
getSides()
Enabled: Returns how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes. |
int |
getToPage()
Enabled: Returns, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed. |
int |
hashCode()
Suppressed: Returns a hash code value for this JobAttributes. |
void |
set(JobAttributes obj)
Enabled: Sets all of the attributes of this JobAttributes to
the same values as the attributes of obj. |
void |
setCopies(int copies)
Enabled: Specifies the number of copies the application should render for jobs using these attributes. |
void |
setCopiesToDefault()
Enabled: Sets the number of copies the application should render for jobs using these attributes to the default. |
void |
setDefaultSelection(java.awt.JobAttributes.DefaultSelectionType defaultSelection)
Suppressed: Specifies whether, for jobs using these attributes, the application should print all pages, the range specified by the return value of getPageRanges , or the current selection. |
void |
setDestination(java.awt.JobAttributes.DestinationType destination)
Suppressed: Specifies whether output will be to a printer or a file for jobs using these attributes. |
void |
setDialog(java.awt.JobAttributes.DialogType dialog)
Suppressed: Specifies whether, for jobs using these attributes, the user should see a print dialog in which to modify the print settings, and which type of print dialog should be displayed. |
void |
setFileName(String fileName)
Suppressed: Specifies the file name for the output file for jobs using these attributes. |
void |
setFromPage(int fromPage)
Enabled: Specifies, for jobs using these attributes, the first page to be printed, if a range of pages is to be printed. |
void |
setMaxPage(int maxPage)
Enabled: Specifies the maximum value the user can specify as the last page to be printed for jobs using these attributes. |
void |
setMinPage(int minPage)
Enabled: Specifies the minimum value the user can specify as the first page to be printed for jobs using these attributes. |
void |
setMultipleDocumentHandling(java.awt.JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling)
Suppressed: Specifies the handling of multiple copies, including collation, for jobs using these attributes. |
void |
setMultipleDocumentHandlingToDefault()
Enabled: Sets the handling of multiple copies, including collation, for jobs using these attributes to the default. |
void |
setPageRanges(int[][] pageRanges)
Enabled: Specifies, for jobs using these attributes, the ranges of pages to be printed, if a range of pages is to be printed. |
void |
setPrinter(String printer)
Suppressed: Specifies the destination printer for jobs using these attributes. |
void |
setSides(java.awt.JobAttributes.SidesType sides)
Suppressed: Specifies how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes. |
void |
setSidesToDefault()
Enabled: Sets how consecutive pages should be imposed upon the sides of the print medium for jobs using these attributes to the default. |
void |
setToPage(int toPage)
Enabled: Specifies, for jobs using these attributes, the last page (inclusive) to be printed, if a range of pages is to be printed. |
String |
toString()
Suppressed: Returns a string representation of this JobAttributes. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private int copies
private java.awt.JobAttributes.DefaultSelectionType defaultSelection
private java.awt.JobAttributes.DestinationType destination
private java.awt.JobAttributes.DialogType dialog
private String fileName
private int fromPage
private int maxPage
private int minPage
private java.awt.JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling
private int[][] pageRanges
private int prFirst
private int prLast
private String printer
private java.awt.JobAttributes.SidesType sides
private int toPage
Constructor Detail |
public JobAttributes()
JobAttributes
instance with default
values for every attribute. The dialog defaults to
DialogType.NATIVE
. Min page defaults to
1
. Max page defaults to Integer.MAX_VALUE
.
Destination defaults to DestinationType.PRINTER
.
Selection defaults to DefaultSelectionType.ALL
.
Number of copies defaults to 1
. Multiple document handling defaults
to MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
.
Sides defaults to SidesType.ONE_SIDED
. File name defaults
to null
.
public JobAttributes(JobAttributes obj)
JobAttributes
instance which is a copy
of the supplied JobAttributes
.
obj
- the JobAttributes
to copypublic JobAttributes(int copies, java.awt.JobAttributes.DefaultSelectionType defaultSelection, java.awt.JobAttributes.DestinationType destination, java.awt.JobAttributes.DialogType dialog, String fileName, int maxPage, int minPage, java.awt.JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling, int[][] pageRanges, String printer, java.awt.JobAttributes.SidesType sides)
JobAttributes
instance with the
specified values for every attribute.
copies
- an integer greater than 0defaultSelection
- DefaultSelectionType.ALL
,
DefaultSelectionType.RANGE
, or
DefaultSelectionType.SELECTION
destination
- DesintationType.FILE
or
DesintationType.PRINTER
dialog
- DialogType.COMMON
,
DialogType.NATIVE
, or
DialogType.NONE
fileName
- the possibly null
file namemaxPage
- an integer greater than zero and greater than or equal
to minPageminPage
- an integer greater than zero and less than or equal
to maxPagemultipleDocumentHandling
- MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES
or
MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
pageRanges
- an array of integer arrays of two elements; an array
is interpreted as a range spanning all pages including and
between the specified pages; ranges must be in ascending
order and must not overlap; specified page numbers cannot be
less than minPage nor greater than maxPage;
for example:
(new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 }, new int[] { 15, 19 } }),specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19. Note that (
new int[][] { new int[] { 1, 1 }, new int[] { 1, 2 } }
),
is an invalid set of page ranges because the two ranges
overlapprinter
- the possibly null
printer namesides
- SidesType.ONE_SIDED
,
SidesType.TWO_SIDED_LONG_EDGE
, or
SidesType.TWO_SIDED_SHORT_EDGE
IllegalArgumentException
- if one or more of the above
conditions is violatedMethod Detail |
public Object clone()
JobAttributes
.
clone
in class Object
JobAttributes
java.lang.Cloneable
public void set(JobAttributes obj)
JobAttributes
to
the same values as the attributes of obj.
obj
- the JobAttributes
to copypublic int getCopies()
public void setCopies(int copies)
1
.
copies
- an integer greater than 0
IllegalArgumentException
- if copies
is less than
or equal to 0public void setCopiesToDefault()
public java.awt.JobAttributes.DefaultSelectionType getDefaultSelection()
getPageRanges
, or the current selection. This attribute
is updated to the value chosen by the user.
public void setDefaultSelection(java.awt.JobAttributes.DefaultSelectionType defaultSelection)
getPageRanges
, or the current selection. Not specifying
this attribute is equivalent to specifying DefaultSelectionType.ALL.
defaultSelection
- DefaultSelectionType.ALL,
DefaultSelectionType.RANGE, or DefaultSelectionType.SELECTION.
IllegalArgumentException
- if defaultSelection is null
public java.awt.JobAttributes.DestinationType getDestination()
public void setDestination(java.awt.JobAttributes.DestinationType destination)
destination
- DesintationType.FILE or DesintationType.PRINTER.
IllegalArgumentException
- if destination is null.public java.awt.JobAttributes.DialogType getDialog()
DialogType.COMMON
, DialogType.NATIVE
, or
DialogType.NONE
public void setDialog(java.awt.JobAttributes.DialogType dialog)
dialog
- DialogType.COMMON, DialogType.NATIVE, or
DialogType.NONE.
IllegalArgumentException
- if dialog is null.public String getFileName()
null
file namepublic void setFileName(String fileName)
fileName
- the possibly null file name.public int getFromPage()
getDefaultSelection
method is DefaultSelectionType.RANGE. An
application should honor the return value of getPageRanges
over the return value of this method, if possible.
public void setFromPage(int fromPage)
fromPage
- an integer greater than zero and less than or equal to
toPage and greater than or equal to minPage and
less than or equal to maxPage.
IllegalArgumentException
- if one or more of the above
conditions is violated.public int getMaxPage()
public void setMaxPage(int maxPage)
Integer.MAX_VALUE
.
maxPage
- an integer greater than zero and greater than or equal
to minPage
IllegalArgumentException
- if one or more of the above
conditions is violatedpublic int getMinPage()
public void setMinPage(int minPage)
1
.
minPage
- an integer greater than zero and less than or equal
to maxPage.
IllegalArgumentException
- if one or more of the above
conditions is violated.public java.awt.JobAttributes.MultipleDocumentHandlingType getMultipleDocumentHandling()
public void setMultipleDocumentHandling(java.awt.JobAttributes.MultipleDocumentHandlingType multipleDocumentHandling)
multipleDocumentHandling
- MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_COLLATED_COPIES or
MultipleDocumentHandlingType.SEPARATE_DOCUMENTS_UNCOLLATED_COPIES.
IllegalArgumentException
- if multipleDocumentHandling is null.public void setMultipleDocumentHandlingToDefault()
public int[][] getPageRanges()
getDefaultSelection
method is
DefaultSelectionType.RANGE.
public void setPageRanges(int[][] pageRanges)
pageRanges
- an array of integer arrays of 2 elements. An array
is interpreted as a range spanning all pages including and
between the specified pages. Ranges must be in ascending
order and must not overlap. Specified page numbers cannot be
less than minPage nor greater than maxPage.
For example:
(new int[][] { new int[] { 1, 3 }, new int[] { 5, 5 },
new int[] { 15, 19 } }),
specifies pages 1, 2, 3, 5, 15, 16, 17, 18, and 19. Note that
(new int[][] { new int[] { 1, 1 }, new int[] { 1, 2 } }),
is an invalid set of page ranges because the two ranges
overlap.
IllegalArgumentException
- if one or more of the above
conditions is violated.public String getPrinter()
public void setPrinter(String printer)
printer
- the possibly null printer name.public java.awt.JobAttributes.SidesType getSides()
public void setSides(java.awt.JobAttributes.SidesType sides)
sides
- SidesType.ONE_SIDED, SidesType.TWO_SIDED_LONG_EDGE, or
SidesType.TWO_SIDED_SHORT_EDGE.
IllegalArgumentException
- if sides is null.public void setSidesToDefault()
public int getToPage()
getDefaultSelection
method is DefaultSelectionType.RANGE. An
application should honor the return value of getPageRanges
over the return value of this method, if possible.
public void setToPage(int toPage)
toPage
- an integer greater than zero and greater than or equal
to fromPage and greater than or equal to minPage
and less than or equal to maxPage.
IllegalArgumentException
- if one or more of the above
conditions is violated.public boolean equals(Object obj)
Two JobAttributes are equal if and only if each of their attributes are equal. Attributes of enumeration type are equal if and only if the fields refer to the same unique enumeration object. A set of page ranges is equal if and only if the sets are of equal length, each range enumerates the same pages, and the ranges are in the same order.
equals
in class Object
obj
- the object whose equality will be checked.
Object.hashCode()
,
java.util.Hashtable
public int hashCode()
hashCode
in class Object
java.lang.Object#equals(java.lang.Object)
,
java.util.Hashtable
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |