Serializable
, Cloneable
, Attribute
, DocAttribute
, PrintJobAttribute
, PrintRequestAttribute
public final class PrinterResolution extends ResolutionSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
PrinterResolution
is a printing attribute class that specifies an exact resolution supported by a printer or to be used for a print job. This attribute assumes that printers have a small set of device resolutions at which they can operate rather than a continuum. PrinterResolution
is used in multiple ways:
PrinterResolution
indicating the exact resolution the client wants. Only printers supporting that exact resolution will match the search. PrinterResolution
as an attribute of the Print Job. This will fail if the Print Job doesn't support that exact resolution, and Fidelity
is set to true. PrintQuality
attribute which often controls resolution. IPP Compatibility: The information needed to construct an IPP "printer-resolution"
attribute can be obtained by calling methods on the PrinterResolution object. The category name returned by getName()
gives the IPP attribute name.
DPCM, DPI
Constructor | Description |
---|---|
PrinterResolution |
Construct a new printer resolution attribute from the given items. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Returns whether this printer resolution attribute is equivalent to the passed in object. |
final Class |
getCategory() |
Get the printing attribute class which is to be used as the "category" for this printing attribute value. |
final String |
getName() |
Get the name of the category of which this attribute value is an instance. |
getCrossFeedResolution, getCrossFeedResolutionDphi, getFeedResolution, getFeedResolutionDphi, getResolution, hashCode, lessThanOrEquals, toString, toString
public PrinterResolution(int crossFeedResolution, int feedResolution, int units)
crossFeedResolution
- cross feed direction resolutionfeedResolution
- feed direction resolutionunits
- unit conversion factor, e.g. ResolutionSyntax.DPI
or ResolutionSyntax.DPCM
IllegalArgumentException
- if crossFeedResolution < 1
or feedResolution < 1
or units < 1
public boolean equals(Object object)
object
is not null
. object
is an instance of class PrinterResolution
. object
's cross feed direction resolution. object
's feed direction resolution. equals
in class ResolutionSyntax
object
- Object
to compare totrue
if object
is equivalent to this printer resolution attribute, false
otherwisepublic final Class<? extends Attribute> getCategory()
For class PrinterResolution
, the category is class PrinterResolution
itself.
getCategory
in interface Attribute
java.lang.Class
public final String getName()
For class PrinterResolution
, the category name is "printer-resolution"
.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/print/attribute/standard/PrinterResolution.html