Example usage for javax.print.event PrintServiceAttributeEvent getPrintService

List of usage examples for javax.print.event PrintServiceAttributeEvent getPrintService

Introduction

In this page you can find the example usage for javax.print.event PrintServiceAttributeEvent getPrintService.

Prototype

public PrintService getPrintService() 

Source Link

Document

Returns the print service.

Usage

From source file:Main.java

public void attributeUpdate(PrintServiceAttributeEvent psae) {
    PrintService service = psae.getPrintService();
    Attribute[] attrs = psae.getAttributes().toArray();
    for (int i = 0; i < attrs.length; i++) {
        String attrName = attrs[i].getName();
        String attrValue = attrs[i].toString();
    }/* www .  j  ava2  s. co m*/
}