javax.print.attribute.standard
Class PrinterResolution

java.lang.Object
  extended by javax.print.attribute.ResolutionSyntax
      extended by javax.print.attribute.standard.PrinterResolution
All Implemented Interfaces:
Serializable, Cloneable, Attribute, DocAttribute, PrintJobAttribute, PrintRequestAttribute

public final class PrinterResolution
extends ResolutionSyntax
implements DocAttribute, PrintJobAttribute, PrintRequestAttribute

The PrinterResolution printing attribute specifies a resolution supported by a print service or to be used by a print job.

IPP Compatibility: PrinterResolution is an IPP 1.1 attribute.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.print.attribute.ResolutionSyntax
DPCM, DPI
 
Constructor Summary
PrinterResolution(int crossFeedResolution, int feedResolution, int units)
          Creates a PrinterResolution object with the given cross feed and feed resolutions.
 
Method Summary
 boolean equals(Object obj)
          Tests if the given object is equal to this object.
 Class<? extends Attribute> getCategory()
          Returns category of this class.
 String getName()
          Returns the name of this attribute.
 
Methods inherited from class javax.print.attribute.ResolutionSyntax
getCrossFeedResolution, getCrossFeedResolutionDphi, getFeedResolution, getFeedResolutionDphi, getResolution, hashCode, lessThanOrEquals, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrinterResolution

public PrinterResolution(int crossFeedResolution,
                         int feedResolution,
                         int units)
Creates a PrinterResolution object with the given cross feed and feed resolutions.

Parameters:
crossFeedResolution - the cross feed resolution
feedResolution - the feed resolution
units - the unit to use (e.g. ResolutionSyntax.DPCM or ResolutionSyntax.DPI)
Throws:
IllegalArgumentException - if either parameter is < 1
Method Detail

equals

public boolean equals(Object obj)
Tests if the given object is equal to this object.

Overrides:
equals in class ResolutionSyntax
Parameters:
obj - the object to test
Returns:
true if both objects are equal, false otherwise.
See Also:
Object.hashCode()

getCategory

public Class<? extends Attribute> getCategory()
Returns category of this class.

Specified by:
getCategory in interface Attribute
Returns:
The class PrinterResolution itself.

getName

public String getName()
Returns the name of this attribute.

Specified by:
getName in interface Attribute
Returns:
The name "printer-resolution".