use of javax.print.attribute.HashPrintServiceAttributeSet in project jdk8u_jdk by JetBrains.
the class UnixPrintService method getAIXServiceAttributes.
private PrintServiceAttributeSet getAIXServiceAttributes() {
PrintServiceAttributeSet attrs = new HashPrintServiceAttributeSet();
attrs.add(getQueuedJobCountAIX());
attrs.add(getPrinterIsAcceptingJobsAIX());
return attrs;
}
use of javax.print.attribute.HashPrintServiceAttributeSet in project jdk8u_jdk by JetBrains.
the class UnixPrintService method getAttributes.
public PrintServiceAttributeSet getAttributes() {
PrintServiceAttributeSet attrs = new HashPrintServiceAttributeSet();
attrs.add(getPrinterName());
attrs.add(getPrinterIsAcceptingJobs());
PrinterState prnState = getPrinterState();
if (prnState != null) {
attrs.add(prnState);
}
PrinterStateReasons prnStateReasons = getPrinterStateReasons();
if (prnStateReasons != null) {
attrs.add(prnStateReasons);
}
attrs.add(getQueuedJobCount());
return AttributeSetUtilities.unmodifiableView(attrs);
}
use of javax.print.attribute.HashPrintServiceAttributeSet in project jdk8u_jdk by JetBrains.
the class UnixPrintService method getBSDServiceAttributes.
private PrintServiceAttributeSet getBSDServiceAttributes() {
PrintServiceAttributeSet attrs = new HashPrintServiceAttributeSet();
attrs.add(getQueuedJobCountBSD());
attrs.add(getPrinterIsAcceptingJobsBSD());
return attrs;
}
use of javax.print.attribute.HashPrintServiceAttributeSet in project jdk8u_jdk by JetBrains.
the class Win32MediaSize method getAttributes.
public PrintServiceAttributeSet getAttributes() {
PrintServiceAttributeSet attrs = new HashPrintServiceAttributeSet();
attrs.add(getPrinterName());
attrs.add(getPrinterIsAcceptingJobs());
PrinterState prnState = getPrinterState();
if (prnState != null) {
attrs.add(prnState);
}
PrinterStateReasons prnStateReasons = getPrinterStateReasons();
if (prnStateReasons != null) {
attrs.add(prnStateReasons);
}
attrs.add(getQueuedJobCount());
int caps = getPrinterCapabilities();
if ((caps & DEVCAP_COLOR) != 0) {
attrs.add(ColorSupported.SUPPORTED);
} else {
attrs.add(ColorSupported.NOT_SUPPORTED);
}
return AttributeSetUtilities.unmodifiableView(attrs);
}
use of javax.print.attribute.HashPrintServiceAttributeSet in project jdk8u_jdk by JetBrains.
the class Win32MediaSize method getUpdatedAttributes.
public PrintServiceAttributeSet getUpdatedAttributes() {
PrintServiceAttributeSet currSet = getDynamicAttributes();
if (lastSet == null) {
lastSet = currSet;
return AttributeSetUtilities.unmodifiableView(currSet);
} else {
PrintServiceAttributeSet updates = new HashPrintServiceAttributeSet();
Attribute[] attrs = currSet.toArray();
for (int i = 0; i < attrs.length; i++) {
Attribute attr = attrs[i];
if (!lastSet.containsValue(attr)) {
updates.add(attr);
}
}
lastSet = currSet;
return AttributeSetUtilities.unmodifiableView(updates);
}
}
Aggregations