|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.PageAttributes
Unsafe:
Field Summary | |
private java.awt.PageAttributes.ColorType |
color
|
private java.awt.PageAttributes.MediaType |
media
|
private java.awt.PageAttributes.OrientationRequestedType |
orientationRequested
|
private java.awt.PageAttributes.OriginType |
origin
|
private int[] |
printerResolution
|
private java.awt.PageAttributes.PrintQualityType |
printQuality
|
Constructor Summary | |
PageAttributes()
Enabled: Constructs a PageAttributes instance with default values for every attribute. |
|
PageAttributes(java.awt.PageAttributes.ColorType color,
java.awt.PageAttributes.MediaType media,
java.awt.PageAttributes.OrientationRequestedType orientationRequested,
java.awt.PageAttributes.OriginType origin,
java.awt.PageAttributes.PrintQualityType printQuality,
int[] printerResolution)
Suppressed: Constructs a PageAttributes instance with the specified values for every attribute. |
|
PageAttributes(PageAttributes obj)
Suppressed: Constructs a PageAttributes instance which is a copy of the supplied PageAttributes. |
Method Summary | |
Object |
clone()
Suppressed: Creates and returns a copy of this PageAttributes. |
boolean |
equals(Object obj)
Suppressed: Determines whether two PageAttributes are equal to each other. |
java.awt.PageAttributes.ColorType |
getColor()
Enabled: Returns whether pages using these attributes will be rendered in color or monochrome. |
java.awt.PageAttributes.MediaType |
getMedia()
Enabled: Returns the paper size for pages using these attributes. |
java.awt.PageAttributes.OrientationRequestedType |
getOrientationRequested()
Enabled: Returns the print orientation for pages using these attributes. |
java.awt.PageAttributes.OriginType |
getOrigin()
Enabled: Returns whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area. |
int[] |
getPrinterResolution()
Enabled: Returns the print resolution for pages using these attributes. |
java.awt.PageAttributes.PrintQualityType |
getPrintQuality()
Enabled: Returns the print quality for pages using these attributes. |
int |
hashCode()
Suppressed: Returns a hash code value for this PageAttributes. |
void |
set(PageAttributes obj)
Enabled: Sets all of the attributes of this PageAttributes to the same values as the attributes of obj. |
void |
setColor(java.awt.PageAttributes.ColorType color)
Suppressed: Specifies whether pages using these attributes will be rendered in color or monochrome. |
void |
setMedia(java.awt.PageAttributes.MediaType media)
Suppressed: Specifies the desired paper size for pages using these attributes. |
void |
setMediaToDefault()
Enabled: Sets the paper size for pages using these attributes to the default size for the default locale. |
void |
setOrientationRequested(int orientationRequested)
Enabled: Specifies the print orientation for pages using these attributes. |
void |
setOrientationRequested(java.awt.PageAttributes.OrientationRequestedType orientationRequested)
Suppressed: Specifies the print orientation for pages using these attributes. |
void |
setOrientationRequestedToDefault()
Enabled: Sets the print orientation for pages using these attributes to the default. |
void |
setOrigin(java.awt.PageAttributes.OriginType origin)
Suppressed: Specifies whether drawing at (0, 0) to pages using these attributes draws at the upper-left corner of the physical page, or at the upper-left corner of the printable area. |
void |
setPrinterResolution(int printerResolution)
Enabled: Specifies the desired cross feed and feed print resolutions in dots per inch for pages using these attributes. |
void |
setPrinterResolution(int[] printerResolution)
Enabled: Specifies the desired print resolution for pages using these attributes. |
void |
setPrinterResolutionToDefault()
Enabled: Sets the printer resolution for pages using these attributes to the default. |
void |
setPrintQuality(int printQuality)
Enabled: Specifies the print quality for pages using these attributes. |
void |
setPrintQuality(java.awt.PageAttributes.PrintQualityType printQuality)
Suppressed: Specifies the print quality for pages using these attributes. |
void |
setPrintQualityToDefault()
Enabled: Sets the print quality for pages using these attributes to the default. |
String |
toString()
Suppressed: Returns a string representation of this PageAttributes. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.awt.PageAttributes.ColorType color
private java.awt.PageAttributes.MediaType media
private java.awt.PageAttributes.OrientationRequestedType orientationRequested
private java.awt.PageAttributes.OriginType origin
private java.awt.PageAttributes.PrintQualityType printQuality
private int[] printerResolution
Constructor Detail |
public PageAttributes()
public PageAttributes(PageAttributes obj)
obj
- the PageAttributes to copy.public PageAttributes(java.awt.PageAttributes.ColorType color, java.awt.PageAttributes.MediaType media, java.awt.PageAttributes.OrientationRequestedType orientationRequested, java.awt.PageAttributes.OriginType origin, java.awt.PageAttributes.PrintQualityType printQuality, int[] printerResolution)
color
- ColorType.COLOR or ColorType.MONOCHROME.media
- one of the constant fields of the MediaType class.orientationRequested
- OrientationRequestedType.PORTRAIT or
OrientationRequestedType.LANDSCAPE.origin
- OriginType.PHYSICAL or OriginType.PRINTABLEprintQuality
- PrintQualityType.DRAFT, PrintQualityType.NORMAL,
or PrintQualityType.HIGHprinterResolution
- an integer array of 3 elements. The first
element must be greater than 0. The second element must be
must be greater than 0. The third element must be either
3
or 4
.
IllegalArgumentException
- if one or more of the above
conditions is violated.Method Detail |
public Object clone()
clone
in class Object
java.lang.Cloneable
public void set(PageAttributes obj)
obj
- the PageAttributes to copy.public java.awt.PageAttributes.ColorType getColor()
public void setColor(java.awt.PageAttributes.ColorType color)
color
- ColorType.COLOR or ColorType.MONOCHROME.
IllegalArgumentException
- if color is null.public java.awt.PageAttributes.MediaType getMedia()
public void setMedia(java.awt.PageAttributes.MediaType media)
media
- one of the constant fields of the MediaType class.
IllegalArgumentException
- if media is null.public void setMediaToDefault()
public java.awt.PageAttributes.OrientationRequestedType getOrientationRequested()
public void setOrientationRequested(java.awt.PageAttributes.OrientationRequestedType orientationRequested)
orientationRequested
- OrientationRequestedType.PORTRAIT or
OrientationRequestedType.LANDSCAPE.
IllegalArgumentException
- if orientationRequested is null.public void setOrientationRequested(int orientationRequested)
3
denotes portrait. Specifying 4
denotes landscape. Specifying any other value will generate an
IllegalArgumentException. Not specifying the property is equivalent
to calling setOrientationRequested(OrientationRequestedType.PORTRAIT).
orientationRequested
- 3
or 4
IllegalArgumentException
- if orientationRequested is not
3
or 4
public void setOrientationRequestedToDefault()
public java.awt.PageAttributes.OriginType getOrigin()
public void setOrigin(java.awt.PageAttributes.OriginType origin)
origin
- OriginType.PHYSICAL or OriginType.PRINTABLE
IllegalArgumentException
- if origin is null.public java.awt.PageAttributes.PrintQualityType getPrintQuality()
public void setPrintQuality(java.awt.PageAttributes.PrintQualityType printQuality)
printQuality
- PrintQualityType.DRAFT, PrintQualityType.NORMAL,
or PrintQualityType.HIGH
IllegalArgumentException
- if printQuality is null.public void setPrintQuality(int printQuality)
3
denotes draft. Specifying 4
denotes normal. Specifying 5
denotes high. Specifying
any other value will generate an IllegalArgumentException. Not
specifying the property is equivalent to calling
setPrintQuality(PrintQualityType.NORMAL).
printQuality
- 3
, 4
, or 5
IllegalArgumentException
- if printQuality is not 3
, 4
, or 5
public void setPrintQualityToDefault()
public int[] getPrinterResolution()
3
denotes dots per inch.
4
denotes dots per centimeter.
3
or 4
.public void setPrinterResolution(int[] printerResolution)
3
denotes dots per inch. 4
denotes dots per centimeter. Note that the 1.1 printing implementation
(Toolkit.getPrintJob) requires that the feed and cross feed resolutions
be the same. Not specifying the property is equivalent to calling
setPrinterResolution(72).
printerResolution
- an integer array of 3 elements. The first
element must be greater than 0. The second element must be
must be greater than 0. The third element must be either
3
or 4
.
IllegalArgumentException
- if one or more of the above
conditions is violated.public void setPrinterResolution(int printerResolution)
72
.
printerResolution
- an integer greater than 0.
IllegalArgumentException
- if printerResolution is less than or
equal to 0.public void setPrinterResolutionToDefault()
public boolean equals(Object obj)
Two PageAttributes 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. This means that an aliased media is equal to its underlying unique media. Printer resolutions are equal if and only if the feed resolution, cross feed resolution, and units are equal.
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 |