Example usage for javax.print.event PrintServiceAttributeEvent getAttributes

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

Introduction

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

Prototype

public PrintServiceAttributeSet getAttributes() 

Source Link

Document

Determine the printing service attributes that changed and their new values.

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();
    }//w  w w.j av  a2  s  .  c  om
}