Package javax.print.attribute

Examples of javax.print.attribute.PrintServiceAttribute


        if (!PrintServiceAttribute.class.isAssignableFrom(category)) {
            throw new IllegalArgumentException();
        }
        PrintServiceAttributeSet attributes = getAttributes();
        if (attributes.containsKey(category)) {
            PrintServiceAttribute attribute = (PrintServiceAttribute) attributes
                    .get(category);
            return attribute;
        }
        return null;
    }
View Full Code Here


        if (!PrintServiceAttribute.class.isAssignableFrom(category)) {
            throw new IllegalArgumentException();
        }
        PrintServiceAttributeSet attributes = getAttributes();
        if (attributes.containsKey(category)) {
            PrintServiceAttribute attribute = (PrintServiceAttribute) attributes
                    .get(category);
            return attribute;
        }
        return null;
    }
View Full Code Here

            PrintService printer = null;
            if (services.length > 0) {
                if (UtilValidate.isNotEmpty(printerName)) {
                    String sPrinterName = null;
                    for (int i = 0; i < services.length; i++) {
                        PrintServiceAttribute attr = services[i].getAttribute(PrinterName.class);
                        sPrinterName = ((PrinterName)attr).getValue();
                        if (sPrinterName.toLowerCase().indexOf(printerName.toLowerCase()) >= 0) {
                            printer = services[i];
                            Debug.logInfo("Printer with name [" + sPrinterName +"] selected", module);
                            break;
View Full Code Here

TOP

Related Classes of javax.print.attribute.PrintServiceAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.