Modifier and Type | Field and Description |
---|---|
private static int | |
private static final MediaSizeName[] | |
private static final Class |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | addPrintServiceAttributeListener(PrintServiceAttributeListener
a PrintServiceAttributeListener, which monitors the
status of a print service listener)Implements javax. PrintService .
|
public DocPrintJob | createPrintJob()
Implements javax. PrintJob capable of handling data from any
of the supported document flavors.
|
public boolean | equals(Object
the reference object with which to compare obj)Overrides java. Implements javax. |
public <T extends PrintServiceAttribute> T | getAttribute(Class<T>
the category of a category)PrintServiceAttribute
supported by this service - may not be null Implements javax. |
public PrintServiceAttributeSet | getAttributes()
Implements javax. |
public Object | getDefaultAttributeValue(Class<? extends Attribute> category)
Implements javax. |
public String | getName()
Implements javax. |
public String | getOutputFormat()
Implements abstract javax. |
public ServiceUIFactory | getServiceUIFactory()
Implements javax. |
public Class | getSupportedAttributeCategories()
Implements javax. |
public Object | getSupportedAttributeValues(Class<? extends Attribute> category, DocFlavor
doc flavor for a supposed job, or flavor, AttributeSet null set of printing attributes for a supposed job (both
job-level attributes and document-level attributes), or
attributes)null Implements javax. |
public DocFlavor[] | getSupportedDocFlavors()
Implements javax. PrintService .
|
public AttributeSet | getUnsupportedAttributes(DocFlavor
doc flavor to test, or flavor, AttributeSet null set of printing attributes for a supposed job (both
job-level attributes and document-level attributes), or
attributes)null Implements javax. DocFlavor .
|
public int | hashCode()
Overrides java. Implements javax. equals(Object) .
|
public boolean | isAttributeCategorySupported(Class<? extends Attribute>
printing attribute category to test. It must be a
category)Class that implements interface
Attribute .Implements javax. |
public boolean | isAttributeValueSupported(Attribute
printing attribute value to test attr, DocFlavor doc flavor for a supposed job, or flavor, AttributeSet null set of printing attributes for a supposed job (both
job-level attributes and document-level attributes), or
attributes)null Implements javax. |
public boolean | isDocFlavorSupported(DocFlavor
the flavor)DocFlavor to query for supportImplements javax. DocFlavor .
|
private boolean | |
private boolean | |
public void | removePrintServiceAttributeListener(PrintServiceAttributeListener
a listener)PrintServiceAttributeListener objectImplements javax. |
public String | |
public boolean | usesClass(Class<?> c)
Implements sun. |
MAXCOPIES | back to summary |
---|---|
private static int MAXCOPIES |
mediaSizes | back to summary |
---|---|
private static final MediaSizeName[] mediaSizes |
suppAttrCats | back to summary |
---|---|
private static final Class<?>[] suppAttrCats |
PSStreamPrintService | back to summary |
---|---|
public PSStreamPrintService(OutputStream out) |
addPrintServiceAttributeListener | back to summary |
---|---|
public void addPrintServiceAttributeListener(PrintServiceAttributeListener listener) Implements javax. Doc from javax. Registers a listener for events on this
|
createPrintJob | back to summary |
---|---|
public DocPrintJob createPrintJob() Implements javax. Doc from javax. Creates and returns a
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Overrides java. Implements javax. Doc from javax. Determines if two services are referring to the same underlying service. Objects encapsulating a print service may not exhibit equality of reference even though they refer to the same underlying service. Clients should call this method to determine if two services are referring to the same underlying service.
Services must implement this method and return
|
getAttribute | back to summary |
---|---|
public <T extends PrintServiceAttribute> T getAttribute(Class<T> category) Implements javax. Doc from javax. Gets the value of the single specified service attribute. This may be useful to clients which only need the value of one attribute and want to minimize overhead.
|
getAttributes | back to summary |
---|---|
public PrintServiceAttributeSet getAttributes() Implements javax. Doc from javax. Obtains this print service's set of printer description attributes giving
this Print Service's status. The returned attribute set object is
unmodifiable. The returned attribute set object is a "snapshot" of this
Print Service's attribute set at the time of the
|
getDefaultAttributeValue | back to summary |
---|---|
public Object getDefaultAttributeValue(Class<? extends Attribute> category) Implements javax. Doc from javax. Determines this print service's default printing attribute value in the
given category. A printing attribute value is an instance of a class that
implements interface
Some attributes may not be supported in a particular context (ie for a
particular
Not all attributes have a default value. For example the service will not
have a default value for
|
getName | back to summary |
---|---|
public String getName() Implements javax. Doc from javax. Returns a string name for this print service which may be used by
applications to request a particular print service. In a suitable
context, such as a name service, this name must be unique. In some
environments this unique name may be the same as the user friendly
printer name defined as the
|
getOutputFormat | back to summary |
---|---|
public String getOutputFormat() Implements abstract javax. Doc from javax. Returns the document format emitted by this print service. Must be in
mimetype format, compatible with the mime type components of
|
getServiceUIFactory | back to summary |
---|---|
public ServiceUIFactory getServiceUIFactory() Implements javax. Doc from javax. Returns a factory for UI components which allow users to interact with
the service in various roles. Services which do not provide any UI should
return
|
getSupportedAttributeCategories | back to summary |
---|---|
public Class Implements javax. Doc from javax. Determines the printing attribute categories a client can specify when
setting up a job for this print service. A printing attribute category is
designated by a
This method returns all the printing attribute categories this print
service supports for any possible job. Some categories may not be
supported in a particular context (ie for a particular
|
getSupportedAttributeValues | back to summary |
---|---|
public Object getSupportedAttributeValues(Class<? extends Attribute> category, DocFlavor flavor, AttributeSet attributes) Implements javax. Doc from javax. Determines the printing attribute values a client can specify in the
given category when setting up a job for this print service. A printing
attribute value is an instance of a class that implements interface
If
If the
This method returns an
|
getSupportedDocFlavors | back to summary |
---|---|
public DocFlavor[] getSupportedDocFlavors() Implements javax. Doc from javax. Determines the print data formats a client can specify when setting up a
job for this
Note that some doc flavors may not be supported in combination with all
attributes. Use
|
getUnsupportedAttributes | back to summary |
---|---|
public AttributeSet getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes) Implements javax. Doc from javax. Identifies the attributes that are unsupported for a print request in the
context of a particular
If the return value is
A supported print request can then be created by removing all unsupported
attributes from the original attribute set, except in the case that the
If any attributes are unsupported only because they are in conflict with other attributes then it is at the discretion of the service to select the attribute(s) to be identified as the cause of the conflict.
Use
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Implements javax. Doc from javax. This method should be implemented consistently with
|
isAttributeCategorySupported | back to summary |
---|---|
public boolean isAttributeCategorySupported(Class<? extends Attribute> category) Implements javax. Doc from javax. Determines whether a client can specify the given printing attribute
category when setting up a job for this print service. A printing
attribute category is designated by a
Some categories may not be supported in a particular context (ie for a
particular
This is a convenience method to determine if the category would be a
member of the result of |
isAttributeValueSupported | back to summary |
---|---|
public boolean isAttributeValueSupported(Attribute attr, DocFlavor flavor, AttributeSet attributes) Implements javax. Doc from javax. Determines whether a client can specify the given printing attribute
value when setting up a job for this Print Service. A printing attribute
value is an instance of a class that implements interface
If
Also if
This is a convenience method to determine if the value would be a member
of the result of
|
isDocFlavorSupported | back to summary |
---|---|
public boolean isDocFlavorSupported(DocFlavor flavor) Implements javax. Doc from javax. Determines if this print service supports a specific
Note that some doc flavors may not be supported in combination with all
attributes. Use
|
isSupportedCopies | back to summary |
---|---|
private boolean isSupportedCopies(Copies copies) |
isSupportedMedia | back to summary |
---|---|
private boolean isSupportedMedia(MediaSizeName msn) |
removePrintServiceAttributeListener | back to summary |
---|---|
public void removePrintServiceAttributeListener(PrintServiceAttributeListener listener) Implements javax. Doc from javax. Removes the print-service listener from this print service. This means
the listener is no longer interested in
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object.
|
usesClass | back to summary |
---|---|
public boolean usesClass(Class<?> c) Implements sun. Doc from sun. This returns true if this service is implemented using the platform's built-in subclass of PrinterJob. ie the same class as the caller. |